blob: ed5577995e79029cdbe940f0e9d4206798040a66 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussorene3da75a2010-02-11 13:38:58 +00002# From configure.in Revision: 78152 .
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
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000718PKG_CONFIG
719LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001135# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001161 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 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001226 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001252\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001313 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001320 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Optional Packages:
1332 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1333 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001334 --with-universal-archs=ARCH
1335 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001336 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001337 --with-framework-name=FRAMEWORK
1338 specify an alternate name of the framework built
1339 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001340 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001341 --with-cxx-main=<compiler>
1342 compile main() and link python executable with C++
1343 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --with-suffix=.exe set executable suffix
1345 --with-pydebug build with Py_DEBUG defined
1346 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001347 --with-system-expat build pyexpat module using an installed expat
1348 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001363 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001368 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001369 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1370 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandle2e15612009-05-20 18:25:10 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001446python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001460It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$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 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# 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 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001602 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705shift
1706for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$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 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Benjamin Petersond23f8222009-04-05 19:13:16 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001834VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001889{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1890echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001891# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001892if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001893 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001894 case $enableval in
1895 yes)
1896 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001897 if test ! -d "${enableval}"
1898 then
1899 enableval=/
1900 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901 ;;
1902 esac
1903 case $enableval in
1904 no)
1905 UNIVERSALSDK=
1906 enable_universalsdk=
1907 ;;
1908 *)
1909 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001910 if test ! -d "${UNIVERSALSDK}"
1911 then
1912 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1913echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1914 { (exit 1); exit 1; }; }
1915 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001916 ;;
1917 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001918
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001919
Thomas Wouters477c8d52006-05-27 19:21:47 +00001920else
1921
1922 UNIVERSALSDK=
1923 enable_universalsdk=
1924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001925fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001926
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001927if test -n "${UNIVERSALSDK}"
1928then
1929 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1930echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1931else
1932 { echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6; }
1934fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001936
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001937
1938
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001939UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001940
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001941{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1942echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943
1944# Check whether --with-universal-archs was given.
1945if test "${with_universal_archs+set}" = set; then
1946 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001947 { echo "$as_me:$LINENO: result: $withval" >&5
1948echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949 UNIVERSAL_ARCHS="$withval"
1950
1951else
1952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001953 { echo "$as_me:$LINENO: result: 32-bit" >&5
1954echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001955
1956fi
1957
1958
1959
1960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001961
1962# Check whether --with-framework-name was given.
1963if test "${with_framework_name+set}" = set; then
1964 withval=$with_framework_name;
1965 PYTHONFRAMEWORK=${withval}
1966 PYTHONFRAMEWORKDIR=${withval}.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1968
1969else
1970
1971 PYTHONFRAMEWORK=Python
1972 PYTHONFRAMEWORKDIR=Python.framework
1973 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1974
1975fi
1976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001978if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001979 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001980 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001981 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001982 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001983 esac
1984 case $enableval in
1985 no)
1986 PYTHONFRAMEWORK=
1987 PYTHONFRAMEWORKDIR=no-framework
1988 PYTHONFRAMEWORKPREFIX=
1989 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001990 FRAMEWORKINSTALLFIRST=
1991 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001992 FRAMEWORKALTINSTALLFIRST=
1993 FRAMEWORKALTINSTALLLAST=
1994 if test "x${prefix}" = "xNONE"; then
1995 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1996 else
1997 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1998 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001999 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002000 ;;
2001 *)
2002 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002004 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002005 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002046fi
2047
Thomas Wouters477c8d52006-05-27 19:21:47 +00002048
2049
Michael W. Hudson54241132001-12-07 15:38:26 +00002050
2051
2052
2053
Jack Jansene578a632001-08-15 01:27:14 +00002054
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002055
2056
2057
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002058
Jack Jansene578a632001-08-15 01:27:14 +00002059##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002060## AC_HELP_STRING(--with-dyld,
2061## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002062##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063# Set name for machine-dependent library files
2064
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002065{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2066echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002067if test -z "$MACHDEP"
2068then
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002070 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002071 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002073 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002075 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002076 ac_md_system=`echo $ac_sys_system |
2077 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2078 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002079 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002080 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002081
Guido van Rossum07397971997-04-29 21:49:50 +00002082 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002083 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002084 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002085 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002086 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002087 esac
2088fi
Guido van Rossum91922671997-10-09 20:24:13 +00002089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002090# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2091# disable features if it is defined, without any means to access these
2092# features as extensions. For these systems, we skip the definition of
2093# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2094# some feature, make sure there is no alternative way to access this
2095# feature. Also, when using wildcards, make sure you have verified the
2096# need for not defining _XOPEN_SOURCE on all systems matching the
2097# wildcard, and that the wildcard does not include future systems
2098# (which may remove their limitations).
2099case $ac_sys_system/$ac_sys_release in
2100 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2101 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002102 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002103 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002104 define_xopen_source=no
2105 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2106 # also defined. This can be overridden by defining _BSD_SOURCE
2107 # As this has a different meaning on Linux, only define it on OpenBSD
2108
2109cat >>confdefs.h <<\_ACEOF
2110#define _BSD_SOURCE 1
2111_ACEOF
2112
2113 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002114 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2115 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2116 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002117 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 +00002118 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002119 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2120 # of union __?sigval. Reported by Stuart Bishop.
2121 SunOS/5.6)
2122 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002123 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2124 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002125 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002126 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002127 define_xopen_source=no;;
2128 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002129 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002130 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002131 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002132 # On FreeBSD 4, the math functions C89 does not cover are never defined
2133 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2134 FreeBSD/4.*)
2135 define_xopen_source=no;;
2136 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2137 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2138 # identifies itself as Darwin/7.*
2139 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2140 # disables platform specific features beyond repair.
2141 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2142 # has no effect, don't bother defining them
2143 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002144 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002145 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2146 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2147 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002148 AIX/4)
2149 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002150 AIX/5)
2151 if test `uname -r` -eq 1; then
2152 define_xopen_source=no
2153 fi
2154 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002155 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2156 # defining NI_NUMERICHOST.
2157 QNX/6.3.2)
2158 define_xopen_source=no
2159 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002160
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002161esac
2162
2163if test $define_xopen_source = yes
2164then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002165 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2166 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002167 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2168 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002170 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002171
2172cat >>confdefs.h <<\_ACEOF
2173#define _XOPEN_SOURCE 500
2174_ACEOF
2175
2176 ;;
2177 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002178
2179cat >>confdefs.h <<\_ACEOF
2180#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002181_ACEOF
2182
Skip Montanarof0d5f792004-08-15 14:08:23 +00002183 ;;
2184 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002185
2186 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2187 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2188 # several APIs are not declared. Since this is also needed in some
2189 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002190 # except for Solaris 10, where it must not be defined,
2191 # as it implies XPG4.2
2192 case $ac_sys_system/$ac_sys_release in
2193 SunOS/5.10)
2194 ;;
2195 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002196
2197cat >>confdefs.h <<\_ACEOF
2198#define _XOPEN_SOURCE_EXTENDED 1
2199_ACEOF
2200
Martin v. Löwis7dece662005-11-26 11:38:24 +00002201 ;;
2202 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002203
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002204
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002205cat >>confdefs.h <<\_ACEOF
2206#define _POSIX_C_SOURCE 200112L
2207_ACEOF
2208
2209
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002210fi
2211
Guido van Rossum91922671997-10-09 20:24:13 +00002212#
2213# SGI compilers allow the specification of the both the ABI and the
2214# ISA on the command line. Depending on the values of these switches,
2215# different and often incompatable code will be generated.
2216#
2217# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2218# thus supply support for various ABI/ISA combinations. The MACHDEP
2219# variable is also adjusted.
2220#
2221
2222if test ! -z "$SGI_ABI"
2223then
2224 CC="cc $SGI_ABI"
2225 LDFLAGS="$SGI_ABI $LDFLAGS"
2226 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2227fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002228{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2229echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002230
Jack Jansen6b08a402004-06-03 12:41:45 +00002231# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2232# it may influence the way we can build extensions, so distutils
2233# needs to check it
2234
Thomas Wouters477c8d52006-05-27 19:21:47 +00002235
Jack Jansen6b08a402004-06-03 12:41:45 +00002236CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002237EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002238
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002239{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2240echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002241ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002242{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2243echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002244
Guido van Rossum627b2d71993-12-24 10:39:16 +00002245# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002246
2247# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2248# for debug/optimization stuff. BASECFLAGS is for flags that are required
2249# just to get things to compile and link. Users are free to override OPT
2250# when running configure or make. The build should not break if they do.
2251# BASECFLAGS should generally not be messed with, however.
2252
2253# XXX shouldn't some/most/all of this code be merged with the stuff later
2254# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002255{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2256echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002258# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002259if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002260 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002261 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002262 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002263 without_gcc=yes;;
2264 yes) CC=gcc
2265 without_gcc=no;;
2266 *) CC=$withval
2267 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002268 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002269else
Martin v. Löwis11437992002-04-12 09:54:03 +00002270
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002271 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002272 AIX*) CC=cc_r
2273 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002274 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002275 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002276fi
2277
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002278{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2279echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002280
Guido van Rossum8b131c51995-03-09 14:10:13 +00002281# If the user switches compilers, we can't believe the cache
2282if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2283then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002284 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002285(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002286echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002287(it is also a good idea to do 'make clean' before compiling)" >&2;}
2288 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002289fi
2290
Martin v. Löwis11437992002-04-12 09:54:03 +00002291ac_ext=c
2292ac_cpp='$CPP $CPPFLAGS'
2293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2295ac_compiler_gnu=$ac_cv_c_compiler_gnu
2296if test -n "$ac_tool_prefix"; then
2297 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2298set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002299{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002301if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002303else
2304 if test -n "$CC"; then
2305 ac_cv_prog_CC="$CC" # Let the user override the test.
2306else
Martin v. Löwis11437992002-04-12 09:54:03 +00002307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2308for as_dir in $PATH
2309do
2310 IFS=$as_save_IFS
2311 test -z "$as_dir" && as_dir=.
2312 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002313 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 +00002314 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 break 2
2317 fi
2318done
2319done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002320IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002321
Jack Jansendd19cf82001-12-06 22:36:17 +00002322fi
2323fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002324CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002325if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002326 { echo "$as_me:$LINENO: result: $CC" >&5
2327echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002328else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002329 { echo "$as_me:$LINENO: result: no" >&5
2330echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002331fi
2332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002333
Martin v. Löwis11437992002-04-12 09:54:03 +00002334fi
2335if test -z "$ac_cv_prog_CC"; then
2336 ac_ct_CC=$CC
2337 # Extract the first word of "gcc", so it can be a program name with args.
2338set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002339{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2340echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002341if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002342 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002343else
2344 if test -n "$ac_ct_CC"; then
2345 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2346else
2347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2348for as_dir in $PATH
2349do
2350 IFS=$as_save_IFS
2351 test -z "$as_dir" && as_dir=.
2352 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002353 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 +00002354 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002356 break 2
2357 fi
2358done
2359done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002361
2362fi
2363fi
2364ac_ct_CC=$ac_cv_prog_ac_ct_CC
2365if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002366 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2367echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002369 { echo "$as_me:$LINENO: result: no" >&5
2370echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002373 if test "x$ac_ct_CC" = x; then
2374 CC=""
2375 else
2376 case $cross_compiling:$ac_tool_warned in
2377yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002378{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2379whose name does not start with the host triplet. If you think this
2380configuration is useful to you, please write to autoconf@gnu.org." >&5
2381echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2382whose name does not start with the host triplet. If you think this
2383configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384ac_tool_warned=yes ;;
2385esac
2386 CC=$ac_ct_CC
2387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002388else
2389 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002390fi
2391
Jack Jansendd19cf82001-12-06 22:36:17 +00002392if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393 if test -n "$ac_tool_prefix"; then
2394 # 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 +00002395set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002396{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2397echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002398if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002399 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002400else
2401 if test -n "$CC"; then
2402 ac_cv_prog_CC="$CC" # Let the user override the test.
2403else
Martin v. Löwis11437992002-04-12 09:54:03 +00002404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2405for as_dir in $PATH
2406do
2407 IFS=$as_save_IFS
2408 test -z "$as_dir" && as_dir=.
2409 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410 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 +00002411 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002412 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002413 break 2
2414 fi
2415done
2416done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002417IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002418
2419fi
2420fi
2421CC=$ac_cv_prog_CC
2422if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002423 { echo "$as_me:$LINENO: result: $CC" >&5
2424echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002426 { echo "$as_me:$LINENO: result: no" >&5
2427echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002428fi
2429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002432fi
2433if test -z "$CC"; then
2434 # Extract the first word of "cc", so it can be a program name with args.
2435set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002436{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002438if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002439 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002440else
2441 if test -n "$CC"; then
2442 ac_cv_prog_CC="$CC" # Let the user override the test.
2443else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002444 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2446for as_dir in $PATH
2447do
2448 IFS=$as_save_IFS
2449 test -z "$as_dir" && as_dir=.
2450 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451 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 +00002452 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2453 ac_prog_rejected=yes
2454 continue
2455 fi
2456 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002457 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 break 2
2459 fi
2460done
2461done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002463
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002464if test $ac_prog_rejected = yes; then
2465 # We found a bogon in the path, so make sure we never use it.
2466 set dummy $ac_cv_prog_CC
2467 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469 # We chose a different compiler from the bogus one.
2470 # However, it has the same basename, so the bogon will be chosen
2471 # first if we set CC to just the basename; use the full file name.
2472 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002474 fi
2475fi
2476fi
2477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002478CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002479if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002480 { echo "$as_me:$LINENO: result: $CC" >&5
2481echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002482else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002483 { echo "$as_me:$LINENO: result: no" >&5
2484echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002485fi
2486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487
Martin v. Löwis11437992002-04-12 09:54:03 +00002488fi
2489if test -z "$CC"; then
2490 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 do
2493 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2494set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002495{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2496echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002497if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002498 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002499else
2500 if test -n "$CC"; then
2501 ac_cv_prog_CC="$CC" # Let the user override the test.
2502else
Martin v. Löwis11437992002-04-12 09:54:03 +00002503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2504for as_dir in $PATH
2505do
2506 IFS=$as_save_IFS
2507 test -z "$as_dir" && as_dir=.
2508 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 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 +00002510 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002511 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002513 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002514done
2515done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002517
2518fi
2519fi
2520CC=$ac_cv_prog_CC
2521if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002522 { echo "$as_me:$LINENO: result: $CC" >&5
2523echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002525 { echo "$as_me:$LINENO: result: no" >&5
2526echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002527fi
2528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 test -n "$CC" && break
2531 done
2532fi
2533if test -z "$CC"; then
2534 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002536do
2537 # Extract the first word of "$ac_prog", so it can be a program name with args.
2538set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002539{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002541if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002542 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002543else
2544 if test -n "$ac_ct_CC"; then
2545 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2546else
2547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2548for as_dir in $PATH
2549do
2550 IFS=$as_save_IFS
2551 test -z "$as_dir" && as_dir=.
2552 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 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 +00002554 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002555 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 break 2
2557 fi
2558done
2559done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562fi
2563fi
2564ac_ct_CC=$ac_cv_prog_ac_ct_CC
2565if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002566 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2567echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002568else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002569 { echo "$as_me:$LINENO: result: no" >&5
2570echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002571fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 test -n "$ac_ct_CC" && break
2575done
Michael W. Hudson54241132001-12-07 15:38:26 +00002576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577 if test "x$ac_ct_CC" = x; then
2578 CC=""
2579 else
2580 case $cross_compiling:$ac_tool_warned in
2581yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2583whose name does not start with the host triplet. If you think this
2584configuration is useful to you, please write to autoconf@gnu.org." >&5
2585echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2586whose name does not start with the host triplet. If you think this
2587configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588ac_tool_warned=yes ;;
2589esac
2590 CC=$ac_ct_CC
2591 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002592fi
2593
2594fi
2595
2596
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002597test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002598See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002599echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002600See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002601 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002602
2603# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002604echo "$as_me:$LINENO: checking for C compiler version" >&5
2605ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606{ (ac_try="$ac_compiler --version >&5"
2607case "(($ac_try" in
2608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2609 *) ac_try_echo=$ac_try;;
2610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616{ (ac_try="$ac_compiler -v >&5"
2617case "(($ac_try" in
2618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2619 *) ac_try_echo=$ac_try;;
2620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626{ (ac_try="$ac_compiler -V >&5"
2627case "(($ac_try" in
2628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2629 *) ac_try_echo=$ac_try;;
2630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 (exit $ac_status); }
2636
2637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002638/* confdefs.h. */
2639_ACEOF
2640cat confdefs.h >>conftest.$ac_ext
2641cat >>conftest.$ac_ext <<_ACEOF
2642/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644int
2645main ()
2646{
2647
2648 ;
2649 return 0;
2650}
2651_ACEOF
2652ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002653ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002654# Try to create an executable without -o first, disregard a.out.
2655# It will help us diagnose broken compilers, and finding out an intuition
2656# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002657{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2658echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2659ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2660#
2661# List of possible output files, starting from the most likely.
2662# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2663# only as a last resort. b.out is created by i960 compilers.
2664ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2665#
2666# The IRIX 6 linker writes into existing files which may not be
2667# executable, retaining their permissions. Remove them first so a
2668# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669ac_rmfiles=
2670for ac_file in $ac_files
2671do
2672 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002673 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2675 esac
2676done
2677rm -f $ac_rmfiles
2678
2679if { (ac_try="$ac_link_default"
2680case "(($ac_try" in
2681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2682 *) ac_try_echo=$ac_try;;
2683esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2690# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2691# in a Makefile. We should not override ac_cv_exeext if it was cached,
2692# so that the user can short-circuit this test for compilers unknown to
2693# Autoconf.
2694for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002695do
2696 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002698 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002699 ;;
2700 [ab].out )
2701 # We found the default executable, but exeext='' is most
2702 # certainly right.
2703 break;;
2704 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2706 then :; else
2707 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2708 fi
2709 # We set ac_cv_exeext here because the later test for it is not
2710 # safe: cross compilers may not add the suffix if given an `-o'
2711 # argument, so we may need to know it at that point already.
2712 # Even if this section looks crufty: it has the advantage of
2713 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002714 break;;
2715 * )
2716 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 esac
2718done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719test "$ac_cv_exeext" = no && ac_cv_exeext=
2720
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002721else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722 ac_file=''
2723fi
2724
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002725{ echo "$as_me:$LINENO: result: $ac_file" >&5
2726echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002727if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002729sed 's/^/| /' conftest.$ac_ext >&5
2730
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002731{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002732See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002733echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002734See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002735 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002736fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002737
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002738ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002740# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002741# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002742{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2743echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002744# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2745# If not cross compiling, check that we can run a simple program.
2746if test "$cross_compiling" != yes; then
2747 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 { (case "(($ac_try" in
2749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2750 *) ac_try_echo=$ac_try;;
2751esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 (exit $ac_status); }; }; then
2757 cross_compiling=no
2758 else
2759 if test "$cross_compiling" = maybe; then
2760 cross_compiling=yes
2761 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002762 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002763If you meant to cross compile, use \`--host'.
2764See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002765echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002766If you meant to cross compile, use \`--host'.
2767See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002768 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 fi
2770 fi
2771fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002772{ echo "$as_me:$LINENO: result: yes" >&5
2773echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002775rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002776ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002778# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002779{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2780echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2781{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2782echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002783
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002784{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2785echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002786if { (ac_try="$ac_link"
2787case "(($ac_try" in
2788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2789 *) ac_try_echo=$ac_try;;
2790esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002792 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002796 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2797# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2798# work properly (i.e., refer to `conftest.exe'), while it won't with
2799# `rm'.
2800for ac_file in conftest.exe conftest conftest.*; do
2801 test -f "$ac_file" || continue
2802 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002803 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2805 break;;
2806 * ) break;;
2807 esac
2808done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002810 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002811See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002812echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002813See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002814 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002815fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002816
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002817rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002818{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2819echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002820
2821rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002822EXEEXT=$ac_cv_exeext
2823ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002824{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2825echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002826if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002827 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002828else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002829 cat >conftest.$ac_ext <<_ACEOF
2830/* confdefs.h. */
2831_ACEOF
2832cat confdefs.h >>conftest.$ac_ext
2833cat >>conftest.$ac_ext <<_ACEOF
2834/* end confdefs.h. */
2835
2836int
2837main ()
2838{
2839
2840 ;
2841 return 0;
2842}
2843_ACEOF
2844rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002845if { (ac_try="$ac_compile"
2846case "(($ac_try" in
2847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2848 *) ac_try_echo=$ac_try;;
2849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002855 for ac_file in conftest.o conftest.obj conftest.*; do
2856 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002857 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002858 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2860 break;;
2861 esac
2862done
2863else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002865sed 's/^/| /' conftest.$ac_ext >&5
2866
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002867{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002868See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002869echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002870See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002871 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002872fi
2873
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002874rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002875fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002876{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2877echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878OBJEXT=$ac_cv_objext
2879ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002880{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2881echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002882if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002883 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002884else
2885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
Martin v. Löwis11437992002-04-12 09:54:03 +00002892int
2893main ()
2894{
2895#ifndef __GNUC__
2896 choke me
2897#endif
2898
2899 ;
2900 return 0;
2901}
2902_ACEOF
2903rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002904if { (ac_try="$ac_compile"
2905case "(($ac_try" in
2906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2907 *) ac_try_echo=$ac_try;;
2908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002912 grep -v '^ *+' conftest.er1 >conftest.err
2913 rm -f conftest.er1
2914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916 (exit $ac_status); } && {
2917 test -z "$ac_c_werror_flag" ||
2918 test ! -s conftest.err
2919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002920 ac_compiler_gnu=yes
2921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002923sed 's/^/| /' conftest.$ac_ext >&5
2924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002925 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002927
2928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002929ac_cv_c_compiler_gnu=$ac_compiler_gnu
2930
2931fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002932{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2933echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2934GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002935ac_test_CFLAGS=${CFLAGS+set}
2936ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002937{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2938echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002939if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002940 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002941else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942 ac_save_c_werror_flag=$ac_c_werror_flag
2943 ac_c_werror_flag=yes
2944 ac_cv_prog_cc_g=no
2945 CFLAGS="-g"
2946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002947/* confdefs.h. */
2948_ACEOF
2949cat confdefs.h >>conftest.$ac_ext
2950cat >>conftest.$ac_ext <<_ACEOF
2951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953int
2954main ()
2955{
2956
2957 ;
2958 return 0;
2959}
2960_ACEOF
2961rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962if { (ac_try="$ac_compile"
2963case "(($ac_try" in
2964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2965 *) ac_try_echo=$ac_try;;
2966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002970 grep -v '^ *+' conftest.er1 >conftest.err
2971 rm -f conftest.er1
2972 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002974 (exit $ac_status); } && {
2975 test -z "$ac_c_werror_flag" ||
2976 test ! -s conftest.err
2977 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002978 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002981sed 's/^/| /' conftest.$ac_ext >&5
2982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002983 CFLAGS=""
2984 cat >conftest.$ac_ext <<_ACEOF
2985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
2990
2991int
2992main ()
2993{
2994
2995 ;
2996 return 0;
2997}
2998_ACEOF
2999rm -f conftest.$ac_objext
3000if { (ac_try="$ac_compile"
3001case "(($ac_try" in
3002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3003 *) ac_try_echo=$ac_try;;
3004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006 (eval "$ac_compile") 2>conftest.er1
3007 ac_status=$?
3008 grep -v '^ *+' conftest.er1 >conftest.err
3009 rm -f conftest.er1
3010 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003012 (exit $ac_status); } && {
3013 test -z "$ac_c_werror_flag" ||
3014 test ! -s conftest.err
3015 } && test -s conftest.$ac_objext; then
3016 :
3017else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003018 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019sed 's/^/| /' conftest.$ac_ext >&5
3020
3021 ac_c_werror_flag=$ac_save_c_werror_flag
3022 CFLAGS="-g"
3023 cat >conftest.$ac_ext <<_ACEOF
3024/* confdefs.h. */
3025_ACEOF
3026cat confdefs.h >>conftest.$ac_ext
3027cat >>conftest.$ac_ext <<_ACEOF
3028/* end confdefs.h. */
3029
3030int
3031main ()
3032{
3033
3034 ;
3035 return 0;
3036}
3037_ACEOF
3038rm -f conftest.$ac_objext
3039if { (ac_try="$ac_compile"
3040case "(($ac_try" in
3041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3042 *) ac_try_echo=$ac_try;;
3043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045 (eval "$ac_compile") 2>conftest.er1
3046 ac_status=$?
3047 grep -v '^ *+' conftest.er1 >conftest.err
3048 rm -f conftest.er1
3049 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051 (exit $ac_status); } && {
3052 test -z "$ac_c_werror_flag" ||
3053 test ! -s conftest.err
3054 } && test -s conftest.$ac_objext; then
3055 ac_cv_prog_cc_g=yes
3056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003057 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003058sed 's/^/| /' conftest.$ac_ext >&5
3059
3060
Guido van Rossum627b2d71993-12-24 10:39:16 +00003061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062
3063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065
3066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3067fi
3068
3069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3070 ac_c_werror_flag=$ac_save_c_werror_flag
3071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003072{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3073echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003074if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003075 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003076elif test $ac_cv_prog_cc_g = yes; then
3077 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003078 CFLAGS="-g -O2"
3079 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003080 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003081 fi
3082else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003083 if test "$GCC" = yes; then
3084 CFLAGS="-O2"
3085 else
3086 CFLAGS=
3087 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003088fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003089{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3090echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003092 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003093else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003094 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003095ac_save_CC=$CC
3096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003097/* confdefs.h. */
3098_ACEOF
3099cat confdefs.h >>conftest.$ac_ext
3100cat >>conftest.$ac_ext <<_ACEOF
3101/* end confdefs.h. */
3102#include <stdarg.h>
3103#include <stdio.h>
3104#include <sys/types.h>
3105#include <sys/stat.h>
3106/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3107struct buf { int x; };
3108FILE * (*rcsopen) (struct buf *, struct stat *, int);
3109static char *e (p, i)
3110 char **p;
3111 int i;
3112{
3113 return p[i];
3114}
3115static char *f (char * (*g) (char **, int), char **p, ...)
3116{
3117 char *s;
3118 va_list v;
3119 va_start (v,p);
3120 s = g (p, va_arg (v,int));
3121 va_end (v);
3122 return s;
3123}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003124
3125/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3126 function prototypes and stuff, but not '\xHH' hex character constants.
3127 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003129 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3130 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003131 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003132int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003134/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3135 inside strings and character constants. */
3136#define FOO(x) 'x'
3137int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3138
Skip Montanaro6dead952003-09-25 14:50:04 +00003139int test (int i, double x);
3140struct s1 {int (*f) (int a);};
3141struct s2 {int (*f) (double a);};
3142int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3143int argc;
3144char **argv;
3145int
3146main ()
3147{
3148return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3149 ;
3150 return 0;
3151}
3152_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3154 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003155do
3156 CC="$ac_save_CC $ac_arg"
3157 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158if { (ac_try="$ac_compile"
3159case "(($ac_try" in
3160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161 *) ac_try_echo=$ac_try;;
3162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166 grep -v '^ *+' conftest.er1 >conftest.err
3167 rm -f conftest.er1
3168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170 (exit $ac_status); } && {
3171 test -z "$ac_c_werror_flag" ||
3172 test ! -s conftest.err
3173 } && test -s conftest.$ac_objext; then
3174 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003177sed 's/^/| /' conftest.$ac_ext >&5
3178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179
Skip Montanaro6dead952003-09-25 14:50:04 +00003180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181
3182rm -f core conftest.err conftest.$ac_objext
3183 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003184done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003186CC=$ac_save_CC
3187
3188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189# AC_CACHE_VAL
3190case "x$ac_cv_prog_cc_c89" in
3191 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003192 { echo "$as_me:$LINENO: result: none needed" >&5
3193echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003194 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003195 { echo "$as_me:$LINENO: result: unsupported" >&5
3196echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003197 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003199 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3200echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003201esac
3202
Skip Montanaro6dead952003-09-25 14:50:04 +00003203
Martin v. Löwis11437992002-04-12 09:54:03 +00003204ac_ext=c
3205ac_cpp='$CPP $CPPFLAGS'
3206ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3207ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3208ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003209
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003210
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003211
3212
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003213{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3214echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003217if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003219
3220 case $withval in
3221 no) with_cxx_main=no
3222 MAINCC='$(CC)';;
3223 yes) with_cxx_main=yes
3224 MAINCC='$(CXX)';;
3225 *) with_cxx_main=yes
3226 MAINCC=$withval
3227 if test -z "$CXX"
3228 then
3229 CXX=$withval
3230 fi;;
3231 esac
3232else
3233
3234 with_cxx_main=no
3235 MAINCC='$(CC)'
3236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237fi
3238
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003239{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3240echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003241
3242preset_cxx="$CXX"
3243if test -z "$CXX"
3244then
3245 case "$CC" in
3246 gcc) # Extract the first word of "g++", so it can be a program name with args.
3247set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003248{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003250if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003251 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003252else
3253 case $CXX in
3254 [\\/]* | ?:[\\/]*)
3255 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3256 ;;
3257 *)
3258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in notfound
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
3263 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264 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 +00003265 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003267 break 2
3268 fi
3269done
3270done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003272
3273 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3274 ;;
3275esac
3276fi
3277CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003278if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003279 { echo "$as_me:$LINENO: result: $CXX" >&5
3280echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003281else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003282 { echo "$as_me:$LINENO: result: no" >&5
3283echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003286 ;;
3287 cc) # Extract the first word of "c++", so it can be a program name with args.
3288set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003289{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003292 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003293else
3294 case $CXX in
3295 [\\/]* | ?:[\\/]*)
3296 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3297 ;;
3298 *)
3299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in notfound
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
3304 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003305 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 +00003306 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003307 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003308 break 2
3309 fi
3310done
3311done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003313
3314 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3315 ;;
3316esac
3317fi
3318CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003319if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003320 { echo "$as_me:$LINENO: result: $CXX" >&5
3321echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003322else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003323 { echo "$as_me:$LINENO: result: no" >&5
3324echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327 ;;
3328 esac
3329 if test "$CXX" = "notfound"
3330 then
3331 CXX=""
3332 fi
3333fi
3334if test -z "$CXX"
3335then
3336 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3337do
3338 # Extract the first word of "$ac_prog", so it can be a program name with args.
3339set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003340{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3341echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003342if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003343 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003344else
3345 if test -n "$CXX"; then
3346 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3347else
3348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349for as_dir in $PATH
3350do
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
3353 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003354 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 +00003355 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003356 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003357 break 2
3358 fi
3359done
3360done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003361IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003362
3363fi
3364fi
3365CXX=$ac_cv_prog_CXX
3366if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003367 { echo "$as_me:$LINENO: result: $CXX" >&5
3368echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003370 { echo "$as_me:$LINENO: result: no" >&5
3371echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003372fi
3373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003374
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375 test -n "$CXX" && break
3376done
3377test -n "$CXX" || CXX="notfound"
3378
3379 if test "$CXX" = "notfound"
3380 then
3381 CXX=""
3382 fi
3383fi
3384if test "$preset_cxx" != "$CXX"
3385then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003386 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003387
3388 By default, distutils will build C++ extension modules with \"$CXX\".
3389 If this is not intended, then set CXX on the configure command line.
3390 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003391echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003392
3393 By default, distutils will build C++ extension modules with \"$CXX\".
3394 If this is not intended, then set CXX on the configure command line.
3395 " >&2;}
3396fi
3397
3398
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003399# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003400
3401ac_ext=c
3402ac_cpp='$CPP $CPPFLAGS'
3403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3405ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003406{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3407echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003408# On Suns, sometimes $CPP names a directory.
3409if test -n "$CPP" && test -d "$CPP"; then
3410 CPP=
3411fi
3412if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003413 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003414 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003415else
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 # Double quotes because CPP needs to be expanded
3417 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3418 do
3419 ac_preproc_ok=false
3420for ac_c_preproc_warn_flag in '' yes
3421do
3422 # Use a header file that comes with gcc, so configuring glibc
3423 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003424 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3425 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003426 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 # not just through cpp. "Syntax error" is here to catch this case.
3428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003429/* confdefs.h. */
3430_ACEOF
3431cat confdefs.h >>conftest.$ac_ext
3432cat >>conftest.$ac_ext <<_ACEOF
3433/* end confdefs.h. */
3434#ifdef __STDC__
3435# include <limits.h>
3436#else
3437# include <assert.h>
3438#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003439 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003440_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441if { (ac_try="$ac_cpp conftest.$ac_ext"
3442case "(($ac_try" in
3443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3444 *) ac_try_echo=$ac_try;;
3445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003449 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 rm -f conftest.er1
3451 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 (exit $ac_status); } >/dev/null && {
3454 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3455 test ! -s conftest.err
3456 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003457 :
3458else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003460sed 's/^/| /' conftest.$ac_ext >&5
3461
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 # Broken: fails on valid input.
3463continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465
Martin v. Löwis11437992002-04-12 09:54:03 +00003466rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 # can be detected and how.
3470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003471/* confdefs.h. */
3472_ACEOF
3473cat confdefs.h >>conftest.$ac_ext
3474cat >>conftest.$ac_ext <<_ACEOF
3475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003476#include <ac_nonexistent.h>
3477_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478if { (ac_try="$ac_cpp conftest.$ac_ext"
3479case "(($ac_try" in
3480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3481 *) ac_try_echo=$ac_try;;
3482esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003486 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 rm -f conftest.er1
3488 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003490 (exit $ac_status); } >/dev/null && {
3491 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3492 test ! -s conftest.err
3493 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 # Broken: success on invalid input.
3495continue
3496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003498sed 's/^/| /' conftest.$ac_ext >&5
3499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 # Passes both tests.
3501ac_preproc_ok=:
3502break
3503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505rm -f conftest.err conftest.$ac_ext
3506
3507done
3508# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3509rm -f conftest.err conftest.$ac_ext
3510if $ac_preproc_ok; then
3511 break
3512fi
3513
3514 done
3515 ac_cv_prog_CPP=$CPP
3516
3517fi
3518 CPP=$ac_cv_prog_CPP
3519else
3520 ac_cv_prog_CPP=$CPP
3521fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003522{ echo "$as_me:$LINENO: result: $CPP" >&5
3523echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003524ac_preproc_ok=false
3525for ac_c_preproc_warn_flag in '' yes
3526do
3527 # Use a header file that comes with gcc, so configuring glibc
3528 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003529 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3530 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 # On the NeXT, cc -E runs the code through the compiler's parser,
3532 # not just through cpp. "Syntax error" is here to catch this case.
3533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003534/* confdefs.h. */
3535_ACEOF
3536cat confdefs.h >>conftest.$ac_ext
3537cat >>conftest.$ac_ext <<_ACEOF
3538/* end confdefs.h. */
3539#ifdef __STDC__
3540# include <limits.h>
3541#else
3542# include <assert.h>
3543#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003544 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003545_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546if { (ac_try="$ac_cpp conftest.$ac_ext"
3547case "(($ac_try" in
3548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3549 *) ac_try_echo=$ac_try;;
3550esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003554 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 rm -f conftest.er1
3556 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 (exit $ac_status); } >/dev/null && {
3559 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3560 test ! -s conftest.err
3561 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 :
3563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003565sed 's/^/| /' conftest.$ac_ext >&5
3566
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 # Broken: fails on valid input.
3568continue
3569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571rm -f conftest.err conftest.$ac_ext
3572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 # can be detected and how.
3575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003576/* confdefs.h. */
3577_ACEOF
3578cat confdefs.h >>conftest.$ac_ext
3579cat >>conftest.$ac_ext <<_ACEOF
3580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003581#include <ac_nonexistent.h>
3582_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583if { (ac_try="$ac_cpp conftest.$ac_ext"
3584case "(($ac_try" in
3585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3586 *) ac_try_echo=$ac_try;;
3587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003591 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 rm -f conftest.er1
3593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595 (exit $ac_status); } >/dev/null && {
3596 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3597 test ! -s conftest.err
3598 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 # Broken: success on invalid input.
3600continue
3601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003603sed 's/^/| /' conftest.$ac_ext >&5
3604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 # Passes both tests.
3606ac_preproc_ok=:
3607break
3608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609
Martin v. Löwis11437992002-04-12 09:54:03 +00003610rm -f conftest.err conftest.$ac_ext
3611
3612done
3613# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3614rm -f conftest.err conftest.$ac_ext
3615if $ac_preproc_ok; then
3616 :
3617else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003618 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003619See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003620echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003621See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003622 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624
3625ac_ext=c
3626ac_cpp='$CPP $CPPFLAGS'
3627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3629ac_compiler_gnu=$ac_cv_c_compiler_gnu
3630
3631
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003632{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3633echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003635 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003637 # Extract the first word of "grep ggrep" to use in msg output
3638if test -z "$GREP"; then
3639set dummy grep ggrep; ac_prog_name=$2
3640if test "${ac_cv_path_GREP+set}" = set; then
3641 echo $ECHO_N "(cached) $ECHO_C" >&6
3642else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644# Loop through the user's path and test for each of PROGNAME-LIST
3645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3647do
3648 IFS=$as_save_IFS
3649 test -z "$as_dir" && as_dir=.
3650 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003651 for ac_exec_ext in '' $ac_executable_extensions; do
3652 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3653 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3654 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 # Check for GNU $ac_path_GREP
3656case `"$ac_path_GREP" --version 2>&1` in
3657*GNU*)
3658 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3659*)
3660 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003661 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662 while :
3663 do
3664 cat "conftest.in" "conftest.in" >"conftest.tmp"
3665 mv "conftest.tmp" "conftest.in"
3666 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003667 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3669 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3670 ac_count=`expr $ac_count + 1`
3671 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3672 # Best one so far, save it but keep looking for a better one
3673 ac_cv_path_GREP="$ac_path_GREP"
3674 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003675 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 # 10*(2^10) chars as input seems more than enough
3677 test $ac_count -gt 10 && break
3678 done
3679 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3680esac
3681
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003682
3683 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684 done
3685done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003686
3687done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003689
3690
3691fi
3692
3693GREP="$ac_cv_path_GREP"
3694if test -z "$GREP"; then
3695 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3696echo "$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 +00003697 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698fi
3699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700else
3701 ac_cv_path_GREP=$GREP
3702fi
3703
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003706{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3707echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708 GREP="$ac_cv_path_GREP"
3709
3710
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003711{ echo "$as_me:$LINENO: checking for egrep" >&5
3712echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003714 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715else
3716 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3717 then ac_cv_path_EGREP="$GREP -E"
3718 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003719 # Extract the first word of "egrep" to use in msg output
3720if test -z "$EGREP"; then
3721set dummy egrep; ac_prog_name=$2
3722if test "${ac_cv_path_EGREP+set}" = set; then
3723 echo $ECHO_N "(cached) $ECHO_C" >&6
3724else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726# Loop through the user's path and test for each of PROGNAME-LIST
3727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
3732 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
3734 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3735 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3736 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737 # Check for GNU $ac_path_EGREP
3738case `"$ac_path_EGREP" --version 2>&1` in
3739*GNU*)
3740 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3741*)
3742 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003743 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744 while :
3745 do
3746 cat "conftest.in" "conftest.in" >"conftest.tmp"
3747 mv "conftest.tmp" "conftest.in"
3748 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003749 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3751 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3752 ac_count=`expr $ac_count + 1`
3753 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3754 # Best one so far, save it but keep looking for a better one
3755 ac_cv_path_EGREP="$ac_path_EGREP"
3756 ac_path_EGREP_max=$ac_count
3757 fi
3758 # 10*(2^10) chars as input seems more than enough
3759 test $ac_count -gt 10 && break
3760 done
3761 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3762esac
3763
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003764
3765 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 done
3767done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003768
3769done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003771
3772
3773fi
3774
3775EGREP="$ac_cv_path_EGREP"
3776if test -z "$EGREP"; then
3777 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3778echo "$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 +00003779 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003780fi
3781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782else
3783 ac_cv_path_EGREP=$EGREP
3784fi
3785
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787 fi
3788fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003789{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3790echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003792
3793
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003794
3795{ echo "$as_me:$LINENO: checking for AIX" >&5
3796echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3797cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003798/* confdefs.h. */
3799_ACEOF
3800cat confdefs.h >>conftest.$ac_ext
3801cat >>conftest.$ac_ext <<_ACEOF
3802/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003803#ifdef _AIX
3804 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003805#endif
3806
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003807_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003808if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3809 $EGREP "yes" >/dev/null 2>&1; then
3810 { echo "$as_me:$LINENO: result: yes" >&5
3811echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003812cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003813#define _ALL_SOURCE 1
3814_ACEOF
3815
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003816else
3817 { echo "$as_me:$LINENO: result: no" >&5
3818echo "${ECHO_T}no" >&6; }
3819fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00003820rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003821
3822
3823
3824# Check for unsupported systems
3825case $ac_sys_system/$ac_sys_release in
3826atheos*|Linux*/1*)
3827 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3828 echo See README for details.
3829 exit 1;;
3830esac
3831
3832
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003833{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3834echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003835
3836# Check whether --with-suffix was given.
3837if test "${with_suffix+set}" = set; then
3838 withval=$with_suffix;
3839 case $withval in
3840 no) EXEEXT=;;
3841 yes) EXEEXT=.exe;;
3842 *) EXEEXT=$withval;;
3843 esac
3844fi
3845
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003846{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3847echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003848
3849# Test whether we're running on a non-case-sensitive system, in which
3850# case we give a warning if no ext is given
3851
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003852{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3853echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003854if test ! -d CaseSensitiveTestDir; then
3855mkdir CaseSensitiveTestDir
3856fi
3857
3858if test -d casesensitivetestdir
3859then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003860 { echo "$as_me:$LINENO: result: yes" >&5
3861echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003862 BUILDEXEEXT=.exe
3863else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003864 { echo "$as_me:$LINENO: result: no" >&5
3865echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003866 BUILDEXEEXT=$EXEEXT
3867fi
3868rmdir CaseSensitiveTestDir
3869
3870case $MACHDEP in
3871bsdos*)
3872 case $CC in
3873 gcc) CC="$CC -D_HAVE_BSDI";;
3874 esac;;
3875esac
3876
3877case $ac_sys_system in
3878hp*|HP*)
3879 case $CC in
3880 cc|*/cc) CC="$CC -Ae";;
3881 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003882SunOS*)
3883 # Some functions have a prototype only with that define, e.g. confstr
3884
3885cat >>confdefs.h <<\_ACEOF
3886#define __EXTENSIONS__ 1
3887_ACEOF
3888
3889 ;;
3890esac
3891
3892
3893
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003894{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3895echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003896if test -z "$LIBRARY"
3897then
3898 LIBRARY='libpython$(VERSION).a'
3899fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003900{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3901echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003902
3903# LDLIBRARY is the name of the library to link against (as opposed to the
3904# name of the library into which to insert object files). BLDLIBRARY is also
3905# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3906# is blank as the main program is not linked directly against LDLIBRARY.
3907# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3908# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3909# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3910# DLLLIBRARY is the shared (i.e., DLL) library.
3911#
3912# RUNSHARED is used to run shared python without installed libraries
3913#
3914# INSTSONAME is the name of the shared library that will be use to install
3915# on the system - some systems like version suffix, others don't
3916
3917
3918
3919
3920
3921
3922LDLIBRARY="$LIBRARY"
3923BLDLIBRARY='$(LDLIBRARY)'
3924INSTSONAME='$(LDLIBRARY)'
3925DLLLIBRARY=''
3926LDLIBRARYDIR=''
3927RUNSHARED=''
3928
3929# LINKCC is the command that links the python executable -- default is $(CC).
3930# If CXX is set, and if it is needed to link a main function that was
3931# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3932# python might then depend on the C++ runtime
3933# This is altered for AIX in order to build the export list before
3934# linking.
3935
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003936{ echo "$as_me:$LINENO: checking LINKCC" >&5
3937echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003938if test -z "$LINKCC"
3939then
3940 LINKCC='$(PURIFY) $(MAINCC)'
3941 case $ac_sys_system in
3942 AIX*)
3943 exp_extra="\"\""
3944 if test $ac_sys_release -ge 5 -o \
3945 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3946 exp_extra="."
3947 fi
3948 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003949 QNX*)
3950 # qcc must be used because the other compilers do not
3951 # support -N.
3952 LINKCC=qcc;;
3953 esac
3954fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003955{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3956echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003957
3958# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3959# make sure we default having it set to "no": this is used by
3960# distutils.unixccompiler to know if it should add --enable-new-dtags
3961# to linker command lines, and failing to detect GNU ld simply results
3962# in the same bahaviour as before.
3963
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003964{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3965echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003966ac_prog=ld
3967if test "$GCC" = yes; then
3968 ac_prog=`$CC -print-prog-name=ld`
3969fi
3970case `"$ac_prog" -V 2>&1 < /dev/null` in
3971 *GNU*)
3972 GNULD=yes;;
3973 *)
3974 GNULD=no;;
3975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003976{ echo "$as_me:$LINENO: result: $GNULD" >&5
3977echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003978
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003979{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3980echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003981# Check whether --enable-shared was given.
3982if test "${enable_shared+set}" = set; then
3983 enableval=$enable_shared;
3984fi
3985
3986
3987if test -z "$enable_shared"
3988then
3989 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003990 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003991 enable_shared="yes";;
3992 *)
3993 enable_shared="no";;
3994 esac
3995fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003996{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3997echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003998
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003999{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4000echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004001# Check whether --enable-profiling was given.
4002if test "${enable_profiling+set}" = set; then
4003 enableval=$enable_profiling; ac_save_cc="$CC"
4004 CC="$CC -pg"
4005 if test "$cross_compiling" = yes; then
4006 ac_enable_profiling="no"
4007else
4008 cat >conftest.$ac_ext <<_ACEOF
4009/* confdefs.h. */
4010_ACEOF
4011cat confdefs.h >>conftest.$ac_ext
4012cat >>conftest.$ac_ext <<_ACEOF
4013/* end confdefs.h. */
4014int main() { return 0; }
4015_ACEOF
4016rm -f conftest$ac_exeext
4017if { (ac_try="$ac_link"
4018case "(($ac_try" in
4019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4020 *) ac_try_echo=$ac_try;;
4021esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004023 (eval "$ac_link") 2>&5
4024 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004026 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4027 { (case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004032 (eval "$ac_try") 2>&5
4033 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004035 (exit $ac_status); }; }; then
4036 ac_enable_profiling="yes"
4037else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004038 echo "$as_me: program exited with status $ac_status" >&5
4039echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004040sed 's/^/| /' conftest.$ac_ext >&5
4041
4042( exit $ac_status )
4043ac_enable_profiling="no"
4044fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4046fi
4047
4048
4049 CC="$ac_save_cc"
4050fi
4051
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004052{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4053echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004054
4055case "$ac_enable_profiling" in
4056 "yes")
4057 BASECFLAGS="-pg $BASECFLAGS"
4058 LDFLAGS="-pg $LDFLAGS"
4059 ;;
4060esac
4061
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004062{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4063echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004064
4065# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4066# library that we build, but we do not want to link against it (we
4067# will find it with a -framework option). For this reason there is an
4068# extra variable BLDLIBRARY against which Python and the extension
4069# modules are linked, BLDLIBRARY. This is normally the same as
4070# LDLIBRARY, but empty for MacOSX framework builds.
4071if test "$enable_framework"
4072then
4073 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4074 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4075 BLDLIBRARY=''
4076else
4077 BLDLIBRARY='$(LDLIBRARY)'
4078fi
4079
4080# Other platforms follow
4081if test $enable_shared = "yes"; then
4082
4083cat >>confdefs.h <<\_ACEOF
4084#define Py_ENABLE_SHARED 1
4085_ACEOF
4086
4087 case $ac_sys_system in
4088 CYGWIN*)
4089 LDLIBRARY='libpython$(VERSION).dll.a'
4090 DLLLIBRARY='libpython$(VERSION).dll'
4091 ;;
4092 SunOS*)
4093 LDLIBRARY='libpython$(VERSION).so'
4094 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4095 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4096 INSTSONAME="$LDLIBRARY".$SOVERSION
4097 ;;
4098 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4099 LDLIBRARY='libpython$(VERSION).so'
4100 BLDLIBRARY='-L. -lpython$(VERSION)'
4101 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4102 case $ac_sys_system in
4103 FreeBSD*)
4104 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4105 ;;
4106 esac
4107 INSTSONAME="$LDLIBRARY".$SOVERSION
4108 ;;
4109 hp*|HP*)
4110 case `uname -m` in
4111 ia64)
4112 LDLIBRARY='libpython$(VERSION).so'
4113 ;;
4114 *)
4115 LDLIBRARY='libpython$(VERSION).sl'
4116 ;;
4117 esac
4118 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4119 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4120 ;;
4121 OSF*)
4122 LDLIBRARY='libpython$(VERSION).so'
4123 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4124 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4125 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004126 Darwin*)
4127 LDLIBRARY='libpython$(VERSION).dylib'
4128 BLDLIBRARY='-L. -lpython$(VERSION)'
4129 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4130 ;;
4131
4132 esac
4133else # shared is disabled
4134 case $ac_sys_system in
4135 CYGWIN*)
4136 BLDLIBRARY='$(LIBRARY)'
4137 LDLIBRARY='libpython$(VERSION).dll.a'
4138 ;;
4139 esac
4140fi
4141
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004142{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4143echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004144
4145if test -n "$ac_tool_prefix"; then
4146 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4147set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004148{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4149echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004150if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004151 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004152else
4153 if test -n "$RANLIB"; then
4154 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4155else
4156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157for as_dir in $PATH
4158do
4159 IFS=$as_save_IFS
4160 test -z "$as_dir" && as_dir=.
4161 for ac_exec_ext in '' $ac_executable_extensions; do
4162 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4163 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004164 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004165 break 2
4166 fi
4167done
4168done
4169IFS=$as_save_IFS
4170
4171fi
4172fi
4173RANLIB=$ac_cv_prog_RANLIB
4174if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004175 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4176echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004177else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004178 { echo "$as_me:$LINENO: result: no" >&5
4179echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004180fi
4181
4182
4183fi
4184if test -z "$ac_cv_prog_RANLIB"; then
4185 ac_ct_RANLIB=$RANLIB
4186 # Extract the first word of "ranlib", so it can be a program name with args.
4187set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004188{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004190if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004191 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004192else
4193 if test -n "$ac_ct_RANLIB"; then
4194 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4195else
4196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4197for as_dir in $PATH
4198do
4199 IFS=$as_save_IFS
4200 test -z "$as_dir" && as_dir=.
4201 for ac_exec_ext in '' $ac_executable_extensions; do
4202 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4203 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004205 break 2
4206 fi
4207done
4208done
4209IFS=$as_save_IFS
4210
4211fi
4212fi
4213ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4214if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004215 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4216echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004218 { echo "$as_me:$LINENO: result: no" >&5
4219echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004220fi
4221
4222 if test "x$ac_ct_RANLIB" = x; then
4223 RANLIB=":"
4224 else
4225 case $cross_compiling:$ac_tool_warned in
4226yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004227{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4228whose name does not start with the host triplet. If you think this
4229configuration is useful to you, please write to autoconf@gnu.org." >&5
4230echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4231whose name does not start with the host triplet. If you think this
4232configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233ac_tool_warned=yes ;;
4234esac
4235 RANLIB=$ac_ct_RANLIB
4236 fi
4237else
4238 RANLIB="$ac_cv_prog_RANLIB"
4239fi
4240
4241
4242for ac_prog in ar aal
4243do
4244 # Extract the first word of "$ac_prog", so it can be a program name with args.
4245set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004246{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4247echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004248if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004249 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004250else
4251 if test -n "$AR"; then
4252 ac_cv_prog_AR="$AR" # Let the user override the test.
4253else
4254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255for as_dir in $PATH
4256do
4257 IFS=$as_save_IFS
4258 test -z "$as_dir" && as_dir=.
4259 for ac_exec_ext in '' $ac_executable_extensions; do
4260 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4261 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004262 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004263 break 2
4264 fi
4265done
4266done
4267IFS=$as_save_IFS
4268
4269fi
4270fi
4271AR=$ac_cv_prog_AR
4272if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004273 { echo "$as_me:$LINENO: result: $AR" >&5
4274echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004275else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004276 { echo "$as_me:$LINENO: result: no" >&5
4277echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004278fi
4279
4280
4281 test -n "$AR" && break
4282done
4283test -n "$AR" || AR="ar"
4284
4285
4286# tweak ARFLAGS only if the user didn't set it on the command line
4287
4288if test -z "$ARFLAGS"
4289then
4290 ARFLAGS="rc"
4291fi
4292
4293
4294# Extract the first word of "svnversion", so it can be a program name with args.
4295set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004298if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004299 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004300else
4301 if test -n "$SVNVERSION"; then
4302 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4303else
4304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307 IFS=$as_save_IFS
4308 test -z "$as_dir" && as_dir=.
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004313 break 2
4314 fi
4315done
4316done
4317IFS=$as_save_IFS
4318
4319 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4320fi
4321fi
4322SVNVERSION=$ac_cv_prog_SVNVERSION
4323if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004324 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4325echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004327 { echo "$as_me:$LINENO: result: no" >&5
4328echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004329fi
4330
4331
4332if test $SVNVERSION = found
4333then
4334 SVNVERSION="svnversion \$(srcdir)"
4335else
4336 SVNVERSION="echo Unversioned directory"
4337fi
4338
4339case $MACHDEP in
4340bsdos*|hp*|HP*)
4341 # install -d does not work on BSDI or HP-UX
4342 if test -z "$INSTALL"
4343 then
4344 INSTALL="${srcdir}/install-sh -c"
4345 fi
4346esac
4347ac_aux_dir=
4348for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4349 if test -f "$ac_dir/install-sh"; then
4350 ac_aux_dir=$ac_dir
4351 ac_install_sh="$ac_aux_dir/install-sh -c"
4352 break
4353 elif test -f "$ac_dir/install.sh"; then
4354 ac_aux_dir=$ac_dir
4355 ac_install_sh="$ac_aux_dir/install.sh -c"
4356 break
4357 elif test -f "$ac_dir/shtool"; then
4358 ac_aux_dir=$ac_dir
4359 ac_install_sh="$ac_aux_dir/shtool install -c"
4360 break
4361 fi
4362done
4363if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004364 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4365echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004366 { (exit 1); exit 1; }; }
4367fi
4368
4369# These three variables are undocumented and unsupported,
4370# and are intended to be withdrawn in a future Autoconf release.
4371# They can cause serious problems if a builder's source tree is in a directory
4372# whose full name contains unusual characters.
4373ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4374ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4375ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4376
4377
4378# Find a good install program. We prefer a C program (faster),
4379# so one script is as good as another. But avoid the broken or
4380# incompatible versions:
4381# SysV /etc/install, /usr/sbin/install
4382# SunOS /usr/etc/install
4383# IRIX /sbin/install
4384# AIX /bin/install
4385# AmigaOS /C/install, which installs bootblocks on floppy discs
4386# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4387# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4388# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4389# OS/2's system install, which has a completely different semantic
4390# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004391{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4392echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004393if test -z "$INSTALL"; then
4394if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004395 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004396else
4397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4398for as_dir in $PATH
4399do
4400 IFS=$as_save_IFS
4401 test -z "$as_dir" && as_dir=.
4402 # Account for people who put trailing slashes in PATH elements.
4403case $as_dir/ in
4404 ./ | .// | /cC/* | \
4405 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4406 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4407 /usr/ucb/* ) ;;
4408 *)
4409 # OSF1 and SCO ODT 3.0 have their own names for install.
4410 # Don't use installbsd from OSF since it installs stuff as root
4411 # by default.
4412 for ac_prog in ginstall scoinst install; do
4413 for ac_exec_ext in '' $ac_executable_extensions; do
4414 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4415 if test $ac_prog = install &&
4416 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4417 # AIX install. It has an incompatible calling convention.
4418 :
4419 elif test $ac_prog = install &&
4420 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4421 # program-specific install script used by HP pwplus--don't use.
4422 :
4423 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004424 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4425 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004426 fi
4427 fi
4428 done
4429 done
4430 ;;
4431esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004432done
4433IFS=$as_save_IFS
4434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004435
4436fi
4437 if test "${ac_cv_path_install+set}" = set; then
4438 INSTALL=$ac_cv_path_install
4439 else
4440 # As a last resort, use the slow shell script. Don't cache a
4441 # value for INSTALL within a source directory, because that will
4442 # break other packages using the cache if that directory is
4443 # removed, or if the value is a relative name.
4444 INSTALL=$ac_install_sh
4445 fi
4446fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004447{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4448echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004449
4450# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4451# It thinks the first close brace ends the variable substitution.
4452test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4453
4454test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4455
4456test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4457
4458
4459# Not every filesystem supports hard links
4460
4461if test -z "$LN" ; then
4462 case $ac_sys_system in
4463 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004464 *) LN=ln;;
4465 esac
4466fi
4467
4468# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004469{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4470echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004471
4472# Check whether --with-pydebug was given.
4473if test "${with_pydebug+set}" = set; then
4474 withval=$with_pydebug;
4475if test "$withval" != no
4476then
4477
4478cat >>confdefs.h <<\_ACEOF
4479#define Py_DEBUG 1
4480_ACEOF
4481
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004482 { echo "$as_me:$LINENO: result: yes" >&5
4483echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004484 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004485else { echo "$as_me:$LINENO: result: no" >&5
4486echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004487fi
4488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004489 { echo "$as_me:$LINENO: result: no" >&5
4490echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004491fi
4492
4493
4494# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4495# merged with this chunk of code?
4496
4497# Optimizer/debugger flags
4498# ------------------------
4499# (The following bit of code is complicated enough - please keep things
4500# indented properly. Just pretend you're editing Python code. ;-)
4501
4502# There are two parallel sets of case statements below, one that checks to
4503# see if OPT was set and one that does BASECFLAGS setting based upon
4504# compiler and platform. BASECFLAGS tweaks need to be made even if the
4505# user set OPT.
4506
4507# tweak OPT based on compiler and platform, only if the user didn't set
4508# it on the command line
4509
4510if test -z "$OPT"
4511then
4512 case $GCC in
4513 yes)
4514 if test "$CC" != 'g++' ; then
4515 STRICT_PROTO="-Wstrict-prototypes"
4516 fi
4517 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4518 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4519 WRAP="-fwrapv"
4520 fi
4521 case $ac_cv_prog_cc_g in
4522 yes)
4523 if test "$Py_DEBUG" = 'true' ; then
4524 # Optimization messes up debuggers, so turn it off for
4525 # debug builds.
4526 OPT="-g -Wall $STRICT_PROTO"
4527 else
4528 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4529 fi
4530 ;;
4531 *)
4532 OPT="-O3 -Wall $STRICT_PROTO"
4533 ;;
4534 esac
4535 case $ac_sys_system in
4536 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4537 ;;
4538 esac
4539 ;;
4540
4541 *)
4542 OPT="-O"
4543 ;;
4544 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004545fi
4546
4547
4548
4549# The -arch flags for universal builds on OSX
4550UNIVERSAL_ARCH_FLAGS=
4551
4552
4553# tweak BASECFLAGS based on compiler and platform
4554case $GCC in
4555yes)
4556 # Python violates C99 rules, by casting between incompatible
4557 # pointer types. GCC may generate bad code as a result of that,
4558 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004559 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4560echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004561 ac_save_cc="$CC"
4562 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004563 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004564 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004565else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566 cat >conftest.$ac_ext <<_ACEOF
4567/* confdefs.h. */
4568_ACEOF
4569cat confdefs.h >>conftest.$ac_ext
4570cat >>conftest.$ac_ext <<_ACEOF
4571/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004572
4573int
4574main ()
4575{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004576int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004577 ;
4578 return 0;
4579}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004580_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004581rm -f conftest.$ac_objext
4582if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004583case "(($ac_try" in
4584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4585 *) ac_try_echo=$ac_try;;
4586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004588 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004589 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004590 grep -v '^ *+' conftest.er1 >conftest.err
4591 rm -f conftest.er1
4592 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004594 (exit $ac_status); } && {
4595 test -z "$ac_c_werror_flag" ||
4596 test ! -s conftest.err
4597 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004598 ac_cv_no_strict_aliasing_ok=yes
4599else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004600 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004601sed 's/^/| /' conftest.$ac_ext >&5
4602
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004603 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004604fi
4605
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004607fi
4608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004609 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004610 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4611echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004612 if test $ac_cv_no_strict_aliasing_ok = yes
4613 then
4614 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4615 fi
4616
4617 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4618 # support. Without this, treatment of subnormals doesn't follow
4619 # the standard.
4620 case $ac_sys_machine in
4621 alpha*)
4622 BASECFLAGS="$BASECFLAGS -mieee"
4623 ;;
4624 esac
4625
4626 case $ac_sys_system in
4627 SCO_SV*)
4628 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4629 ;;
4630 # is there any other compiler on Darwin besides gcc?
4631 Darwin*)
4632 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4633 # used to be here, but non-Apple gcc doesn't accept them.
4634
4635
4636 if test "${enable_universalsdk}"; then
4637 UNIVERSAL_ARCH_FLAGS=""
4638 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4639 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4640 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004641 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004642
Ronald Oussoren755740f2010-02-07 19:56:39 +00004643 # You have to use different flags on various versions of
4644 # OSX to extract PPC code from an universal binary, basically
4645 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4646 # newer.
4647 # Because '-arch pp7400' works on OSX 10.5 or higher this
4648 # test is only present in the '32-bit' branch, all other
4649 # branches require OSX 10.5 to compile.
4650
4651 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4652echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4653 FN="test.$$"
4654 cat >${FN}.c <<-EOF
4655 int main() { return 0; }
4656EOF
4657 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4658 if test $? != 0 ; then
4659 rm ${FN} ${FN}.c
4660 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4661echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4662 else
4663 lipo "${FN}" -extract ppc7400 -output "${FN}.out" 2>/dev/null
4664 if test $? != 0 ; then
4665 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4666 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4667echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4668 else
4669 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4670echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4671 fi
4672 rm -f ${FN} ${FN}.c ${FN}.out
4673 fi
4674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4676 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004677 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004678 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004679
4680 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4681 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004682 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004683 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004684
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004685 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4686 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004687 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004688 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004689
4690 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4691 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004692 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004693 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004696 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4697echo "$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 +00004698 { (exit 1); exit 1; }; }
4699
4700 fi
4701
4702
4703 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4704 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4705 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4706 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4707 fi
4708 fi
4709
4710 # Calculate the right deployment target for this build.
4711 #
4712 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4713 if test ${cur_target} '>' 10.2; then
4714 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004715 if test ${enable_universalsdk}; then
4716 if test "${UNIVERSAL_ARCHS}" = "all"; then
4717 # Ensure that the default platform for a
4718 # 4-way universal build is OSX 10.5,
4719 # that's the first OS release where
4720 # 4-way builds make sense.
4721 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004722
4723 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4724 cur_target='10.5'
4725
4726 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4727 cur_target='10.5'
4728
4729 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4730 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004731 fi
4732 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004733 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004734 # On Intel macs default to a deployment
4735 # target of 10.4, that's the first OSX
4736 # release with Intel support.
4737 cur_target="10.4"
4738 fi
4739 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740 fi
4741 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4742
4743 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4744 # environment with a value that is the same as what we'll use
4745 # in the Makefile to ensure that we'll get the same compiler
4746 # environment during configure and build time.
4747 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4748 export MACOSX_DEPLOYMENT_TARGET
4749 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4750
4751 ;;
4752 OSF*)
4753 BASECFLAGS="$BASECFLAGS -mieee"
4754 ;;
4755 esac
4756 ;;
4757
4758*)
4759 case $ac_sys_system in
4760 OpenUNIX*|UnixWare*)
4761 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4762 ;;
4763 OSF*)
4764 BASECFLAGS="$BASECFLAGS -ieee -std"
4765 ;;
4766 SCO_SV*)
4767 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4768 ;;
4769 esac
4770 ;;
4771esac
4772
4773if test "$Py_DEBUG" = 'true'; then
4774 :
4775else
4776 OPT="-DNDEBUG $OPT"
4777fi
4778
4779if test "$ac_arch_flags"
4780then
4781 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4782fi
4783
4784# disable check for icc since it seems to pass, but generates a warning
4785if test "$CC" = icc
4786then
4787 ac_cv_opt_olimit_ok=no
4788fi
4789
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004790{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4791echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004792if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004793 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004794else
4795 ac_save_cc="$CC"
4796CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004797cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004798/* confdefs.h. */
4799_ACEOF
4800cat confdefs.h >>conftest.$ac_ext
4801cat >>conftest.$ac_ext <<_ACEOF
4802/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004803
4804int
4805main ()
4806{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004808 ;
4809 return 0;
4810}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004811_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004812rm -f conftest.$ac_objext
4813if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814case "(($ac_try" in
4815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4816 *) ac_try_echo=$ac_try;;
4817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004819 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004821 grep -v '^ *+' conftest.er1 >conftest.err
4822 rm -f conftest.er1
4823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004825 (exit $ac_status); } && {
4826 test -z "$ac_c_werror_flag" ||
4827 test ! -s conftest.err
4828 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004829 ac_cv_opt_olimit_ok=yes
4830else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004831 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832sed 's/^/| /' conftest.$ac_ext >&5
4833
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004834 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835fi
4836
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004838CC="$ac_save_cc"
4839fi
4840
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004841{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4842echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843if test $ac_cv_opt_olimit_ok = yes; then
4844 case $ac_sys_system in
4845 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4846 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4847 # environment?
4848 Darwin*)
4849 ;;
4850 *)
4851 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4852 ;;
4853 esac
4854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004855 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4856echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004858 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859else
4860 ac_save_cc="$CC"
4861 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862 cat >conftest.$ac_ext <<_ACEOF
4863/* confdefs.h. */
4864_ACEOF
4865cat confdefs.h >>conftest.$ac_ext
4866cat >>conftest.$ac_ext <<_ACEOF
4867/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004868
4869int
4870main ()
4871{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004873 ;
4874 return 0;
4875}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004877rm -f conftest.$ac_objext
4878if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004879case "(($ac_try" in
4880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4881 *) ac_try_echo=$ac_try;;
4882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004884 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004886 grep -v '^ *+' conftest.er1 >conftest.err
4887 rm -f conftest.er1
4888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004890 (exit $ac_status); } && {
4891 test -z "$ac_c_werror_flag" ||
4892 test ! -s conftest.err
4893 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004894 ac_cv_olimit_ok=yes
4895else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004896 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897sed 's/^/| /' conftest.$ac_ext >&5
4898
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004899 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900fi
4901
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903 CC="$ac_save_cc"
4904fi
4905
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004906 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4907echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908 if test $ac_cv_olimit_ok = yes; then
4909 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4910 fi
4911fi
4912
4913# Check whether GCC supports PyArg_ParseTuple format
4914if test "$GCC" = "yes"
4915then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004916 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4917echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918 save_CFLAGS=$CFLAGS
4919 CFLAGS="$CFLAGS -Werror"
4920 cat >conftest.$ac_ext <<_ACEOF
4921/* confdefs.h. */
4922_ACEOF
4923cat confdefs.h >>conftest.$ac_ext
4924cat >>conftest.$ac_ext <<_ACEOF
4925/* end confdefs.h. */
4926
4927 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4928
4929int
4930main ()
4931{
4932
4933 ;
4934 return 0;
4935}
4936_ACEOF
4937rm -f conftest.$ac_objext
4938if { (ac_try="$ac_compile"
4939case "(($ac_try" in
4940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4941 *) ac_try_echo=$ac_try;;
4942esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944 (eval "$ac_compile") 2>conftest.er1
4945 ac_status=$?
4946 grep -v '^ *+' conftest.er1 >conftest.err
4947 rm -f conftest.er1
4948 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 (exit $ac_status); } && {
4951 test -z "$ac_c_werror_flag" ||
4952 test ! -s conftest.err
4953 } && test -s conftest.$ac_objext; then
4954
4955cat >>confdefs.h <<\_ACEOF
4956#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4957_ACEOF
4958
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004959 { echo "$as_me:$LINENO: result: yes" >&5
4960echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004962 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963sed 's/^/| /' conftest.$ac_ext >&5
4964
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004965 { echo "$as_me:$LINENO: result: no" >&5
4966echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967
4968fi
4969
4970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4971 CFLAGS=$save_CFLAGS
4972fi
4973
4974# On some compilers, pthreads are available without further options
4975# (e.g. MacOS X). On some of these systems, the compiler will not
4976# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4977# So we have to see first whether pthreads are available without
4978# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004979{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4980echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004982 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983else
4984 if test "$cross_compiling" = yes; then
4985 ac_cv_pthread_is_default=no
4986else
4987 cat >conftest.$ac_ext <<_ACEOF
4988/* confdefs.h. */
4989_ACEOF
4990cat confdefs.h >>conftest.$ac_ext
4991cat >>conftest.$ac_ext <<_ACEOF
4992/* end confdefs.h. */
4993
4994#include <pthread.h>
4995
4996void* routine(void* p){return NULL;}
4997
4998int main(){
4999 pthread_t p;
5000 if(pthread_create(&p,NULL,routine,NULL)!=0)
5001 return 1;
5002 (void)pthread_detach(p);
5003 return 0;
5004}
5005
5006_ACEOF
5007rm -f conftest$ac_exeext
5008if { (ac_try="$ac_link"
5009case "(($ac_try" in
5010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5011 *) ac_try_echo=$ac_try;;
5012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014 (eval "$ac_link") 2>&5
5015 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005017 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5018 { (case "(($ac_try" in
5019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5020 *) ac_try_echo=$ac_try;;
5021esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023 (eval "$ac_try") 2>&5
5024 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026 (exit $ac_status); }; }; then
5027
5028 ac_cv_pthread_is_default=yes
5029 ac_cv_kthread=no
5030 ac_cv_pthread=no
5031
5032else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005033 echo "$as_me: program exited with status $ac_status" >&5
5034echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035sed 's/^/| /' conftest.$ac_ext >&5
5036
5037( exit $ac_status )
5038ac_cv_pthread_is_default=no
5039fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5041fi
5042
5043
5044
5045fi
5046
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005047{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5048echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049
5050
5051if test $ac_cv_pthread_is_default = yes
5052then
5053 ac_cv_kpthread=no
5054else
5055# -Kpthread, if available, provides the right #defines
5056# and linker options to make pthread_create available
5057# Some compilers won't report that they do not support -Kpthread,
5058# so we need to run a program to see whether it really made the
5059# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005060{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5061echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005063 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064else
5065 ac_save_cc="$CC"
5066CC="$CC -Kpthread"
5067if test "$cross_compiling" = yes; then
5068 ac_cv_kpthread=no
5069else
5070 cat >conftest.$ac_ext <<_ACEOF
5071/* confdefs.h. */
5072_ACEOF
5073cat confdefs.h >>conftest.$ac_ext
5074cat >>conftest.$ac_ext <<_ACEOF
5075/* end confdefs.h. */
5076
5077#include <pthread.h>
5078
5079void* routine(void* p){return NULL;}
5080
5081int main(){
5082 pthread_t p;
5083 if(pthread_create(&p,NULL,routine,NULL)!=0)
5084 return 1;
5085 (void)pthread_detach(p);
5086 return 0;
5087}
5088
5089_ACEOF
5090rm -f conftest$ac_exeext
5091if { (ac_try="$ac_link"
5092case "(($ac_try" in
5093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5094 *) ac_try_echo=$ac_try;;
5095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097 (eval "$ac_link") 2>&5
5098 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5101 { (case "(($ac_try" in
5102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5103 *) ac_try_echo=$ac_try;;
5104esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005106 (eval "$ac_try") 2>&5
5107 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 (exit $ac_status); }; }; then
5110 ac_cv_kpthread=yes
5111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005112 echo "$as_me: program exited with status $ac_status" >&5
5113echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114sed 's/^/| /' conftest.$ac_ext >&5
5115
5116( exit $ac_status )
5117ac_cv_kpthread=no
5118fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5120fi
5121
5122
5123CC="$ac_save_cc"
5124fi
5125
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005126{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5127echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128fi
5129
5130if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5131then
5132# -Kthread, if available, provides the right #defines
5133# and linker options to make pthread_create available
5134# Some compilers won't report that they do not support -Kthread,
5135# so we need to run a program to see whether it really made the
5136# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005137{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5138echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141else
5142 ac_save_cc="$CC"
5143CC="$CC -Kthread"
5144if test "$cross_compiling" = yes; then
5145 ac_cv_kthread=no
5146else
5147 cat >conftest.$ac_ext <<_ACEOF
5148/* confdefs.h. */
5149_ACEOF
5150cat confdefs.h >>conftest.$ac_ext
5151cat >>conftest.$ac_ext <<_ACEOF
5152/* end confdefs.h. */
5153
5154#include <pthread.h>
5155
5156void* routine(void* p){return NULL;}
5157
5158int main(){
5159 pthread_t p;
5160 if(pthread_create(&p,NULL,routine,NULL)!=0)
5161 return 1;
5162 (void)pthread_detach(p);
5163 return 0;
5164}
5165
5166_ACEOF
5167rm -f conftest$ac_exeext
5168if { (ac_try="$ac_link"
5169case "(($ac_try" in
5170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5171 *) ac_try_echo=$ac_try;;
5172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005174 (eval "$ac_link") 2>&5
5175 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5178 { (case "(($ac_try" in
5179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5180 *) ac_try_echo=$ac_try;;
5181esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183 (eval "$ac_try") 2>&5
5184 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186 (exit $ac_status); }; }; then
5187 ac_cv_kthread=yes
5188else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005189 echo "$as_me: program exited with status $ac_status" >&5
5190echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191sed 's/^/| /' conftest.$ac_ext >&5
5192
5193( exit $ac_status )
5194ac_cv_kthread=no
5195fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5197fi
5198
5199
5200CC="$ac_save_cc"
5201fi
5202
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005203{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5204echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205fi
5206
5207if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5208then
5209# -pthread, if available, provides the right #defines
5210# and linker options to make pthread_create available
5211# Some compilers won't report that they do not support -pthread,
5212# so we need to run a program to see whether it really made the
5213# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005214{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5215echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005217 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005218else
5219 ac_save_cc="$CC"
5220CC="$CC -pthread"
5221if test "$cross_compiling" = yes; then
5222 ac_cv_pthread=no
5223else
5224 cat >conftest.$ac_ext <<_ACEOF
5225/* confdefs.h. */
5226_ACEOF
5227cat confdefs.h >>conftest.$ac_ext
5228cat >>conftest.$ac_ext <<_ACEOF
5229/* end confdefs.h. */
5230
5231#include <pthread.h>
5232
5233void* routine(void* p){return NULL;}
5234
5235int main(){
5236 pthread_t p;
5237 if(pthread_create(&p,NULL,routine,NULL)!=0)
5238 return 1;
5239 (void)pthread_detach(p);
5240 return 0;
5241}
5242
5243_ACEOF
5244rm -f conftest$ac_exeext
5245if { (ac_try="$ac_link"
5246case "(($ac_try" in
5247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5248 *) ac_try_echo=$ac_try;;
5249esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005251 (eval "$ac_link") 2>&5
5252 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5255 { (case "(($ac_try" in
5256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5257 *) ac_try_echo=$ac_try;;
5258esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005260 (eval "$ac_try") 2>&5
5261 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005263 (exit $ac_status); }; }; then
5264 ac_cv_pthread=yes
5265else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005266 echo "$as_me: program exited with status $ac_status" >&5
5267echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268sed 's/^/| /' conftest.$ac_ext >&5
5269
5270( exit $ac_status )
5271ac_cv_pthread=no
5272fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5274fi
5275
5276
5277CC="$ac_save_cc"
5278fi
5279
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005280{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5281echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282fi
5283
5284# If we have set a CC compiler flag for thread support then
5285# check if it works for CXX, too.
5286ac_cv_cxx_thread=no
5287if test ! -z "$CXX"
5288then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005289{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5290echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005291ac_save_cxx="$CXX"
5292
5293if test "$ac_cv_kpthread" = "yes"
5294then
5295 CXX="$CXX -Kpthread"
5296 ac_cv_cxx_thread=yes
5297elif test "$ac_cv_kthread" = "yes"
5298then
5299 CXX="$CXX -Kthread"
5300 ac_cv_cxx_thread=yes
5301elif test "$ac_cv_pthread" = "yes"
5302then
5303 CXX="$CXX -pthread"
5304 ac_cv_cxx_thread=yes
5305fi
5306
5307if test $ac_cv_cxx_thread = yes
5308then
5309 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5310 $CXX -c conftest.$ac_ext 2>&5
5311 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5312 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5313 then
5314 ac_cv_cxx_thread=yes
5315 else
5316 ac_cv_cxx_thread=no
5317 fi
5318 rm -fr conftest*
5319fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005320{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5321echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322fi
5323CXX="$ac_save_cxx"
5324
5325
5326# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005327{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5328echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005330 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331else
5332 cat >conftest.$ac_ext <<_ACEOF
5333/* confdefs.h. */
5334_ACEOF
5335cat confdefs.h >>conftest.$ac_ext
5336cat >>conftest.$ac_ext <<_ACEOF
5337/* end confdefs.h. */
5338#include <stdlib.h>
5339#include <stdarg.h>
5340#include <string.h>
5341#include <float.h>
5342
5343int
5344main ()
5345{
5346
5347 ;
5348 return 0;
5349}
5350_ACEOF
5351rm -f conftest.$ac_objext
5352if { (ac_try="$ac_compile"
5353case "(($ac_try" in
5354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5355 *) ac_try_echo=$ac_try;;
5356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358 (eval "$ac_compile") 2>conftest.er1
5359 ac_status=$?
5360 grep -v '^ *+' conftest.er1 >conftest.err
5361 rm -f conftest.er1
5362 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364 (exit $ac_status); } && {
5365 test -z "$ac_c_werror_flag" ||
5366 test ! -s conftest.err
5367 } && test -s conftest.$ac_objext; then
5368 ac_cv_header_stdc=yes
5369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005370 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371sed 's/^/| /' conftest.$ac_ext >&5
5372
5373 ac_cv_header_stdc=no
5374fi
5375
5376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5377
5378if test $ac_cv_header_stdc = yes; then
5379 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5380 cat >conftest.$ac_ext <<_ACEOF
5381/* confdefs.h. */
5382_ACEOF
5383cat confdefs.h >>conftest.$ac_ext
5384cat >>conftest.$ac_ext <<_ACEOF
5385/* end confdefs.h. */
5386#include <string.h>
5387
5388_ACEOF
5389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5390 $EGREP "memchr" >/dev/null 2>&1; then
5391 :
5392else
5393 ac_cv_header_stdc=no
5394fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00005395rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396
5397fi
5398
5399if test $ac_cv_header_stdc = yes; then
5400 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5401 cat >conftest.$ac_ext <<_ACEOF
5402/* confdefs.h. */
5403_ACEOF
5404cat confdefs.h >>conftest.$ac_ext
5405cat >>conftest.$ac_ext <<_ACEOF
5406/* end confdefs.h. */
5407#include <stdlib.h>
5408
5409_ACEOF
5410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5411 $EGREP "free" >/dev/null 2>&1; then
5412 :
5413else
5414 ac_cv_header_stdc=no
5415fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00005416rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417
5418fi
5419
5420if test $ac_cv_header_stdc = yes; then
5421 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5422 if test "$cross_compiling" = yes; then
5423 :
5424else
5425 cat >conftest.$ac_ext <<_ACEOF
5426/* confdefs.h. */
5427_ACEOF
5428cat confdefs.h >>conftest.$ac_ext
5429cat >>conftest.$ac_ext <<_ACEOF
5430/* end confdefs.h. */
5431#include <ctype.h>
5432#include <stdlib.h>
5433#if ((' ' & 0x0FF) == 0x020)
5434# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5435# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5436#else
5437# define ISLOWER(c) \
5438 (('a' <= (c) && (c) <= 'i') \
5439 || ('j' <= (c) && (c) <= 'r') \
5440 || ('s' <= (c) && (c) <= 'z'))
5441# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5442#endif
5443
5444#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5445int
5446main ()
5447{
5448 int i;
5449 for (i = 0; i < 256; i++)
5450 if (XOR (islower (i), ISLOWER (i))
5451 || toupper (i) != TOUPPER (i))
5452 return 2;
5453 return 0;
5454}
5455_ACEOF
5456rm -f conftest$ac_exeext
5457if { (ac_try="$ac_link"
5458case "(($ac_try" in
5459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5460 *) ac_try_echo=$ac_try;;
5461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463 (eval "$ac_link") 2>&5
5464 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005466 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5467 { (case "(($ac_try" in
5468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5469 *) ac_try_echo=$ac_try;;
5470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472 (eval "$ac_try") 2>&5
5473 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475 (exit $ac_status); }; }; then
5476 :
5477else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005478 echo "$as_me: program exited with status $ac_status" >&5
5479echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480sed 's/^/| /' conftest.$ac_ext >&5
5481
5482( exit $ac_status )
5483ac_cv_header_stdc=no
5484fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5486fi
5487
5488
5489fi
5490fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005491{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5492echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493if test $ac_cv_header_stdc = yes; then
5494
5495cat >>confdefs.h <<\_ACEOF
5496#define STDC_HEADERS 1
5497_ACEOF
5498
5499fi
5500
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5512 inttypes.h stdint.h unistd.h
5513do
5514as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5515{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5516echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5517if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5518 echo $ECHO_N "(cached) $ECHO_C" >&6
5519else
5520 cat >conftest.$ac_ext <<_ACEOF
5521/* confdefs.h. */
5522_ACEOF
5523cat confdefs.h >>conftest.$ac_ext
5524cat >>conftest.$ac_ext <<_ACEOF
5525/* end confdefs.h. */
5526$ac_includes_default
5527
5528#include <$ac_header>
5529_ACEOF
5530rm -f conftest.$ac_objext
5531if { (ac_try="$ac_compile"
5532case "(($ac_try" in
5533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5534 *) ac_try_echo=$ac_try;;
5535esac
5536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5537 (eval "$ac_compile") 2>conftest.er1
5538 ac_status=$?
5539 grep -v '^ *+' conftest.er1 >conftest.err
5540 rm -f conftest.er1
5541 cat conftest.err >&5
5542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5543 (exit $ac_status); } && {
5544 test -z "$ac_c_werror_flag" ||
5545 test ! -s conftest.err
5546 } && test -s conftest.$ac_objext; then
5547 eval "$as_ac_Header=yes"
5548else
5549 echo "$as_me: failed program was:" >&5
5550sed 's/^/| /' conftest.$ac_ext >&5
5551
5552 eval "$as_ac_Header=no"
5553fi
5554
5555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5556fi
5557ac_res=`eval echo '${'$as_ac_Header'}'`
5558 { echo "$as_me:$LINENO: result: $ac_res" >&5
5559echo "${ECHO_T}$ac_res" >&6; }
5560if test `eval echo '${'$as_ac_Header'}'` = yes; then
5561 cat >>confdefs.h <<_ACEOF
5562#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5563_ACEOF
5564
5565fi
5566
5567done
5568
5569
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570
Martin v. Löwis11437992002-04-12 09:54:03 +00005571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
Anthony Baxter8a560de2004-10-13 15:30:56 +00005606
Martin v. Löwisc3001752005-01-23 09:27:24 +00005607
Martin v. Löwis11017b12006-01-14 18:12:57 +00005608
Thomas Wouters477c8d52006-05-27 19:21:47 +00005609
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005610
5611
5612
5613
5614
5615
5616
5617
Thomas Wouters89f507f2006-12-13 04:49:30 +00005618
Christian Heimes043d6f62008-01-07 17:19:16 +00005619
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005620
5621
Christian Heimesbbe741d2008-03-28 10:53:29 +00005622
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005623
Ronald Oussoren755740f2010-02-07 19:56:39 +00005624
5625
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005626for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5627fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005628ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005629shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005630unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005631sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5632sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005633sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005634sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005635sys/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 +00005636sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005637bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005638do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005639as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005641 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5642echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005643if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005644 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005645fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005646ac_res=`eval echo '${'$as_ac_Header'}'`
5647 { echo "$as_me:$LINENO: result: $ac_res" >&5
5648echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005649else
Martin v. Löwis11437992002-04-12 09:54:03 +00005650 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005651{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5652echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005654/* confdefs.h. */
5655_ACEOF
5656cat confdefs.h >>conftest.$ac_ext
5657cat >>conftest.$ac_ext <<_ACEOF
5658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005659$ac_includes_default
5660#include <$ac_header>
5661_ACEOF
5662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005663if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005671 grep -v '^ *+' conftest.er1 >conftest.err
5672 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); } && {
5676 test -z "$ac_c_werror_flag" ||
5677 test ! -s conftest.err
5678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005680else
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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005684 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005686
5687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005688{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5689echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005690
5691# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005692{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5693echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005695/* confdefs.h. */
5696_ACEOF
5697cat confdefs.h >>conftest.$ac_ext
5698cat >>conftest.$ac_ext <<_ACEOF
5699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005700#include <$ac_header>
5701_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005702if { (ac_try="$ac_cpp conftest.$ac_ext"
5703case "(($ac_try" in
5704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5705 *) ac_try_echo=$ac_try;;
5706esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005708 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005709 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005710 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005711 rm -f conftest.er1
5712 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005714 (exit $ac_status); } >/dev/null && {
5715 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5716 test ! -s conftest.err
5717 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005718 ac_header_preproc=yes
5719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005721sed 's/^/| /' conftest.$ac_ext >&5
5722
Martin v. Löwis11437992002-04-12 09:54:03 +00005723 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005725
Martin v. Löwis11437992002-04-12 09:54:03 +00005726rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005727{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5728echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005729
5730# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005731case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5732 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005733 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5734echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5735 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5736echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005737 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005738 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005739 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005740 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5741echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5742 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5743echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5744 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5745echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5746 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5747echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5748 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5749echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5750 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5751echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005752 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005753## -------------------------------------- ##
5754## Report this to http://bugs.python.org/ ##
5755## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005756_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005757 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005758 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005760{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5761echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005762if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005763 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005764else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005765 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005766fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005767ac_res=`eval echo '${'$as_ac_Header'}'`
5768 { echo "$as_me:$LINENO: result: $ac_res" >&5
5769echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005770
5771fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005772if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005773 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005774#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005775_ACEOF
5776
5777fi
5778
Guido van Rossum627b2d71993-12-24 10:39:16 +00005779done
5780
Martin v. Löwis11437992002-04-12 09:54:03 +00005781
5782
5783
5784
5785
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005786ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005787for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005788 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5789{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5790echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005791if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005793else
Martin v. Löwis11437992002-04-12 09:54:03 +00005794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005795/* confdefs.h. */
5796_ACEOF
5797cat confdefs.h >>conftest.$ac_ext
5798cat >>conftest.$ac_ext <<_ACEOF
5799/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800#include <sys/types.h>
5801#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005802
Martin v. Löwis11437992002-04-12 09:54:03 +00005803int
5804main ()
5805{
5806if ((DIR *) 0)
5807return 0;
5808 ;
5809 return 0;
5810}
5811_ACEOF
5812rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005813if { (ac_try="$ac_compile"
5814case "(($ac_try" in
5815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5816 *) ac_try_echo=$ac_try;;
5817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005821 grep -v '^ *+' conftest.er1 >conftest.err
5822 rm -f conftest.er1
5823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005825 (exit $ac_status); } && {
5826 test -z "$ac_c_werror_flag" ||
5827 test ! -s conftest.err
5828 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005829 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005832sed 's/^/| /' conftest.$ac_ext >&5
5833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005834 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005836
5837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005838fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005839ac_res=`eval echo '${'$as_ac_Header'}'`
5840 { echo "$as_me:$LINENO: result: $ac_res" >&5
5841echo "${ECHO_T}$ac_res" >&6; }
5842if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005844#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005845_ACEOF
5846
5847ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005848fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005849
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005850done
5851# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5852if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5854echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005855if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005857else
Martin v. Löwis11437992002-04-12 09:54:03 +00005858 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005859cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005860/* confdefs.h. */
5861_ACEOF
5862cat confdefs.h >>conftest.$ac_ext
5863cat >>conftest.$ac_ext <<_ACEOF
5864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005866/* Override any GCC internal prototype to avoid an error.
5867 Use char because int might match the return type of a GCC
5868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005869#ifdef __cplusplus
5870extern "C"
5871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005872char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005873int
5874main ()
5875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005876return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005877 ;
5878 return 0;
5879}
5880_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005881for ac_lib in '' dir; do
5882 if test -z "$ac_lib"; then
5883 ac_res="none required"
5884 else
5885 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005886 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005887 fi
5888 rm -f conftest.$ac_objext conftest$ac_exeext
5889if { (ac_try="$ac_link"
5890case "(($ac_try" in
5891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5892 *) ac_try_echo=$ac_try;;
5893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005896 ac_status=$?
5897 grep -v '^ *+' conftest.er1 >conftest.err
5898 rm -f conftest.er1
5899 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005901 (exit $ac_status); } && {
5902 test -z "$ac_c_werror_flag" ||
5903 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005904 } && test -s conftest$ac_exeext &&
5905 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005906 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005908 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005909sed 's/^/| /' conftest.$ac_ext >&5
5910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005911
Thomas Wouters477c8d52006-05-27 19:21:47 +00005912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005913
5914rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5915 conftest$ac_exeext
5916 if test "${ac_cv_search_opendir+set}" = set; then
5917 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005919done
5920if test "${ac_cv_search_opendir+set}" = set; then
5921 :
5922else
5923 ac_cv_search_opendir=no
5924fi
5925rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005926LIBS=$ac_func_search_save_LIBS
5927fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005928{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5929echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005930ac_res=$ac_cv_search_opendir
5931if test "$ac_res" != no; then
5932 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005933
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005934fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005935
Michael W. Hudson54241132001-12-07 15:38:26 +00005936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005937 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5938echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005939if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005940 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005941else
5942 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005943cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005944/* confdefs.h. */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005950/* Override any GCC internal prototype to avoid an error.
5951 Use char because int might match the return type of a GCC
5952 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005953#ifdef __cplusplus
5954extern "C"
5955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005956char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005957int
5958main ()
5959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005960return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005961 ;
5962 return 0;
5963}
5964_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005965for ac_lib in '' x; do
5966 if test -z "$ac_lib"; then
5967 ac_res="none required"
5968 else
5969 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005970 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005971 fi
5972 rm -f conftest.$ac_objext conftest$ac_exeext
5973if { (ac_try="$ac_link"
5974case "(($ac_try" in
5975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5976 *) ac_try_echo=$ac_try;;
5977esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005979 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005980 ac_status=$?
5981 grep -v '^ *+' conftest.er1 >conftest.err
5982 rm -f conftest.er1
5983 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005985 (exit $ac_status); } && {
5986 test -z "$ac_c_werror_flag" ||
5987 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005988 } && test -s conftest$ac_exeext &&
5989 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005990 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005992 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005993sed 's/^/| /' conftest.$ac_ext >&5
5994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005995
Thomas Wouters477c8d52006-05-27 19:21:47 +00005996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005997
5998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5999 conftest$ac_exeext
6000 if test "${ac_cv_search_opendir+set}" = set; then
6001 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006003done
6004if test "${ac_cv_search_opendir+set}" = set; then
6005 :
6006else
6007 ac_cv_search_opendir=no
6008fi
6009rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006010LIBS=$ac_func_search_save_LIBS
6011fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006012{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6013echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006014ac_res=$ac_cv_search_opendir
6015if test "$ac_res" != no; then
6016 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006017
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006018fi
6019
6020fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006021
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006022{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6023echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006025 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026else
6027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006028/* confdefs.h. */
6029_ACEOF
6030cat confdefs.h >>conftest.$ac_ext
6031cat >>conftest.$ac_ext <<_ACEOF
6032/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006034int
6035main ()
6036{
6037return makedev(0, 0);
6038 ;
6039 return 0;
6040}
6041_ACEOF
6042rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006043if { (ac_try="$ac_link"
6044case "(($ac_try" in
6045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6046 *) ac_try_echo=$ac_try;;
6047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006049 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006051 grep -v '^ *+' conftest.er1 >conftest.err
6052 rm -f conftest.er1
6053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006055 (exit $ac_status); } && {
6056 test -z "$ac_c_werror_flag" ||
6057 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006058 } && test -s conftest$ac_exeext &&
6059 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060 ac_cv_header_sys_types_h_makedev=yes
6061else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006063sed 's/^/| /' conftest.$ac_ext >&5
6064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006067
6068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070
6071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006072{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6073echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074
6075if test $ac_cv_header_sys_types_h_makedev = no; then
6076if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006077 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6078echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006080 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006082{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6083echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084else
6085 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006086{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6087echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006089/* confdefs.h. */
6090_ACEOF
6091cat confdefs.h >>conftest.$ac_ext
6092cat >>conftest.$ac_ext <<_ACEOF
6093/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094$ac_includes_default
6095#include <sys/mkdev.h>
6096_ACEOF
6097rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006106 grep -v '^ *+' conftest.er1 >conftest.err
6107 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); } && {
6111 test -z "$ac_c_werror_flag" ||
6112 test ! -s conftest.err
6113 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_compiler=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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006119 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121
6122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006123{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6124echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125
6126# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006127{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6128echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006130/* confdefs.h. */
6131_ACEOF
6132cat confdefs.h >>conftest.$ac_ext
6133cat >>conftest.$ac_ext <<_ACEOF
6134/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135#include <sys/mkdev.h>
6136_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137if { (ac_try="$ac_cpp conftest.$ac_ext"
6138case "(($ac_try" in
6139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6140 *) ac_try_echo=$ac_try;;
6141esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006145 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146 rm -f conftest.er1
6147 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149 (exit $ac_status); } >/dev/null && {
6150 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6151 test ! -s conftest.err
6152 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153 ac_header_preproc=yes
6154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006156sed 's/^/| /' conftest.$ac_ext >&5
6157
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_header_preproc=no
6159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006162{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6163echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164
6165# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006166case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6167 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006168 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6169echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6170 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6171echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006172 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006173 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006174 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006175 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6176echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6177 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6178echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6179 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6180echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6181 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6182echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6183 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6184echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6185 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6186echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006187 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006188## -------------------------------------- ##
6189## Report this to http://bugs.python.org/ ##
6190## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006191_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006193 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006195{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6196echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006198 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199else
6200 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6201fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006202{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6203echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006206if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207
6208cat >>confdefs.h <<\_ACEOF
6209#define MAJOR_IN_MKDEV 1
6210_ACEOF
6211
6212fi
6213
6214
6215
6216 if test $ac_cv_header_sys_mkdev_h = no; then
6217 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006218 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6219echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006221 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006223{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6224echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225else
6226 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006227{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6228echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235$ac_includes_default
6236#include <sys/sysmacros.h>
6237_ACEOF
6238rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006247 grep -v '^ *+' conftest.er1 >conftest.err
6248 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); } && {
6252 test -z "$ac_c_werror_flag" ||
6253 test ! -s conftest.err
6254 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_header_compiler=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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006262
6263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006264{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6265echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266
6267# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006268{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6269echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006271/* confdefs.h. */
6272_ACEOF
6273cat confdefs.h >>conftest.$ac_ext
6274cat >>conftest.$ac_ext <<_ACEOF
6275/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276#include <sys/sysmacros.h>
6277_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006278if { (ac_try="$ac_cpp conftest.$ac_ext"
6279case "(($ac_try" in
6280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6281 *) ac_try_echo=$ac_try;;
6282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006284 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006286 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287 rm -f conftest.er1
6288 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006290 (exit $ac_status); } >/dev/null && {
6291 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6292 test ! -s conftest.err
6293 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294 ac_header_preproc=yes
6295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006297sed 's/^/| /' conftest.$ac_ext >&5
6298
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299 ac_header_preproc=no
6300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006301
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006303{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6304echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305
6306# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006307case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6308 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006309 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6310echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6311 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6312echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006313 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006314 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006315 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006316 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6317echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6318 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6319echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6320 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6321echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6322 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6323echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6324 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6325echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6326 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6327echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006328 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006329## -------------------------------------- ##
6330## Report this to http://bugs.python.org/ ##
6331## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006332_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006333 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006334 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006335esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006336{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6337echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006338if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006339 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006340else
6341 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6342fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006343{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6344echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345
6346fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006347if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006348
6349cat >>confdefs.h <<\_ACEOF
6350#define MAJOR_IN_SYSMACROS 1
6351_ACEOF
6352
6353fi
6354
6355
6356 fi
6357fi
6358
Michael W. Hudson54241132001-12-07 15:38:26 +00006359
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006361
6362for ac_header in term.h
6363do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006364as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6365{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006367if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006368 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369else
6370 cat >conftest.$ac_ext <<_ACEOF
6371/* confdefs.h. */
6372_ACEOF
6373cat confdefs.h >>conftest.$ac_ext
6374cat >>conftest.$ac_ext <<_ACEOF
6375/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006376
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006377#ifdef HAVE_CURSES_H
6378#include <curses.h>
6379#endif
6380
6381
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006382#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383_ACEOF
6384rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006385if { (ac_try="$ac_compile"
6386case "(($ac_try" in
6387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6388 *) ac_try_echo=$ac_try;;
6389esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006392 ac_status=$?
6393 grep -v '^ *+' conftest.er1 >conftest.err
6394 rm -f conftest.er1
6395 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397 (exit $ac_status); } && {
6398 test -z "$ac_c_werror_flag" ||
6399 test ! -s conftest.err
6400 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006401 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006403 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006404sed 's/^/| /' conftest.$ac_ext >&5
6405
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006406 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408
6409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006410fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006411ac_res=`eval echo '${'$as_ac_Header'}'`
6412 { echo "$as_me:$LINENO: result: $ac_res" >&5
6413echo "${ECHO_T}$ac_res" >&6; }
6414if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006415 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006416#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006417_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006418
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006419fi
6420
6421done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006422
6423
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424# On Linux, netlink.h requires asm/types.h
6425
6426for ac_header in linux/netlink.h
6427do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006428as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6429{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6430echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006431if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006432 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006433else
6434 cat >conftest.$ac_ext <<_ACEOF
6435/* confdefs.h. */
6436_ACEOF
6437cat confdefs.h >>conftest.$ac_ext
6438cat >>conftest.$ac_ext <<_ACEOF
6439/* end confdefs.h. */
6440
6441#ifdef HAVE_ASM_TYPES_H
6442#include <asm/types.h>
6443#endif
6444#ifdef HAVE_SYS_SOCKET_H
6445#include <sys/socket.h>
6446#endif
6447
6448
6449#include <$ac_header>
6450_ACEOF
6451rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452if { (ac_try="$ac_compile"
6453case "(($ac_try" in
6454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6455 *) ac_try_echo=$ac_try;;
6456esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006459 ac_status=$?
6460 grep -v '^ *+' conftest.er1 >conftest.err
6461 rm -f conftest.er1
6462 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006464 (exit $ac_status); } && {
6465 test -z "$ac_c_werror_flag" ||
6466 test ! -s conftest.err
6467 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006468 eval "$as_ac_Header=yes"
6469else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006470 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006471sed 's/^/| /' conftest.$ac_ext >&5
6472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006473 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006475
6476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006477fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006478ac_res=`eval echo '${'$as_ac_Header'}'`
6479 { echo "$as_me:$LINENO: result: $ac_res" >&5
6480echo "${ECHO_T}$ac_res" >&6; }
6481if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006482 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006483#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006484_ACEOF
6485
6486fi
6487
6488done
6489
6490
Guido van Rossum627b2d71993-12-24 10:39:16 +00006491# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006492was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006493{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6494echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006496/* confdefs.h. */
6497_ACEOF
6498cat confdefs.h >>conftest.$ac_ext
6499cat >>conftest.$ac_ext <<_ACEOF
6500/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006502
6503_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006505 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006506 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006507else
Martin v. Löwis11437992002-04-12 09:54:03 +00006508
6509
6510cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006511#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006512_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006513
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006514
Guido van Rossum627b2d71993-12-24 10:39:16 +00006515fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00006516rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006518{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6519echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006520
Neal Norwitz11690112002-07-30 01:08:28 +00006521# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006522{ echo "$as_me:$LINENO: checking for makedev" >&5
6523echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006524cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006525/* confdefs.h. */
6526_ACEOF
6527cat confdefs.h >>conftest.$ac_ext
6528cat >>conftest.$ac_ext <<_ACEOF
6529/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006530#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006531int
6532main ()
6533{
6534 makedev(0, 0)
6535 ;
6536 return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006540if { (ac_try="$ac_link"
6541case "(($ac_try" in
6542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6543 *) ac_try_echo=$ac_try;;
6544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006546 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006548 grep -v '^ *+' conftest.er1 >conftest.err
6549 rm -f conftest.er1
6550 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552 (exit $ac_status); } && {
6553 test -z "$ac_c_werror_flag" ||
6554 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006555 } && test -s conftest$ac_exeext &&
6556 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006557 ac_cv_has_makedev=yes
6558else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006560sed 's/^/| /' conftest.$ac_ext >&5
6561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006562 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564
6565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006566 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006567if test "$ac_cv_has_makedev" = "no"; then
6568 # we didn't link, try if _OSF_SOURCE will allow us to link
6569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006570/* confdefs.h. */
6571_ACEOF
6572cat confdefs.h >>conftest.$ac_ext
6573cat >>conftest.$ac_ext <<_ACEOF
6574/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006575
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006576#define _OSF_SOURCE 1
6577#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006578
Neal Norwitz11690112002-07-30 01:08:28 +00006579int
6580main ()
6581{
6582 makedev(0, 0)
6583 ;
6584 return 0;
6585}
6586_ACEOF
6587rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006588if { (ac_try="$ac_link"
6589case "(($ac_try" in
6590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6591 *) ac_try_echo=$ac_try;;
6592esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006594 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006596 grep -v '^ *+' conftest.er1 >conftest.err
6597 rm -f conftest.er1
6598 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006600 (exit $ac_status); } && {
6601 test -z "$ac_c_werror_flag" ||
6602 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006603 } && test -s conftest$ac_exeext &&
6604 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006605 ac_cv_has_makedev=yes
6606else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006608sed 's/^/| /' conftest.$ac_ext >&5
6609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006610 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612
6613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006614 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006615 if test "$ac_cv_has_makedev" = "yes"; then
6616
6617cat >>confdefs.h <<\_ACEOF
6618#define _OSF_SOURCE 1
6619_ACEOF
6620
6621 fi
6622fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006623{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6624echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006625if test "$ac_cv_has_makedev" = "yes"; then
6626
6627cat >>confdefs.h <<\_ACEOF
6628#define HAVE_MAKEDEV 1
6629_ACEOF
6630
6631fi
6632
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6634# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6635# defined, but the compiler does not support pragma redefine_extname,
6636# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6637# structures (such as rlimit64) without declaring them. As a
6638# work-around, disable LFS on such configurations
6639
6640use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006641{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6642echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006644/* confdefs.h. */
6645_ACEOF
6646cat confdefs.h >>conftest.$ac_ext
6647cat >>conftest.$ac_ext <<_ACEOF
6648/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649
6650#define _LARGEFILE_SOURCE 1
6651#define _FILE_OFFSET_BITS 64
6652#include <sys/resource.h>
6653
Martin v. Löwis399a6892002-10-04 10:22:02 +00006654int
6655main ()
6656{
6657struct rlimit foo;
6658 ;
6659 return 0;
6660}
6661_ACEOF
6662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006663if { (ac_try="$ac_compile"
6664case "(($ac_try" in
6665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6666 *) ac_try_echo=$ac_try;;
6667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006671 grep -v '^ *+' conftest.er1 >conftest.err
6672 rm -f conftest.er1
6673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675 (exit $ac_status); } && {
6676 test -z "$ac_c_werror_flag" ||
6677 test ! -s conftest.err
6678 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006679 sol_lfs_bug=no
6680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006682sed 's/^/| /' conftest.$ac_ext >&5
6683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006686
6687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006688{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6689echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006690if test "$sol_lfs_bug" = "yes"; then
6691 use_lfs=no
6692fi
6693
6694if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006695# Two defines needed to enable largefile support on various platforms
6696# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698cat >>confdefs.h <<\_ACEOF
6699#define _LARGEFILE_SOURCE 1
6700_ACEOF
6701
6702
6703cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006704#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006705_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006706
Martin v. Löwis399a6892002-10-04 10:22:02 +00006707fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006708
Guido van Rossum84e7b241996-08-19 21:59:00 +00006709# Add some code to confdefs.h so that the test for off_t works on SCO
6710cat >> confdefs.h <<\EOF
6711#if defined(SCO_DS)
6712#undef _OFF_T
6713#endif
6714EOF
6715
Guido van Rossumef2255b2000-03-10 22:30:29 +00006716# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006717{ echo "$as_me:$LINENO: checking for mode_t" >&5
6718echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006719if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006721else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006722 cat >conftest.$ac_ext <<_ACEOF
6723/* confdefs.h. */
6724_ACEOF
6725cat confdefs.h >>conftest.$ac_ext
6726cat >>conftest.$ac_ext <<_ACEOF
6727/* end confdefs.h. */
6728$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006729typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006730int
6731main ()
6732{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006733if ((ac__type_new_ *) 0)
6734 return 0;
6735if (sizeof (ac__type_new_))
6736 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006737 ;
6738 return 0;
6739}
6740_ACEOF
6741rm -f conftest.$ac_objext
6742if { (ac_try="$ac_compile"
6743case "(($ac_try" in
6744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6745 *) ac_try_echo=$ac_try;;
6746esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006748 (eval "$ac_compile") 2>conftest.er1
6749 ac_status=$?
6750 grep -v '^ *+' conftest.er1 >conftest.err
6751 rm -f conftest.er1
6752 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006754 (exit $ac_status); } && {
6755 test -z "$ac_c_werror_flag" ||
6756 test ! -s conftest.err
6757 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006758 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006759else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006761sed 's/^/| /' conftest.$ac_ext >&5
6762
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006763 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006765
6766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006767fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006768{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6769echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6770if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006771 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006772else
Martin v. Löwis11437992002-04-12 09:54:03 +00006773
6774cat >>confdefs.h <<_ACEOF
6775#define mode_t int
6776_ACEOF
6777
6778fi
6779
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006780{ echo "$as_me:$LINENO: checking for off_t" >&5
6781echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006782if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006783 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006784else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006785 cat >conftest.$ac_ext <<_ACEOF
6786/* confdefs.h. */
6787_ACEOF
6788cat confdefs.h >>conftest.$ac_ext
6789cat >>conftest.$ac_ext <<_ACEOF
6790/* end confdefs.h. */
6791$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006792typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006793int
6794main ()
6795{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006796if ((ac__type_new_ *) 0)
6797 return 0;
6798if (sizeof (ac__type_new_))
6799 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006800 ;
6801 return 0;
6802}
6803_ACEOF
6804rm -f conftest.$ac_objext
6805if { (ac_try="$ac_compile"
6806case "(($ac_try" in
6807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6808 *) ac_try_echo=$ac_try;;
6809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006811 (eval "$ac_compile") 2>conftest.er1
6812 ac_status=$?
6813 grep -v '^ *+' conftest.er1 >conftest.err
6814 rm -f conftest.er1
6815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006817 (exit $ac_status); } && {
6818 test -z "$ac_c_werror_flag" ||
6819 test ! -s conftest.err
6820 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006821 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006822else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006824sed 's/^/| /' conftest.$ac_ext >&5
6825
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006826 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006828
6829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006830fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006831{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6832echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6833if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006834 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006835else
Martin v. Löwis11437992002-04-12 09:54:03 +00006836
6837cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006838#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006839_ACEOF
6840
6841fi
6842
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006843{ echo "$as_me:$LINENO: checking for pid_t" >&5
6844echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006845if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006846 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006847else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006848 cat >conftest.$ac_ext <<_ACEOF
6849/* confdefs.h. */
6850_ACEOF
6851cat confdefs.h >>conftest.$ac_ext
6852cat >>conftest.$ac_ext <<_ACEOF
6853/* end confdefs.h. */
6854$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006855typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006856int
6857main ()
6858{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006859if ((ac__type_new_ *) 0)
6860 return 0;
6861if (sizeof (ac__type_new_))
6862 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006863 ;
6864 return 0;
6865}
6866_ACEOF
6867rm -f conftest.$ac_objext
6868if { (ac_try="$ac_compile"
6869case "(($ac_try" in
6870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6871 *) ac_try_echo=$ac_try;;
6872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006874 (eval "$ac_compile") 2>conftest.er1
6875 ac_status=$?
6876 grep -v '^ *+' conftest.er1 >conftest.err
6877 rm -f conftest.er1
6878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006880 (exit $ac_status); } && {
6881 test -z "$ac_c_werror_flag" ||
6882 test ! -s conftest.err
6883 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006884 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006885else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006887sed 's/^/| /' conftest.$ac_ext >&5
6888
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006889 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891
6892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006893fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006894{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6895echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6896if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006897 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006898else
Martin v. Löwis11437992002-04-12 09:54:03 +00006899
6900cat >>confdefs.h <<_ACEOF
6901#define pid_t int
6902_ACEOF
6903
6904fi
6905
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006906{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6907echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006908if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006910else
6911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006912/* confdefs.h. */
6913_ACEOF
6914cat confdefs.h >>conftest.$ac_ext
6915cat >>conftest.$ac_ext <<_ACEOF
6916/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917#include <sys/types.h>
6918#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920int
6921main ()
6922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006923return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006924 ;
6925 return 0;
6926}
6927_ACEOF
6928rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006929if { (ac_try="$ac_compile"
6930case "(($ac_try" in
6931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6932 *) ac_try_echo=$ac_try;;
6933esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006937 grep -v '^ *+' conftest.er1 >conftest.err
6938 rm -f conftest.er1
6939 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006941 (exit $ac_status); } && {
6942 test -z "$ac_c_werror_flag" ||
6943 test ! -s conftest.err
6944 } && test -s conftest.$ac_objext; then
6945 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006946else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006948sed 's/^/| /' conftest.$ac_ext >&5
6949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006950 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952
6953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006954fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006955{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6956echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006959#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006960_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006961
Michael W. Hudson54241132001-12-07 15:38:26 +00006962
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006963{ echo "$as_me:$LINENO: checking for size_t" >&5
6964echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006965if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006967else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006968 cat >conftest.$ac_ext <<_ACEOF
6969/* confdefs.h. */
6970_ACEOF
6971cat confdefs.h >>conftest.$ac_ext
6972cat >>conftest.$ac_ext <<_ACEOF
6973/* end confdefs.h. */
6974$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006975typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006976int
6977main ()
6978{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006979if ((ac__type_new_ *) 0)
6980 return 0;
6981if (sizeof (ac__type_new_))
6982 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006983 ;
6984 return 0;
6985}
6986_ACEOF
6987rm -f conftest.$ac_objext
6988if { (ac_try="$ac_compile"
6989case "(($ac_try" in
6990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6991 *) ac_try_echo=$ac_try;;
6992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006994 (eval "$ac_compile") 2>conftest.er1
6995 ac_status=$?
6996 grep -v '^ *+' conftest.er1 >conftest.err
6997 rm -f conftest.er1
6998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007000 (exit $ac_status); } && {
7001 test -z "$ac_c_werror_flag" ||
7002 test ! -s conftest.err
7003 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007004 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007007sed 's/^/| /' conftest.$ac_ext >&5
7008
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007009 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011
7012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007013fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007014{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7015echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7016if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018else
Martin v. Löwis11437992002-04-12 09:54:03 +00007019
7020cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007021#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007022_ACEOF
7023
7024fi
7025
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007026{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7027echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007028if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007029 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007030else
7031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007032/* confdefs.h. */
7033_ACEOF
7034cat confdefs.h >>conftest.$ac_ext
7035cat >>conftest.$ac_ext <<_ACEOF
7036/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007038
7039_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007041 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007042 ac_cv_type_uid_t=yes
7043else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007044 ac_cv_type_uid_t=no
7045fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007046rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007047
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007048fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007049{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7050echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007051if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007052
Martin v. Löwis11437992002-04-12 09:54:03 +00007053cat >>confdefs.h <<\_ACEOF
7054#define uid_t int
7055_ACEOF
7056
7057
7058cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007060_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061
7062fi
7063
Mark Dickinsonbd792642009-03-18 20:06:12 +00007064
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007065 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7066echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007067if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007068 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007069else
7070 ac_cv_c_uint32_t=no
7071 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7072 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7073 cat >conftest.$ac_ext <<_ACEOF
7074/* confdefs.h. */
7075_ACEOF
7076cat confdefs.h >>conftest.$ac_ext
7077cat >>conftest.$ac_ext <<_ACEOF
7078/* end confdefs.h. */
7079$ac_includes_default
7080int
7081main ()
7082{
7083static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7084test_array [0] = 0
7085
7086 ;
7087 return 0;
7088}
7089_ACEOF
7090rm -f conftest.$ac_objext
7091if { (ac_try="$ac_compile"
7092case "(($ac_try" in
7093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7094 *) ac_try_echo=$ac_try;;
7095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007097 (eval "$ac_compile") 2>conftest.er1
7098 ac_status=$?
7099 grep -v '^ *+' conftest.er1 >conftest.err
7100 rm -f conftest.er1
7101 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007103 (exit $ac_status); } && {
7104 test -z "$ac_c_werror_flag" ||
7105 test ! -s conftest.err
7106 } && test -s conftest.$ac_objext; then
7107 case $ac_type in
7108 uint32_t) ac_cv_c_uint32_t=yes ;;
7109 *) ac_cv_c_uint32_t=$ac_type ;;
7110esac
7111
7112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007113 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007114sed 's/^/| /' conftest.$ac_ext >&5
7115
7116
7117fi
7118
7119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7120 test "$ac_cv_c_uint32_t" != no && break
7121 done
7122fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007123{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7124echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007125 case $ac_cv_c_uint32_t in #(
7126 no|yes) ;; #(
7127 *)
7128
7129cat >>confdefs.h <<\_ACEOF
7130#define _UINT32_T 1
7131_ACEOF
7132
7133
7134cat >>confdefs.h <<_ACEOF
7135#define uint32_t $ac_cv_c_uint32_t
7136_ACEOF
7137;;
7138 esac
7139
7140
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007141 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7142echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007143if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007144 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007145else
7146 ac_cv_c_uint64_t=no
7147 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7148 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7149 cat >conftest.$ac_ext <<_ACEOF
7150/* confdefs.h. */
7151_ACEOF
7152cat confdefs.h >>conftest.$ac_ext
7153cat >>conftest.$ac_ext <<_ACEOF
7154/* end confdefs.h. */
7155$ac_includes_default
7156int
7157main ()
7158{
7159static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7160test_array [0] = 0
7161
7162 ;
7163 return 0;
7164}
7165_ACEOF
7166rm -f conftest.$ac_objext
7167if { (ac_try="$ac_compile"
7168case "(($ac_try" in
7169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7170 *) ac_try_echo=$ac_try;;
7171esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007173 (eval "$ac_compile") 2>conftest.er1
7174 ac_status=$?
7175 grep -v '^ *+' conftest.er1 >conftest.err
7176 rm -f conftest.er1
7177 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007179 (exit $ac_status); } && {
7180 test -z "$ac_c_werror_flag" ||
7181 test ! -s conftest.err
7182 } && test -s conftest.$ac_objext; then
7183 case $ac_type in
7184 uint64_t) ac_cv_c_uint64_t=yes ;;
7185 *) ac_cv_c_uint64_t=$ac_type ;;
7186esac
7187
7188else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007189 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007190sed 's/^/| /' conftest.$ac_ext >&5
7191
7192
7193fi
7194
7195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7196 test "$ac_cv_c_uint64_t" != no && break
7197 done
7198fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007199{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7200echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007201 case $ac_cv_c_uint64_t in #(
7202 no|yes) ;; #(
7203 *)
7204
7205cat >>confdefs.h <<\_ACEOF
7206#define _UINT64_T 1
7207_ACEOF
7208
7209
7210cat >>confdefs.h <<_ACEOF
7211#define uint64_t $ac_cv_c_uint64_t
7212_ACEOF
7213;;
7214 esac
7215
7216
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007217 { echo "$as_me:$LINENO: checking for int32_t" >&5
7218echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007219if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007220 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007221else
7222 ac_cv_c_int32_t=no
7223 for ac_type in 'int32_t' 'int' 'long int' \
7224 'long long int' 'short int' 'signed char'; do
7225 cat >conftest.$ac_ext <<_ACEOF
7226/* confdefs.h. */
7227_ACEOF
7228cat confdefs.h >>conftest.$ac_ext
7229cat >>conftest.$ac_ext <<_ACEOF
7230/* end confdefs.h. */
7231$ac_includes_default
7232int
7233main ()
7234{
7235static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7236test_array [0] = 0
7237
7238 ;
7239 return 0;
7240}
7241_ACEOF
7242rm -f conftest.$ac_objext
7243if { (ac_try="$ac_compile"
7244case "(($ac_try" in
7245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7246 *) ac_try_echo=$ac_try;;
7247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007249 (eval "$ac_compile") 2>conftest.er1
7250 ac_status=$?
7251 grep -v '^ *+' conftest.er1 >conftest.err
7252 rm -f conftest.er1
7253 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007255 (exit $ac_status); } && {
7256 test -z "$ac_c_werror_flag" ||
7257 test ! -s conftest.err
7258 } && test -s conftest.$ac_objext; then
7259 cat >conftest.$ac_ext <<_ACEOF
7260/* confdefs.h. */
7261_ACEOF
7262cat confdefs.h >>conftest.$ac_ext
7263cat >>conftest.$ac_ext <<_ACEOF
7264/* end confdefs.h. */
7265$ac_includes_default
7266int
7267main ()
7268{
7269static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007270 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007271test_array [0] = 0
7272
7273 ;
7274 return 0;
7275}
7276_ACEOF
7277rm -f conftest.$ac_objext
7278if { (ac_try="$ac_compile"
7279case "(($ac_try" in
7280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7281 *) ac_try_echo=$ac_try;;
7282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007284 (eval "$ac_compile") 2>conftest.er1
7285 ac_status=$?
7286 grep -v '^ *+' conftest.er1 >conftest.err
7287 rm -f conftest.er1
7288 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007290 (exit $ac_status); } && {
7291 test -z "$ac_c_werror_flag" ||
7292 test ! -s conftest.err
7293 } && test -s conftest.$ac_objext; then
7294 :
7295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007296 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007297sed 's/^/| /' conftest.$ac_ext >&5
7298
7299 case $ac_type in
7300 int32_t) ac_cv_c_int32_t=yes ;;
7301 *) ac_cv_c_int32_t=$ac_type ;;
7302esac
7303
7304fi
7305
7306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007308 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007309sed 's/^/| /' conftest.$ac_ext >&5
7310
7311
7312fi
7313
7314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7315 test "$ac_cv_c_int32_t" != no && break
7316 done
7317fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007318{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7319echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007320 case $ac_cv_c_int32_t in #(
7321 no|yes) ;; #(
7322 *)
7323
7324cat >>confdefs.h <<_ACEOF
7325#define int32_t $ac_cv_c_int32_t
7326_ACEOF
7327;;
7328 esac
7329
7330
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007331 { echo "$as_me:$LINENO: checking for int64_t" >&5
7332echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007333if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007334 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007335else
7336 ac_cv_c_int64_t=no
7337 for ac_type in 'int64_t' 'int' 'long int' \
7338 'long long int' 'short int' 'signed char'; do
7339 cat >conftest.$ac_ext <<_ACEOF
7340/* confdefs.h. */
7341_ACEOF
7342cat confdefs.h >>conftest.$ac_ext
7343cat >>conftest.$ac_ext <<_ACEOF
7344/* end confdefs.h. */
7345$ac_includes_default
7346int
7347main ()
7348{
7349static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7350test_array [0] = 0
7351
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356rm -f conftest.$ac_objext
7357if { (ac_try="$ac_compile"
7358case "(($ac_try" in
7359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7360 *) ac_try_echo=$ac_try;;
7361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007363 (eval "$ac_compile") 2>conftest.er1
7364 ac_status=$?
7365 grep -v '^ *+' conftest.er1 >conftest.err
7366 rm -f conftest.er1
7367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007369 (exit $ac_status); } && {
7370 test -z "$ac_c_werror_flag" ||
7371 test ! -s conftest.err
7372 } && test -s conftest.$ac_objext; then
7373 cat >conftest.$ac_ext <<_ACEOF
7374/* confdefs.h. */
7375_ACEOF
7376cat confdefs.h >>conftest.$ac_ext
7377cat >>conftest.$ac_ext <<_ACEOF
7378/* end confdefs.h. */
7379$ac_includes_default
7380int
7381main ()
7382{
7383static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007384 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007385test_array [0] = 0
7386
7387 ;
7388 return 0;
7389}
7390_ACEOF
7391rm -f conftest.$ac_objext
7392if { (ac_try="$ac_compile"
7393case "(($ac_try" in
7394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7395 *) ac_try_echo=$ac_try;;
7396esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007398 (eval "$ac_compile") 2>conftest.er1
7399 ac_status=$?
7400 grep -v '^ *+' conftest.er1 >conftest.err
7401 rm -f conftest.er1
7402 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007404 (exit $ac_status); } && {
7405 test -z "$ac_c_werror_flag" ||
7406 test ! -s conftest.err
7407 } && test -s conftest.$ac_objext; then
7408 :
7409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007410 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007411sed 's/^/| /' conftest.$ac_ext >&5
7412
7413 case $ac_type in
7414 int64_t) ac_cv_c_int64_t=yes ;;
7415 *) ac_cv_c_int64_t=$ac_type ;;
7416esac
7417
7418fi
7419
7420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007422 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007423sed 's/^/| /' conftest.$ac_ext >&5
7424
7425
7426fi
7427
7428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7429 test "$ac_cv_c_int64_t" != no && break
7430 done
7431fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007432{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7433echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007434 case $ac_cv_c_int64_t in #(
7435 no|yes) ;; #(
7436 *)
7437
7438cat >>confdefs.h <<_ACEOF
7439#define int64_t $ac_cv_c_int64_t
7440_ACEOF
7441;;
7442 esac
7443
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007444{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7445echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007446if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007447 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007448else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007449 cat >conftest.$ac_ext <<_ACEOF
7450/* confdefs.h. */
7451_ACEOF
7452cat confdefs.h >>conftest.$ac_ext
7453cat >>conftest.$ac_ext <<_ACEOF
7454/* end confdefs.h. */
7455$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007456typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007457int
7458main ()
7459{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007460if ((ac__type_new_ *) 0)
7461 return 0;
7462if (sizeof (ac__type_new_))
7463 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007464 ;
7465 return 0;
7466}
7467_ACEOF
7468rm -f conftest.$ac_objext
7469if { (ac_try="$ac_compile"
7470case "(($ac_try" in
7471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7472 *) ac_try_echo=$ac_try;;
7473esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007475 (eval "$ac_compile") 2>conftest.er1
7476 ac_status=$?
7477 grep -v '^ *+' conftest.er1 >conftest.err
7478 rm -f conftest.er1
7479 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007481 (exit $ac_status); } && {
7482 test -z "$ac_c_werror_flag" ||
7483 test ! -s conftest.err
7484 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007485 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007486else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007487 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007488sed 's/^/| /' conftest.$ac_ext >&5
7489
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007490 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007492
7493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007494fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007495{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7496echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7497if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007498
7499cat >>confdefs.h <<\_ACEOF
7500#define HAVE_SSIZE_T 1
7501_ACEOF
7502
7503fi
7504
Jack Jansendd19cf82001-12-06 22:36:17 +00007505
Michael W. Hudson54241132001-12-07 15:38:26 +00007506# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007507# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007508{ echo "$as_me:$LINENO: checking for int" >&5
7509echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7510if test "${ac_cv_type_int+set}" = set; then
7511 echo $ECHO_N "(cached) $ECHO_C" >&6
7512else
7513 cat >conftest.$ac_ext <<_ACEOF
7514/* confdefs.h. */
7515_ACEOF
7516cat confdefs.h >>conftest.$ac_ext
7517cat >>conftest.$ac_ext <<_ACEOF
7518/* end confdefs.h. */
7519$ac_includes_default
7520typedef int ac__type_new_;
7521int
7522main ()
7523{
7524if ((ac__type_new_ *) 0)
7525 return 0;
7526if (sizeof (ac__type_new_))
7527 return 0;
7528 ;
7529 return 0;
7530}
7531_ACEOF
7532rm -f conftest.$ac_objext
7533if { (ac_try="$ac_compile"
7534case "(($ac_try" in
7535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7536 *) ac_try_echo=$ac_try;;
7537esac
7538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7539 (eval "$ac_compile") 2>conftest.er1
7540 ac_status=$?
7541 grep -v '^ *+' conftest.er1 >conftest.err
7542 rm -f conftest.er1
7543 cat conftest.err >&5
7544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545 (exit $ac_status); } && {
7546 test -z "$ac_c_werror_flag" ||
7547 test ! -s conftest.err
7548 } && test -s conftest.$ac_objext; then
7549 ac_cv_type_int=yes
7550else
7551 echo "$as_me: failed program was:" >&5
7552sed 's/^/| /' conftest.$ac_ext >&5
7553
7554 ac_cv_type_int=no
7555fi
7556
7557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7558fi
7559{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7560echo "${ECHO_T}$ac_cv_type_int" >&6; }
7561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007562# The cast to long int works around a bug in the HP C Compiler
7563# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7564# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7565# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007566{ echo "$as_me:$LINENO: checking size of int" >&5
7567echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007568if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007570else
Martin v. Löwis11437992002-04-12 09:54:03 +00007571 if test "$cross_compiling" = yes; then
7572 # Depending upon the size, compute the lo and hi bounds.
7573cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007574/* confdefs.h. */
7575_ACEOF
7576cat confdefs.h >>conftest.$ac_ext
7577cat >>conftest.$ac_ext <<_ACEOF
7578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007579$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007580 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007581int
7582main ()
7583{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007584static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007585test_array [0] = 0
7586
7587 ;
7588 return 0;
7589}
7590_ACEOF
7591rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007592if { (ac_try="$ac_compile"
7593case "(($ac_try" in
7594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7595 *) ac_try_echo=$ac_try;;
7596esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007600 grep -v '^ *+' conftest.er1 >conftest.err
7601 rm -f conftest.er1
7602 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604 (exit $ac_status); } && {
7605 test -z "$ac_c_werror_flag" ||
7606 test ! -s conftest.err
7607 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007608 ac_lo=0 ac_mid=0
7609 while :; do
7610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007611/* confdefs.h. */
7612_ACEOF
7613cat confdefs.h >>conftest.$ac_ext
7614cat >>conftest.$ac_ext <<_ACEOF
7615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007616$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007617 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007618int
7619main ()
7620{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007622test_array [0] = 0
7623
7624 ;
7625 return 0;
7626}
7627_ACEOF
7628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007629if { (ac_try="$ac_compile"
7630case "(($ac_try" in
7631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7632 *) ac_try_echo=$ac_try;;
7633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007637 grep -v '^ *+' conftest.er1 >conftest.err
7638 rm -f conftest.er1
7639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641 (exit $ac_status); } && {
7642 test -z "$ac_c_werror_flag" ||
7643 test ! -s conftest.err
7644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007645 ac_hi=$ac_mid; break
7646else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007648sed 's/^/| /' conftest.$ac_ext >&5
7649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007650 ac_lo=`expr $ac_mid + 1`
7651 if test $ac_lo -le $ac_mid; then
7652 ac_lo= ac_hi=
7653 break
7654 fi
7655 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657
7658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 done
7660else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007662sed 's/^/| /' conftest.$ac_ext >&5
7663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007665/* confdefs.h. */
7666_ACEOF
7667cat confdefs.h >>conftest.$ac_ext
7668cat >>conftest.$ac_ext <<_ACEOF
7669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007670$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007671 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007672int
7673main ()
7674{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007675static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007676test_array [0] = 0
7677
7678 ;
7679 return 0;
7680}
7681_ACEOF
7682rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007683if { (ac_try="$ac_compile"
7684case "(($ac_try" in
7685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7686 *) ac_try_echo=$ac_try;;
7687esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007691 grep -v '^ *+' conftest.er1 >conftest.err
7692 rm -f conftest.er1
7693 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695 (exit $ac_status); } && {
7696 test -z "$ac_c_werror_flag" ||
7697 test ! -s conftest.err
7698 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 ac_hi=-1 ac_mid=-1
7700 while :; do
7701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007702/* confdefs.h. */
7703_ACEOF
7704cat confdefs.h >>conftest.$ac_ext
7705cat >>conftest.$ac_ext <<_ACEOF
7706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007707$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007708 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007709int
7710main ()
7711{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007712static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007713test_array [0] = 0
7714
7715 ;
7716 return 0;
7717}
7718_ACEOF
7719rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720if { (ac_try="$ac_compile"
7721case "(($ac_try" in
7722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7723 *) ac_try_echo=$ac_try;;
7724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007728 grep -v '^ *+' conftest.er1 >conftest.err
7729 rm -f conftest.er1
7730 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732 (exit $ac_status); } && {
7733 test -z "$ac_c_werror_flag" ||
7734 test ! -s conftest.err
7735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 ac_lo=$ac_mid; break
7737else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007739sed 's/^/| /' conftest.$ac_ext >&5
7740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741 ac_hi=`expr '(' $ac_mid ')' - 1`
7742 if test $ac_mid -le $ac_hi; then
7743 ac_lo= ac_hi=
7744 break
7745 fi
7746 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748
7749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 done
7751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007753sed 's/^/| /' conftest.$ac_ext >&5
7754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757
7758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760
7761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007762# Binary search between lo and hi bounds.
7763while test "x$ac_lo" != "x$ac_hi"; do
7764 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007766/* confdefs.h. */
7767_ACEOF
7768cat confdefs.h >>conftest.$ac_ext
7769cat >>conftest.$ac_ext <<_ACEOF
7770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007771$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007772 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007773int
7774main ()
7775{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007776static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007777test_array [0] = 0
7778
7779 ;
7780 return 0;
7781}
7782_ACEOF
7783rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784if { (ac_try="$ac_compile"
7785case "(($ac_try" in
7786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7787 *) ac_try_echo=$ac_try;;
7788esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007792 grep -v '^ *+' conftest.er1 >conftest.err
7793 rm -f conftest.er1
7794 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796 (exit $ac_status); } && {
7797 test -z "$ac_c_werror_flag" ||
7798 test ! -s conftest.err
7799 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 ac_hi=$ac_mid
7801else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007803sed 's/^/| /' conftest.$ac_ext >&5
7804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807
7808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007809done
7810case $ac_lo in
7811?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007813 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007814See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007815echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007816See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007817 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 else
7819 ac_cv_sizeof_int=0
7820 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007821esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007822else
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007824/* confdefs.h. */
7825_ACEOF
7826cat confdefs.h >>conftest.$ac_ext
7827cat >>conftest.$ac_ext <<_ACEOF
7828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007829$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007830 typedef int ac__type_sizeof_;
7831static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7832static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007833#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007834#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007835int
7836main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007837{
Martin v. Löwis11437992002-04-12 09:54:03 +00007838
7839 FILE *f = fopen ("conftest.val", "w");
7840 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007842 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007845 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007847 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 }
7849 else
7850 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007852 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007854 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007857
7858 ;
7859 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007860}
Martin v. Löwis11437992002-04-12 09:54:03 +00007861_ACEOF
7862rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863if { (ac_try="$ac_link"
7864case "(($ac_try" in
7865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7866 *) ac_try_echo=$ac_try;;
7867esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 { (case "(($ac_try" in
7874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7875 *) ac_try_echo=$ac_try;;
7876esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 (exit $ac_status); }; }; then
7882 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007883else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007884 echo "$as_me: program exited with status $ac_status" >&5
7885echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007886sed 's/^/| /' conftest.$ac_ext >&5
7887
Martin v. Löwis11437992002-04-12 09:54:03 +00007888( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007890 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007891See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007892echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007893See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007894 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895 else
7896 ac_cv_sizeof_int=0
7897 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899rm -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 +00007900fi
7901rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007902fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007903{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7904echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905
7906
7907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007909#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007910_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007911
7912
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007913{ echo "$as_me:$LINENO: checking for long" >&5
7914echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7915if test "${ac_cv_type_long+set}" = set; then
7916 echo $ECHO_N "(cached) $ECHO_C" >&6
7917else
7918 cat >conftest.$ac_ext <<_ACEOF
7919/* confdefs.h. */
7920_ACEOF
7921cat confdefs.h >>conftest.$ac_ext
7922cat >>conftest.$ac_ext <<_ACEOF
7923/* end confdefs.h. */
7924$ac_includes_default
7925typedef long ac__type_new_;
7926int
7927main ()
7928{
7929if ((ac__type_new_ *) 0)
7930 return 0;
7931if (sizeof (ac__type_new_))
7932 return 0;
7933 ;
7934 return 0;
7935}
7936_ACEOF
7937rm -f conftest.$ac_objext
7938if { (ac_try="$ac_compile"
7939case "(($ac_try" in
7940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7941 *) ac_try_echo=$ac_try;;
7942esac
7943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7944 (eval "$ac_compile") 2>conftest.er1
7945 ac_status=$?
7946 grep -v '^ *+' conftest.er1 >conftest.err
7947 rm -f conftest.er1
7948 cat conftest.err >&5
7949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7950 (exit $ac_status); } && {
7951 test -z "$ac_c_werror_flag" ||
7952 test ! -s conftest.err
7953 } && test -s conftest.$ac_objext; then
7954 ac_cv_type_long=yes
7955else
7956 echo "$as_me: failed program was:" >&5
7957sed 's/^/| /' conftest.$ac_ext >&5
7958
7959 ac_cv_type_long=no
7960fi
7961
7962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7963fi
7964{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7965echo "${ECHO_T}$ac_cv_type_long" >&6; }
7966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967# The cast to long int works around a bug in the HP C Compiler
7968# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7969# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7970# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007971{ echo "$as_me:$LINENO: checking size of long" >&5
7972echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007973if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007975else
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 if test "$cross_compiling" = yes; then
7977 # Depending upon the size, compute the lo and hi bounds.
7978cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007979/* confdefs.h. */
7980_ACEOF
7981cat confdefs.h >>conftest.$ac_ext
7982cat >>conftest.$ac_ext <<_ACEOF
7983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007984$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007985 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007986int
7987main ()
7988{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007989static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007990test_array [0] = 0
7991
7992 ;
7993 return 0;
7994}
7995_ACEOF
7996rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997if { (ac_try="$ac_compile"
7998case "(($ac_try" in
7999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8000 *) ac_try_echo=$ac_try;;
8001esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008005 grep -v '^ *+' conftest.er1 >conftest.err
8006 rm -f conftest.er1
8007 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 (exit $ac_status); } && {
8010 test -z "$ac_c_werror_flag" ||
8011 test ! -s conftest.err
8012 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008013 ac_lo=0 ac_mid=0
8014 while :; do
8015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008016/* confdefs.h. */
8017_ACEOF
8018cat confdefs.h >>conftest.$ac_ext
8019cat >>conftest.$ac_ext <<_ACEOF
8020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008021$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008022 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008023int
8024main ()
8025{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008026static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008027test_array [0] = 0
8028
8029 ;
8030 return 0;
8031}
8032_ACEOF
8033rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034if { (ac_try="$ac_compile"
8035case "(($ac_try" in
8036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8037 *) ac_try_echo=$ac_try;;
8038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008042 grep -v '^ *+' conftest.er1 >conftest.err
8043 rm -f conftest.er1
8044 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 (exit $ac_status); } && {
8047 test -z "$ac_c_werror_flag" ||
8048 test ! -s conftest.err
8049 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ac_hi=$ac_mid; break
8051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008053sed 's/^/| /' conftest.$ac_ext >&5
8054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055 ac_lo=`expr $ac_mid + 1`
8056 if test $ac_lo -le $ac_mid; then
8057 ac_lo= ac_hi=
8058 break
8059 fi
8060 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062
8063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 done
8065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008067sed 's/^/| /' conftest.$ac_ext >&5
8068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008070/* confdefs.h. */
8071_ACEOF
8072cat confdefs.h >>conftest.$ac_ext
8073cat >>conftest.$ac_ext <<_ACEOF
8074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008075$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008076 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008077int
8078main ()
8079{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008080static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008081test_array [0] = 0
8082
8083 ;
8084 return 0;
8085}
8086_ACEOF
8087rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088if { (ac_try="$ac_compile"
8089case "(($ac_try" in
8090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8091 *) ac_try_echo=$ac_try;;
8092esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008096 grep -v '^ *+' conftest.er1 >conftest.err
8097 rm -f conftest.er1
8098 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100 (exit $ac_status); } && {
8101 test -z "$ac_c_werror_flag" ||
8102 test ! -s conftest.err
8103 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008104 ac_hi=-1 ac_mid=-1
8105 while :; do
8106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008107/* confdefs.h. */
8108_ACEOF
8109cat confdefs.h >>conftest.$ac_ext
8110cat >>conftest.$ac_ext <<_ACEOF
8111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008112$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008113 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008114int
8115main ()
8116{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008117static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008118test_array [0] = 0
8119
8120 ;
8121 return 0;
8122}
8123_ACEOF
8124rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125if { (ac_try="$ac_compile"
8126case "(($ac_try" in
8127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8128 *) ac_try_echo=$ac_try;;
8129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008133 grep -v '^ *+' conftest.er1 >conftest.err
8134 rm -f conftest.er1
8135 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008137 (exit $ac_status); } && {
8138 test -z "$ac_c_werror_flag" ||
8139 test ! -s conftest.err
8140 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008141 ac_lo=$ac_mid; break
8142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008144sed 's/^/| /' conftest.$ac_ext >&5
8145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008146 ac_hi=`expr '(' $ac_mid ')' - 1`
8147 if test $ac_mid -le $ac_hi; then
8148 ac_lo= ac_hi=
8149 break
8150 fi
8151 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153
8154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 done
8156else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008158sed 's/^/| /' conftest.$ac_ext >&5
8159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162
8163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165
8166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008167# Binary search between lo and hi bounds.
8168while test "x$ac_lo" != "x$ac_hi"; do
8169 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008171/* confdefs.h. */
8172_ACEOF
8173cat confdefs.h >>conftest.$ac_ext
8174cat >>conftest.$ac_ext <<_ACEOF
8175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008176$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008177 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008178int
8179main ()
8180{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008182test_array [0] = 0
8183
8184 ;
8185 return 0;
8186}
8187_ACEOF
8188rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189if { (ac_try="$ac_compile"
8190case "(($ac_try" in
8191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8192 *) ac_try_echo=$ac_try;;
8193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008197 grep -v '^ *+' conftest.er1 >conftest.err
8198 rm -f conftest.er1
8199 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 (exit $ac_status); } && {
8202 test -z "$ac_c_werror_flag" ||
8203 test ! -s conftest.err
8204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 ac_hi=$ac_mid
8206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008208sed 's/^/| /' conftest.$ac_ext >&5
8209
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212
8213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008214done
8215case $ac_lo in
8216?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008218 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008219See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008220echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008221See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008222 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223 else
8224 ac_cv_sizeof_long=0
8225 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008226esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008227else
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008229/* confdefs.h. */
8230_ACEOF
8231cat confdefs.h >>conftest.$ac_ext
8232cat >>conftest.$ac_ext <<_ACEOF
8233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008234$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008235 typedef long ac__type_sizeof_;
8236static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8237static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008238#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008239#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008240int
8241main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008242{
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
8244 FILE *f = fopen ("conftest.val", "w");
8245 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008247 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008248 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008250 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008252 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008253 }
8254 else
8255 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008257 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008259 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008260 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008262
8263 ;
8264 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008265}
Martin v. Löwis11437992002-04-12 09:54:03 +00008266_ACEOF
8267rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268if { (ac_try="$ac_link"
8269case "(($ac_try" in
8270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8271 *) ac_try_echo=$ac_try;;
8272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278 { (case "(($ac_try" in
8279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8280 *) ac_try_echo=$ac_try;;
8281esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008284 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 (exit $ac_status); }; }; then
8287 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008289 echo "$as_me: program exited with status $ac_status" >&5
8290echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008291sed 's/^/| /' conftest.$ac_ext >&5
8292
Martin v. Löwis11437992002-04-12 09:54:03 +00008293( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008294if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008295 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008296See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008297echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008298See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008299 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008300 else
8301 ac_cv_sizeof_long=0
8302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304rm -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 +00008305fi
8306rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008307fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008308{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8309echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310
8311
8312
Martin v. Löwis11437992002-04-12 09:54:03 +00008313cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008314#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008315_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008316
8317
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008318{ echo "$as_me:$LINENO: checking for void *" >&5
8319echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8320if test "${ac_cv_type_void_p+set}" = set; then
8321 echo $ECHO_N "(cached) $ECHO_C" >&6
8322else
8323 cat >conftest.$ac_ext <<_ACEOF
8324/* confdefs.h. */
8325_ACEOF
8326cat confdefs.h >>conftest.$ac_ext
8327cat >>conftest.$ac_ext <<_ACEOF
8328/* end confdefs.h. */
8329$ac_includes_default
8330typedef void * ac__type_new_;
8331int
8332main ()
8333{
8334if ((ac__type_new_ *) 0)
8335 return 0;
8336if (sizeof (ac__type_new_))
8337 return 0;
8338 ;
8339 return 0;
8340}
8341_ACEOF
8342rm -f conftest.$ac_objext
8343if { (ac_try="$ac_compile"
8344case "(($ac_try" in
8345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8346 *) ac_try_echo=$ac_try;;
8347esac
8348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8349 (eval "$ac_compile") 2>conftest.er1
8350 ac_status=$?
8351 grep -v '^ *+' conftest.er1 >conftest.err
8352 rm -f conftest.er1
8353 cat conftest.err >&5
8354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8355 (exit $ac_status); } && {
8356 test -z "$ac_c_werror_flag" ||
8357 test ! -s conftest.err
8358 } && test -s conftest.$ac_objext; then
8359 ac_cv_type_void_p=yes
8360else
8361 echo "$as_me: failed program was:" >&5
8362sed 's/^/| /' conftest.$ac_ext >&5
8363
8364 ac_cv_type_void_p=no
8365fi
8366
8367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8368fi
8369{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8370echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372# The cast to long int works around a bug in the HP C Compiler
8373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8375# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008376{ echo "$as_me:$LINENO: checking size of void *" >&5
8377echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008378if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008379 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008380else
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 if test "$cross_compiling" = yes; then
8382 # Depending upon the size, compute the lo and hi bounds.
8383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008384/* confdefs.h. */
8385_ACEOF
8386cat confdefs.h >>conftest.$ac_ext
8387cat >>conftest.$ac_ext <<_ACEOF
8388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008389$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008390 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008391int
8392main ()
8393{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008394static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008395test_array [0] = 0
8396
8397 ;
8398 return 0;
8399}
8400_ACEOF
8401rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402if { (ac_try="$ac_compile"
8403case "(($ac_try" in
8404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8405 *) ac_try_echo=$ac_try;;
8406esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008410 grep -v '^ *+' conftest.er1 >conftest.err
8411 rm -f conftest.er1
8412 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414 (exit $ac_status); } && {
8415 test -z "$ac_c_werror_flag" ||
8416 test ! -s conftest.err
8417 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008418 ac_lo=0 ac_mid=0
8419 while :; do
8420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008421/* confdefs.h. */
8422_ACEOF
8423cat confdefs.h >>conftest.$ac_ext
8424cat >>conftest.$ac_ext <<_ACEOF
8425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008426$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008427 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008428int
8429main ()
8430{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008431static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008432test_array [0] = 0
8433
8434 ;
8435 return 0;
8436}
8437_ACEOF
8438rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439if { (ac_try="$ac_compile"
8440case "(($ac_try" in
8441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8442 *) ac_try_echo=$ac_try;;
8443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008447 grep -v '^ *+' conftest.er1 >conftest.err
8448 rm -f conftest.er1
8449 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451 (exit $ac_status); } && {
8452 test -z "$ac_c_werror_flag" ||
8453 test ! -s conftest.err
8454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 ac_hi=$ac_mid; break
8456else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008458sed 's/^/| /' conftest.$ac_ext >&5
8459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460 ac_lo=`expr $ac_mid + 1`
8461 if test $ac_lo -le $ac_mid; then
8462 ac_lo= ac_hi=
8463 break
8464 fi
8465 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467
8468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 done
8470else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008472sed 's/^/| /' conftest.$ac_ext >&5
8473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008475/* confdefs.h. */
8476_ACEOF
8477cat confdefs.h >>conftest.$ac_ext
8478cat >>conftest.$ac_ext <<_ACEOF
8479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008480$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008481 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008482int
8483main ()
8484{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008485static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008486test_array [0] = 0
8487
8488 ;
8489 return 0;
8490}
8491_ACEOF
8492rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493if { (ac_try="$ac_compile"
8494case "(($ac_try" in
8495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8496 *) ac_try_echo=$ac_try;;
8497esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008501 grep -v '^ *+' conftest.er1 >conftest.err
8502 rm -f conftest.er1
8503 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505 (exit $ac_status); } && {
8506 test -z "$ac_c_werror_flag" ||
8507 test ! -s conftest.err
8508 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ac_hi=-1 ac_mid=-1
8510 while :; do
8511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008512/* confdefs.h. */
8513_ACEOF
8514cat confdefs.h >>conftest.$ac_ext
8515cat >>conftest.$ac_ext <<_ACEOF
8516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008518 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
8521{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008522static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008523test_array [0] = 0
8524
8525 ;
8526 return 0;
8527}
8528_ACEOF
8529rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530if { (ac_try="$ac_compile"
8531case "(($ac_try" in
8532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8533 *) ac_try_echo=$ac_try;;
8534esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008538 grep -v '^ *+' conftest.er1 >conftest.err
8539 rm -f conftest.er1
8540 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542 (exit $ac_status); } && {
8543 test -z "$ac_c_werror_flag" ||
8544 test ! -s conftest.err
8545 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 ac_lo=$ac_mid; break
8547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008549sed 's/^/| /' conftest.$ac_ext >&5
8550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551 ac_hi=`expr '(' $ac_mid ')' - 1`
8552 if test $ac_mid -le $ac_hi; then
8553 ac_lo= ac_hi=
8554 break
8555 fi
8556 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558
8559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 done
8561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008563sed 's/^/| /' conftest.$ac_ext >&5
8564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567
8568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570
8571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008572# Binary search between lo and hi bounds.
8573while test "x$ac_lo" != "x$ac_hi"; do
8574 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008576/* confdefs.h. */
8577_ACEOF
8578cat confdefs.h >>conftest.$ac_ext
8579cat >>conftest.$ac_ext <<_ACEOF
8580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008581$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008582 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008583int
8584main ()
8585{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008586static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008587test_array [0] = 0
8588
8589 ;
8590 return 0;
8591}
8592_ACEOF
8593rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594if { (ac_try="$ac_compile"
8595case "(($ac_try" in
8596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8597 *) ac_try_echo=$ac_try;;
8598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008602 grep -v '^ *+' conftest.er1 >conftest.err
8603 rm -f conftest.er1
8604 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 (exit $ac_status); } && {
8607 test -z "$ac_c_werror_flag" ||
8608 test ! -s conftest.err
8609 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ac_hi=$ac_mid
8611else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008613sed 's/^/| /' conftest.$ac_ext >&5
8614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617
8618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008619done
8620case $ac_lo in
8621?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008623 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008624See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008625echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008626See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008627 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 else
8629 ac_cv_sizeof_void_p=0
8630 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008631esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008632else
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008634/* confdefs.h. */
8635_ACEOF
8636cat confdefs.h >>conftest.$ac_ext
8637cat >>conftest.$ac_ext <<_ACEOF
8638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008639$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008640 typedef void * ac__type_sizeof_;
8641static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8642static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008643#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008644#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008645int
8646main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008647{
Martin v. Löwis11437992002-04-12 09:54:03 +00008648
8649 FILE *f = fopen ("conftest.val", "w");
8650 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008651 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008652 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008655 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008657 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 }
8659 else
8660 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008662 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008664 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
8668 ;
8669 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008670}
Martin v. Löwis11437992002-04-12 09:54:03 +00008671_ACEOF
8672rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673if { (ac_try="$ac_link"
8674case "(($ac_try" in
8675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8676 *) ac_try_echo=$ac_try;;
8677esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683 { (case "(($ac_try" in
8684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8685 *) ac_try_echo=$ac_try;;
8686esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 (exit $ac_status); }; }; then
8692 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008694 echo "$as_me: program exited with status $ac_status" >&5
8695echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008696sed 's/^/| /' conftest.$ac_ext >&5
8697
Martin v. Löwis11437992002-04-12 09:54:03 +00008698( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008700 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008701See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008702echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008703See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008704 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705 else
8706 ac_cv_sizeof_void_p=0
8707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709rm -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 +00008710fi
8711rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008712fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008713{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8714echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715
8716
8717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008719#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008720_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008721
8722
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008723{ echo "$as_me:$LINENO: checking for short" >&5
8724echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8725if test "${ac_cv_type_short+set}" = set; then
8726 echo $ECHO_N "(cached) $ECHO_C" >&6
8727else
8728 cat >conftest.$ac_ext <<_ACEOF
8729/* confdefs.h. */
8730_ACEOF
8731cat confdefs.h >>conftest.$ac_ext
8732cat >>conftest.$ac_ext <<_ACEOF
8733/* end confdefs.h. */
8734$ac_includes_default
8735typedef short ac__type_new_;
8736int
8737main ()
8738{
8739if ((ac__type_new_ *) 0)
8740 return 0;
8741if (sizeof (ac__type_new_))
8742 return 0;
8743 ;
8744 return 0;
8745}
8746_ACEOF
8747rm -f conftest.$ac_objext
8748if { (ac_try="$ac_compile"
8749case "(($ac_try" in
8750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8751 *) ac_try_echo=$ac_try;;
8752esac
8753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8754 (eval "$ac_compile") 2>conftest.er1
8755 ac_status=$?
8756 grep -v '^ *+' conftest.er1 >conftest.err
8757 rm -f conftest.er1
8758 cat conftest.err >&5
8759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8760 (exit $ac_status); } && {
8761 test -z "$ac_c_werror_flag" ||
8762 test ! -s conftest.err
8763 } && test -s conftest.$ac_objext; then
8764 ac_cv_type_short=yes
8765else
8766 echo "$as_me: failed program was:" >&5
8767sed 's/^/| /' conftest.$ac_ext >&5
8768
8769 ac_cv_type_short=no
8770fi
8771
8772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8773fi
8774{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8775echo "${ECHO_T}$ac_cv_type_short" >&6; }
8776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777# The cast to long int works around a bug in the HP C Compiler
8778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8780# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008781{ echo "$as_me:$LINENO: checking size of short" >&5
8782echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008783if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008784 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008785else
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 if test "$cross_compiling" = yes; then
8787 # Depending upon the size, compute the lo and hi bounds.
8788cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008789/* confdefs.h. */
8790_ACEOF
8791cat confdefs.h >>conftest.$ac_ext
8792cat >>conftest.$ac_ext <<_ACEOF
8793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008794$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008795 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008796int
8797main ()
8798{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008799static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008800test_array [0] = 0
8801
8802 ;
8803 return 0;
8804}
8805_ACEOF
8806rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008807if { (ac_try="$ac_compile"
8808case "(($ac_try" in
8809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8810 *) ac_try_echo=$ac_try;;
8811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008815 grep -v '^ *+' conftest.er1 >conftest.err
8816 rm -f conftest.er1
8817 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819 (exit $ac_status); } && {
8820 test -z "$ac_c_werror_flag" ||
8821 test ! -s conftest.err
8822 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 ac_lo=0 ac_mid=0
8824 while :; do
8825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008826/* confdefs.h. */
8827_ACEOF
8828cat confdefs.h >>conftest.$ac_ext
8829cat >>conftest.$ac_ext <<_ACEOF
8830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008831$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008832 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008833int
8834main ()
8835{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008836static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008837test_array [0] = 0
8838
8839 ;
8840 return 0;
8841}
8842_ACEOF
8843rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008844if { (ac_try="$ac_compile"
8845case "(($ac_try" in
8846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8847 *) ac_try_echo=$ac_try;;
8848esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008852 grep -v '^ *+' conftest.er1 >conftest.err
8853 rm -f conftest.er1
8854 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856 (exit $ac_status); } && {
8857 test -z "$ac_c_werror_flag" ||
8858 test ! -s conftest.err
8859 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 ac_hi=$ac_mid; break
8861else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008863sed 's/^/| /' conftest.$ac_ext >&5
8864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008865 ac_lo=`expr $ac_mid + 1`
8866 if test $ac_lo -le $ac_mid; then
8867 ac_lo= ac_hi=
8868 break
8869 fi
8870 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872
8873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 done
8875else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008877sed 's/^/| /' conftest.$ac_ext >&5
8878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008880/* confdefs.h. */
8881_ACEOF
8882cat confdefs.h >>conftest.$ac_ext
8883cat >>conftest.$ac_ext <<_ACEOF
8884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008885$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008886 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008887int
8888main ()
8889{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008890static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008891test_array [0] = 0
8892
8893 ;
8894 return 0;
8895}
8896_ACEOF
8897rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008898if { (ac_try="$ac_compile"
8899case "(($ac_try" in
8900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8901 *) ac_try_echo=$ac_try;;
8902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008906 grep -v '^ *+' conftest.er1 >conftest.err
8907 rm -f conftest.er1
8908 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910 (exit $ac_status); } && {
8911 test -z "$ac_c_werror_flag" ||
8912 test ! -s conftest.err
8913 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 ac_hi=-1 ac_mid=-1
8915 while :; do
8916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008917/* confdefs.h. */
8918_ACEOF
8919cat confdefs.h >>conftest.$ac_ext
8920cat >>conftest.$ac_ext <<_ACEOF
8921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008922$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008923 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008924int
8925main ()
8926{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008927static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008928test_array [0] = 0
8929
8930 ;
8931 return 0;
8932}
8933_ACEOF
8934rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008935if { (ac_try="$ac_compile"
8936case "(($ac_try" in
8937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8938 *) ac_try_echo=$ac_try;;
8939esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008943 grep -v '^ *+' conftest.er1 >conftest.err
8944 rm -f conftest.er1
8945 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947 (exit $ac_status); } && {
8948 test -z "$ac_c_werror_flag" ||
8949 test ! -s conftest.err
8950 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_lo=$ac_mid; break
8952else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008954sed 's/^/| /' conftest.$ac_ext >&5
8955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956 ac_hi=`expr '(' $ac_mid ')' - 1`
8957 if test $ac_mid -le $ac_hi; then
8958 ac_lo= ac_hi=
8959 break
8960 fi
8961 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963
8964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 done
8966else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008968sed 's/^/| /' conftest.$ac_ext >&5
8969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972
8973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975
8976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008977# Binary search between lo and hi bounds.
8978while test "x$ac_lo" != "x$ac_hi"; do
8979 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008981/* confdefs.h. */
8982_ACEOF
8983cat confdefs.h >>conftest.$ac_ext
8984cat >>conftest.$ac_ext <<_ACEOF
8985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008986$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008987 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008988int
8989main ()
8990{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008991static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008992test_array [0] = 0
8993
8994 ;
8995 return 0;
8996}
8997_ACEOF
8998rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999if { (ac_try="$ac_compile"
9000case "(($ac_try" in
9001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9002 *) ac_try_echo=$ac_try;;
9003esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009007 grep -v '^ *+' conftest.er1 >conftest.err
9008 rm -f conftest.er1
9009 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 (exit $ac_status); } && {
9012 test -z "$ac_c_werror_flag" ||
9013 test ! -s conftest.err
9014 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 ac_hi=$ac_mid
9016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009018sed 's/^/| /' conftest.$ac_ext >&5
9019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009020 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022
9023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009024done
9025case $ac_lo in
9026?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009028 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009029See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009030echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009031See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009032 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033 else
9034 ac_cv_sizeof_short=0
9035 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009036esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009037else
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009039/* confdefs.h. */
9040_ACEOF
9041cat confdefs.h >>conftest.$ac_ext
9042cat >>conftest.$ac_ext <<_ACEOF
9043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009044$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009045 typedef short ac__type_sizeof_;
9046static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9047static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009048#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009049#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009050int
9051main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009052{
Martin v. Löwis11437992002-04-12 09:54:03 +00009053
9054 FILE *f = fopen ("conftest.val", "w");
9055 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009056 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009057 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009060 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009062 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 }
9064 else
9065 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009067 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009068 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009069 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009072
9073 ;
9074 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009075}
Martin v. Löwis11437992002-04-12 09:54:03 +00009076_ACEOF
9077rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009078if { (ac_try="$ac_link"
9079case "(($ac_try" in
9080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9081 *) ac_try_echo=$ac_try;;
9082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009088 { (case "(($ac_try" in
9089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9090 *) ac_try_echo=$ac_try;;
9091esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009096 (exit $ac_status); }; }; then
9097 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009099 echo "$as_me: program exited with status $ac_status" >&5
9100echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009101sed 's/^/| /' conftest.$ac_ext >&5
9102
Martin v. Löwis11437992002-04-12 09:54:03 +00009103( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009104if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009105 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009106See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009107echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009108See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009109 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009110 else
9111 ac_cv_sizeof_short=0
9112 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114rm -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 +00009115fi
9116rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009117fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009118{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9119echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120
9121
9122
Martin v. Löwis11437992002-04-12 09:54:03 +00009123cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009124#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009125_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009126
9127
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009128{ echo "$as_me:$LINENO: checking for float" >&5
9129echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9130if test "${ac_cv_type_float+set}" = set; then
9131 echo $ECHO_N "(cached) $ECHO_C" >&6
9132else
9133 cat >conftest.$ac_ext <<_ACEOF
9134/* confdefs.h. */
9135_ACEOF
9136cat confdefs.h >>conftest.$ac_ext
9137cat >>conftest.$ac_ext <<_ACEOF
9138/* end confdefs.h. */
9139$ac_includes_default
9140typedef float ac__type_new_;
9141int
9142main ()
9143{
9144if ((ac__type_new_ *) 0)
9145 return 0;
9146if (sizeof (ac__type_new_))
9147 return 0;
9148 ;
9149 return 0;
9150}
9151_ACEOF
9152rm -f conftest.$ac_objext
9153if { (ac_try="$ac_compile"
9154case "(($ac_try" in
9155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9156 *) ac_try_echo=$ac_try;;
9157esac
9158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9159 (eval "$ac_compile") 2>conftest.er1
9160 ac_status=$?
9161 grep -v '^ *+' conftest.er1 >conftest.err
9162 rm -f conftest.er1
9163 cat conftest.err >&5
9164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165 (exit $ac_status); } && {
9166 test -z "$ac_c_werror_flag" ||
9167 test ! -s conftest.err
9168 } && test -s conftest.$ac_objext; then
9169 ac_cv_type_float=yes
9170else
9171 echo "$as_me: failed program was:" >&5
9172sed 's/^/| /' conftest.$ac_ext >&5
9173
9174 ac_cv_type_float=no
9175fi
9176
9177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9178fi
9179{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9180echo "${ECHO_T}$ac_cv_type_float" >&6; }
9181
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009182# The cast to long int works around a bug in the HP C Compiler
9183# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9184# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9185# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009186{ echo "$as_me:$LINENO: checking size of float" >&5
9187echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009188if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009189 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009190else
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 if test "$cross_compiling" = yes; then
9192 # Depending upon the size, compute the lo and hi bounds.
9193cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009194/* confdefs.h. */
9195_ACEOF
9196cat confdefs.h >>conftest.$ac_ext
9197cat >>conftest.$ac_ext <<_ACEOF
9198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009199$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009200 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009201int
9202main ()
9203{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009204static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009205test_array [0] = 0
9206
9207 ;
9208 return 0;
9209}
9210_ACEOF
9211rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009212if { (ac_try="$ac_compile"
9213case "(($ac_try" in
9214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9215 *) ac_try_echo=$ac_try;;
9216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009220 grep -v '^ *+' conftest.er1 >conftest.err
9221 rm -f conftest.er1
9222 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009224 (exit $ac_status); } && {
9225 test -z "$ac_c_werror_flag" ||
9226 test ! -s conftest.err
9227 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 ac_lo=0 ac_mid=0
9229 while :; do
9230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009231/* confdefs.h. */
9232_ACEOF
9233cat confdefs.h >>conftest.$ac_ext
9234cat >>conftest.$ac_ext <<_ACEOF
9235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009236$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009237 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009238int
9239main ()
9240{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009241static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009242test_array [0] = 0
9243
9244 ;
9245 return 0;
9246}
9247_ACEOF
9248rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009249if { (ac_try="$ac_compile"
9250case "(($ac_try" in
9251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9252 *) ac_try_echo=$ac_try;;
9253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009255 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009257 grep -v '^ *+' conftest.er1 >conftest.err
9258 rm -f conftest.er1
9259 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261 (exit $ac_status); } && {
9262 test -z "$ac_c_werror_flag" ||
9263 test ! -s conftest.err
9264 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009265 ac_hi=$ac_mid; break
9266else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009268sed 's/^/| /' conftest.$ac_ext >&5
9269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270 ac_lo=`expr $ac_mid + 1`
9271 if test $ac_lo -le $ac_mid; then
9272 ac_lo= ac_hi=
9273 break
9274 fi
9275 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277
9278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 done
9280else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009282sed 's/^/| /' conftest.$ac_ext >&5
9283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009285/* confdefs.h. */
9286_ACEOF
9287cat confdefs.h >>conftest.$ac_ext
9288cat >>conftest.$ac_ext <<_ACEOF
9289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009290$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009291 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009292int
9293main ()
9294{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009295static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009296test_array [0] = 0
9297
9298 ;
9299 return 0;
9300}
9301_ACEOF
9302rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009303if { (ac_try="$ac_compile"
9304case "(($ac_try" in
9305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9306 *) ac_try_echo=$ac_try;;
9307esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009311 grep -v '^ *+' conftest.er1 >conftest.err
9312 rm -f conftest.er1
9313 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315 (exit $ac_status); } && {
9316 test -z "$ac_c_werror_flag" ||
9317 test ! -s conftest.err
9318 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 ac_hi=-1 ac_mid=-1
9320 while :; do
9321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009322/* confdefs.h. */
9323_ACEOF
9324cat confdefs.h >>conftest.$ac_ext
9325cat >>conftest.$ac_ext <<_ACEOF
9326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009327$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009328 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009329int
9330main ()
9331{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009332static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009333test_array [0] = 0
9334
9335 ;
9336 return 0;
9337}
9338_ACEOF
9339rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009340if { (ac_try="$ac_compile"
9341case "(($ac_try" in
9342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9343 *) ac_try_echo=$ac_try;;
9344esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009348 grep -v '^ *+' conftest.er1 >conftest.err
9349 rm -f conftest.er1
9350 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009352 (exit $ac_status); } && {
9353 test -z "$ac_c_werror_flag" ||
9354 test ! -s conftest.err
9355 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ac_lo=$ac_mid; break
9357else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009359sed 's/^/| /' conftest.$ac_ext >&5
9360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009361 ac_hi=`expr '(' $ac_mid ')' - 1`
9362 if test $ac_mid -le $ac_hi; then
9363 ac_lo= ac_hi=
9364 break
9365 fi
9366 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368
9369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 done
9371else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009373sed 's/^/| /' conftest.$ac_ext >&5
9374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377
9378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380
9381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009382# Binary search between lo and hi bounds.
9383while test "x$ac_lo" != "x$ac_hi"; do
9384 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009386/* confdefs.h. */
9387_ACEOF
9388cat confdefs.h >>conftest.$ac_ext
9389cat >>conftest.$ac_ext <<_ACEOF
9390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009391$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009392 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009393int
9394main ()
9395{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009397test_array [0] = 0
9398
9399 ;
9400 return 0;
9401}
9402_ACEOF
9403rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404if { (ac_try="$ac_compile"
9405case "(($ac_try" in
9406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9407 *) ac_try_echo=$ac_try;;
9408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009412 grep -v '^ *+' conftest.er1 >conftest.err
9413 rm -f conftest.er1
9414 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 (exit $ac_status); } && {
9417 test -z "$ac_c_werror_flag" ||
9418 test ! -s conftest.err
9419 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 ac_hi=$ac_mid
9421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009423sed 's/^/| /' conftest.$ac_ext >&5
9424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427
9428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009429done
9430case $ac_lo in
9431?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009433 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009434See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009435echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009436See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009437 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438 else
9439 ac_cv_sizeof_float=0
9440 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009441esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009442else
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009444/* confdefs.h. */
9445_ACEOF
9446cat confdefs.h >>conftest.$ac_ext
9447cat >>conftest.$ac_ext <<_ACEOF
9448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009449$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009450 typedef float ac__type_sizeof_;
9451static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9452static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009453#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009454#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009455int
9456main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009457{
Martin v. Löwis11437992002-04-12 09:54:03 +00009458
9459 FILE *f = fopen ("conftest.val", "w");
9460 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009462 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009465 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009466 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009467 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 }
9469 else
9470 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009472 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009474 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009477
9478 ;
9479 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009480}
Martin v. Löwis11437992002-04-12 09:54:03 +00009481_ACEOF
9482rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483if { (ac_try="$ac_link"
9484case "(($ac_try" in
9485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9486 *) ac_try_echo=$ac_try;;
9487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493 { (case "(($ac_try" in
9494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9495 *) ac_try_echo=$ac_try;;
9496esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 (exit $ac_status); }; }; then
9502 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009504 echo "$as_me: program exited with status $ac_status" >&5
9505echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009506sed 's/^/| /' conftest.$ac_ext >&5
9507
Martin v. Löwis11437992002-04-12 09:54:03 +00009508( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009510 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009511See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009512echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009513See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009514 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515 else
9516 ac_cv_sizeof_float=0
9517 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519rm -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 +00009520fi
9521rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009522fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009523{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9524echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525
9526
9527
Martin v. Löwis11437992002-04-12 09:54:03 +00009528cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009529#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009530_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009531
9532
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009533{ echo "$as_me:$LINENO: checking for double" >&5
9534echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9535if test "${ac_cv_type_double+set}" = set; then
9536 echo $ECHO_N "(cached) $ECHO_C" >&6
9537else
9538 cat >conftest.$ac_ext <<_ACEOF
9539/* confdefs.h. */
9540_ACEOF
9541cat confdefs.h >>conftest.$ac_ext
9542cat >>conftest.$ac_ext <<_ACEOF
9543/* end confdefs.h. */
9544$ac_includes_default
9545typedef double ac__type_new_;
9546int
9547main ()
9548{
9549if ((ac__type_new_ *) 0)
9550 return 0;
9551if (sizeof (ac__type_new_))
9552 return 0;
9553 ;
9554 return 0;
9555}
9556_ACEOF
9557rm -f conftest.$ac_objext
9558if { (ac_try="$ac_compile"
9559case "(($ac_try" in
9560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9561 *) ac_try_echo=$ac_try;;
9562esac
9563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9564 (eval "$ac_compile") 2>conftest.er1
9565 ac_status=$?
9566 grep -v '^ *+' conftest.er1 >conftest.err
9567 rm -f conftest.er1
9568 cat conftest.err >&5
9569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9570 (exit $ac_status); } && {
9571 test -z "$ac_c_werror_flag" ||
9572 test ! -s conftest.err
9573 } && test -s conftest.$ac_objext; then
9574 ac_cv_type_double=yes
9575else
9576 echo "$as_me: failed program was:" >&5
9577sed 's/^/| /' conftest.$ac_ext >&5
9578
9579 ac_cv_type_double=no
9580fi
9581
9582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9583fi
9584{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9585echo "${ECHO_T}$ac_cv_type_double" >&6; }
9586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009587# The cast to long int works around a bug in the HP C Compiler
9588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9590# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009591{ echo "$as_me:$LINENO: checking size of double" >&5
9592echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009593if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009594 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009595else
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 if test "$cross_compiling" = yes; then
9597 # Depending upon the size, compute the lo and hi bounds.
9598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* confdefs.h. */
9600_ACEOF
9601cat confdefs.h >>conftest.$ac_ext
9602cat >>conftest.$ac_ext <<_ACEOF
9603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009605 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009606int
9607main ()
9608{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009609static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009610test_array [0] = 0
9611
9612 ;
9613 return 0;
9614}
9615_ACEOF
9616rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617if { (ac_try="$ac_compile"
9618case "(($ac_try" in
9619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9620 *) ac_try_echo=$ac_try;;
9621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009625 grep -v '^ *+' conftest.er1 >conftest.err
9626 rm -f conftest.er1
9627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629 (exit $ac_status); } && {
9630 test -z "$ac_c_werror_flag" ||
9631 test ! -s conftest.err
9632 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 ac_lo=0 ac_mid=0
9634 while :; do
9635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009636/* confdefs.h. */
9637_ACEOF
9638cat confdefs.h >>conftest.$ac_ext
9639cat >>conftest.$ac_ext <<_ACEOF
9640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009641$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009642 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009643int
9644main ()
9645{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009646static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009647test_array [0] = 0
9648
9649 ;
9650 return 0;
9651}
9652_ACEOF
9653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654if { (ac_try="$ac_compile"
9655case "(($ac_try" in
9656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9657 *) ac_try_echo=$ac_try;;
9658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009662 grep -v '^ *+' conftest.er1 >conftest.err
9663 rm -f conftest.er1
9664 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666 (exit $ac_status); } && {
9667 test -z "$ac_c_werror_flag" ||
9668 test ! -s conftest.err
9669 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 ac_hi=$ac_mid; break
9671else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009673sed 's/^/| /' conftest.$ac_ext >&5
9674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675 ac_lo=`expr $ac_mid + 1`
9676 if test $ac_lo -le $ac_mid; then
9677 ac_lo= ac_hi=
9678 break
9679 fi
9680 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682
9683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 done
9685else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009687sed 's/^/| /' conftest.$ac_ext >&5
9688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009690/* confdefs.h. */
9691_ACEOF
9692cat confdefs.h >>conftest.$ac_ext
9693cat >>conftest.$ac_ext <<_ACEOF
9694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009696 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009697int
9698main ()
9699{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009700static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009701test_array [0] = 0
9702
9703 ;
9704 return 0;
9705}
9706_ACEOF
9707rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708if { (ac_try="$ac_compile"
9709case "(($ac_try" in
9710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9711 *) ac_try_echo=$ac_try;;
9712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009716 grep -v '^ *+' conftest.er1 >conftest.err
9717 rm -f conftest.er1
9718 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720 (exit $ac_status); } && {
9721 test -z "$ac_c_werror_flag" ||
9722 test ! -s conftest.err
9723 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ac_hi=-1 ac_mid=-1
9725 while :; do
9726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009727/* confdefs.h. */
9728_ACEOF
9729cat confdefs.h >>conftest.$ac_ext
9730cat >>conftest.$ac_ext <<_ACEOF
9731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009732$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009733 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009734int
9735main ()
9736{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009737static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009738test_array [0] = 0
9739
9740 ;
9741 return 0;
9742}
9743_ACEOF
9744rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009745if { (ac_try="$ac_compile"
9746case "(($ac_try" in
9747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9748 *) ac_try_echo=$ac_try;;
9749esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009753 grep -v '^ *+' conftest.er1 >conftest.err
9754 rm -f conftest.er1
9755 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757 (exit $ac_status); } && {
9758 test -z "$ac_c_werror_flag" ||
9759 test ! -s conftest.err
9760 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ac_lo=$ac_mid; break
9762else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009764sed 's/^/| /' conftest.$ac_ext >&5
9765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766 ac_hi=`expr '(' $ac_mid ')' - 1`
9767 if test $ac_mid -le $ac_hi; then
9768 ac_lo= ac_hi=
9769 break
9770 fi
9771 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773
9774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 done
9776else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009778sed 's/^/| /' conftest.$ac_ext >&5
9779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782
9783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785
9786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009787# Binary search between lo and hi bounds.
9788while test "x$ac_lo" != "x$ac_hi"; do
9789 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009791/* confdefs.h. */
9792_ACEOF
9793cat confdefs.h >>conftest.$ac_ext
9794cat >>conftest.$ac_ext <<_ACEOF
9795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009796$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009797 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009798int
9799main ()
9800{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009802test_array [0] = 0
9803
9804 ;
9805 return 0;
9806}
9807_ACEOF
9808rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809if { (ac_try="$ac_compile"
9810case "(($ac_try" in
9811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9812 *) ac_try_echo=$ac_try;;
9813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009817 grep -v '^ *+' conftest.er1 >conftest.err
9818 rm -f conftest.er1
9819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 (exit $ac_status); } && {
9822 test -z "$ac_c_werror_flag" ||
9823 test ! -s conftest.err
9824 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ac_hi=$ac_mid
9826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009828sed 's/^/| /' conftest.$ac_ext >&5
9829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832
9833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009834done
9835case $ac_lo in
9836?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009838 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009839See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009840echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009841See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009842 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843 else
9844 ac_cv_sizeof_double=0
9845 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009846esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009847else
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009849/* confdefs.h. */
9850_ACEOF
9851cat confdefs.h >>conftest.$ac_ext
9852cat >>conftest.$ac_ext <<_ACEOF
9853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009854$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009855 typedef double ac__type_sizeof_;
9856static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9857static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009858#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009859#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009860int
9861main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009862{
Martin v. Löwis11437992002-04-12 09:54:03 +00009863
9864 FILE *f = fopen ("conftest.val", "w");
9865 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009867 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009870 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009872 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 }
9874 else
9875 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009877 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009879 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009882
9883 ;
9884 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009885}
Martin v. Löwis11437992002-04-12 09:54:03 +00009886_ACEOF
9887rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888if { (ac_try="$ac_link"
9889case "(($ac_try" in
9890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9891 *) ac_try_echo=$ac_try;;
9892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898 { (case "(($ac_try" in
9899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9900 *) ac_try_echo=$ac_try;;
9901esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009904 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 (exit $ac_status); }; }; then
9907 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009908else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009909 echo "$as_me: program exited with status $ac_status" >&5
9910echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009911sed 's/^/| /' conftest.$ac_ext >&5
9912
Martin v. Löwis11437992002-04-12 09:54:03 +00009913( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009915 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009916See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009917echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009918See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009919 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920 else
9921 ac_cv_sizeof_double=0
9922 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924rm -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 +00009925fi
9926rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009927fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009928{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9929echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930
9931
9932
Martin v. Löwis11437992002-04-12 09:54:03 +00009933cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009934#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009935_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009936
9937
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009938{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9939echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9940if test "${ac_cv_type_fpos_t+set}" = set; then
9941 echo $ECHO_N "(cached) $ECHO_C" >&6
9942else
9943 cat >conftest.$ac_ext <<_ACEOF
9944/* confdefs.h. */
9945_ACEOF
9946cat confdefs.h >>conftest.$ac_ext
9947cat >>conftest.$ac_ext <<_ACEOF
9948/* end confdefs.h. */
9949$ac_includes_default
9950typedef fpos_t ac__type_new_;
9951int
9952main ()
9953{
9954if ((ac__type_new_ *) 0)
9955 return 0;
9956if (sizeof (ac__type_new_))
9957 return 0;
9958 ;
9959 return 0;
9960}
9961_ACEOF
9962rm -f conftest.$ac_objext
9963if { (ac_try="$ac_compile"
9964case "(($ac_try" in
9965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9966 *) ac_try_echo=$ac_try;;
9967esac
9968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9969 (eval "$ac_compile") 2>conftest.er1
9970 ac_status=$?
9971 grep -v '^ *+' conftest.er1 >conftest.err
9972 rm -f conftest.er1
9973 cat conftest.err >&5
9974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9975 (exit $ac_status); } && {
9976 test -z "$ac_c_werror_flag" ||
9977 test ! -s conftest.err
9978 } && test -s conftest.$ac_objext; then
9979 ac_cv_type_fpos_t=yes
9980else
9981 echo "$as_me: failed program was:" >&5
9982sed 's/^/| /' conftest.$ac_ext >&5
9983
9984 ac_cv_type_fpos_t=no
9985fi
9986
9987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9988fi
9989{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9990echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009992# The cast to long int works around a bug in the HP C Compiler
9993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9995# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009996{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9997echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009998if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009999 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010000else
Martin v. Löwis11437992002-04-12 09:54:03 +000010001 if test "$cross_compiling" = yes; then
10002 # Depending upon the size, compute the lo and hi bounds.
10003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010004/* confdefs.h. */
10005_ACEOF
10006cat confdefs.h >>conftest.$ac_ext
10007cat >>conftest.$ac_ext <<_ACEOF
10008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010009$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010010 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010011int
10012main ()
10013{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010014static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010015test_array [0] = 0
10016
10017 ;
10018 return 0;
10019}
10020_ACEOF
10021rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022if { (ac_try="$ac_compile"
10023case "(($ac_try" in
10024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10025 *) ac_try_echo=$ac_try;;
10026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010030 grep -v '^ *+' conftest.er1 >conftest.err
10031 rm -f conftest.er1
10032 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010034 (exit $ac_status); } && {
10035 test -z "$ac_c_werror_flag" ||
10036 test ! -s conftest.err
10037 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010038 ac_lo=0 ac_mid=0
10039 while :; do
10040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010041/* confdefs.h. */
10042_ACEOF
10043cat confdefs.h >>conftest.$ac_ext
10044cat >>conftest.$ac_ext <<_ACEOF
10045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010046$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010047 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010048int
10049main ()
10050{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010051static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010052test_array [0] = 0
10053
10054 ;
10055 return 0;
10056}
10057_ACEOF
10058rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010059if { (ac_try="$ac_compile"
10060case "(($ac_try" in
10061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10062 *) ac_try_echo=$ac_try;;
10063esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010067 grep -v '^ *+' conftest.er1 >conftest.err
10068 rm -f conftest.er1
10069 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071 (exit $ac_status); } && {
10072 test -z "$ac_c_werror_flag" ||
10073 test ! -s conftest.err
10074 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 ac_hi=$ac_mid; break
10076else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010078sed 's/^/| /' conftest.$ac_ext >&5
10079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080 ac_lo=`expr $ac_mid + 1`
10081 if test $ac_lo -le $ac_mid; then
10082 ac_lo= ac_hi=
10083 break
10084 fi
10085 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087
10088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 done
10090else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010092sed 's/^/| /' conftest.$ac_ext >&5
10093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010095/* confdefs.h. */
10096_ACEOF
10097cat confdefs.h >>conftest.$ac_ext
10098cat >>conftest.$ac_ext <<_ACEOF
10099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010100$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010101 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010102int
10103main ()
10104{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010105static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010106test_array [0] = 0
10107
10108 ;
10109 return 0;
10110}
10111_ACEOF
10112rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113if { (ac_try="$ac_compile"
10114case "(($ac_try" in
10115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10116 *) ac_try_echo=$ac_try;;
10117esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010121 grep -v '^ *+' conftest.er1 >conftest.err
10122 rm -f conftest.er1
10123 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125 (exit $ac_status); } && {
10126 test -z "$ac_c_werror_flag" ||
10127 test ! -s conftest.err
10128 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 ac_hi=-1 ac_mid=-1
10130 while :; do
10131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010132/* confdefs.h. */
10133_ACEOF
10134cat confdefs.h >>conftest.$ac_ext
10135cat >>conftest.$ac_ext <<_ACEOF
10136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010137$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010138 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010139int
10140main ()
10141{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010142static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010143test_array [0] = 0
10144
10145 ;
10146 return 0;
10147}
10148_ACEOF
10149rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010150if { (ac_try="$ac_compile"
10151case "(($ac_try" in
10152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10153 *) ac_try_echo=$ac_try;;
10154esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010158 grep -v '^ *+' conftest.er1 >conftest.err
10159 rm -f conftest.er1
10160 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162 (exit $ac_status); } && {
10163 test -z "$ac_c_werror_flag" ||
10164 test ! -s conftest.err
10165 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ac_lo=$ac_mid; break
10167else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010169sed 's/^/| /' conftest.$ac_ext >&5
10170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171 ac_hi=`expr '(' $ac_mid ')' - 1`
10172 if test $ac_mid -le $ac_hi; then
10173 ac_lo= ac_hi=
10174 break
10175 fi
10176 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178
10179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 done
10181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010183sed 's/^/| /' conftest.$ac_ext >&5
10184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187
10188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190
10191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010192# Binary search between lo and hi bounds.
10193while test "x$ac_lo" != "x$ac_hi"; do
10194 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010196/* confdefs.h. */
10197_ACEOF
10198cat confdefs.h >>conftest.$ac_ext
10199cat >>conftest.$ac_ext <<_ACEOF
10200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010201$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010202 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010203int
10204main ()
10205{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010206static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010207test_array [0] = 0
10208
10209 ;
10210 return 0;
10211}
10212_ACEOF
10213rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214if { (ac_try="$ac_compile"
10215case "(($ac_try" in
10216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10217 *) ac_try_echo=$ac_try;;
10218esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010222 grep -v '^ *+' conftest.er1 >conftest.err
10223 rm -f conftest.er1
10224 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 (exit $ac_status); } && {
10227 test -z "$ac_c_werror_flag" ||
10228 test ! -s conftest.err
10229 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ac_hi=$ac_mid
10231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010233sed 's/^/| /' conftest.$ac_ext >&5
10234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237
10238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010239done
10240case $ac_lo in
10241?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010243 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010244See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010245echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010246See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010247 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248 else
10249 ac_cv_sizeof_fpos_t=0
10250 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010251esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010252else
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010254/* confdefs.h. */
10255_ACEOF
10256cat confdefs.h >>conftest.$ac_ext
10257cat >>conftest.$ac_ext <<_ACEOF
10258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010259$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010260 typedef fpos_t ac__type_sizeof_;
10261static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10262static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010263#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010264#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010265int
10266main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010267{
Martin v. Löwis11437992002-04-12 09:54:03 +000010268
10269 FILE *f = fopen ("conftest.val", "w");
10270 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010272 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010274 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010275 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010277 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010278 }
10279 else
10280 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010282 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010283 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010284 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010287
10288 ;
10289 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010290}
Martin v. Löwis11437992002-04-12 09:54:03 +000010291_ACEOF
10292rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293if { (ac_try="$ac_link"
10294case "(($ac_try" in
10295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10296 *) ac_try_echo=$ac_try;;
10297esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303 { (case "(($ac_try" in
10304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10305 *) ac_try_echo=$ac_try;;
10306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010308 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 (exit $ac_status); }; }; then
10312 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010314 echo "$as_me: program exited with status $ac_status" >&5
10315echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010316sed 's/^/| /' conftest.$ac_ext >&5
10317
Martin v. Löwis11437992002-04-12 09:54:03 +000010318( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010320 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010321See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010322echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010323See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010324 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010325 else
10326 ac_cv_sizeof_fpos_t=0
10327 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329rm -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 +000010330fi
10331rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010332fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010333{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10334echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335
10336
10337
Martin v. Löwis11437992002-04-12 09:54:03 +000010338cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010339#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010340_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010341
Michael W. Hudson54241132001-12-07 15:38:26 +000010342
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010343{ echo "$as_me:$LINENO: checking for size_t" >&5
10344echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10345if test "${ac_cv_type_size_t+set}" = set; then
10346 echo $ECHO_N "(cached) $ECHO_C" >&6
10347else
10348 cat >conftest.$ac_ext <<_ACEOF
10349/* confdefs.h. */
10350_ACEOF
10351cat confdefs.h >>conftest.$ac_ext
10352cat >>conftest.$ac_ext <<_ACEOF
10353/* end confdefs.h. */
10354$ac_includes_default
10355typedef size_t ac__type_new_;
10356int
10357main ()
10358{
10359if ((ac__type_new_ *) 0)
10360 return 0;
10361if (sizeof (ac__type_new_))
10362 return 0;
10363 ;
10364 return 0;
10365}
10366_ACEOF
10367rm -f conftest.$ac_objext
10368if { (ac_try="$ac_compile"
10369case "(($ac_try" in
10370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10371 *) ac_try_echo=$ac_try;;
10372esac
10373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10374 (eval "$ac_compile") 2>conftest.er1
10375 ac_status=$?
10376 grep -v '^ *+' conftest.er1 >conftest.err
10377 rm -f conftest.er1
10378 cat conftest.err >&5
10379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10380 (exit $ac_status); } && {
10381 test -z "$ac_c_werror_flag" ||
10382 test ! -s conftest.err
10383 } && test -s conftest.$ac_objext; then
10384 ac_cv_type_size_t=yes
10385else
10386 echo "$as_me: failed program was:" >&5
10387sed 's/^/| /' conftest.$ac_ext >&5
10388
10389 ac_cv_type_size_t=no
10390fi
10391
10392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10393fi
10394{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10395echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397# The cast to long int works around a bug in the HP C Compiler
10398# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10399# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10400# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010401{ echo "$as_me:$LINENO: checking size of size_t" >&5
10402echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010403if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010404 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010405else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010406 if test "$cross_compiling" = yes; then
10407 # Depending upon the size, compute the lo and hi bounds.
10408cat >conftest.$ac_ext <<_ACEOF
10409/* confdefs.h. */
10410_ACEOF
10411cat confdefs.h >>conftest.$ac_ext
10412cat >>conftest.$ac_ext <<_ACEOF
10413/* end confdefs.h. */
10414$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010415 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010416int
10417main ()
10418{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010419static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010420test_array [0] = 0
10421
10422 ;
10423 return 0;
10424}
10425_ACEOF
10426rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010427if { (ac_try="$ac_compile"
10428case "(($ac_try" in
10429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10430 *) ac_try_echo=$ac_try;;
10431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434 ac_status=$?
10435 grep -v '^ *+' conftest.er1 >conftest.err
10436 rm -f conftest.er1
10437 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439 (exit $ac_status); } && {
10440 test -z "$ac_c_werror_flag" ||
10441 test ! -s conftest.err
10442 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010443 ac_lo=0 ac_mid=0
10444 while :; do
10445 cat >conftest.$ac_ext <<_ACEOF
10446/* confdefs.h. */
10447_ACEOF
10448cat confdefs.h >>conftest.$ac_ext
10449cat >>conftest.$ac_ext <<_ACEOF
10450/* end confdefs.h. */
10451$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010452 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453int
10454main ()
10455{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010456static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457test_array [0] = 0
10458
10459 ;
10460 return 0;
10461}
10462_ACEOF
10463rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010464if { (ac_try="$ac_compile"
10465case "(($ac_try" in
10466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10467 *) ac_try_echo=$ac_try;;
10468esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471 ac_status=$?
10472 grep -v '^ *+' conftest.er1 >conftest.err
10473 rm -f conftest.er1
10474 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476 (exit $ac_status); } && {
10477 test -z "$ac_c_werror_flag" ||
10478 test ! -s conftest.err
10479 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010480 ac_hi=$ac_mid; break
10481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010482 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010483sed 's/^/| /' conftest.$ac_ext >&5
10484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010485 ac_lo=`expr $ac_mid + 1`
10486 if test $ac_lo -le $ac_mid; then
10487 ac_lo= ac_hi=
10488 break
10489 fi
10490 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492
10493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494 done
10495else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010496 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010497sed 's/^/| /' conftest.$ac_ext >&5
10498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500/* confdefs.h. */
10501_ACEOF
10502cat confdefs.h >>conftest.$ac_ext
10503cat >>conftest.$ac_ext <<_ACEOF
10504/* end confdefs.h. */
10505$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010506 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507int
10508main ()
10509{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010510static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511test_array [0] = 0
10512
10513 ;
10514 return 0;
10515}
10516_ACEOF
10517rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010518if { (ac_try="$ac_compile"
10519case "(($ac_try" in
10520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10521 *) ac_try_echo=$ac_try;;
10522esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525 ac_status=$?
10526 grep -v '^ *+' conftest.er1 >conftest.err
10527 rm -f conftest.er1
10528 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530 (exit $ac_status); } && {
10531 test -z "$ac_c_werror_flag" ||
10532 test ! -s conftest.err
10533 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010534 ac_hi=-1 ac_mid=-1
10535 while :; do
10536 cat >conftest.$ac_ext <<_ACEOF
10537/* confdefs.h. */
10538_ACEOF
10539cat confdefs.h >>conftest.$ac_ext
10540cat >>conftest.$ac_ext <<_ACEOF
10541/* end confdefs.h. */
10542$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010543 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544int
10545main ()
10546{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010547static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548test_array [0] = 0
10549
10550 ;
10551 return 0;
10552}
10553_ACEOF
10554rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010555if { (ac_try="$ac_compile"
10556case "(($ac_try" in
10557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10558 *) ac_try_echo=$ac_try;;
10559esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562 ac_status=$?
10563 grep -v '^ *+' conftest.er1 >conftest.err
10564 rm -f conftest.er1
10565 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567 (exit $ac_status); } && {
10568 test -z "$ac_c_werror_flag" ||
10569 test ! -s conftest.err
10570 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010571 ac_lo=$ac_mid; break
10572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010573 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010574sed 's/^/| /' conftest.$ac_ext >&5
10575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576 ac_hi=`expr '(' $ac_mid ')' - 1`
10577 if test $ac_mid -le $ac_hi; then
10578 ac_lo= ac_hi=
10579 break
10580 fi
10581 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583
10584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585 done
10586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010587 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588sed 's/^/| /' conftest.$ac_ext >&5
10589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592
10593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010595
10596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597# Binary search between lo and hi bounds.
10598while test "x$ac_lo" != "x$ac_hi"; do
10599 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10600 cat >conftest.$ac_ext <<_ACEOF
10601/* confdefs.h. */
10602_ACEOF
10603cat confdefs.h >>conftest.$ac_ext
10604cat >>conftest.$ac_ext <<_ACEOF
10605/* end confdefs.h. */
10606$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010607 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608int
10609main ()
10610{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010611static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612test_array [0] = 0
10613
10614 ;
10615 return 0;
10616}
10617_ACEOF
10618rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619if { (ac_try="$ac_compile"
10620case "(($ac_try" in
10621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10622 *) ac_try_echo=$ac_try;;
10623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626 ac_status=$?
10627 grep -v '^ *+' conftest.er1 >conftest.err
10628 rm -f conftest.er1
10629 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 (exit $ac_status); } && {
10632 test -z "$ac_c_werror_flag" ||
10633 test ! -s conftest.err
10634 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635 ac_hi=$ac_mid
10636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010637 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638sed 's/^/| /' conftest.$ac_ext >&5
10639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642
10643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644done
10645case $ac_lo in
10646?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010648 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010650echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010652 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653 else
10654 ac_cv_sizeof_size_t=0
10655 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656esac
10657else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658 cat >conftest.$ac_ext <<_ACEOF
10659/* confdefs.h. */
10660_ACEOF
10661cat confdefs.h >>conftest.$ac_ext
10662cat >>conftest.$ac_ext <<_ACEOF
10663/* end confdefs.h. */
10664$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010665 typedef size_t ac__type_sizeof_;
10666static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10667static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668#include <stdio.h>
10669#include <stdlib.h>
10670int
10671main ()
10672{
10673
10674 FILE *f = fopen ("conftest.val", "w");
10675 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010677 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010680 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010682 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010683 }
10684 else
10685 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010687 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010689 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692
10693 ;
10694 return 0;
10695}
10696_ACEOF
10697rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698if { (ac_try="$ac_link"
10699case "(($ac_try" in
10700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10701 *) ac_try_echo=$ac_try;;
10702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708 { (case "(($ac_try" in
10709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10710 *) ac_try_echo=$ac_try;;
10711esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010714 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010716 (exit $ac_status); }; }; then
10717 ac_cv_sizeof_size_t=`cat conftest.val`
10718else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010719 echo "$as_me: program exited with status $ac_status" >&5
10720echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721sed 's/^/| /' conftest.$ac_ext >&5
10722
10723( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010725 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010727echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010729 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730 else
10731 ac_cv_sizeof_size_t=0
10732 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734rm -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 +000010735fi
10736rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010738{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10739echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740
10741
10742
Martin v. Löwis18e16552006-02-15 17:27:45 +000010743cat >>confdefs.h <<_ACEOF
10744#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10745_ACEOF
10746
10747
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010748{ echo "$as_me:$LINENO: checking for pid_t" >&5
10749echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10750if test "${ac_cv_type_pid_t+set}" = set; then
10751 echo $ECHO_N "(cached) $ECHO_C" >&6
10752else
10753 cat >conftest.$ac_ext <<_ACEOF
10754/* confdefs.h. */
10755_ACEOF
10756cat confdefs.h >>conftest.$ac_ext
10757cat >>conftest.$ac_ext <<_ACEOF
10758/* end confdefs.h. */
10759$ac_includes_default
10760typedef pid_t ac__type_new_;
10761int
10762main ()
10763{
10764if ((ac__type_new_ *) 0)
10765 return 0;
10766if (sizeof (ac__type_new_))
10767 return 0;
10768 ;
10769 return 0;
10770}
10771_ACEOF
10772rm -f conftest.$ac_objext
10773if { (ac_try="$ac_compile"
10774case "(($ac_try" in
10775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10776 *) ac_try_echo=$ac_try;;
10777esac
10778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10779 (eval "$ac_compile") 2>conftest.er1
10780 ac_status=$?
10781 grep -v '^ *+' conftest.er1 >conftest.err
10782 rm -f conftest.er1
10783 cat conftest.err >&5
10784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10785 (exit $ac_status); } && {
10786 test -z "$ac_c_werror_flag" ||
10787 test ! -s conftest.err
10788 } && test -s conftest.$ac_objext; then
10789 ac_cv_type_pid_t=yes
10790else
10791 echo "$as_me: failed program was:" >&5
10792sed 's/^/| /' conftest.$ac_ext >&5
10793
10794 ac_cv_type_pid_t=no
10795fi
10796
10797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10798fi
10799{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10800echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10801
Christian Heimes400adb02008-02-01 08:12:03 +000010802# The cast to long int works around a bug in the HP C Compiler
10803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10805# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010806{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10807echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010808if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010809 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010810else
10811 if test "$cross_compiling" = yes; then
10812 # Depending upon the size, compute the lo and hi bounds.
10813cat >conftest.$ac_ext <<_ACEOF
10814/* confdefs.h. */
10815_ACEOF
10816cat confdefs.h >>conftest.$ac_ext
10817cat >>conftest.$ac_ext <<_ACEOF
10818/* end confdefs.h. */
10819$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010820 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010821int
10822main ()
10823{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010825test_array [0] = 0
10826
10827 ;
10828 return 0;
10829}
10830_ACEOF
10831rm -f conftest.$ac_objext
10832if { (ac_try="$ac_compile"
10833case "(($ac_try" in
10834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10835 *) ac_try_echo=$ac_try;;
10836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010838 (eval "$ac_compile") 2>conftest.er1
10839 ac_status=$?
10840 grep -v '^ *+' conftest.er1 >conftest.err
10841 rm -f conftest.er1
10842 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010844 (exit $ac_status); } && {
10845 test -z "$ac_c_werror_flag" ||
10846 test ! -s conftest.err
10847 } && test -s conftest.$ac_objext; then
10848 ac_lo=0 ac_mid=0
10849 while :; do
10850 cat >conftest.$ac_ext <<_ACEOF
10851/* confdefs.h. */
10852_ACEOF
10853cat confdefs.h >>conftest.$ac_ext
10854cat >>conftest.$ac_ext <<_ACEOF
10855/* end confdefs.h. */
10856$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010857 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010858int
10859main ()
10860{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010861static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010862test_array [0] = 0
10863
10864 ;
10865 return 0;
10866}
10867_ACEOF
10868rm -f conftest.$ac_objext
10869if { (ac_try="$ac_compile"
10870case "(($ac_try" in
10871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10872 *) ac_try_echo=$ac_try;;
10873esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010875 (eval "$ac_compile") 2>conftest.er1
10876 ac_status=$?
10877 grep -v '^ *+' conftest.er1 >conftest.err
10878 rm -f conftest.er1
10879 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010881 (exit $ac_status); } && {
10882 test -z "$ac_c_werror_flag" ||
10883 test ! -s conftest.err
10884 } && test -s conftest.$ac_objext; then
10885 ac_hi=$ac_mid; break
10886else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010887 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010888sed 's/^/| /' conftest.$ac_ext >&5
10889
10890 ac_lo=`expr $ac_mid + 1`
10891 if test $ac_lo -le $ac_mid; then
10892 ac_lo= ac_hi=
10893 break
10894 fi
10895 ac_mid=`expr 2 '*' $ac_mid + 1`
10896fi
10897
10898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10899 done
10900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010901 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010902sed 's/^/| /' conftest.$ac_ext >&5
10903
10904 cat >conftest.$ac_ext <<_ACEOF
10905/* confdefs.h. */
10906_ACEOF
10907cat confdefs.h >>conftest.$ac_ext
10908cat >>conftest.$ac_ext <<_ACEOF
10909/* end confdefs.h. */
10910$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010911 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010912int
10913main ()
10914{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010915static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010916test_array [0] = 0
10917
10918 ;
10919 return 0;
10920}
10921_ACEOF
10922rm -f conftest.$ac_objext
10923if { (ac_try="$ac_compile"
10924case "(($ac_try" in
10925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10926 *) ac_try_echo=$ac_try;;
10927esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010929 (eval "$ac_compile") 2>conftest.er1
10930 ac_status=$?
10931 grep -v '^ *+' conftest.er1 >conftest.err
10932 rm -f conftest.er1
10933 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010935 (exit $ac_status); } && {
10936 test -z "$ac_c_werror_flag" ||
10937 test ! -s conftest.err
10938 } && test -s conftest.$ac_objext; then
10939 ac_hi=-1 ac_mid=-1
10940 while :; do
10941 cat >conftest.$ac_ext <<_ACEOF
10942/* confdefs.h. */
10943_ACEOF
10944cat confdefs.h >>conftest.$ac_ext
10945cat >>conftest.$ac_ext <<_ACEOF
10946/* end confdefs.h. */
10947$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010948 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010949int
10950main ()
10951{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010952static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010953test_array [0] = 0
10954
10955 ;
10956 return 0;
10957}
10958_ACEOF
10959rm -f conftest.$ac_objext
10960if { (ac_try="$ac_compile"
10961case "(($ac_try" in
10962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10963 *) ac_try_echo=$ac_try;;
10964esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010966 (eval "$ac_compile") 2>conftest.er1
10967 ac_status=$?
10968 grep -v '^ *+' conftest.er1 >conftest.err
10969 rm -f conftest.er1
10970 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010972 (exit $ac_status); } && {
10973 test -z "$ac_c_werror_flag" ||
10974 test ! -s conftest.err
10975 } && test -s conftest.$ac_objext; then
10976 ac_lo=$ac_mid; break
10977else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010978 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010979sed 's/^/| /' conftest.$ac_ext >&5
10980
10981 ac_hi=`expr '(' $ac_mid ')' - 1`
10982 if test $ac_mid -le $ac_hi; then
10983 ac_lo= ac_hi=
10984 break
10985 fi
10986 ac_mid=`expr 2 '*' $ac_mid`
10987fi
10988
10989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10990 done
10991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010992 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010993sed 's/^/| /' conftest.$ac_ext >&5
10994
10995 ac_lo= ac_hi=
10996fi
10997
10998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10999fi
11000
11001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11002# Binary search between lo and hi bounds.
11003while test "x$ac_lo" != "x$ac_hi"; do
11004 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11005 cat >conftest.$ac_ext <<_ACEOF
11006/* confdefs.h. */
11007_ACEOF
11008cat confdefs.h >>conftest.$ac_ext
11009cat >>conftest.$ac_ext <<_ACEOF
11010/* end confdefs.h. */
11011$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011012 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011013int
11014main ()
11015{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011016static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011017test_array [0] = 0
11018
11019 ;
11020 return 0;
11021}
11022_ACEOF
11023rm -f conftest.$ac_objext
11024if { (ac_try="$ac_compile"
11025case "(($ac_try" in
11026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11027 *) ac_try_echo=$ac_try;;
11028esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011030 (eval "$ac_compile") 2>conftest.er1
11031 ac_status=$?
11032 grep -v '^ *+' conftest.er1 >conftest.err
11033 rm -f conftest.er1
11034 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011036 (exit $ac_status); } && {
11037 test -z "$ac_c_werror_flag" ||
11038 test ! -s conftest.err
11039 } && test -s conftest.$ac_objext; then
11040 ac_hi=$ac_mid
11041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011042 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011043sed 's/^/| /' conftest.$ac_ext >&5
11044
11045 ac_lo=`expr '(' $ac_mid ')' + 1`
11046fi
11047
11048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11049done
11050case $ac_lo in
11051?*) ac_cv_sizeof_pid_t=$ac_lo;;
11052'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011053 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011054See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011055echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011056See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011057 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011058 else
11059 ac_cv_sizeof_pid_t=0
11060 fi ;;
11061esac
11062else
11063 cat >conftest.$ac_ext <<_ACEOF
11064/* confdefs.h. */
11065_ACEOF
11066cat confdefs.h >>conftest.$ac_ext
11067cat >>conftest.$ac_ext <<_ACEOF
11068/* end confdefs.h. */
11069$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011070 typedef pid_t ac__type_sizeof_;
11071static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11072static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011073#include <stdio.h>
11074#include <stdlib.h>
11075int
11076main ()
11077{
11078
11079 FILE *f = fopen ("conftest.val", "w");
11080 if (! f)
11081 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011082 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011083 {
11084 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011085 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011086 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011087 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011088 }
11089 else
11090 {
11091 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011092 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011093 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011094 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011095 }
11096 return ferror (f) || fclose (f) != 0;
11097
11098 ;
11099 return 0;
11100}
11101_ACEOF
11102rm -f conftest$ac_exeext
11103if { (ac_try="$ac_link"
11104case "(($ac_try" in
11105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11106 *) ac_try_echo=$ac_try;;
11107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011109 (eval "$ac_link") 2>&5
11110 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11113 { (case "(($ac_try" in
11114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11115 *) ac_try_echo=$ac_try;;
11116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011118 (eval "$ac_try") 2>&5
11119 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011121 (exit $ac_status); }; }; then
11122 ac_cv_sizeof_pid_t=`cat conftest.val`
11123else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011124 echo "$as_me: program exited with status $ac_status" >&5
11125echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011126sed 's/^/| /' conftest.$ac_ext >&5
11127
11128( exit $ac_status )
11129if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011130 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011131See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011132echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011133See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011134 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011135 else
11136 ac_cv_sizeof_pid_t=0
11137 fi
11138fi
11139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11140fi
11141rm -f conftest.val
11142fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011143{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11144echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011145
11146
11147
11148cat >>confdefs.h <<_ACEOF
11149#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11150_ACEOF
11151
11152
Michael W. Hudson54241132001-12-07 15:38:26 +000011153
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011154{ echo "$as_me:$LINENO: checking for long long support" >&5
11155echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011156have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011158/* confdefs.h. */
11159_ACEOF
11160cat confdefs.h >>conftest.$ac_ext
11161cat >>conftest.$ac_ext <<_ACEOF
11162/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011163
Martin v. Löwis11437992002-04-12 09:54:03 +000011164int
11165main ()
11166{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011167long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 ;
11169 return 0;
11170}
11171_ACEOF
11172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011173if { (ac_try="$ac_compile"
11174case "(($ac_try" in
11175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11176 *) ac_try_echo=$ac_try;;
11177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011181 grep -v '^ *+' conftest.er1 >conftest.err
11182 rm -f conftest.er1
11183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185 (exit $ac_status); } && {
11186 test -z "$ac_c_werror_flag" ||
11187 test ! -s conftest.err
11188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011189
11190
11191cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011192#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011193_ACEOF
11194
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011195 have_long_long=yes
11196
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011199sed 's/^/| /' conftest.$ac_ext >&5
11200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203
11204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011205{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11206echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011207if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011208{ echo "$as_me:$LINENO: checking for long long" >&5
11209echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11210if test "${ac_cv_type_long_long+set}" = set; then
11211 echo $ECHO_N "(cached) $ECHO_C" >&6
11212else
11213 cat >conftest.$ac_ext <<_ACEOF
11214/* confdefs.h. */
11215_ACEOF
11216cat confdefs.h >>conftest.$ac_ext
11217cat >>conftest.$ac_ext <<_ACEOF
11218/* end confdefs.h. */
11219$ac_includes_default
11220typedef long long ac__type_new_;
11221int
11222main ()
11223{
11224if ((ac__type_new_ *) 0)
11225 return 0;
11226if (sizeof (ac__type_new_))
11227 return 0;
11228 ;
11229 return 0;
11230}
11231_ACEOF
11232rm -f conftest.$ac_objext
11233if { (ac_try="$ac_compile"
11234case "(($ac_try" in
11235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11236 *) ac_try_echo=$ac_try;;
11237esac
11238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11239 (eval "$ac_compile") 2>conftest.er1
11240 ac_status=$?
11241 grep -v '^ *+' conftest.er1 >conftest.err
11242 rm -f conftest.er1
11243 cat conftest.err >&5
11244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11245 (exit $ac_status); } && {
11246 test -z "$ac_c_werror_flag" ||
11247 test ! -s conftest.err
11248 } && test -s conftest.$ac_objext; then
11249 ac_cv_type_long_long=yes
11250else
11251 echo "$as_me: failed program was:" >&5
11252sed 's/^/| /' conftest.$ac_ext >&5
11253
11254 ac_cv_type_long_long=no
11255fi
11256
11257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11258fi
11259{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11260echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011262# The cast to long int works around a bug in the HP C Compiler
11263# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11264# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11265# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011266{ echo "$as_me:$LINENO: checking size of long long" >&5
11267echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011268if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011269 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011270else
Martin v. Löwis11437992002-04-12 09:54:03 +000011271 if test "$cross_compiling" = yes; then
11272 # Depending upon the size, compute the lo and hi bounds.
11273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* confdefs.h. */
11275_ACEOF
11276cat confdefs.h >>conftest.$ac_ext
11277cat >>conftest.$ac_ext <<_ACEOF
11278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011279$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011280 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011281int
11282main ()
11283{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011284static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011285test_array [0] = 0
11286
11287 ;
11288 return 0;
11289}
11290_ACEOF
11291rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011292if { (ac_try="$ac_compile"
11293case "(($ac_try" in
11294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11295 *) ac_try_echo=$ac_try;;
11296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011300 grep -v '^ *+' conftest.er1 >conftest.err
11301 rm -f conftest.er1
11302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304 (exit $ac_status); } && {
11305 test -z "$ac_c_werror_flag" ||
11306 test ! -s conftest.err
11307 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 ac_lo=0 ac_mid=0
11309 while :; do
11310 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* confdefs.h. */
11312_ACEOF
11313cat confdefs.h >>conftest.$ac_ext
11314cat >>conftest.$ac_ext <<_ACEOF
11315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011316$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011317 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011318int
11319main ()
11320{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011321static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011322test_array [0] = 0
11323
11324 ;
11325 return 0;
11326}
11327_ACEOF
11328rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329if { (ac_try="$ac_compile"
11330case "(($ac_try" in
11331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11332 *) ac_try_echo=$ac_try;;
11333esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011337 grep -v '^ *+' conftest.er1 >conftest.err
11338 rm -f conftest.er1
11339 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341 (exit $ac_status); } && {
11342 test -z "$ac_c_werror_flag" ||
11343 test ! -s conftest.err
11344 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011345 ac_hi=$ac_mid; break
11346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011348sed 's/^/| /' conftest.$ac_ext >&5
11349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350 ac_lo=`expr $ac_mid + 1`
11351 if test $ac_lo -le $ac_mid; then
11352 ac_lo= ac_hi=
11353 break
11354 fi
11355 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357
11358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 done
11360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011362sed 's/^/| /' conftest.$ac_ext >&5
11363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011365/* confdefs.h. */
11366_ACEOF
11367cat confdefs.h >>conftest.$ac_ext
11368cat >>conftest.$ac_ext <<_ACEOF
11369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011370$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011371 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011372int
11373main ()
11374{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011376test_array [0] = 0
11377
11378 ;
11379 return 0;
11380}
11381_ACEOF
11382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011383if { (ac_try="$ac_compile"
11384case "(($ac_try" in
11385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11386 *) ac_try_echo=$ac_try;;
11387esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011391 grep -v '^ *+' conftest.er1 >conftest.err
11392 rm -f conftest.er1
11393 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395 (exit $ac_status); } && {
11396 test -z "$ac_c_werror_flag" ||
11397 test ! -s conftest.err
11398 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 ac_hi=-1 ac_mid=-1
11400 while :; do
11401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* confdefs.h. */
11403_ACEOF
11404cat confdefs.h >>conftest.$ac_ext
11405cat >>conftest.$ac_ext <<_ACEOF
11406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011407$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011408 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011409int
11410main ()
11411{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011413test_array [0] = 0
11414
11415 ;
11416 return 0;
11417}
11418_ACEOF
11419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420if { (ac_try="$ac_compile"
11421case "(($ac_try" in
11422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11423 *) ac_try_echo=$ac_try;;
11424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011428 grep -v '^ *+' conftest.er1 >conftest.err
11429 rm -f conftest.er1
11430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432 (exit $ac_status); } && {
11433 test -z "$ac_c_werror_flag" ||
11434 test ! -s conftest.err
11435 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 ac_lo=$ac_mid; break
11437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011439sed 's/^/| /' conftest.$ac_ext >&5
11440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441 ac_hi=`expr '(' $ac_mid ')' - 1`
11442 if test $ac_mid -le $ac_hi; then
11443 ac_lo= ac_hi=
11444 break
11445 fi
11446 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448
11449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 done
11451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011453sed 's/^/| /' conftest.$ac_ext >&5
11454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457
11458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460
11461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011462# Binary search between lo and hi bounds.
11463while test "x$ac_lo" != "x$ac_hi"; do
11464 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011466/* confdefs.h. */
11467_ACEOF
11468cat confdefs.h >>conftest.$ac_ext
11469cat >>conftest.$ac_ext <<_ACEOF
11470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011471$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011472 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011473int
11474main ()
11475{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011477test_array [0] = 0
11478
11479 ;
11480 return 0;
11481}
11482_ACEOF
11483rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484if { (ac_try="$ac_compile"
11485case "(($ac_try" in
11486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11487 *) ac_try_echo=$ac_try;;
11488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011492 grep -v '^ *+' conftest.er1 >conftest.err
11493 rm -f conftest.er1
11494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 (exit $ac_status); } && {
11497 test -z "$ac_c_werror_flag" ||
11498 test ! -s conftest.err
11499 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 ac_hi=$ac_mid
11501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011503sed 's/^/| /' conftest.$ac_ext >&5
11504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507
11508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011509done
11510case $ac_lo in
11511?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011513 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011514See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011515echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011516See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011517 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 else
11519 ac_cv_sizeof_long_long=0
11520 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011521esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011522else
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011524/* confdefs.h. */
11525_ACEOF
11526cat confdefs.h >>conftest.$ac_ext
11527cat >>conftest.$ac_ext <<_ACEOF
11528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011529$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011530 typedef long long ac__type_sizeof_;
11531static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11532static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011533#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011534#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011535int
11536main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011537{
Martin v. Löwis11437992002-04-12 09:54:03 +000011538
11539 FILE *f = fopen ("conftest.val", "w");
11540 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011541 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011542 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011545 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011547 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 }
11549 else
11550 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011552 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011554 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
11558 ;
11559 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011560}
Martin v. Löwis11437992002-04-12 09:54:03 +000011561_ACEOF
11562rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563if { (ac_try="$ac_link"
11564case "(($ac_try" in
11565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11566 *) ac_try_echo=$ac_try;;
11567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573 { (case "(($ac_try" in
11574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11575 *) ac_try_echo=$ac_try;;
11576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 (exit $ac_status); }; }; then
11582 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011583else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011584 echo "$as_me: program exited with status $ac_status" >&5
11585echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011586sed 's/^/| /' conftest.$ac_ext >&5
11587
Martin v. Löwis11437992002-04-12 09:54:03 +000011588( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011590 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011591See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011592echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011593See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011594 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595 else
11596 ac_cv_sizeof_long_long=0
11597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011599rm -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 +000011600fi
11601rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011602fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011603{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11604echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605
11606
11607
Martin v. Löwis11437992002-04-12 09:54:03 +000011608cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011609#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011610_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011611
Michael W. Hudson54241132001-12-07 15:38:26 +000011612
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011613fi
11614
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011615{ echo "$as_me:$LINENO: checking for long double support" >&5
11616echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011617have_long_double=no
11618cat >conftest.$ac_ext <<_ACEOF
11619/* confdefs.h. */
11620_ACEOF
11621cat confdefs.h >>conftest.$ac_ext
11622cat >>conftest.$ac_ext <<_ACEOF
11623/* end confdefs.h. */
11624
11625int
11626main ()
11627{
11628long double x; x = (long double)0;
11629 ;
11630 return 0;
11631}
11632_ACEOF
11633rm -f conftest.$ac_objext
11634if { (ac_try="$ac_compile"
11635case "(($ac_try" in
11636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11637 *) ac_try_echo=$ac_try;;
11638esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011640 (eval "$ac_compile") 2>conftest.er1
11641 ac_status=$?
11642 grep -v '^ *+' conftest.er1 >conftest.err
11643 rm -f conftest.er1
11644 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011646 (exit $ac_status); } && {
11647 test -z "$ac_c_werror_flag" ||
11648 test ! -s conftest.err
11649 } && test -s conftest.$ac_objext; then
11650
11651
11652cat >>confdefs.h <<\_ACEOF
11653#define HAVE_LONG_DOUBLE 1
11654_ACEOF
11655
11656 have_long_double=yes
11657
11658else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011659 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011660sed 's/^/| /' conftest.$ac_ext >&5
11661
11662
11663fi
11664
11665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011666{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11667echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011668if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011669{ echo "$as_me:$LINENO: checking for long double" >&5
11670echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11671if test "${ac_cv_type_long_double+set}" = set; then
11672 echo $ECHO_N "(cached) $ECHO_C" >&6
11673else
11674 cat >conftest.$ac_ext <<_ACEOF
11675/* confdefs.h. */
11676_ACEOF
11677cat confdefs.h >>conftest.$ac_ext
11678cat >>conftest.$ac_ext <<_ACEOF
11679/* end confdefs.h. */
11680$ac_includes_default
11681typedef long double ac__type_new_;
11682int
11683main ()
11684{
11685if ((ac__type_new_ *) 0)
11686 return 0;
11687if (sizeof (ac__type_new_))
11688 return 0;
11689 ;
11690 return 0;
11691}
11692_ACEOF
11693rm -f conftest.$ac_objext
11694if { (ac_try="$ac_compile"
11695case "(($ac_try" in
11696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11697 *) ac_try_echo=$ac_try;;
11698esac
11699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11700 (eval "$ac_compile") 2>conftest.er1
11701 ac_status=$?
11702 grep -v '^ *+' conftest.er1 >conftest.err
11703 rm -f conftest.er1
11704 cat conftest.err >&5
11705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11706 (exit $ac_status); } && {
11707 test -z "$ac_c_werror_flag" ||
11708 test ! -s conftest.err
11709 } && test -s conftest.$ac_objext; then
11710 ac_cv_type_long_double=yes
11711else
11712 echo "$as_me: failed program was:" >&5
11713sed 's/^/| /' conftest.$ac_ext >&5
11714
11715 ac_cv_type_long_double=no
11716fi
11717
11718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11719fi
11720{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11721echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11722
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011723# The cast to long int works around a bug in the HP C Compiler
11724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11726# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011727{ echo "$as_me:$LINENO: checking size of long double" >&5
11728echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011729if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011730 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011731else
11732 if test "$cross_compiling" = yes; then
11733 # Depending upon the size, compute the lo and hi bounds.
11734cat >conftest.$ac_ext <<_ACEOF
11735/* confdefs.h. */
11736_ACEOF
11737cat confdefs.h >>conftest.$ac_ext
11738cat >>conftest.$ac_ext <<_ACEOF
11739/* end confdefs.h. */
11740$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011741 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011742int
11743main ()
11744{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011745static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011746test_array [0] = 0
11747
11748 ;
11749 return 0;
11750}
11751_ACEOF
11752rm -f conftest.$ac_objext
11753if { (ac_try="$ac_compile"
11754case "(($ac_try" in
11755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11756 *) ac_try_echo=$ac_try;;
11757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011759 (eval "$ac_compile") 2>conftest.er1
11760 ac_status=$?
11761 grep -v '^ *+' conftest.er1 >conftest.err
11762 rm -f conftest.er1
11763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011765 (exit $ac_status); } && {
11766 test -z "$ac_c_werror_flag" ||
11767 test ! -s conftest.err
11768 } && test -s conftest.$ac_objext; then
11769 ac_lo=0 ac_mid=0
11770 while :; do
11771 cat >conftest.$ac_ext <<_ACEOF
11772/* confdefs.h. */
11773_ACEOF
11774cat confdefs.h >>conftest.$ac_ext
11775cat >>conftest.$ac_ext <<_ACEOF
11776/* end confdefs.h. */
11777$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011778 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011779int
11780main ()
11781{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011782static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011783test_array [0] = 0
11784
11785 ;
11786 return 0;
11787}
11788_ACEOF
11789rm -f conftest.$ac_objext
11790if { (ac_try="$ac_compile"
11791case "(($ac_try" in
11792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11793 *) ac_try_echo=$ac_try;;
11794esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011796 (eval "$ac_compile") 2>conftest.er1
11797 ac_status=$?
11798 grep -v '^ *+' conftest.er1 >conftest.err
11799 rm -f conftest.er1
11800 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011802 (exit $ac_status); } && {
11803 test -z "$ac_c_werror_flag" ||
11804 test ! -s conftest.err
11805 } && test -s conftest.$ac_objext; then
11806 ac_hi=$ac_mid; break
11807else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011808 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011809sed 's/^/| /' conftest.$ac_ext >&5
11810
11811 ac_lo=`expr $ac_mid + 1`
11812 if test $ac_lo -le $ac_mid; then
11813 ac_lo= ac_hi=
11814 break
11815 fi
11816 ac_mid=`expr 2 '*' $ac_mid + 1`
11817fi
11818
11819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11820 done
11821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011822 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011823sed 's/^/| /' conftest.$ac_ext >&5
11824
11825 cat >conftest.$ac_ext <<_ACEOF
11826/* confdefs.h. */
11827_ACEOF
11828cat confdefs.h >>conftest.$ac_ext
11829cat >>conftest.$ac_ext <<_ACEOF
11830/* end confdefs.h. */
11831$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011832 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011833int
11834main ()
11835{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011836static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011837test_array [0] = 0
11838
11839 ;
11840 return 0;
11841}
11842_ACEOF
11843rm -f conftest.$ac_objext
11844if { (ac_try="$ac_compile"
11845case "(($ac_try" in
11846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11847 *) ac_try_echo=$ac_try;;
11848esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011850 (eval "$ac_compile") 2>conftest.er1
11851 ac_status=$?
11852 grep -v '^ *+' conftest.er1 >conftest.err
11853 rm -f conftest.er1
11854 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011856 (exit $ac_status); } && {
11857 test -z "$ac_c_werror_flag" ||
11858 test ! -s conftest.err
11859 } && test -s conftest.$ac_objext; then
11860 ac_hi=-1 ac_mid=-1
11861 while :; do
11862 cat >conftest.$ac_ext <<_ACEOF
11863/* confdefs.h. */
11864_ACEOF
11865cat confdefs.h >>conftest.$ac_ext
11866cat >>conftest.$ac_ext <<_ACEOF
11867/* end confdefs.h. */
11868$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011869 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870int
11871main ()
11872{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011873static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011874test_array [0] = 0
11875
11876 ;
11877 return 0;
11878}
11879_ACEOF
11880rm -f conftest.$ac_objext
11881if { (ac_try="$ac_compile"
11882case "(($ac_try" in
11883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11884 *) ac_try_echo=$ac_try;;
11885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011887 (eval "$ac_compile") 2>conftest.er1
11888 ac_status=$?
11889 grep -v '^ *+' conftest.er1 >conftest.err
11890 rm -f conftest.er1
11891 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011893 (exit $ac_status); } && {
11894 test -z "$ac_c_werror_flag" ||
11895 test ! -s conftest.err
11896 } && test -s conftest.$ac_objext; then
11897 ac_lo=$ac_mid; break
11898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011899 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011900sed 's/^/| /' conftest.$ac_ext >&5
11901
11902 ac_hi=`expr '(' $ac_mid ')' - 1`
11903 if test $ac_mid -le $ac_hi; then
11904 ac_lo= ac_hi=
11905 break
11906 fi
11907 ac_mid=`expr 2 '*' $ac_mid`
11908fi
11909
11910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11911 done
11912else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011913 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011914sed 's/^/| /' conftest.$ac_ext >&5
11915
11916 ac_lo= ac_hi=
11917fi
11918
11919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11920fi
11921
11922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11923# Binary search between lo and hi bounds.
11924while test "x$ac_lo" != "x$ac_hi"; do
11925 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11926 cat >conftest.$ac_ext <<_ACEOF
11927/* confdefs.h. */
11928_ACEOF
11929cat confdefs.h >>conftest.$ac_ext
11930cat >>conftest.$ac_ext <<_ACEOF
11931/* end confdefs.h. */
11932$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011933 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011934int
11935main ()
11936{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011937static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011938test_array [0] = 0
11939
11940 ;
11941 return 0;
11942}
11943_ACEOF
11944rm -f conftest.$ac_objext
11945if { (ac_try="$ac_compile"
11946case "(($ac_try" in
11947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11948 *) ac_try_echo=$ac_try;;
11949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011951 (eval "$ac_compile") 2>conftest.er1
11952 ac_status=$?
11953 grep -v '^ *+' conftest.er1 >conftest.err
11954 rm -f conftest.er1
11955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011957 (exit $ac_status); } && {
11958 test -z "$ac_c_werror_flag" ||
11959 test ! -s conftest.err
11960 } && test -s conftest.$ac_objext; then
11961 ac_hi=$ac_mid
11962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011963 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011964sed 's/^/| /' conftest.$ac_ext >&5
11965
11966 ac_lo=`expr '(' $ac_mid ')' + 1`
11967fi
11968
11969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11970done
11971case $ac_lo in
11972?*) ac_cv_sizeof_long_double=$ac_lo;;
11973'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011974 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011975See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011976echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011977See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011978 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011979 else
11980 ac_cv_sizeof_long_double=0
11981 fi ;;
11982esac
11983else
11984 cat >conftest.$ac_ext <<_ACEOF
11985/* confdefs.h. */
11986_ACEOF
11987cat confdefs.h >>conftest.$ac_ext
11988cat >>conftest.$ac_ext <<_ACEOF
11989/* end confdefs.h. */
11990$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011991 typedef long double ac__type_sizeof_;
11992static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11993static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011994#include <stdio.h>
11995#include <stdlib.h>
11996int
11997main ()
11998{
11999
12000 FILE *f = fopen ("conftest.val", "w");
12001 if (! f)
12002 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012003 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012004 {
12005 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012006 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012007 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012008 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012009 }
12010 else
12011 {
12012 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012013 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012014 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012015 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012016 }
12017 return ferror (f) || fclose (f) != 0;
12018
12019 ;
12020 return 0;
12021}
12022_ACEOF
12023rm -f conftest$ac_exeext
12024if { (ac_try="$ac_link"
12025case "(($ac_try" in
12026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12027 *) ac_try_echo=$ac_try;;
12028esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012030 (eval "$ac_link") 2>&5
12031 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12034 { (case "(($ac_try" in
12035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12036 *) ac_try_echo=$ac_try;;
12037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012039 (eval "$ac_try") 2>&5
12040 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012042 (exit $ac_status); }; }; then
12043 ac_cv_sizeof_long_double=`cat conftest.val`
12044else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012045 echo "$as_me: program exited with status $ac_status" >&5
12046echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012047sed 's/^/| /' conftest.$ac_ext >&5
12048
12049( exit $ac_status )
12050if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012051 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012052See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012053echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012054See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012055 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012056 else
12057 ac_cv_sizeof_long_double=0
12058 fi
12059fi
12060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12061fi
12062rm -f conftest.val
12063fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012064{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12065echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012066
12067
12068
12069cat >>confdefs.h <<_ACEOF
12070#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12071_ACEOF
12072
12073
12074fi
12075
12076
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012077{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12078echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012079have_c99_bool=no
12080cat >conftest.$ac_ext <<_ACEOF
12081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
12086
12087int
12088main ()
12089{
12090_Bool x; x = (_Bool)0;
12091 ;
12092 return 0;
12093}
12094_ACEOF
12095rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012096if { (ac_try="$ac_compile"
12097case "(($ac_try" in
12098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12099 *) ac_try_echo=$ac_try;;
12100esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012102 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012103 ac_status=$?
12104 grep -v '^ *+' conftest.er1 >conftest.err
12105 rm -f conftest.er1
12106 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108 (exit $ac_status); } && {
12109 test -z "$ac_c_werror_flag" ||
12110 test ! -s conftest.err
12111 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012112
12113
12114cat >>confdefs.h <<\_ACEOF
12115#define HAVE_C99_BOOL 1
12116_ACEOF
12117
12118 have_c99_bool=yes
12119
12120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012121 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012122sed 's/^/| /' conftest.$ac_ext >&5
12123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124
Thomas Woutersb2137042007-02-01 18:02:27 +000012125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126
12127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012128{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12129echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012130if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012131{ echo "$as_me:$LINENO: checking for _Bool" >&5
12132echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12133if test "${ac_cv_type__Bool+set}" = set; then
12134 echo $ECHO_N "(cached) $ECHO_C" >&6
12135else
12136 cat >conftest.$ac_ext <<_ACEOF
12137/* confdefs.h. */
12138_ACEOF
12139cat confdefs.h >>conftest.$ac_ext
12140cat >>conftest.$ac_ext <<_ACEOF
12141/* end confdefs.h. */
12142$ac_includes_default
12143typedef _Bool ac__type_new_;
12144int
12145main ()
12146{
12147if ((ac__type_new_ *) 0)
12148 return 0;
12149if (sizeof (ac__type_new_))
12150 return 0;
12151 ;
12152 return 0;
12153}
12154_ACEOF
12155rm -f conftest.$ac_objext
12156if { (ac_try="$ac_compile"
12157case "(($ac_try" in
12158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12159 *) ac_try_echo=$ac_try;;
12160esac
12161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12162 (eval "$ac_compile") 2>conftest.er1
12163 ac_status=$?
12164 grep -v '^ *+' conftest.er1 >conftest.err
12165 rm -f conftest.er1
12166 cat conftest.err >&5
12167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12168 (exit $ac_status); } && {
12169 test -z "$ac_c_werror_flag" ||
12170 test ! -s conftest.err
12171 } && test -s conftest.$ac_objext; then
12172 ac_cv_type__Bool=yes
12173else
12174 echo "$as_me: failed program was:" >&5
12175sed 's/^/| /' conftest.$ac_ext >&5
12176
12177 ac_cv_type__Bool=no
12178fi
12179
12180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12181fi
12182{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12183echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185# The cast to long int works around a bug in the HP C Compiler
12186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12188# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012189{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12190echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012191if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012192 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012193else
12194 if test "$cross_compiling" = yes; then
12195 # Depending upon the size, compute the lo and hi bounds.
12196cat >conftest.$ac_ext <<_ACEOF
12197/* confdefs.h. */
12198_ACEOF
12199cat confdefs.h >>conftest.$ac_ext
12200cat >>conftest.$ac_ext <<_ACEOF
12201/* end confdefs.h. */
12202$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012203 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012204int
12205main ()
12206{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012207static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012208test_array [0] = 0
12209
12210 ;
12211 return 0;
12212}
12213_ACEOF
12214rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215if { (ac_try="$ac_compile"
12216case "(($ac_try" in
12217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12218 *) ac_try_echo=$ac_try;;
12219esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012222 ac_status=$?
12223 grep -v '^ *+' conftest.er1 >conftest.err
12224 rm -f conftest.er1
12225 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227 (exit $ac_status); } && {
12228 test -z "$ac_c_werror_flag" ||
12229 test ! -s conftest.err
12230 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012231 ac_lo=0 ac_mid=0
12232 while :; do
12233 cat >conftest.$ac_ext <<_ACEOF
12234/* confdefs.h. */
12235_ACEOF
12236cat confdefs.h >>conftest.$ac_ext
12237cat >>conftest.$ac_ext <<_ACEOF
12238/* end confdefs.h. */
12239$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012240 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012241int
12242main ()
12243{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012244static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012245test_array [0] = 0
12246
12247 ;
12248 return 0;
12249}
12250_ACEOF
12251rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252if { (ac_try="$ac_compile"
12253case "(($ac_try" in
12254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12255 *) ac_try_echo=$ac_try;;
12256esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012258 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012259 ac_status=$?
12260 grep -v '^ *+' conftest.er1 >conftest.err
12261 rm -f conftest.er1
12262 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264 (exit $ac_status); } && {
12265 test -z "$ac_c_werror_flag" ||
12266 test ! -s conftest.err
12267 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012268 ac_hi=$ac_mid; break
12269else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012270 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012271sed 's/^/| /' conftest.$ac_ext >&5
12272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273 ac_lo=`expr $ac_mid + 1`
12274 if test $ac_lo -le $ac_mid; then
12275 ac_lo= ac_hi=
12276 break
12277 fi
12278 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280
12281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012282 done
12283else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012284 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012285sed 's/^/| /' conftest.$ac_ext >&5
12286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012288/* confdefs.h. */
12289_ACEOF
12290cat confdefs.h >>conftest.$ac_ext
12291cat >>conftest.$ac_ext <<_ACEOF
12292/* end confdefs.h. */
12293$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012294 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012295int
12296main ()
12297{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012299test_array [0] = 0
12300
12301 ;
12302 return 0;
12303}
12304_ACEOF
12305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306if { (ac_try="$ac_compile"
12307case "(($ac_try" in
12308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12309 *) ac_try_echo=$ac_try;;
12310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012313 ac_status=$?
12314 grep -v '^ *+' conftest.er1 >conftest.err
12315 rm -f conftest.er1
12316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318 (exit $ac_status); } && {
12319 test -z "$ac_c_werror_flag" ||
12320 test ! -s conftest.err
12321 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012322 ac_hi=-1 ac_mid=-1
12323 while :; do
12324 cat >conftest.$ac_ext <<_ACEOF
12325/* confdefs.h. */
12326_ACEOF
12327cat confdefs.h >>conftest.$ac_ext
12328cat >>conftest.$ac_ext <<_ACEOF
12329/* end confdefs.h. */
12330$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012331 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012332int
12333main ()
12334{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012336test_array [0] = 0
12337
12338 ;
12339 return 0;
12340}
12341_ACEOF
12342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012343if { (ac_try="$ac_compile"
12344case "(($ac_try" in
12345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12346 *) ac_try_echo=$ac_try;;
12347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012350 ac_status=$?
12351 grep -v '^ *+' conftest.er1 >conftest.err
12352 rm -f conftest.er1
12353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355 (exit $ac_status); } && {
12356 test -z "$ac_c_werror_flag" ||
12357 test ! -s conftest.err
12358 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012359 ac_lo=$ac_mid; break
12360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012361 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012362sed 's/^/| /' conftest.$ac_ext >&5
12363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364 ac_hi=`expr '(' $ac_mid ')' - 1`
12365 if test $ac_mid -le $ac_hi; then
12366 ac_lo= ac_hi=
12367 break
12368 fi
12369 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371
12372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012373 done
12374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012375 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012376sed 's/^/| /' conftest.$ac_ext >&5
12377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380
12381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383
12384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012385# Binary search between lo and hi bounds.
12386while test "x$ac_lo" != "x$ac_hi"; do
12387 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12388 cat >conftest.$ac_ext <<_ACEOF
12389/* confdefs.h. */
12390_ACEOF
12391cat confdefs.h >>conftest.$ac_ext
12392cat >>conftest.$ac_ext <<_ACEOF
12393/* end confdefs.h. */
12394$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012395 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012396int
12397main ()
12398{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012400test_array [0] = 0
12401
12402 ;
12403 return 0;
12404}
12405_ACEOF
12406rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407if { (ac_try="$ac_compile"
12408case "(($ac_try" in
12409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12410 *) ac_try_echo=$ac_try;;
12411esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012414 ac_status=$?
12415 grep -v '^ *+' conftest.er1 >conftest.err
12416 rm -f conftest.er1
12417 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 (exit $ac_status); } && {
12420 test -z "$ac_c_werror_flag" ||
12421 test ! -s conftest.err
12422 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012423 ac_hi=$ac_mid
12424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012425 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012426sed 's/^/| /' conftest.$ac_ext >&5
12427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430
12431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012432done
12433case $ac_lo in
12434?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012436 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012437See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012438echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012439See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012440 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441 else
12442 ac_cv_sizeof__Bool=0
12443 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012444esac
12445else
12446 cat >conftest.$ac_ext <<_ACEOF
12447/* confdefs.h. */
12448_ACEOF
12449cat confdefs.h >>conftest.$ac_ext
12450cat >>conftest.$ac_ext <<_ACEOF
12451/* end confdefs.h. */
12452$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012453 typedef _Bool ac__type_sizeof_;
12454static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12455static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012456#include <stdio.h>
12457#include <stdlib.h>
12458int
12459main ()
12460{
12461
12462 FILE *f = fopen ("conftest.val", "w");
12463 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012465 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012466 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012468 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012470 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012471 }
12472 else
12473 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012475 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012477 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012478 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012480
12481 ;
12482 return 0;
12483}
12484_ACEOF
12485rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486if { (ac_try="$ac_link"
12487case "(($ac_try" in
12488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12489 *) ac_try_echo=$ac_try;;
12490esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012493 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012495 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012496 { (case "(($ac_try" in
12497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12498 *) ac_try_echo=$ac_try;;
12499esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012502 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012504 (exit $ac_status); }; }; then
12505 ac_cv_sizeof__Bool=`cat conftest.val`
12506else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012507 echo "$as_me: program exited with status $ac_status" >&5
12508echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012509sed 's/^/| /' conftest.$ac_ext >&5
12510
12511( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012513 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012514See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012515echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012516See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012517 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518 else
12519 ac_cv_sizeof__Bool=0
12520 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522rm -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 +000012523fi
12524rm -f conftest.val
12525fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012526{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12527echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528
12529
12530
Thomas Woutersb2137042007-02-01 18:02:27 +000012531cat >>confdefs.h <<_ACEOF
12532#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12533_ACEOF
12534
12535
12536fi
12537
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012538{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12539echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012540if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012541 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012542else
12543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012544/* confdefs.h. */
12545_ACEOF
12546cat confdefs.h >>conftest.$ac_ext
12547cat >>conftest.$ac_ext <<_ACEOF
12548/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012549#ifdef HAVE_STDINT_H
12550 #include <stdint.h>
12551 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012552
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012553typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012554int
12555main ()
12556{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012557if ((ac__type_new_ *) 0)
12558 return 0;
12559if (sizeof (ac__type_new_))
12560 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 ;
12562 return 0;
12563}
12564_ACEOF
12565rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566if { (ac_try="$ac_compile"
12567case "(($ac_try" in
12568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12569 *) ac_try_echo=$ac_try;;
12570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012574 grep -v '^ *+' conftest.er1 >conftest.err
12575 rm -f conftest.er1
12576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578 (exit $ac_status); } && {
12579 test -z "$ac_c_werror_flag" ||
12580 test ! -s conftest.err
12581 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012582 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012583else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012585sed 's/^/| /' conftest.$ac_ext >&5
12586
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012587 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589
12590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012591fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012592{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12593echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12594if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012595
12596cat >>confdefs.h <<_ACEOF
12597#define HAVE_UINTPTR_T 1
12598_ACEOF
12599
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012600{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12601echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12602if test "${ac_cv_type_uintptr_t+set}" = set; then
12603 echo $ECHO_N "(cached) $ECHO_C" >&6
12604else
12605 cat >conftest.$ac_ext <<_ACEOF
12606/* confdefs.h. */
12607_ACEOF
12608cat confdefs.h >>conftest.$ac_ext
12609cat >>conftest.$ac_ext <<_ACEOF
12610/* end confdefs.h. */
12611$ac_includes_default
12612typedef uintptr_t ac__type_new_;
12613int
12614main ()
12615{
12616if ((ac__type_new_ *) 0)
12617 return 0;
12618if (sizeof (ac__type_new_))
12619 return 0;
12620 ;
12621 return 0;
12622}
12623_ACEOF
12624rm -f conftest.$ac_objext
12625if { (ac_try="$ac_compile"
12626case "(($ac_try" in
12627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12628 *) ac_try_echo=$ac_try;;
12629esac
12630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12631 (eval "$ac_compile") 2>conftest.er1
12632 ac_status=$?
12633 grep -v '^ *+' conftest.er1 >conftest.err
12634 rm -f conftest.er1
12635 cat conftest.err >&5
12636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12637 (exit $ac_status); } && {
12638 test -z "$ac_c_werror_flag" ||
12639 test ! -s conftest.err
12640 } && test -s conftest.$ac_objext; then
12641 ac_cv_type_uintptr_t=yes
12642else
12643 echo "$as_me: failed program was:" >&5
12644sed 's/^/| /' conftest.$ac_ext >&5
12645
12646 ac_cv_type_uintptr_t=no
12647fi
12648
12649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12650fi
12651{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12652echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654# The cast to long int works around a bug in the HP C Compiler
12655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12657# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012658{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12659echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012660if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012661 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012662else
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 if test "$cross_compiling" = yes; then
12664 # Depending upon the size, compute the lo and hi bounds.
12665cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012666/* confdefs.h. */
12667_ACEOF
12668cat confdefs.h >>conftest.$ac_ext
12669cat >>conftest.$ac_ext <<_ACEOF
12670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012671$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012672 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012673int
12674main ()
12675{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012676static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012677test_array [0] = 0
12678
12679 ;
12680 return 0;
12681}
12682_ACEOF
12683rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012684if { (ac_try="$ac_compile"
12685case "(($ac_try" in
12686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12687 *) ac_try_echo=$ac_try;;
12688esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012692 grep -v '^ *+' conftest.er1 >conftest.err
12693 rm -f conftest.er1
12694 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696 (exit $ac_status); } && {
12697 test -z "$ac_c_werror_flag" ||
12698 test ! -s conftest.err
12699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012700 ac_lo=0 ac_mid=0
12701 while :; do
12702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012703/* confdefs.h. */
12704_ACEOF
12705cat confdefs.h >>conftest.$ac_ext
12706cat >>conftest.$ac_ext <<_ACEOF
12707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012708$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012709 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012710int
12711main ()
12712{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012713static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012714test_array [0] = 0
12715
12716 ;
12717 return 0;
12718}
12719_ACEOF
12720rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721if { (ac_try="$ac_compile"
12722case "(($ac_try" in
12723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12724 *) ac_try_echo=$ac_try;;
12725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012729 grep -v '^ *+' conftest.er1 >conftest.err
12730 rm -f conftest.er1
12731 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733 (exit $ac_status); } && {
12734 test -z "$ac_c_werror_flag" ||
12735 test ! -s conftest.err
12736 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 ac_hi=$ac_mid; break
12738else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012740sed 's/^/| /' conftest.$ac_ext >&5
12741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742 ac_lo=`expr $ac_mid + 1`
12743 if test $ac_lo -le $ac_mid; then
12744 ac_lo= ac_hi=
12745 break
12746 fi
12747 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749
12750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 done
12752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012754sed 's/^/| /' conftest.$ac_ext >&5
12755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012757/* confdefs.h. */
12758_ACEOF
12759cat confdefs.h >>conftest.$ac_ext
12760cat >>conftest.$ac_ext <<_ACEOF
12761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012762$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012763 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012764int
12765main ()
12766{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012767static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012768test_array [0] = 0
12769
12770 ;
12771 return 0;
12772}
12773_ACEOF
12774rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775if { (ac_try="$ac_compile"
12776case "(($ac_try" in
12777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12778 *) ac_try_echo=$ac_try;;
12779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012783 grep -v '^ *+' conftest.er1 >conftest.err
12784 rm -f conftest.er1
12785 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787 (exit $ac_status); } && {
12788 test -z "$ac_c_werror_flag" ||
12789 test ! -s conftest.err
12790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ac_hi=-1 ac_mid=-1
12792 while :; do
12793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012794/* confdefs.h. */
12795_ACEOF
12796cat confdefs.h >>conftest.$ac_ext
12797cat >>conftest.$ac_ext <<_ACEOF
12798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012800 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012801int
12802main ()
12803{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012804static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012805test_array [0] = 0
12806
12807 ;
12808 return 0;
12809}
12810_ACEOF
12811rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812if { (ac_try="$ac_compile"
12813case "(($ac_try" in
12814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12815 *) ac_try_echo=$ac_try;;
12816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012820 grep -v '^ *+' conftest.er1 >conftest.err
12821 rm -f conftest.er1
12822 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824 (exit $ac_status); } && {
12825 test -z "$ac_c_werror_flag" ||
12826 test ! -s conftest.err
12827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 ac_lo=$ac_mid; break
12829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012831sed 's/^/| /' conftest.$ac_ext >&5
12832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012833 ac_hi=`expr '(' $ac_mid ')' - 1`
12834 if test $ac_mid -le $ac_hi; then
12835 ac_lo= ac_hi=
12836 break
12837 fi
12838 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840
12841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 done
12843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012845sed 's/^/| /' conftest.$ac_ext >&5
12846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012847 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849
12850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852
12853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012854# Binary search between lo and hi bounds.
12855while test "x$ac_lo" != "x$ac_hi"; do
12856 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* confdefs.h. */
12859_ACEOF
12860cat confdefs.h >>conftest.$ac_ext
12861cat >>conftest.$ac_ext <<_ACEOF
12862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012863$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012864 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012865int
12866main ()
12867{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012868static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012869test_array [0] = 0
12870
12871 ;
12872 return 0;
12873}
12874_ACEOF
12875rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876if { (ac_try="$ac_compile"
12877case "(($ac_try" in
12878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12879 *) ac_try_echo=$ac_try;;
12880esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012884 grep -v '^ *+' conftest.er1 >conftest.err
12885 rm -f conftest.er1
12886 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 (exit $ac_status); } && {
12889 test -z "$ac_c_werror_flag" ||
12890 test ! -s conftest.err
12891 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 ac_hi=$ac_mid
12893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012895sed 's/^/| /' conftest.$ac_ext >&5
12896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899
12900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012901done
12902case $ac_lo in
12903?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012905 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012906See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012907echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012908See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012909 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 else
12911 ac_cv_sizeof_uintptr_t=0
12912 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012913esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012914else
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012916/* confdefs.h. */
12917_ACEOF
12918cat confdefs.h >>conftest.$ac_ext
12919cat >>conftest.$ac_ext <<_ACEOF
12920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012921$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012922 typedef uintptr_t ac__type_sizeof_;
12923static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12924static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012925#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012926#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012927int
12928main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012929{
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
12931 FILE *f = fopen ("conftest.val", "w");
12932 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012934 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012937 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012939 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 }
12941 else
12942 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012944 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012946 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
12950 ;
12951 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012952}
Martin v. Löwis11437992002-04-12 09:54:03 +000012953_ACEOF
12954rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955if { (ac_try="$ac_link"
12956case "(($ac_try" in
12957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12958 *) ac_try_echo=$ac_try;;
12959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965 { (case "(($ac_try" in
12966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12967 *) ac_try_echo=$ac_try;;
12968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 (exit $ac_status); }; }; then
12974 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012975else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012976 echo "$as_me: program exited with status $ac_status" >&5
12977echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012978sed 's/^/| /' conftest.$ac_ext >&5
12979
Martin v. Löwis11437992002-04-12 09:54:03 +000012980( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012982 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012983See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012984echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012985See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012986 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987 else
12988 ac_cv_sizeof_uintptr_t=0
12989 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991rm -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 +000012992fi
12993rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012994fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012995{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12996echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997
12998
12999
Martin v. Löwis11437992002-04-12 09:54:03 +000013000cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013001#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013002_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013003
Michael W. Hudson54241132001-12-07 15:38:26 +000013004
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013005fi
13006
Thomas Wouters89f507f2006-12-13 04:49:30 +000013007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013008{ echo "$as_me:$LINENO: checking for off_t" >&5
13009echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13010if test "${ac_cv_type_off_t+set}" = set; then
13011 echo $ECHO_N "(cached) $ECHO_C" >&6
13012else
13013 cat >conftest.$ac_ext <<_ACEOF
13014/* confdefs.h. */
13015_ACEOF
13016cat confdefs.h >>conftest.$ac_ext
13017cat >>conftest.$ac_ext <<_ACEOF
13018/* end confdefs.h. */
13019
13020#ifdef HAVE_SYS_TYPES_H
13021#include <sys/types.h>
13022#endif
13023
13024
13025typedef off_t ac__type_new_;
13026int
13027main ()
13028{
13029if ((ac__type_new_ *) 0)
13030 return 0;
13031if (sizeof (ac__type_new_))
13032 return 0;
13033 ;
13034 return 0;
13035}
13036_ACEOF
13037rm -f conftest.$ac_objext
13038if { (ac_try="$ac_compile"
13039case "(($ac_try" in
13040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13041 *) ac_try_echo=$ac_try;;
13042esac
13043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13044 (eval "$ac_compile") 2>conftest.er1
13045 ac_status=$?
13046 grep -v '^ *+' conftest.er1 >conftest.err
13047 rm -f conftest.er1
13048 cat conftest.err >&5
13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13050 (exit $ac_status); } && {
13051 test -z "$ac_c_werror_flag" ||
13052 test ! -s conftest.err
13053 } && test -s conftest.$ac_objext; then
13054 ac_cv_type_off_t=yes
13055else
13056 echo "$as_me: failed program was:" >&5
13057sed 's/^/| /' conftest.$ac_ext >&5
13058
13059 ac_cv_type_off_t=no
13060fi
13061
13062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13063fi
13064{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13065echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13066
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013067# The cast to long int works around a bug in the HP C Compiler
13068# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13069# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13070# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013071{ echo "$as_me:$LINENO: checking size of off_t" >&5
13072echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013073if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013074 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013075else
13076 if test "$cross_compiling" = yes; then
13077 # Depending upon the size, compute the lo and hi bounds.
13078cat >conftest.$ac_ext <<_ACEOF
13079/* confdefs.h. */
13080_ACEOF
13081cat confdefs.h >>conftest.$ac_ext
13082cat >>conftest.$ac_ext <<_ACEOF
13083/* end confdefs.h. */
13084
13085#ifdef HAVE_SYS_TYPES_H
13086#include <sys/types.h>
13087#endif
13088
13089
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013090 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013091int
13092main ()
13093{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013095test_array [0] = 0
13096
13097 ;
13098 return 0;
13099}
13100_ACEOF
13101rm -f conftest.$ac_objext
13102if { (ac_try="$ac_compile"
13103case "(($ac_try" in
13104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13105 *) ac_try_echo=$ac_try;;
13106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013108 (eval "$ac_compile") 2>conftest.er1
13109 ac_status=$?
13110 grep -v '^ *+' conftest.er1 >conftest.err
13111 rm -f conftest.er1
13112 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013114 (exit $ac_status); } && {
13115 test -z "$ac_c_werror_flag" ||
13116 test ! -s conftest.err
13117 } && test -s conftest.$ac_objext; then
13118 ac_lo=0 ac_mid=0
13119 while :; do
13120 cat >conftest.$ac_ext <<_ACEOF
13121/* confdefs.h. */
13122_ACEOF
13123cat confdefs.h >>conftest.$ac_ext
13124cat >>conftest.$ac_ext <<_ACEOF
13125/* end confdefs.h. */
13126
13127#ifdef HAVE_SYS_TYPES_H
13128#include <sys/types.h>
13129#endif
13130
13131
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013132 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013133int
13134main ()
13135{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013136static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013137test_array [0] = 0
13138
13139 ;
13140 return 0;
13141}
13142_ACEOF
13143rm -f conftest.$ac_objext
13144if { (ac_try="$ac_compile"
13145case "(($ac_try" in
13146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13147 *) ac_try_echo=$ac_try;;
13148esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150 (eval "$ac_compile") 2>conftest.er1
13151 ac_status=$?
13152 grep -v '^ *+' conftest.er1 >conftest.err
13153 rm -f conftest.er1
13154 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013156 (exit $ac_status); } && {
13157 test -z "$ac_c_werror_flag" ||
13158 test ! -s conftest.err
13159 } && test -s conftest.$ac_objext; then
13160 ac_hi=$ac_mid; break
13161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013162 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013163sed 's/^/| /' conftest.$ac_ext >&5
13164
13165 ac_lo=`expr $ac_mid + 1`
13166 if test $ac_lo -le $ac_mid; then
13167 ac_lo= ac_hi=
13168 break
13169 fi
13170 ac_mid=`expr 2 '*' $ac_mid + 1`
13171fi
13172
13173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13174 done
13175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013176 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013177sed 's/^/| /' conftest.$ac_ext >&5
13178
13179 cat >conftest.$ac_ext <<_ACEOF
13180/* confdefs.h. */
13181_ACEOF
13182cat confdefs.h >>conftest.$ac_ext
13183cat >>conftest.$ac_ext <<_ACEOF
13184/* end confdefs.h. */
13185
13186#ifdef HAVE_SYS_TYPES_H
13187#include <sys/types.h>
13188#endif
13189
13190
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013191 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013192int
13193main ()
13194{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013196test_array [0] = 0
13197
13198 ;
13199 return 0;
13200}
13201_ACEOF
13202rm -f conftest.$ac_objext
13203if { (ac_try="$ac_compile"
13204case "(($ac_try" in
13205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13206 *) ac_try_echo=$ac_try;;
13207esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013209 (eval "$ac_compile") 2>conftest.er1
13210 ac_status=$?
13211 grep -v '^ *+' conftest.er1 >conftest.err
13212 rm -f conftest.er1
13213 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013215 (exit $ac_status); } && {
13216 test -z "$ac_c_werror_flag" ||
13217 test ! -s conftest.err
13218 } && test -s conftest.$ac_objext; then
13219 ac_hi=-1 ac_mid=-1
13220 while :; do
13221 cat >conftest.$ac_ext <<_ACEOF
13222/* confdefs.h. */
13223_ACEOF
13224cat confdefs.h >>conftest.$ac_ext
13225cat >>conftest.$ac_ext <<_ACEOF
13226/* end confdefs.h. */
13227
13228#ifdef HAVE_SYS_TYPES_H
13229#include <sys/types.h>
13230#endif
13231
13232
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013233 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013234int
13235main ()
13236{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013237static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013238test_array [0] = 0
13239
13240 ;
13241 return 0;
13242}
13243_ACEOF
13244rm -f conftest.$ac_objext
13245if { (ac_try="$ac_compile"
13246case "(($ac_try" in
13247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13248 *) ac_try_echo=$ac_try;;
13249esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013251 (eval "$ac_compile") 2>conftest.er1
13252 ac_status=$?
13253 grep -v '^ *+' conftest.er1 >conftest.err
13254 rm -f conftest.er1
13255 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013257 (exit $ac_status); } && {
13258 test -z "$ac_c_werror_flag" ||
13259 test ! -s conftest.err
13260 } && test -s conftest.$ac_objext; then
13261 ac_lo=$ac_mid; break
13262else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013263 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264sed 's/^/| /' conftest.$ac_ext >&5
13265
13266 ac_hi=`expr '(' $ac_mid ')' - 1`
13267 if test $ac_mid -le $ac_hi; then
13268 ac_lo= ac_hi=
13269 break
13270 fi
13271 ac_mid=`expr 2 '*' $ac_mid`
13272fi
13273
13274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13275 done
13276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013277 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013278sed 's/^/| /' conftest.$ac_ext >&5
13279
13280 ac_lo= ac_hi=
13281fi
13282
13283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284fi
13285
13286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13287# Binary search between lo and hi bounds.
13288while test "x$ac_lo" != "x$ac_hi"; do
13289 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13290 cat >conftest.$ac_ext <<_ACEOF
13291/* confdefs.h. */
13292_ACEOF
13293cat confdefs.h >>conftest.$ac_ext
13294cat >>conftest.$ac_ext <<_ACEOF
13295/* end confdefs.h. */
13296
13297#ifdef HAVE_SYS_TYPES_H
13298#include <sys/types.h>
13299#endif
13300
13301
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013302 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013303int
13304main ()
13305{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013306static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013307test_array [0] = 0
13308
13309 ;
13310 return 0;
13311}
13312_ACEOF
13313rm -f conftest.$ac_objext
13314if { (ac_try="$ac_compile"
13315case "(($ac_try" in
13316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13317 *) ac_try_echo=$ac_try;;
13318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013320 (eval "$ac_compile") 2>conftest.er1
13321 ac_status=$?
13322 grep -v '^ *+' conftest.er1 >conftest.err
13323 rm -f conftest.er1
13324 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 (exit $ac_status); } && {
13327 test -z "$ac_c_werror_flag" ||
13328 test ! -s conftest.err
13329 } && test -s conftest.$ac_objext; then
13330 ac_hi=$ac_mid
13331else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013332 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013333sed 's/^/| /' conftest.$ac_ext >&5
13334
13335 ac_lo=`expr '(' $ac_mid ')' + 1`
13336fi
13337
13338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13339done
13340case $ac_lo in
13341?*) ac_cv_sizeof_off_t=$ac_lo;;
13342'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013343 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013344See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013345echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013346See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013347 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013348 else
13349 ac_cv_sizeof_off_t=0
13350 fi ;;
13351esac
13352else
13353 cat >conftest.$ac_ext <<_ACEOF
13354/* confdefs.h. */
13355_ACEOF
13356cat confdefs.h >>conftest.$ac_ext
13357cat >>conftest.$ac_ext <<_ACEOF
13358/* end confdefs.h. */
13359
13360#ifdef HAVE_SYS_TYPES_H
13361#include <sys/types.h>
13362#endif
13363
13364
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013365 typedef off_t ac__type_sizeof_;
13366static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13367static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013368#include <stdio.h>
13369#include <stdlib.h>
13370int
13371main ()
13372{
13373
13374 FILE *f = fopen ("conftest.val", "w");
13375 if (! f)
13376 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013377 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013378 {
13379 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013380 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013381 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013382 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013383 }
13384 else
13385 {
13386 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013387 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013388 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013389 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013390 }
13391 return ferror (f) || fclose (f) != 0;
13392
13393 ;
13394 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013395}
Martin v. Löwis11437992002-04-12 09:54:03 +000013396_ACEOF
13397rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398if { (ac_try="$ac_link"
13399case "(($ac_try" in
13400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13401 *) ac_try_echo=$ac_try;;
13402esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013405 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013407 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408 { (case "(($ac_try" in
13409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13410 *) ac_try_echo=$ac_try;;
13411esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013417 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013419 echo "$as_me: program exited with status $ac_status" >&5
13420echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013421sed 's/^/| /' conftest.$ac_ext >&5
13422
Martin v. Löwis11437992002-04-12 09:54:03 +000013423( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013424if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013425 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013426See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013427echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013429 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013430 else
13431 ac_cv_sizeof_off_t=0
13432 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434rm -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 +000013435fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013436rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013437fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013438{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13439echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013441
13442
Martin v. Löwis11437992002-04-12 09:54:03 +000013443cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013444#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013445_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013446
Michael W. Hudson54241132001-12-07 15:38:26 +000013447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013448
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013449{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13450echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013451if test "$have_long_long" = yes
13452then
13453if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013454 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456cat >>confdefs.h <<\_ACEOF
13457#define HAVE_LARGEFILE_SUPPORT 1
13458_ACEOF
13459
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013460 { echo "$as_me:$LINENO: result: yes" >&5
13461echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013462else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013463 { echo "$as_me:$LINENO: result: no" >&5
13464echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013465fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013466else
13467 { echo "$as_me:$LINENO: result: no" >&5
13468echo "${ECHO_T}no" >&6; }
13469fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013470
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013471{ echo "$as_me:$LINENO: checking for time_t" >&5
13472echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13473if test "${ac_cv_type_time_t+set}" = set; then
13474 echo $ECHO_N "(cached) $ECHO_C" >&6
13475else
13476 cat >conftest.$ac_ext <<_ACEOF
13477/* confdefs.h. */
13478_ACEOF
13479cat confdefs.h >>conftest.$ac_ext
13480cat >>conftest.$ac_ext <<_ACEOF
13481/* end confdefs.h. */
13482
13483#ifdef HAVE_SYS_TYPES_H
13484#include <sys/types.h>
13485#endif
13486#ifdef HAVE_TIME_H
13487#include <time.h>
13488#endif
13489
13490
13491typedef time_t ac__type_new_;
13492int
13493main ()
13494{
13495if ((ac__type_new_ *) 0)
13496 return 0;
13497if (sizeof (ac__type_new_))
13498 return 0;
13499 ;
13500 return 0;
13501}
13502_ACEOF
13503rm -f conftest.$ac_objext
13504if { (ac_try="$ac_compile"
13505case "(($ac_try" in
13506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13507 *) ac_try_echo=$ac_try;;
13508esac
13509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13510 (eval "$ac_compile") 2>conftest.er1
13511 ac_status=$?
13512 grep -v '^ *+' conftest.er1 >conftest.err
13513 rm -f conftest.er1
13514 cat conftest.err >&5
13515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13516 (exit $ac_status); } && {
13517 test -z "$ac_c_werror_flag" ||
13518 test ! -s conftest.err
13519 } && test -s conftest.$ac_objext; then
13520 ac_cv_type_time_t=yes
13521else
13522 echo "$as_me: failed program was:" >&5
13523sed 's/^/| /' conftest.$ac_ext >&5
13524
13525 ac_cv_type_time_t=no
13526fi
13527
13528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13529fi
13530{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13531echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13532
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013533# The cast to long int works around a bug in the HP C Compiler
13534# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13535# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13536# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013537{ echo "$as_me:$LINENO: checking size of time_t" >&5
13538echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013539if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013540 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013541else
13542 if test "$cross_compiling" = yes; then
13543 # Depending upon the size, compute the lo and hi bounds.
13544cat >conftest.$ac_ext <<_ACEOF
13545/* confdefs.h. */
13546_ACEOF
13547cat confdefs.h >>conftest.$ac_ext
13548cat >>conftest.$ac_ext <<_ACEOF
13549/* end confdefs.h. */
13550
13551#ifdef HAVE_SYS_TYPES_H
13552#include <sys/types.h>
13553#endif
13554#ifdef HAVE_TIME_H
13555#include <time.h>
13556#endif
13557
13558
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013559 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013560int
13561main ()
13562{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013564test_array [0] = 0
13565
13566 ;
13567 return 0;
13568}
13569_ACEOF
13570rm -f conftest.$ac_objext
13571if { (ac_try="$ac_compile"
13572case "(($ac_try" in
13573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13574 *) ac_try_echo=$ac_try;;
13575esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013577 (eval "$ac_compile") 2>conftest.er1
13578 ac_status=$?
13579 grep -v '^ *+' conftest.er1 >conftest.err
13580 rm -f conftest.er1
13581 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013583 (exit $ac_status); } && {
13584 test -z "$ac_c_werror_flag" ||
13585 test ! -s conftest.err
13586 } && test -s conftest.$ac_objext; then
13587 ac_lo=0 ac_mid=0
13588 while :; do
13589 cat >conftest.$ac_ext <<_ACEOF
13590/* confdefs.h. */
13591_ACEOF
13592cat confdefs.h >>conftest.$ac_ext
13593cat >>conftest.$ac_ext <<_ACEOF
13594/* end confdefs.h. */
13595
13596#ifdef HAVE_SYS_TYPES_H
13597#include <sys/types.h>
13598#endif
13599#ifdef HAVE_TIME_H
13600#include <time.h>
13601#endif
13602
13603
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013604 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013605int
13606main ()
13607{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013608static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013609test_array [0] = 0
13610
13611 ;
13612 return 0;
13613}
13614_ACEOF
13615rm -f conftest.$ac_objext
13616if { (ac_try="$ac_compile"
13617case "(($ac_try" in
13618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13619 *) ac_try_echo=$ac_try;;
13620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013622 (eval "$ac_compile") 2>conftest.er1
13623 ac_status=$?
13624 grep -v '^ *+' conftest.er1 >conftest.err
13625 rm -f conftest.er1
13626 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013628 (exit $ac_status); } && {
13629 test -z "$ac_c_werror_flag" ||
13630 test ! -s conftest.err
13631 } && test -s conftest.$ac_objext; then
13632 ac_hi=$ac_mid; break
13633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013634 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013635sed 's/^/| /' conftest.$ac_ext >&5
13636
13637 ac_lo=`expr $ac_mid + 1`
13638 if test $ac_lo -le $ac_mid; then
13639 ac_lo= ac_hi=
13640 break
13641 fi
13642 ac_mid=`expr 2 '*' $ac_mid + 1`
13643fi
13644
13645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13646 done
13647else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013648 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013649sed 's/^/| /' conftest.$ac_ext >&5
13650
13651 cat >conftest.$ac_ext <<_ACEOF
13652/* confdefs.h. */
13653_ACEOF
13654cat confdefs.h >>conftest.$ac_ext
13655cat >>conftest.$ac_ext <<_ACEOF
13656/* end confdefs.h. */
13657
13658#ifdef HAVE_SYS_TYPES_H
13659#include <sys/types.h>
13660#endif
13661#ifdef HAVE_TIME_H
13662#include <time.h>
13663#endif
13664
13665
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013666 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013667int
13668main ()
13669{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013670static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013671test_array [0] = 0
13672
13673 ;
13674 return 0;
13675}
13676_ACEOF
13677rm -f conftest.$ac_objext
13678if { (ac_try="$ac_compile"
13679case "(($ac_try" in
13680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13681 *) ac_try_echo=$ac_try;;
13682esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013684 (eval "$ac_compile") 2>conftest.er1
13685 ac_status=$?
13686 grep -v '^ *+' conftest.er1 >conftest.err
13687 rm -f conftest.er1
13688 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013690 (exit $ac_status); } && {
13691 test -z "$ac_c_werror_flag" ||
13692 test ! -s conftest.err
13693 } && test -s conftest.$ac_objext; then
13694 ac_hi=-1 ac_mid=-1
13695 while :; do
13696 cat >conftest.$ac_ext <<_ACEOF
13697/* confdefs.h. */
13698_ACEOF
13699cat confdefs.h >>conftest.$ac_ext
13700cat >>conftest.$ac_ext <<_ACEOF
13701/* end confdefs.h. */
13702
13703#ifdef HAVE_SYS_TYPES_H
13704#include <sys/types.h>
13705#endif
13706#ifdef HAVE_TIME_H
13707#include <time.h>
13708#endif
13709
13710
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013711 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013712int
13713main ()
13714{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013715static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013716test_array [0] = 0
13717
13718 ;
13719 return 0;
13720}
13721_ACEOF
13722rm -f conftest.$ac_objext
13723if { (ac_try="$ac_compile"
13724case "(($ac_try" in
13725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13726 *) ac_try_echo=$ac_try;;
13727esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013729 (eval "$ac_compile") 2>conftest.er1
13730 ac_status=$?
13731 grep -v '^ *+' conftest.er1 >conftest.err
13732 rm -f conftest.er1
13733 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013735 (exit $ac_status); } && {
13736 test -z "$ac_c_werror_flag" ||
13737 test ! -s conftest.err
13738 } && test -s conftest.$ac_objext; then
13739 ac_lo=$ac_mid; break
13740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013741 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013742sed 's/^/| /' conftest.$ac_ext >&5
13743
13744 ac_hi=`expr '(' $ac_mid ')' - 1`
13745 if test $ac_mid -le $ac_hi; then
13746 ac_lo= ac_hi=
13747 break
13748 fi
13749 ac_mid=`expr 2 '*' $ac_mid`
13750fi
13751
13752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13753 done
13754else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013755 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013756sed 's/^/| /' conftest.$ac_ext >&5
13757
13758 ac_lo= ac_hi=
13759fi
13760
13761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13762fi
13763
13764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13765# Binary search between lo and hi bounds.
13766while test "x$ac_lo" != "x$ac_hi"; do
13767 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13768 cat >conftest.$ac_ext <<_ACEOF
13769/* confdefs.h. */
13770_ACEOF
13771cat confdefs.h >>conftest.$ac_ext
13772cat >>conftest.$ac_ext <<_ACEOF
13773/* end confdefs.h. */
13774
13775#ifdef HAVE_SYS_TYPES_H
13776#include <sys/types.h>
13777#endif
13778#ifdef HAVE_TIME_H
13779#include <time.h>
13780#endif
13781
13782
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013783 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013784int
13785main ()
13786{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013787static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013788test_array [0] = 0
13789
13790 ;
13791 return 0;
13792}
13793_ACEOF
13794rm -f conftest.$ac_objext
13795if { (ac_try="$ac_compile"
13796case "(($ac_try" in
13797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13798 *) ac_try_echo=$ac_try;;
13799esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013801 (eval "$ac_compile") 2>conftest.er1
13802 ac_status=$?
13803 grep -v '^ *+' conftest.er1 >conftest.err
13804 rm -f conftest.er1
13805 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013807 (exit $ac_status); } && {
13808 test -z "$ac_c_werror_flag" ||
13809 test ! -s conftest.err
13810 } && test -s conftest.$ac_objext; then
13811 ac_hi=$ac_mid
13812else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013813 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013814sed 's/^/| /' conftest.$ac_ext >&5
13815
13816 ac_lo=`expr '(' $ac_mid ')' + 1`
13817fi
13818
13819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13820done
13821case $ac_lo in
13822?*) ac_cv_sizeof_time_t=$ac_lo;;
13823'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013824 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013825See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013826echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013827See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013828 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013829 else
13830 ac_cv_sizeof_time_t=0
13831 fi ;;
13832esac
13833else
13834 cat >conftest.$ac_ext <<_ACEOF
13835/* confdefs.h. */
13836_ACEOF
13837cat confdefs.h >>conftest.$ac_ext
13838cat >>conftest.$ac_ext <<_ACEOF
13839/* end confdefs.h. */
13840
13841#ifdef HAVE_SYS_TYPES_H
13842#include <sys/types.h>
13843#endif
13844#ifdef HAVE_TIME_H
13845#include <time.h>
13846#endif
13847
13848
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013849 typedef time_t ac__type_sizeof_;
13850static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13851static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013852#include <stdio.h>
13853#include <stdlib.h>
13854int
13855main ()
13856{
13857
13858 FILE *f = fopen ("conftest.val", "w");
13859 if (! f)
13860 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013861 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013862 {
13863 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013864 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013865 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013866 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013867 }
13868 else
13869 {
13870 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013871 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013872 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013873 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013874 }
13875 return ferror (f) || fclose (f) != 0;
13876
13877 ;
13878 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013879}
Martin v. Löwis11437992002-04-12 09:54:03 +000013880_ACEOF
13881rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882if { (ac_try="$ac_link"
13883case "(($ac_try" in
13884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13885 *) ac_try_echo=$ac_try;;
13886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892 { (case "(($ac_try" in
13893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13894 *) ac_try_echo=$ac_try;;
13895esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013898 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013901 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013902else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013903 echo "$as_me: program exited with status $ac_status" >&5
13904echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013905sed 's/^/| /' conftest.$ac_ext >&5
13906
Martin v. Löwis11437992002-04-12 09:54:03 +000013907( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013908if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013909 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013910See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013911echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013912See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013913 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013914 else
13915 ac_cv_sizeof_time_t=0
13916 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918rm -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 +000013919fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013920rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013921fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013922{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13923echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013925
13926
Martin v. Löwis11437992002-04-12 09:54:03 +000013927cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013928#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013929_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013930
Michael W. Hudson54241132001-12-07 15:38:26 +000013931
13932
Trent Mick635f6fb2000-08-23 21:33:05 +000013933# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013934ac_save_cc="$CC"
13935if test "$ac_cv_kpthread" = "yes"
13936then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013937elif test "$ac_cv_kthread" = "yes"
13938then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013939elif test "$ac_cv_pthread" = "yes"
13940then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013941fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013942
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013943{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13944echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013945have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013946cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013947/* confdefs.h. */
13948_ACEOF
13949cat confdefs.h >>conftest.$ac_ext
13950cat >>conftest.$ac_ext <<_ACEOF
13951/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013952#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013953int
13954main ()
13955{
Guido van Rossum12580492000-09-24 16:47:19 +000013956pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013957 ;
13958 return 0;
13959}
13960_ACEOF
13961rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962if { (ac_try="$ac_compile"
13963case "(($ac_try" in
13964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13965 *) ac_try_echo=$ac_try;;
13966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013970 grep -v '^ *+' conftest.er1 >conftest.err
13971 rm -f conftest.er1
13972 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974 (exit $ac_status); } && {
13975 test -z "$ac_c_werror_flag" ||
13976 test ! -s conftest.err
13977 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013978 have_pthread_t=yes
13979else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013981sed 's/^/| /' conftest.$ac_ext >&5
13982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983
Trent Mick635f6fb2000-08-23 21:33:05 +000013984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985
13986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013987{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13988echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013989if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013990 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13991echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13992if test "${ac_cv_type_pthread_t+set}" = set; then
13993 echo $ECHO_N "(cached) $ECHO_C" >&6
13994else
13995 cat >conftest.$ac_ext <<_ACEOF
13996/* confdefs.h. */
13997_ACEOF
13998cat confdefs.h >>conftest.$ac_ext
13999cat >>conftest.$ac_ext <<_ACEOF
14000/* end confdefs.h. */
14001
14002#ifdef HAVE_PTHREAD_H
14003#include <pthread.h>
14004#endif
14005
14006
14007typedef pthread_t ac__type_new_;
14008int
14009main ()
14010{
14011if ((ac__type_new_ *) 0)
14012 return 0;
14013if (sizeof (ac__type_new_))
14014 return 0;
14015 ;
14016 return 0;
14017}
14018_ACEOF
14019rm -f conftest.$ac_objext
14020if { (ac_try="$ac_compile"
14021case "(($ac_try" in
14022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14023 *) ac_try_echo=$ac_try;;
14024esac
14025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14026 (eval "$ac_compile") 2>conftest.er1
14027 ac_status=$?
14028 grep -v '^ *+' conftest.er1 >conftest.err
14029 rm -f conftest.er1
14030 cat conftest.err >&5
14031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14032 (exit $ac_status); } && {
14033 test -z "$ac_c_werror_flag" ||
14034 test ! -s conftest.err
14035 } && test -s conftest.$ac_objext; then
14036 ac_cv_type_pthread_t=yes
14037else
14038 echo "$as_me: failed program was:" >&5
14039sed 's/^/| /' conftest.$ac_ext >&5
14040
14041 ac_cv_type_pthread_t=no
14042fi
14043
14044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14045fi
14046{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14047echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14048
14049# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14052# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014053{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14054echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014055if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014056 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014057else
14058 if test "$cross_compiling" = yes; then
14059 # Depending upon the size, compute the lo and hi bounds.
14060cat >conftest.$ac_ext <<_ACEOF
14061/* confdefs.h. */
14062_ACEOF
14063cat confdefs.h >>conftest.$ac_ext
14064cat >>conftest.$ac_ext <<_ACEOF
14065/* end confdefs.h. */
14066
14067#ifdef HAVE_PTHREAD_H
14068#include <pthread.h>
14069#endif
14070
14071
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014072 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014073int
14074main ()
14075{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014076static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014077test_array [0] = 0
14078
14079 ;
14080 return 0;
14081}
14082_ACEOF
14083rm -f conftest.$ac_objext
14084if { (ac_try="$ac_compile"
14085case "(($ac_try" in
14086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14087 *) ac_try_echo=$ac_try;;
14088esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014090 (eval "$ac_compile") 2>conftest.er1
14091 ac_status=$?
14092 grep -v '^ *+' conftest.er1 >conftest.err
14093 rm -f conftest.er1
14094 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014096 (exit $ac_status); } && {
14097 test -z "$ac_c_werror_flag" ||
14098 test ! -s conftest.err
14099 } && test -s conftest.$ac_objext; then
14100 ac_lo=0 ac_mid=0
14101 while :; do
14102 cat >conftest.$ac_ext <<_ACEOF
14103/* confdefs.h. */
14104_ACEOF
14105cat confdefs.h >>conftest.$ac_ext
14106cat >>conftest.$ac_ext <<_ACEOF
14107/* end confdefs.h. */
14108
14109#ifdef HAVE_PTHREAD_H
14110#include <pthread.h>
14111#endif
14112
14113
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014114 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014115int
14116main ()
14117{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014118static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014119test_array [0] = 0
14120
14121 ;
14122 return 0;
14123}
14124_ACEOF
14125rm -f conftest.$ac_objext
14126if { (ac_try="$ac_compile"
14127case "(($ac_try" in
14128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14129 *) ac_try_echo=$ac_try;;
14130esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014132 (eval "$ac_compile") 2>conftest.er1
14133 ac_status=$?
14134 grep -v '^ *+' conftest.er1 >conftest.err
14135 rm -f conftest.er1
14136 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014138 (exit $ac_status); } && {
14139 test -z "$ac_c_werror_flag" ||
14140 test ! -s conftest.err
14141 } && test -s conftest.$ac_objext; then
14142 ac_hi=$ac_mid; break
14143else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014144 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014145sed 's/^/| /' conftest.$ac_ext >&5
14146
14147 ac_lo=`expr $ac_mid + 1`
14148 if test $ac_lo -le $ac_mid; then
14149 ac_lo= ac_hi=
14150 break
14151 fi
14152 ac_mid=`expr 2 '*' $ac_mid + 1`
14153fi
14154
14155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14156 done
14157else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014158 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014159sed 's/^/| /' conftest.$ac_ext >&5
14160
14161 cat >conftest.$ac_ext <<_ACEOF
14162/* confdefs.h. */
14163_ACEOF
14164cat confdefs.h >>conftest.$ac_ext
14165cat >>conftest.$ac_ext <<_ACEOF
14166/* end confdefs.h. */
14167
14168#ifdef HAVE_PTHREAD_H
14169#include <pthread.h>
14170#endif
14171
14172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014173 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014174int
14175main ()
14176{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014177static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178test_array [0] = 0
14179
14180 ;
14181 return 0;
14182}
14183_ACEOF
14184rm -f conftest.$ac_objext
14185if { (ac_try="$ac_compile"
14186case "(($ac_try" in
14187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14188 *) ac_try_echo=$ac_try;;
14189esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014191 (eval "$ac_compile") 2>conftest.er1
14192 ac_status=$?
14193 grep -v '^ *+' conftest.er1 >conftest.err
14194 rm -f conftest.er1
14195 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014197 (exit $ac_status); } && {
14198 test -z "$ac_c_werror_flag" ||
14199 test ! -s conftest.err
14200 } && test -s conftest.$ac_objext; then
14201 ac_hi=-1 ac_mid=-1
14202 while :; do
14203 cat >conftest.$ac_ext <<_ACEOF
14204/* confdefs.h. */
14205_ACEOF
14206cat confdefs.h >>conftest.$ac_ext
14207cat >>conftest.$ac_ext <<_ACEOF
14208/* end confdefs.h. */
14209
14210#ifdef HAVE_PTHREAD_H
14211#include <pthread.h>
14212#endif
14213
14214
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014215 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014216int
14217main ()
14218{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014220test_array [0] = 0
14221
14222 ;
14223 return 0;
14224}
14225_ACEOF
14226rm -f conftest.$ac_objext
14227if { (ac_try="$ac_compile"
14228case "(($ac_try" in
14229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14230 *) ac_try_echo=$ac_try;;
14231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014233 (eval "$ac_compile") 2>conftest.er1
14234 ac_status=$?
14235 grep -v '^ *+' conftest.er1 >conftest.err
14236 rm -f conftest.er1
14237 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014239 (exit $ac_status); } && {
14240 test -z "$ac_c_werror_flag" ||
14241 test ! -s conftest.err
14242 } && test -s conftest.$ac_objext; then
14243 ac_lo=$ac_mid; break
14244else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014245 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014246sed 's/^/| /' conftest.$ac_ext >&5
14247
14248 ac_hi=`expr '(' $ac_mid ')' - 1`
14249 if test $ac_mid -le $ac_hi; then
14250 ac_lo= ac_hi=
14251 break
14252 fi
14253 ac_mid=`expr 2 '*' $ac_mid`
14254fi
14255
14256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14257 done
14258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014259 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014260sed 's/^/| /' conftest.$ac_ext >&5
14261
14262 ac_lo= ac_hi=
14263fi
14264
14265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14266fi
14267
14268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14269# Binary search between lo and hi bounds.
14270while test "x$ac_lo" != "x$ac_hi"; do
14271 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14272 cat >conftest.$ac_ext <<_ACEOF
14273/* confdefs.h. */
14274_ACEOF
14275cat confdefs.h >>conftest.$ac_ext
14276cat >>conftest.$ac_ext <<_ACEOF
14277/* end confdefs.h. */
14278
14279#ifdef HAVE_PTHREAD_H
14280#include <pthread.h>
14281#endif
14282
14283
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014284 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014285int
14286main ()
14287{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014289test_array [0] = 0
14290
14291 ;
14292 return 0;
14293}
14294_ACEOF
14295rm -f conftest.$ac_objext
14296if { (ac_try="$ac_compile"
14297case "(($ac_try" in
14298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14299 *) ac_try_echo=$ac_try;;
14300esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014302 (eval "$ac_compile") 2>conftest.er1
14303 ac_status=$?
14304 grep -v '^ *+' conftest.er1 >conftest.err
14305 rm -f conftest.er1
14306 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014308 (exit $ac_status); } && {
14309 test -z "$ac_c_werror_flag" ||
14310 test ! -s conftest.err
14311 } && test -s conftest.$ac_objext; then
14312 ac_hi=$ac_mid
14313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014314 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014315sed 's/^/| /' conftest.$ac_ext >&5
14316
14317 ac_lo=`expr '(' $ac_mid ')' + 1`
14318fi
14319
14320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14321done
14322case $ac_lo in
14323?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14324'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014325 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014326See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014327echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014328See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014329 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014330 else
14331 ac_cv_sizeof_pthread_t=0
14332 fi ;;
14333esac
14334else
14335 cat >conftest.$ac_ext <<_ACEOF
14336/* confdefs.h. */
14337_ACEOF
14338cat confdefs.h >>conftest.$ac_ext
14339cat >>conftest.$ac_ext <<_ACEOF
14340/* end confdefs.h. */
14341
14342#ifdef HAVE_PTHREAD_H
14343#include <pthread.h>
14344#endif
14345
14346
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014347 typedef pthread_t ac__type_sizeof_;
14348static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14349static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014350#include <stdio.h>
14351#include <stdlib.h>
14352int
14353main ()
14354{
14355
14356 FILE *f = fopen ("conftest.val", "w");
14357 if (! f)
14358 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014359 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014360 {
14361 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014362 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014363 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014364 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014365 }
14366 else
14367 {
14368 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014369 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014370 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014371 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014372 }
14373 return ferror (f) || fclose (f) != 0;
14374
14375 ;
14376 return 0;
14377}
Martin v. Löwis11437992002-04-12 09:54:03 +000014378_ACEOF
14379rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380if { (ac_try="$ac_link"
14381case "(($ac_try" in
14382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14383 *) ac_try_echo=$ac_try;;
14384esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014389 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390 { (case "(($ac_try" in
14391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14392 *) ac_try_echo=$ac_try;;
14393esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014399 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014401 echo "$as_me: program exited with status $ac_status" >&5
14402echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014403sed 's/^/| /' conftest.$ac_ext >&5
14404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014406if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014407 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014408See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014409echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014410See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014411 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014412 else
14413 ac_cv_sizeof_pthread_t=0
14414 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014416rm -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 +000014417fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014418rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014419fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014420{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14421echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014422
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014423
14424
Martin v. Löwis11437992002-04-12 09:54:03 +000014425cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014426#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014427_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014428
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014429
Trent Mick635f6fb2000-08-23 21:33:05 +000014430fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014431CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014432
Michael W. Hudson54241132001-12-07 15:38:26 +000014433
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014434case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014435 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014436 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14437 ;;
14438 Darwin/*)
14439 OTHER_LIBTOOL_OPT=""
14440 ;;
14441esac
14442
14443
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014444ARCH_RUN_32BIT=""
14445
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014446case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014447 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014448 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14449 if test "${enable_universalsdk}"; then
14450 :
14451 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014452 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014453 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014454 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014455 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014456 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014457 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014458 if test ${gcc_version} '<' 4.0
14459 then
14460 LIBTOOL_CRUFT="-lcc_dynamic"
14461 else
14462 LIBTOOL_CRUFT=""
14463 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014464 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014465 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014466else
14467 cat >conftest.$ac_ext <<_ACEOF
14468/* confdefs.h. */
14469_ACEOF
14470cat confdefs.h >>conftest.$ac_ext
14471cat >>conftest.$ac_ext <<_ACEOF
14472/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014473
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014474 #include <unistd.h>
14475 int main(int argc, char*argv[])
14476 {
14477 if (sizeof(long) == 4) {
14478 return 0;
14479 } else {
14480 return 1;
14481 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014482 }
14483
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014484_ACEOF
14485rm -f conftest$ac_exeext
14486if { (ac_try="$ac_link"
14487case "(($ac_try" in
14488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14489 *) ac_try_echo=$ac_try;;
14490esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014492 (eval "$ac_link") 2>&5
14493 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014495 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14496 { (case "(($ac_try" in
14497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14498 *) ac_try_echo=$ac_try;;
14499esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014501 (eval "$ac_try") 2>&5
14502 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014504 (exit $ac_status); }; }; then
14505 ac_osx_32bit=yes
14506else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014507 echo "$as_me: program exited with status $ac_status" >&5
14508echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014509sed 's/^/| /' conftest.$ac_ext >&5
14510
14511( exit $ac_status )
14512ac_osx_32bit=no
14513fi
14514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14515fi
14516
14517
14518
14519 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014520 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014521 i386)
14522 MACOSX_DEFAULT_ARCH="i386"
14523 ;;
14524 ppc)
14525 MACOSX_DEFAULT_ARCH="ppc"
14526 ;;
14527 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014528 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14529echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014530 { (exit 1); exit 1; }; }
14531 ;;
14532 esac
14533 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014534 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014535 i386)
14536 MACOSX_DEFAULT_ARCH="x86_64"
14537 ;;
14538 ppc)
14539 MACOSX_DEFAULT_ARCH="ppc64"
14540 ;;
14541 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014542 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14543echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014544 { (exit 1); exit 1; }; }
14545 ;;
14546 esac
14547
14548 #ARCH_RUN_32BIT="true"
14549 fi
14550
14551 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014552 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014553 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014554esac
14555
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014556{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14557echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014558if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014559then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014560 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014562 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014563
Martin v. Löwis11437992002-04-12 09:54:03 +000014564cat >>confdefs.h <<\_ACEOF
14565#define WITH_NEXT_FRAMEWORK 1
14566_ACEOF
14567
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014568 { echo "$as_me:$LINENO: result: yes" >&5
14569echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014570 if test $enable_shared = "yes"
14571 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014572 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14573echo "$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 +000014574 { (exit 1); exit 1; }; }
14575 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014576else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014577 { echo "$as_me:$LINENO: result: no" >&5
14578echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014579fi
14580
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014581{ echo "$as_me:$LINENO: checking for dyld" >&5
14582echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014583case $ac_sys_system/$ac_sys_release in
14584 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014585
Martin v. Löwis11437992002-04-12 09:54:03 +000014586cat >>confdefs.h <<\_ACEOF
14587#define WITH_DYLD 1
14588_ACEOF
14589
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014590 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14591echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014592 ;;
14593 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014594 { echo "$as_me:$LINENO: result: no" >&5
14595echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014596 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014597esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014598
Guido van Rossum0a516c91994-09-12 10:58:40 +000014599# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014600
Michael W. Hudson54241132001-12-07 15:38:26 +000014601
14602
14603
14604
Guido van Rossum0a516c91994-09-12 10:58:40 +000014605# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014606# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014607{ echo "$as_me:$LINENO: checking SO" >&5
14608echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014609if test -z "$SO"
14610then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014611 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014612 hp*|HP*)
14613 case `uname -m` in
14614 ia64) SO=.so;;
14615 *) SO=.sl;;
14616 esac
14617 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014618 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014619 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014620 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014621else
14622 # this might also be a termcap variable, see #610332
14623 echo
14624 echo '====================================================================='
14625 echo '+ +'
14626 echo '+ WARNING: You have set SO in your environment. +'
14627 echo '+ Do you really mean to change the extension for shared libraries? +'
14628 echo '+ Continuing in 10 seconds to let you to ponder. +'
14629 echo '+ +'
14630 echo '====================================================================='
14631 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014632fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014633{ echo "$as_me:$LINENO: result: $SO" >&5
14634echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014635
Georg Brandlb1441c72009-01-03 22:33:39 +000014636
Thomas Wouters477c8d52006-05-27 19:21:47 +000014637cat >>confdefs.h <<_ACEOF
14638#define SHLIB_EXT "$SO"
14639_ACEOF
14640
Guido van Rossum0a516c91994-09-12 10:58:40 +000014641# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014642# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014643# (Shared libraries in this instance are shared modules to be loaded into
14644# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014645{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14646echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014647if test -z "$LDSHARED"
14648then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014649 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014650 AIX*)
14651 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014652 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014653 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014654 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014655 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014657 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014658 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014659 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014660 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014661 hp*|HP*)
14662 if test "$GCC" = "yes"
14663 then LDSHARED='$(CC) -shared'
14664 else LDSHARED='ld -b';
14665 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014666 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014667 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014668 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14669 if test "$enable_framework" ; then
14670 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014671 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14672 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014673 else
14674 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014675 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014676 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014677 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014678 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14679 if test "$enable_framework" ; then
14680 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014681 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14682 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014683 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014684 # No framework, use the Python app as bundle-loader
14685 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014686 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014687 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014688 Darwin/*)
14689 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14690 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014691
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014692 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014693 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014694 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014695 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014696 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014697 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14698 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014699 else
14700 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14701 if test "$enable_framework" ; then
14702 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014703 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14704 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014705 else
14706 # No framework, use the Python app as bundle-loader
14707 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14708 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14709 fi
14710 fi
14711 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014712 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014713 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014714 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014715 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014716 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014717 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014718 else
14719 LDSHARED="ld -Bshareable ${LDFLAGS}"
14720 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014721 OpenBSD*)
14722 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14723 then
14724 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14725 else
14726 case `uname -r` in
14727 [01].* | 2.[0-7] | 2.[0-7].*)
14728 LDSHARED="ld -Bshareable ${LDFLAGS}"
14729 ;;
14730 *)
14731 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14732 ;;
14733 esac
14734 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014735 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014736 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014737 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014738 then LDSHARED='$(CC) -shared'
14739 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014740 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014741 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014742 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014743 *) LDSHARED="ld";;
14744 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014745fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014746{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14747echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014748BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014749# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014750# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014751{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14752echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014753if test -z "$CCSHARED"
14754then
Guido van Rossum07397971997-04-29 21:49:50 +000014755 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014756 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014757 then CCSHARED="-fPIC";
14758 elif test `uname -p` = sparc;
14759 then CCSHARED="-xcode=pic32";
14760 else CCSHARED="-Kpic";
14761 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014762 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014763 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014764 else CCSHARED="+z";
14765 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014766 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014767 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014768 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014769 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014770 if test "$GCC" = "yes"
14771 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014772 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014773 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014774 SCO_SV*)
14775 if test "$GCC" = "yes"
14776 then CCSHARED="-fPIC"
14777 else CCSHARED="-Kpic -belf"
14778 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014779 IRIX*/6*) case $CC in
14780 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014781 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014782 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014783 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014784fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014785{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14786echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014787# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014788# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014789{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14790echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014791if test -z "$LINKFORSHARED"
14792then
Guido van Rossum07397971997-04-29 21:49:50 +000014793 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014794 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014795 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014796 LINKFORSHARED="-Wl,-E -Wl,+s";;
14797# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014798 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014799 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014800 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014802 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014803 if test "$enable_framework"
14804 then
Jack Jansenda49e192005-01-07 13:08:22 +000014805 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014806 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014807 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014808 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014809 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014810 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014811 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014812 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14813 then
14814 LINKFORSHARED="-Wl,--export-dynamic"
14815 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014816 SunOS/5*) case $CC in
14817 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014818 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014819 then
14820 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014821 fi;;
14822 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014823 CYGWIN*)
14824 if test $enable_shared = "no"
14825 then
14826 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14827 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014828 QNX*)
14829 # -Wl,-E causes the symbols to be added to the dynamic
14830 # symbol table so that they can be found when a module
14831 # is loaded. -N 2048K causes the stack size to be set
14832 # to 2048 kilobytes so that the stack doesn't overflow
14833 # when running test_compile.py.
14834 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014835 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014836fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014837{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14838echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014839
Michael W. Hudson54241132001-12-07 15:38:26 +000014840
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014841
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014842{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14843echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014844if test ! "$LIBRARY" = "$LDLIBRARY"
14845then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014846 case $ac_sys_system in
14847 CYGWIN*)
14848 # Cygwin needs CCSHARED when building extension DLLs
14849 # but not when building the interpreter DLL.
14850 CFLAGSFORSHARED='';;
14851 *)
14852 CFLAGSFORSHARED='$(CCSHARED)'
14853 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014854fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014855{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14856echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014857
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014858# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14859# library (with --enable-shared).
14860# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014861# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14862# if it is not required, since it creates a dependency of the shared library
14863# to LIBS. This, in turn, means that applications linking the shared libpython
14864# don't need to link LIBS explicitly. The default should be only changed
14865# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014866
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014867{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14868echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014869case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014870 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014871 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014873{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14874echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014875
14876
Guido van Rossum627b2d71993-12-24 10:39:16 +000014877# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014878
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014879{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14880echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014881if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014882 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014883else
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014885LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014887/* confdefs.h. */
14888_ACEOF
14889cat confdefs.h >>conftest.$ac_ext
14890cat >>conftest.$ac_ext <<_ACEOF
14891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893/* Override any GCC internal prototype to avoid an error.
14894 Use char because int might match the return type of a GCC
14895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014896#ifdef __cplusplus
14897extern "C"
14898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014899char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014900int
14901main ()
14902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 ;
14905 return 0;
14906}
14907_ACEOF
14908rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909if { (ac_try="$ac_link"
14910case "(($ac_try" in
14911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14912 *) ac_try_echo=$ac_try;;
14913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014917 grep -v '^ *+' conftest.er1 >conftest.err
14918 rm -f conftest.er1
14919 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 (exit $ac_status); } && {
14922 test -z "$ac_c_werror_flag" ||
14923 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014924 } && test -s conftest$ac_exeext &&
14925 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014929sed 's/^/| /' conftest.$ac_ext >&5
14930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933
14934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014936LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014938{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14939echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14940if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 cat >>confdefs.h <<_ACEOF
14942#define HAVE_LIBDL 1
14943_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014944
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014945 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014946
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014947fi
14948 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014949
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014950{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14951echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014952if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014953 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014954else
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014956LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014958/* confdefs.h. */
14959_ACEOF
14960cat confdefs.h >>conftest.$ac_ext
14961cat >>conftest.$ac_ext <<_ACEOF
14962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964/* Override any GCC internal prototype to avoid an error.
14965 Use char because int might match the return type of a GCC
14966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014967#ifdef __cplusplus
14968extern "C"
14969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014970char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014971int
14972main ()
14973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 ;
14976 return 0;
14977}
14978_ACEOF
14979rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980if { (ac_try="$ac_link"
14981case "(($ac_try" in
14982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14983 *) ac_try_echo=$ac_try;;
14984esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014988 grep -v '^ *+' conftest.er1 >conftest.err
14989 rm -f conftest.er1
14990 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992 (exit $ac_status); } && {
14993 test -z "$ac_c_werror_flag" ||
14994 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014995 } && test -s conftest$ac_exeext &&
14996 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014998else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015000sed 's/^/| /' conftest.$ac_ext >&5
15001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004
15005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015007LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015008fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15010echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15011if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 cat >>confdefs.h <<_ACEOF
15013#define HAVE_LIBDLD 1
15014_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015015
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015016 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015018fi
15019 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015020
Georg Brandlb1441c72009-01-03 22:33:39 +000015021# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015022if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015023 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15024echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015025if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015026 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015027else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015028 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015030/* confdefs.h. */
15031_ACEOF
15032cat confdefs.h >>conftest.$ac_ext
15033cat >>conftest.$ac_ext <<_ACEOF
15034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036/* Override any GCC internal prototype to avoid an error.
15037 Use char because int might match the return type of a GCC
15038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015039#ifdef __cplusplus
15040extern "C"
15041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015042char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015043int
15044main ()
15045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 ;
15048 return 0;
15049}
15050_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051for ac_lib in '' pthread rt posix4; do
15052 if test -z "$ac_lib"; then
15053 ac_res="none required"
15054 else
15055 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015056 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057 fi
15058 rm -f conftest.$ac_objext conftest$ac_exeext
15059if { (ac_try="$ac_link"
15060case "(($ac_try" in
15061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15062 *) ac_try_echo=$ac_try;;
15063esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015066 ac_status=$?
15067 grep -v '^ *+' conftest.er1 >conftest.err
15068 rm -f conftest.er1
15069 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071 (exit $ac_status); } && {
15072 test -z "$ac_c_werror_flag" ||
15073 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015074 } && test -s conftest$ac_exeext &&
15075 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015078 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015079sed 's/^/| /' conftest.$ac_ext >&5
15080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081
Thomas Wouters477c8d52006-05-27 19:21:47 +000015082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083
15084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15085 conftest$ac_exeext
15086 if test "${ac_cv_search_sem_init+set}" = set; then
15087 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089done
15090if test "${ac_cv_search_sem_init+set}" = set; then
15091 :
15092else
15093 ac_cv_search_sem_init=no
15094fi
15095rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015096LIBS=$ac_func_search_save_LIBS
15097fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015098{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15099echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100ac_res=$ac_cv_search_sem_init
15101if test "$ac_res" != no; then
15102 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015103
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015104fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015105 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015106 # posix4 on Solaris 2.6
15107 # pthread (first!) on Linux
15108fi
15109
Martin v. Löwis19d17342003-06-14 21:03:05 +000015110# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015111{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15112echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015113if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015114 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015115else
15116 ac_check_lib_save_LIBS=$LIBS
15117LIBS="-lintl $LIBS"
15118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015119/* confdefs.h. */
15120_ACEOF
15121cat confdefs.h >>conftest.$ac_ext
15122cat >>conftest.$ac_ext <<_ACEOF
15123/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125/* Override any GCC internal prototype to avoid an error.
15126 Use char because int might match the return type of a GCC
15127 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015128#ifdef __cplusplus
15129extern "C"
15130#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015131char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015132int
15133main ()
15134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141if { (ac_try="$ac_link"
15142case "(($ac_try" in
15143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15144 *) ac_try_echo=$ac_try;;
15145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015149 grep -v '^ *+' conftest.er1 >conftest.err
15150 rm -f conftest.er1
15151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 (exit $ac_status); } && {
15154 test -z "$ac_c_werror_flag" ||
15155 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015156 } && test -s conftest$ac_exeext &&
15157 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015158 ac_cv_lib_intl_textdomain=yes
15159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015161sed 's/^/| /' conftest.$ac_ext >&5
15162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165
15166rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015167 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015168LIBS=$ac_check_lib_save_LIBS
15169fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015170{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15171echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15172if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015173
15174cat >>confdefs.h <<\_ACEOF
15175#define WITH_LIBINTL 1
15176_ACEOF
15177
Brett Cannonc6d936e2009-06-07 20:09:53 +000015178 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015179fi
15180
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015181
15182# checks for system dependent C++ extensions support
15183case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015184 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15185echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* confdefs.h. */
15188_ACEOF
15189cat confdefs.h >>conftest.$ac_ext
15190cat >>conftest.$ac_ext <<_ACEOF
15191/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015192#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015193int
15194main ()
15195{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015196loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 ;
15198 return 0;
15199}
15200_ACEOF
15201rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202if { (ac_try="$ac_link"
15203case "(($ac_try" in
15204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15205 *) ac_try_echo=$ac_try;;
15206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015210 grep -v '^ *+' conftest.er1 >conftest.err
15211 rm -f conftest.er1
15212 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214 (exit $ac_status); } && {
15215 test -z "$ac_c_werror_flag" ||
15216 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015217 } && test -s conftest$ac_exeext &&
15218 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015219
Martin v. Löwis11437992002-04-12 09:54:03 +000015220cat >>confdefs.h <<\_ACEOF
15221#define AIX_GENUINE_CPLUSPLUS 1
15222_ACEOF
15223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015224 { echo "$as_me:$LINENO: result: yes" >&5
15225echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015228sed 's/^/| /' conftest.$ac_ext >&5
15229
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015230 { echo "$as_me:$LINENO: result: no" >&5
15231echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233
15234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015235 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015236 *) ;;
15237esac
15238
Guido van Rossum70c7f481998-03-26 18:44:10 +000015239# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015240{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15241echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015242if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015244else
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015246LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015248/* confdefs.h. */
15249_ACEOF
15250cat confdefs.h >>conftest.$ac_ext
15251cat >>conftest.$ac_ext <<_ACEOF
15252/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254/* Override any GCC internal prototype to avoid an error.
15255 Use char because int might match the return type of a GCC
15256 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015257#ifdef __cplusplus
15258extern "C"
15259#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015260char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015261int
15262main ()
15263{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 ;
15266 return 0;
15267}
15268_ACEOF
15269rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015270if { (ac_try="$ac_link"
15271case "(($ac_try" in
15272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15273 *) ac_try_echo=$ac_try;;
15274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015276 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015278 grep -v '^ *+' conftest.er1 >conftest.err
15279 rm -f conftest.er1
15280 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282 (exit $ac_status); } && {
15283 test -z "$ac_c_werror_flag" ||
15284 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015285 } && test -s conftest$ac_exeext &&
15286 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015290sed 's/^/| /' conftest.$ac_ext >&5
15291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294
15295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015297LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015298fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015299{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15300echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15301if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015302 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015303fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015304 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015305{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15306echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015307if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015308 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015309else
Martin v. Löwis11437992002-04-12 09:54:03 +000015310 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015311LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015313/* confdefs.h. */
15314_ACEOF
15315cat confdefs.h >>conftest.$ac_ext
15316cat >>conftest.$ac_ext <<_ACEOF
15317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319/* Override any GCC internal prototype to avoid an error.
15320 Use char because int might match the return type of a GCC
15321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015322#ifdef __cplusplus
15323extern "C"
15324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015325char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015326int
15327main ()
15328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 ;
15331 return 0;
15332}
15333_ACEOF
15334rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015335if { (ac_try="$ac_link"
15336case "(($ac_try" in
15337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15338 *) ac_try_echo=$ac_try;;
15339esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015343 grep -v '^ *+' conftest.er1 >conftest.err
15344 rm -f conftest.er1
15345 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015347 (exit $ac_status); } && {
15348 test -z "$ac_c_werror_flag" ||
15349 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015350 } && test -s conftest$ac_exeext &&
15351 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015353else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015355sed 's/^/| /' conftest.$ac_ext >&5
15356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359
15360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015362LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015363fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015364{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15365echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15366if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015367 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015368fi
15369 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015370
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015371{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15372echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015375if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015377{ echo "$as_me:$LINENO: result: $withval" >&5
15378echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015379LIBS="$withval $LIBS"
15380
15381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015382 { echo "$as_me:$LINENO: result: no" >&5
15383echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384fi
15385
Guido van Rossum7f43da71994-08-01 12:15:30 +000015386
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015387# Check for use of the system expat library
15388{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15389echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15390
15391# Check whether --with-system_expat was given.
15392if test "${with_system_expat+set}" = set; then
15393 withval=$with_system_expat;
15394fi
15395
15396
15397{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15398echo "${ECHO_T}$with_system_expat" >&6; }
15399
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015400# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015401{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15402echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015405if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406 withval=$with_system_ffi;
15407fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015408
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015409
Benjamin Petersond78735d2010-01-01 16:04:23 +000015410if test "$with_system_ffi" = "yes"; then
15411 if test -n "$ac_tool_prefix"; then
15412 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15413set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15414{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15415echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15416if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15417 echo $ECHO_N "(cached) $ECHO_C" >&6
15418else
15419 case $PKG_CONFIG in
15420 [\\/]* | ?:[\\/]*)
15421 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15422 ;;
15423 *)
15424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15425for as_dir in $PATH
15426do
15427 IFS=$as_save_IFS
15428 test -z "$as_dir" && as_dir=.
15429 for ac_exec_ext in '' $ac_executable_extensions; do
15430 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15431 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15432 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15433 break 2
15434 fi
15435done
15436done
15437IFS=$as_save_IFS
15438
15439 ;;
15440esac
15441fi
15442PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15443if test -n "$PKG_CONFIG"; then
15444 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15445echo "${ECHO_T}$PKG_CONFIG" >&6; }
15446else
15447 { echo "$as_me:$LINENO: result: no" >&5
15448echo "${ECHO_T}no" >&6; }
15449fi
15450
15451
15452fi
15453if test -z "$ac_cv_path_PKG_CONFIG"; then
15454 ac_pt_PKG_CONFIG=$PKG_CONFIG
15455 # Extract the first word of "pkg-config", so it can be a program name with args.
15456set dummy pkg-config; ac_word=$2
15457{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15458echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15459if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15460 echo $ECHO_N "(cached) $ECHO_C" >&6
15461else
15462 case $ac_pt_PKG_CONFIG in
15463 [\\/]* | ?:[\\/]*)
15464 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15465 ;;
15466 *)
15467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15468for as_dir in $PATH
15469do
15470 IFS=$as_save_IFS
15471 test -z "$as_dir" && as_dir=.
15472 for ac_exec_ext in '' $ac_executable_extensions; do
15473 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15474 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15475 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15476 break 2
15477 fi
15478done
15479done
15480IFS=$as_save_IFS
15481
15482 ;;
15483esac
15484fi
15485ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15486if test -n "$ac_pt_PKG_CONFIG"; then
15487 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15488echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15489else
15490 { echo "$as_me:$LINENO: result: no" >&5
15491echo "${ECHO_T}no" >&6; }
15492fi
15493
15494 if test "x$ac_pt_PKG_CONFIG" = x; then
15495 PKG_CONFIG=""
15496 else
15497 case $cross_compiling:$ac_tool_warned in
15498yes:)
15499{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15500whose name does not start with the host triplet. If you think this
15501configuration is useful to you, please write to autoconf@gnu.org." >&5
15502echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15503whose name does not start with the host triplet. If you think this
15504configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15505ac_tool_warned=yes ;;
15506esac
15507 PKG_CONFIG=$ac_pt_PKG_CONFIG
15508 fi
15509else
15510 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15511fi
15512
15513 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15514else
15515 LIBFFI_INCLUDEDIR=""
15516fi
15517
15518
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015519{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15520echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015521
Matthias Klose55708cc2009-04-30 08:06:49 +000015522# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015523{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15524echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015525
15526# Check whether --with-dbmliborder was given.
15527if test "${with_dbmliborder+set}" = set; then
15528 withval=$with_dbmliborder;
15529if test x$with_dbmliborder = xyes
15530then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015531{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15532echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015533 { (exit 1); exit 1; }; }
15534else
15535 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15536 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15537 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015538 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15539echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015540 { (exit 1); exit 1; }; }
15541 fi
15542 done
15543fi
15544fi
15545
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015546{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15547echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015548
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015549# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015550
15551
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015552{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15553echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015556if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557 withval=$with_signal_module;
15558fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015559
15560
15561if test -z "$with_signal_module"
15562then with_signal_module="yes"
15563fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015564{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15565echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015566
15567if test "${with_signal_module}" = "yes"; then
15568 USE_SIGNAL_MODULE=""
15569 SIGNAL_OBJS=""
15570else
15571 USE_SIGNAL_MODULE="#"
15572 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15573fi
15574
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015575# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015576
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015577USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015578
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015579{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15580echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015581
Guido van Rossumec2f0731997-01-22 20:54:01 +000015582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015584if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015586{ echo "$as_me:$LINENO: result: $withval" >&5
15587echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015588LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015589if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015590 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015591fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015593 { echo "$as_me:$LINENO: result: no" >&5
15594echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595fi
15596
Martin v. Löwis11437992002-04-12 09:54:03 +000015597
15598# Templates for things AC_DEFINEd more than once.
15599# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015600
15601
Martin v. Löwis11437992002-04-12 09:54:03 +000015602
15603
15604
15605
15606
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015607{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15608echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015611if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612 withval=$with_threads;
15613fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015614
15615
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015616# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015619if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620 withval=$with_thread; with_threads=$with_thread
15621fi
15622
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015623
15624if test -z "$with_threads"
15625then with_threads="yes"
15626fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015627{ echo "$as_me:$LINENO: result: $with_threads" >&5
15628echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015629
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015630
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015631if test "$with_threads" = "no"
15632then
15633 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015634elif test "$ac_cv_pthread_is_default" = yes
15635then
Martin v. Löwis11437992002-04-12 09:54:03 +000015636 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015637#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015638_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015639
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015640 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015642#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015643_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015644
15645 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015646 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015647elif test "$ac_cv_kpthread" = "yes"
15648then
15649 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015650 if test "$ac_cv_cxx_thread" = "yes"; then
15651 CXX="$CXX -Kpthread"
15652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015654#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015655_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015656
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015657 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015658 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015659elif test "$ac_cv_kthread" = "yes"
15660then
15661 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015662 if test "$ac_cv_cxx_thread" = "yes"; then
15663 CXX="$CXX -Kthread"
15664 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015665 cat >>confdefs.h <<\_ACEOF
15666#define WITH_THREAD 1
15667_ACEOF
15668
15669 posix_threads=yes
15670 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015671elif test "$ac_cv_pthread" = "yes"
15672then
15673 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015674 if test "$ac_cv_cxx_thread" = "yes"; then
15675 CXX="$CXX -pthread"
15676 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677 cat >>confdefs.h <<\_ACEOF
15678#define WITH_THREAD 1
15679_ACEOF
15680
15681 posix_threads=yes
15682 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015683else
15684 if test ! -z "$with_threads" -a -d "$with_threads"
15685 then LDFLAGS="$LDFLAGS -L$with_threads"
15686 fi
15687 if test ! -z "$withval" -a -d "$withval"
15688 then LDFLAGS="$LDFLAGS -L$withval"
15689 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015690
15691 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015692 # define _POSIX_THREADS in unistd.h. Some apparently don't
15693 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015694 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15695echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015697/* confdefs.h. */
15698_ACEOF
15699cat confdefs.h >>conftest.$ac_ext
15700cat >>conftest.$ac_ext <<_ACEOF
15701/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015702
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015703#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015704#ifdef _POSIX_THREADS
15705yes
15706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015707
15708_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015710 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015711 unistd_defines_pthreads=yes
15712else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015713 unistd_defines_pthreads=no
15714fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000015715rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015716
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015717 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15718echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015719
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015721#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015722_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015723
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015725 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15726echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015727if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015728 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015729fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015730{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15731echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015732else
Martin v. Löwis11437992002-04-12 09:54:03 +000015733 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015734{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15735echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015737/* confdefs.h. */
15738_ACEOF
15739cat confdefs.h >>conftest.$ac_ext
15740cat >>conftest.$ac_ext <<_ACEOF
15741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015742$ac_includes_default
15743#include <cthreads.h>
15744_ACEOF
15745rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746if { (ac_try="$ac_compile"
15747case "(($ac_try" in
15748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15749 *) ac_try_echo=$ac_try;;
15750esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015754 grep -v '^ *+' conftest.er1 >conftest.err
15755 rm -f conftest.er1
15756 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758 (exit $ac_status); } && {
15759 test -z "$ac_c_werror_flag" ||
15760 test ! -s conftest.err
15761 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015762 ac_header_compiler=yes
15763else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015765sed 's/^/| /' conftest.$ac_ext >&5
15766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015767 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769
15770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015771{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15772echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015773
15774# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015775{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15776echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015778/* confdefs.h. */
15779_ACEOF
15780cat confdefs.h >>conftest.$ac_ext
15781cat >>conftest.$ac_ext <<_ACEOF
15782/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015783#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015784_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785if { (ac_try="$ac_cpp conftest.$ac_ext"
15786case "(($ac_try" in
15787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15788 *) ac_try_echo=$ac_try;;
15789esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015793 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015794 rm -f conftest.er1
15795 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797 (exit $ac_status); } >/dev/null && {
15798 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15799 test ! -s conftest.err
15800 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015801 ac_header_preproc=yes
15802else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015804sed 's/^/| /' conftest.$ac_ext >&5
15805
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015808
Martin v. Löwis11437992002-04-12 09:54:03 +000015809rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015810{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15811echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015812
15813# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015814case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15815 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015816 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15817echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15818 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15819echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015820 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015821 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015822 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015823 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15824echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15825 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15826echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15827 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15828echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15829 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15830echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15831 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15832echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15833 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15834echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015836## -------------------------------------- ##
15837## Report this to http://bugs.python.org/ ##
15838## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015839_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015841 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015842esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015843{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15844echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015845if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015846 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015847else
15848 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015849fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015850{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15851echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015852
15853fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015854if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015856#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015857_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015860#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015861_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015862
Martin v. Löwis11437992002-04-12 09:54:03 +000015863
15864cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015865#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015866_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015867
15868 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015869 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015870else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015871
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015873 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15874echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015875if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015876 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015877fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015878{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15879echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015880else
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015882{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15883echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015884cat >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öwis11437992002-04-12 09:54:03 +000015890$ac_includes_default
15891#include <mach/cthreads.h>
15892_ACEOF
15893rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894if { (ac_try="$ac_compile"
15895case "(($ac_try" in
15896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15897 *) ac_try_echo=$ac_try;;
15898esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015902 grep -v '^ *+' conftest.er1 >conftest.err
15903 rm -f conftest.er1
15904 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906 (exit $ac_status); } && {
15907 test -z "$ac_c_werror_flag" ||
15908 test ! -s conftest.err
15909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015910 ac_header_compiler=yes
15911else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015913sed 's/^/| /' conftest.$ac_ext >&5
15914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917
15918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015919{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15920echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015921
15922# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015923{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15924echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015926/* confdefs.h. */
15927_ACEOF
15928cat confdefs.h >>conftest.$ac_ext
15929cat >>conftest.$ac_ext <<_ACEOF
15930/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015931#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015932_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933if { (ac_try="$ac_cpp conftest.$ac_ext"
15934case "(($ac_try" in
15935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15936 *) ac_try_echo=$ac_try;;
15937esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015941 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015942 rm -f conftest.er1
15943 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945 (exit $ac_status); } >/dev/null && {
15946 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15947 test ! -s conftest.err
15948 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 ac_header_preproc=yes
15950else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015952sed 's/^/| /' conftest.$ac_ext >&5
15953
Martin v. Löwis11437992002-04-12 09:54:03 +000015954 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015956
Martin v. Löwis11437992002-04-12 09:54:03 +000015957rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015958{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15959echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015960
15961# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015962case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15963 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015964 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15965echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15966 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15967echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015968 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015969 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015970 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015971 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15972echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15973 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15974echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15975 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15976echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15977 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15978echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15979 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15980echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15981 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15982echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015984## -------------------------------------- ##
15985## Report this to http://bugs.python.org/ ##
15986## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015987_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015988 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015989 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015991{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15992echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015993if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015994 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015995else
15996 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015997fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015998{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15999echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016000
16001fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016002if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016003 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016004#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016005_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016006
Martin v. Löwis11437992002-04-12 09:54:03 +000016007 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016008#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016009_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016010
Martin v. Löwis11437992002-04-12 09:54:03 +000016011
16012cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016013#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016014_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016015
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016016 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016017else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016018
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016019 # Just looking for pthread_create in libpthread is not enough:
16020 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16021 # So we really have to include pthread.h, and then link.
16022 _libs=$LIBS
16023 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016024 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16025echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016027/* confdefs.h. */
16028_ACEOF
16029cat confdefs.h >>conftest.$ac_ext
16030cat >>conftest.$ac_ext <<_ACEOF
16031/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016032#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016033
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016034void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016035int
16036main ()
16037{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016038
16039pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 ;
16041 return 0;
16042}
16043_ACEOF
16044rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045if { (ac_try="$ac_link"
16046case "(($ac_try" in
16047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16048 *) ac_try_echo=$ac_try;;
16049esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016051 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016053 grep -v '^ *+' conftest.er1 >conftest.err
16054 rm -f conftest.er1
16055 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057 (exit $ac_status); } && {
16058 test -z "$ac_c_werror_flag" ||
16059 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016060 } && test -s conftest$ac_exeext &&
16061 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016062
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016063 { echo "$as_me:$LINENO: result: yes" >&5
16064echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016065 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016066#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016067_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016068
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016069 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016070 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016071else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016073sed 's/^/| /' conftest.$ac_ext >&5
16074
Martin v. Löwis11437992002-04-12 09:54:03 +000016075
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016076 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016077 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16078echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016079if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016081else
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016083/* confdefs.h. */
16084_ACEOF
16085cat confdefs.h >>conftest.$ac_ext
16086cat >>conftest.$ac_ext <<_ACEOF
16087/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016088/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16089 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16090#define pthread_detach innocuous_pthread_detach
16091
Guido van Rossumad678af1998-10-02 14:42:15 +000016092/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016093 which can conflict with char pthread_detach (); below.
16094 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016095 <limits.h> exists even on freestanding compilers. */
16096
16097#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016098# include <limits.h>
16099#else
16100# include <assert.h>
16101#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016102
16103#undef pthread_detach
16104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016105/* Override any GCC internal prototype to avoid an error.
16106 Use char because int might match the return type of a GCC
16107 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016108#ifdef __cplusplus
16109extern "C"
16110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016111char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016112/* The GNU C library defines this for functions which it implements
16113 to always fail with ENOSYS. Some functions are actually named
16114 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016115#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016116choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016117#endif
16118
Skip Montanaro6dead952003-09-25 14:50:04 +000016119int
16120main ()
16121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016122return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016123 ;
16124 return 0;
16125}
16126_ACEOF
16127rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128if { (ac_try="$ac_link"
16129case "(($ac_try" in
16130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16131 *) ac_try_echo=$ac_try;;
16132esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016136 grep -v '^ *+' conftest.er1 >conftest.err
16137 rm -f conftest.er1
16138 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140 (exit $ac_status); } && {
16141 test -z "$ac_c_werror_flag" ||
16142 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016143 } && test -s conftest$ac_exeext &&
16144 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016146else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016148sed 's/^/| /' conftest.$ac_ext >&5
16149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016152
16153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016154 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016155fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016156{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16157echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16158if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016160#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016161_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016162
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016163 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016164 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016165else
Guido van Rossumad678af1998-10-02 14:42:15 +000016166
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016167 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16168echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016169if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016171else
Martin v. Löwis11437992002-04-12 09:54:03 +000016172 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016173LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016175/* confdefs.h. */
16176_ACEOF
16177cat confdefs.h >>conftest.$ac_ext
16178cat >>conftest.$ac_ext <<_ACEOF
16179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016181/* Override any GCC internal prototype to avoid an error.
16182 Use char because int might match the return type of a GCC
16183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016184#ifdef __cplusplus
16185extern "C"
16186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016187char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016188int
16189main ()
16190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 ;
16193 return 0;
16194}
16195_ACEOF
16196rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197if { (ac_try="$ac_link"
16198case "(($ac_try" in
16199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16200 *) ac_try_echo=$ac_try;;
16201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016205 grep -v '^ *+' conftest.er1 >conftest.err
16206 rm -f conftest.er1
16207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209 (exit $ac_status); } && {
16210 test -z "$ac_c_werror_flag" ||
16211 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016212 } && test -s conftest$ac_exeext &&
16213 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016215else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016217sed 's/^/| /' conftest.$ac_ext >&5
16218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221
16222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016224LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016225fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016226{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16227echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16228if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016230#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016231_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016233 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016234 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016235 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016236else
Greg Steinadf63d62000-07-05 10:38:09 +000016237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016238 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16239echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016240if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016241 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016242else
Martin v. Löwis11437992002-04-12 09:54:03 +000016243 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016244LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016246/* confdefs.h. */
16247_ACEOF
16248cat confdefs.h >>conftest.$ac_ext
16249cat >>conftest.$ac_ext <<_ACEOF
16250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252/* Override any GCC internal prototype to avoid an error.
16253 Use char because int might match the return type of a GCC
16254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016255#ifdef __cplusplus
16256extern "C"
16257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016258char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016259int
16260main ()
16261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016262return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 ;
16264 return 0;
16265}
16266_ACEOF
16267rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268if { (ac_try="$ac_link"
16269case "(($ac_try" in
16270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16271 *) ac_try_echo=$ac_try;;
16272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016276 grep -v '^ *+' conftest.er1 >conftest.err
16277 rm -f conftest.er1
16278 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 (exit $ac_status); } && {
16281 test -z "$ac_c_werror_flag" ||
16282 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016283 } && test -s conftest$ac_exeext &&
16284 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016285 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016286else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016288sed 's/^/| /' conftest.$ac_ext >&5
16289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292
16293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016295LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016296fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016297{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16298echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16299if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016301#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016302_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016303
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016304 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016305 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016306 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016307else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016308
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016309 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16310echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016311if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016313else
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016315LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016317/* confdefs.h. */
16318_ACEOF
16319cat confdefs.h >>conftest.$ac_ext
16320cat >>conftest.$ac_ext <<_ACEOF
16321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016323/* Override any GCC internal prototype to avoid an error.
16324 Use char because int might match the return type of a GCC
16325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016326#ifdef __cplusplus
16327extern "C"
16328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016329char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016330int
16331main ()
16332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016334 ;
16335 return 0;
16336}
16337_ACEOF
16338rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339if { (ac_try="$ac_link"
16340case "(($ac_try" in
16341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16342 *) ac_try_echo=$ac_try;;
16343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016347 grep -v '^ *+' conftest.er1 >conftest.err
16348 rm -f conftest.er1
16349 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351 (exit $ac_status); } && {
16352 test -z "$ac_c_werror_flag" ||
16353 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016354 } && test -s conftest$ac_exeext &&
16355 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016357else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016359sed 's/^/| /' conftest.$ac_ext >&5
16360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016363
16364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016366LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016367fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016368{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16369echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16370if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016372#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016373_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016374
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016375 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016376 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016377 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016378else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016379
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016380 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16381echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016382if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016384else
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016386LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016388/* confdefs.h. */
16389_ACEOF
16390cat confdefs.h >>conftest.$ac_ext
16391cat >>conftest.$ac_ext <<_ACEOF
16392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394/* Override any GCC internal prototype to avoid an error.
16395 Use char because int might match the return type of a GCC
16396 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016397#ifdef __cplusplus
16398extern "C"
16399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016400char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016401int
16402main ()
16403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016405 ;
16406 return 0;
16407}
16408_ACEOF
16409rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016410if { (ac_try="$ac_link"
16411case "(($ac_try" in
16412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16413 *) ac_try_echo=$ac_try;;
16414esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016418 grep -v '^ *+' conftest.er1 >conftest.err
16419 rm -f conftest.er1
16420 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422 (exit $ac_status); } && {
16423 test -z "$ac_c_werror_flag" ||
16424 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016425 } && test -s conftest$ac_exeext &&
16426 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016428else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016430sed 's/^/| /' conftest.$ac_ext >&5
16431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016432 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434
16435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016437LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016438fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016439{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16440echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16441if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016442 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016443#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016444_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016446 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016447 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016448 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016449else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016450
Martin v. Löwis130fb172001-07-19 11:00:41 +000016451 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016452fi
16453
Guido van Rossum627b2d71993-12-24 10:39:16 +000016454
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016455fi
16456
Guido van Rossum0be3e491997-05-22 20:33:33 +000016457fi
16458
Guido van Rossum49545951997-12-02 19:28:29 +000016459fi
16460
Guido van Rossumb93a8621998-05-07 13:27:32 +000016461fi
16462
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016464
16465rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016466 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016467fi
16468
Martin v. Löwis11437992002-04-12 09:54:03 +000016469
16470fi
16471
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016472
Michael W. Hudson54241132001-12-07 15:38:26 +000016473
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016474 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16475echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016476if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016477 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016478else
Martin v. Löwis11437992002-04-12 09:54:03 +000016479 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016480LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016482/* confdefs.h. */
16483_ACEOF
16484cat confdefs.h >>conftest.$ac_ext
16485cat >>conftest.$ac_ext <<_ACEOF
16486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488/* Override any GCC internal prototype to avoid an error.
16489 Use char because int might match the return type of a GCC
16490 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016491#ifdef __cplusplus
16492extern "C"
16493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016494char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016495int
16496main ()
16497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016498return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016499 ;
16500 return 0;
16501}
16502_ACEOF
16503rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016504if { (ac_try="$ac_link"
16505case "(($ac_try" in
16506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16507 *) ac_try_echo=$ac_try;;
16508esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016512 grep -v '^ *+' conftest.er1 >conftest.err
16513 rm -f conftest.er1
16514 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516 (exit $ac_status); } && {
16517 test -z "$ac_c_werror_flag" ||
16518 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016519 } && test -s conftest$ac_exeext &&
16520 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016522else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016524sed 's/^/| /' conftest.$ac_ext >&5
16525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528
16529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016531LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016532fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016533{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16534echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16535if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016537#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016538_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016539
Martin v. Löwis130fb172001-07-19 11:00:41 +000016540 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016541 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016542 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016543fi
16544
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016545
Neal Norwitza978ab02002-11-02 16:58:05 +000016546 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016547 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16548echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016549if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016551else
Martin v. Löwis11437992002-04-12 09:54:03 +000016552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016553LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016555/* confdefs.h. */
16556_ACEOF
16557cat confdefs.h >>conftest.$ac_ext
16558cat >>conftest.$ac_ext <<_ACEOF
16559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561/* Override any GCC internal prototype to avoid an error.
16562 Use char because int might match the return type of a GCC
16563 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016564#ifdef __cplusplus
16565extern "C"
16566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016567char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016568int
16569main ()
16570{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016571return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016572 ;
16573 return 0;
16574}
16575_ACEOF
16576rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016577if { (ac_try="$ac_link"
16578case "(($ac_try" in
16579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16580 *) ac_try_echo=$ac_try;;
16581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016585 grep -v '^ *+' conftest.er1 >conftest.err
16586 rm -f conftest.er1
16587 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589 (exit $ac_status); } && {
16590 test -z "$ac_c_werror_flag" ||
16591 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016592 } && test -s conftest$ac_exeext &&
16593 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016595else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016597sed 's/^/| /' conftest.$ac_ext >&5
16598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601
16602rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016604LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016605fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016606{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16607echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16608if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016609 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016610#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016611_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016612
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016613 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016614 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016615 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016616fi
16617
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016618 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016619
Martin v. Löwis130fb172001-07-19 11:00:41 +000016620 if test "$USE_THREAD_MODULE" != "#"
16621 then
16622 # If the above checks didn't disable threads, (at least) OSF1
16623 # needs this '-threads' argument during linking.
16624 case $ac_sys_system in
16625 OSF1) LDLAST=-threads;;
16626 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016627 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016628fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016629
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016630if test "$posix_threads" = "yes"; then
16631 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016632
16633cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016634#define _POSIX_THREADS 1
16635_ACEOF
16636
16637 fi
16638
16639 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16640 case $ac_sys_system/$ac_sys_release in
16641 SunOS/5.6)
16642cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016643#define HAVE_PTHREAD_DESTRUCTOR 1
16644_ACEOF
16645
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016646 ;;
16647 SunOS/5.8)
16648cat >>confdefs.h <<\_ACEOF
16649#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16650_ACEOF
16651
16652 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016653 AIX/5)
16654cat >>confdefs.h <<\_ACEOF
16655#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16656_ACEOF
16657
16658 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016659 esac
16660
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016661 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16662echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016663 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016665else
16666 if test "$cross_compiling" = yes; then
16667 ac_cv_pthread_system_supported=no
16668else
16669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016670/* confdefs.h. */
16671_ACEOF
16672cat confdefs.h >>conftest.$ac_ext
16673cat >>conftest.$ac_ext <<_ACEOF
16674/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016675#include <pthread.h>
16676 void *foo(void *parm) {
16677 return NULL;
16678 }
16679 main() {
16680 pthread_attr_t attr;
16681 pthread_t id;
16682 if (pthread_attr_init(&attr)) exit(-1);
16683 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16684 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16685 exit(0);
16686 }
16687_ACEOF
16688rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689if { (ac_try="$ac_link"
16690case "(($ac_try" in
16691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16692 *) ac_try_echo=$ac_try;;
16693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016696 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699 { (case "(($ac_try" in
16700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16701 *) ac_try_echo=$ac_try;;
16702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016705 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016707 (exit $ac_status); }; }; then
16708 ac_cv_pthread_system_supported=yes
16709else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016710 echo "$as_me: program exited with status $ac_status" >&5
16711echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016712sed 's/^/| /' conftest.$ac_ext >&5
16713
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016714( exit $ac_status )
16715ac_cv_pthread_system_supported=no
16716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717rm -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 +000016718fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720
16721
Guido van Rossum627b2d71993-12-24 10:39:16 +000016722fi
16723
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016724 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16725echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016726 if test "$ac_cv_pthread_system_supported" = "yes"; then
16727
16728cat >>confdefs.h <<\_ACEOF
16729#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16730_ACEOF
16731
16732 fi
16733
16734for ac_func in pthread_sigmask
16735do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016736as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16737{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16738echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016740 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016741else
16742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016743/* confdefs.h. */
16744_ACEOF
16745cat confdefs.h >>conftest.$ac_ext
16746cat >>conftest.$ac_ext <<_ACEOF
16747/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016748/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16749 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16750#define $ac_func innocuous_$ac_func
16751
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016752/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016753 which can conflict with char $ac_func (); below.
16754 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016755 <limits.h> exists even on freestanding compilers. */
16756
16757#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016758# include <limits.h>
16759#else
16760# include <assert.h>
16761#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016762
16763#undef $ac_func
16764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765/* Override any GCC internal prototype to avoid an error.
16766 Use char because int might match the return type of a GCC
16767 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016768#ifdef __cplusplus
16769extern "C"
16770#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016771char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016772/* The GNU C library defines this for functions which it implements
16773 to always fail with ENOSYS. Some functions are actually named
16774 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016775#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016776choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016777#endif
16778
Skip Montanaro6dead952003-09-25 14:50:04 +000016779int
16780main ()
16781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016782return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016783 ;
16784 return 0;
16785}
16786_ACEOF
16787rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788if { (ac_try="$ac_link"
16789case "(($ac_try" in
16790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16791 *) ac_try_echo=$ac_try;;
16792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016794 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016796 grep -v '^ *+' conftest.er1 >conftest.err
16797 rm -f conftest.er1
16798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016800 (exit $ac_status); } && {
16801 test -z "$ac_c_werror_flag" ||
16802 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016803 } && test -s conftest$ac_exeext &&
16804 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016805 eval "$as_ac_var=yes"
16806else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016808sed 's/^/| /' conftest.$ac_ext >&5
16809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812
16813rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016815fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016816ac_res=`eval echo '${'$as_ac_var'}'`
16817 { echo "$as_me:$LINENO: result: $ac_res" >&5
16818echo "${ECHO_T}$ac_res" >&6; }
16819if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016820 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016821#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016822_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016823 case $ac_sys_system in
16824 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016825
Jason Tishlerfac083d2003-07-22 15:20:49 +000016826cat >>confdefs.h <<\_ACEOF
16827#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16828_ACEOF
16829
16830 ;;
16831 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016832fi
16833done
16834
16835fi
16836
16837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016838# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016839
16840
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016841{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16842echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016844if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016845 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016846 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016847 { echo "$as_me:$LINENO: result: no" >&5
16848echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016849 ipv6=no
16850 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016851 *) { echo "$as_me:$LINENO: result: yes" >&5
16852echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016853 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016854#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016855_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016856
16857 ipv6=yes
16858 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016859 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016860else
Martin v. Löwis11437992002-04-12 09:54:03 +000016861
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016862 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016863 { echo "$as_me:$LINENO: result: no" >&5
16864echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016865 ipv6=no
16866
16867else
Martin v. Löwis11437992002-04-12 09:54:03 +000016868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016869/* confdefs.h. */
16870_ACEOF
16871cat confdefs.h >>conftest.$ac_ext
16872cat >>conftest.$ac_ext <<_ACEOF
16873/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016874 /* AF_INET6 available check */
16875#include <sys/types.h>
16876#include <sys/socket.h>
16877main()
16878{
16879 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16880 exit(1);
16881 else
16882 exit(0);
16883}
16884
Martin v. Löwis11437992002-04-12 09:54:03 +000016885_ACEOF
16886rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016887if { (ac_try="$ac_link"
16888case "(($ac_try" in
16889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16890 *) ac_try_echo=$ac_try;;
16891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016896 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897 { (case "(($ac_try" in
16898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16899 *) ac_try_echo=$ac_try;;
16900esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016903 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016906 { echo "$as_me:$LINENO: result: yes" >&5
16907echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016908 ipv6=yes
16909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016910 echo "$as_me: program exited with status $ac_status" >&5
16911echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016912sed 's/^/| /' conftest.$ac_ext >&5
16913
Martin v. Löwis11437992002-04-12 09:54:03 +000016914( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016915{ echo "$as_me:$LINENO: result: no" >&5
16916echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016917 ipv6=no
16918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919rm -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 +000016920fi
16921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922
16923
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016924if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016925 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16926echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016928/* confdefs.h. */
16929_ACEOF
16930cat confdefs.h >>conftest.$ac_ext
16931cat >>conftest.$ac_ext <<_ACEOF
16932/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016933#include <sys/types.h>
16934#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016935int
16936main ()
16937{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016938struct sockaddr_in6 x;
16939x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 ;
16941 return 0;
16942}
16943_ACEOF
16944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945if { (ac_try="$ac_compile"
16946case "(($ac_try" in
16947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16948 *) ac_try_echo=$ac_try;;
16949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016953 grep -v '^ *+' conftest.er1 >conftest.err
16954 rm -f conftest.er1
16955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957 (exit $ac_status); } && {
16958 test -z "$ac_c_werror_flag" ||
16959 test ! -s conftest.err
16960 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016961 { echo "$as_me:$LINENO: result: yes" >&5
16962echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016963 ipv6=yes
16964else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016966sed 's/^/| /' conftest.$ac_ext >&5
16967
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016968 { echo "$as_me:$LINENO: result: no" >&5
16969echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016970 ipv6=no
16971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972
16973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016974fi
16975
16976if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016978#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016979_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016980
16981fi
16982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016983fi
16984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016985
16986ipv6type=unknown
16987ipv6lib=none
16988ipv6trylibc=no
16989
16990if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016991 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16992echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016993 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16994 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016995 case $i in
16996 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016998/* confdefs.h. */
16999_ACEOF
17000cat confdefs.h >>conftest.$ac_ext
17001cat >>conftest.$ac_ext <<_ACEOF
17002/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017003
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017004#include <netinet/in.h>
17005#ifdef IPV6_INRIA_VERSION
17006yes
17007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017008_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017010 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017011 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017012fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017013rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017014
17015 ;;
17016 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017018/* confdefs.h. */
17019_ACEOF
17020cat confdefs.h >>conftest.$ac_ext
17021cat >>conftest.$ac_ext <<_ACEOF
17022/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017023
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017024#include <netinet/in.h>
17025#ifdef __KAME__
17026yes
17027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017028_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017030 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017031 ipv6type=$i;
17032 ipv6lib=inet6
17033 ipv6libdir=/usr/local/v6/lib
17034 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017035fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017036rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017037
17038 ;;
17039 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017041/* confdefs.h. */
17042_ACEOF
17043cat confdefs.h >>conftest.$ac_ext
17044cat >>conftest.$ac_ext <<_ACEOF
17045/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017047#include <features.h>
17048#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17049yes
17050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017051_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017053 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017054 ipv6type=$i;
17055 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017056fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017057rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017058
17059 ;;
17060 linux-inet6)
17061 if test -d /usr/inet6; then
17062 ipv6type=$i
17063 ipv6lib=inet6
17064 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017065 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017066 fi
17067 ;;
17068 solaris)
17069 if test -f /etc/netconfig; then
17070 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17071 ipv6type=$i
17072 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017073 fi
17074 fi
17075 ;;
17076 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017078/* confdefs.h. */
17079_ACEOF
17080cat confdefs.h >>conftest.$ac_ext
17081cat >>conftest.$ac_ext <<_ACEOF
17082/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017083
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017084#include <sys/param.h>
17085#ifdef _TOSHIBA_INET6
17086yes
17087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017088_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017090 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017091 ipv6type=$i;
17092 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017093 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017094fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017095rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017096
17097 ;;
17098 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017100/* confdefs.h. */
17101_ACEOF
17102cat confdefs.h >>conftest.$ac_ext
17103cat >>conftest.$ac_ext <<_ACEOF
17104/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017105
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017106#include </usr/local/v6/include/sys/v6config.h>
17107#ifdef __V6D__
17108yes
17109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017110_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017112 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017113 ipv6type=$i;
17114 ipv6lib=v6;
17115 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017116 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017117fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017118rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017119
17120 ;;
17121 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017123/* confdefs.h. */
17124_ACEOF
17125cat confdefs.h >>conftest.$ac_ext
17126cat >>conftest.$ac_ext <<_ACEOF
17127/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017129#include <sys/param.h>
17130#ifdef _ZETA_MINAMI_INET6
17131yes
17132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017133_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017135 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017136 ipv6type=$i;
17137 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017138 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017139fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000017140rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017141
17142 ;;
17143 esac
17144 if test "$ipv6type" != "unknown"; then
17145 break
17146 fi
17147 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017148 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17149echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017150fi
17151
17152if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17153 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17154 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17155 echo "using lib$ipv6lib"
17156 else
17157 if test $ipv6trylibc = "yes"; then
17158 echo "using libc"
17159 else
17160 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17161 echo "You need to fetch lib$ipv6lib.a from appropriate"
17162 echo 'ipv6 kit and compile beforehand.'
17163 exit 1
17164 fi
17165 fi
17166fi
17167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017168{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17169echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017170cat >conftest.$ac_ext <<_ACEOF
17171/* confdefs.h. */
17172_ACEOF
17173cat confdefs.h >>conftest.$ac_ext
17174cat >>conftest.$ac_ext <<_ACEOF
17175/* end confdefs.h. */
17176#include <Carbon/Carbon.h>
17177int
17178main ()
17179{
17180FSIORefNum fRef = 0
17181 ;
17182 return 0;
17183}
17184_ACEOF
17185rm -f conftest.$ac_objext
17186if { (ac_try="$ac_compile"
17187case "(($ac_try" in
17188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17189 *) ac_try_echo=$ac_try;;
17190esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017192 (eval "$ac_compile") 2>conftest.er1
17193 ac_status=$?
17194 grep -v '^ *+' conftest.er1 >conftest.err
17195 rm -f conftest.er1
17196 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017198 (exit $ac_status); } && {
17199 test -z "$ac_c_werror_flag" ||
17200 test ! -s conftest.err
17201 } && test -s conftest.$ac_objext; then
17202
17203cat >>confdefs.h <<\_ACEOF
17204#define HAVE_OSX105_SDK 1
17205_ACEOF
17206
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017207 { echo "$as_me:$LINENO: result: yes" >&5
17208echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017209else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017210 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017211sed 's/^/| /' conftest.$ac_ext >&5
17212
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017213 { echo "$as_me:$LINENO: result: no" >&5
17214echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017215
17216fi
17217
17218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17219
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017220# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017221{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17222echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017225if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226 withval=$with_doc_strings;
17227fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017228
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017229
17230if test -z "$with_doc_strings"
17231then with_doc_strings="yes"
17232fi
17233if test "$with_doc_strings" != "no"
17234then
17235
17236cat >>confdefs.h <<\_ACEOF
17237#define WITH_DOC_STRINGS 1
17238_ACEOF
17239
17240fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017241{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17242echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017243
Neil Schemenauera35c6882001-02-27 04:45:05 +000017244# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017245{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17246echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017249if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017251if test "$withval" != no
17252then
17253
17254cat >>confdefs.h <<\_ACEOF
17255#define WITH_TSC 1
17256_ACEOF
17257
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017258 { echo "$as_me:$LINENO: result: yes" >&5
17259echo "${ECHO_T}yes" >&6; }
17260else { echo "$as_me:$LINENO: result: no" >&5
17261echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017262fi
17263else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017264 { echo "$as_me:$LINENO: result: no" >&5
17265echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017266fi
17267
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017268
17269# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017270{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17271echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017273# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017274if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017275 withval=$with_pymalloc;
17276fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017277
Neil Schemenauera35c6882001-02-27 04:45:05 +000017278
Neil Schemenauer16c22972002-03-22 15:34:49 +000017279if test -z "$with_pymalloc"
17280then with_pymalloc="yes"
17281fi
17282if test "$with_pymalloc" != "no"
17283then
Martin v. Löwis11437992002-04-12 09:54:03 +000017284
17285cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017286#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017287_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017288
17289fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017290{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17291echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017292
Benjamin Peterson05159c42009-12-03 03:01:27 +000017293# Check for Valgrind support
17294{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17295echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17296
17297# Check whether --with-valgrind was given.
17298if test "${with_valgrind+set}" = set; then
17299 withval=$with_valgrind;
17300else
17301 with_valgrind=no
17302fi
17303
17304{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17305echo "${ECHO_T}$with_valgrind" >&6; }
17306if test "$with_valgrind" != no; then
17307 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17308 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17309echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17310if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17311 echo $ECHO_N "(cached) $ECHO_C" >&6
17312fi
17313{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17314echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17315else
17316 # Is the header compilable?
17317{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17318echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17319cat >conftest.$ac_ext <<_ACEOF
17320/* confdefs.h. */
17321_ACEOF
17322cat confdefs.h >>conftest.$ac_ext
17323cat >>conftest.$ac_ext <<_ACEOF
17324/* end confdefs.h. */
17325$ac_includes_default
17326#include <valgrind/valgrind.h>
17327_ACEOF
17328rm -f conftest.$ac_objext
17329if { (ac_try="$ac_compile"
17330case "(($ac_try" in
17331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17332 *) ac_try_echo=$ac_try;;
17333esac
17334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17335 (eval "$ac_compile") 2>conftest.er1
17336 ac_status=$?
17337 grep -v '^ *+' conftest.er1 >conftest.err
17338 rm -f conftest.er1
17339 cat conftest.err >&5
17340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17341 (exit $ac_status); } && {
17342 test -z "$ac_c_werror_flag" ||
17343 test ! -s conftest.err
17344 } && test -s conftest.$ac_objext; then
17345 ac_header_compiler=yes
17346else
17347 echo "$as_me: failed program was:" >&5
17348sed 's/^/| /' conftest.$ac_ext >&5
17349
17350 ac_header_compiler=no
17351fi
17352
17353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17354{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17355echo "${ECHO_T}$ac_header_compiler" >&6; }
17356
17357# Is the header present?
17358{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17359echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17360cat >conftest.$ac_ext <<_ACEOF
17361/* confdefs.h. */
17362_ACEOF
17363cat confdefs.h >>conftest.$ac_ext
17364cat >>conftest.$ac_ext <<_ACEOF
17365/* end confdefs.h. */
17366#include <valgrind/valgrind.h>
17367_ACEOF
17368if { (ac_try="$ac_cpp conftest.$ac_ext"
17369case "(($ac_try" in
17370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17371 *) ac_try_echo=$ac_try;;
17372esac
17373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17374 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17375 ac_status=$?
17376 grep -v '^ *+' conftest.er1 >conftest.err
17377 rm -f conftest.er1
17378 cat conftest.err >&5
17379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17380 (exit $ac_status); } >/dev/null && {
17381 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17382 test ! -s conftest.err
17383 }; then
17384 ac_header_preproc=yes
17385else
17386 echo "$as_me: failed program was:" >&5
17387sed 's/^/| /' conftest.$ac_ext >&5
17388
17389 ac_header_preproc=no
17390fi
17391
17392rm -f conftest.err conftest.$ac_ext
17393{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17394echo "${ECHO_T}$ac_header_preproc" >&6; }
17395
17396# So? What about this header?
17397case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17398 yes:no: )
17399 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17400echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17401 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17402echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17403 ac_header_preproc=yes
17404 ;;
17405 no:yes:* )
17406 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17407echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17408 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17409echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17410 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17411echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17412 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17413echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17414 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17415echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17416 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17417echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17418 ( cat <<\_ASBOX
17419## -------------------------------------- ##
17420## Report this to http://bugs.python.org/ ##
17421## -------------------------------------- ##
17422_ASBOX
17423 ) | sed "s/^/$as_me: WARNING: /" >&2
17424 ;;
17425esac
17426{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17427echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17428if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17429 echo $ECHO_N "(cached) $ECHO_C" >&6
17430else
17431 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17432fi
17433{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17434echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17435
17436fi
17437if test $ac_cv_header_valgrind_valgrind_h = yes; then
17438
17439cat >>confdefs.h <<\_ACEOF
17440#define WITH_VALGRIND 1
17441_ACEOF
17442
17443else
17444 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17445echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17446 { (exit 1); exit 1; }; }
17447
17448fi
17449
17450
17451fi
17452
Barry Warsawef82cd72000-06-30 16:21:01 +000017453# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017454{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17455echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017458if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017460if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017461then
17462
17463cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017464#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017465_ACEOF
17466
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017467 { echo "$as_me:$LINENO: result: yes" >&5
17468echo "${ECHO_T}yes" >&6; }
17469else { echo "$as_me:$LINENO: result: no" >&5
17470echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017471fi
17472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017473 { echo "$as_me:$LINENO: result: no" >&5
17474echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475fi
17476
Barry Warsawef82cd72000-06-30 16:21:01 +000017477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017478# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017479
Guido van Rossum98935bf2001-09-05 19:13:16 +000017480DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017481
Guido van Rossume97ee181999-12-20 21:27:22 +000017482# the dlopen() function means we might want to use dynload_shlib.o. some
17483# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017484
Thomas Wouters3a584202000-08-05 23:28:51 +000017485for ac_func in dlopen
17486do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17488{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017492else
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017494/* confdefs.h. */
17495_ACEOF
17496cat confdefs.h >>conftest.$ac_ext
17497cat >>conftest.$ac_ext <<_ACEOF
17498/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017499/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17500 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17501#define $ac_func innocuous_$ac_func
17502
Guido van Rossume97ee181999-12-20 21:27:22 +000017503/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017504 which can conflict with char $ac_func (); below.
17505 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017506 <limits.h> exists even on freestanding compilers. */
17507
17508#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017509# include <limits.h>
17510#else
17511# include <assert.h>
17512#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017513
17514#undef $ac_func
17515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516/* Override any GCC internal prototype to avoid an error.
17517 Use char because int might match the return type of a GCC
17518 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017519#ifdef __cplusplus
17520extern "C"
17521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017522char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017523/* The GNU C library defines this for functions which it implements
17524 to always fail with ENOSYS. Some functions are actually named
17525 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017527choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017528#endif
17529
Skip Montanaro6dead952003-09-25 14:50:04 +000017530int
17531main ()
17532{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017534 ;
17535 return 0;
17536}
17537_ACEOF
17538rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539if { (ac_try="$ac_link"
17540case "(($ac_try" in
17541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17542 *) ac_try_echo=$ac_try;;
17543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017547 grep -v '^ *+' conftest.er1 >conftest.err
17548 rm -f conftest.er1
17549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551 (exit $ac_status); } && {
17552 test -z "$ac_c_werror_flag" ||
17553 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017554 } && test -s conftest$ac_exeext &&
17555 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017557else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017559sed 's/^/| /' conftest.$ac_ext >&5
17560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563
17564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017565 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017566fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017567ac_res=`eval echo '${'$as_ac_var'}'`
17568 { echo "$as_me:$LINENO: result: $ac_res" >&5
17569echo "${ECHO_T}$ac_res" >&6; }
17570if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017572#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017573_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017574
Guido van Rossume97ee181999-12-20 21:27:22 +000017575fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017576done
Guido van Rossume97ee181999-12-20 21:27:22 +000017577
Michael W. Hudson54241132001-12-07 15:38:26 +000017578
Guido van Rossume97ee181999-12-20 21:27:22 +000017579# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17580# loading of modules.
17581
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017582{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17583echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017584if test -z "$DYNLOADFILE"
17585then
17586 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017587 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17588 if test "$ac_cv_func_dlopen" = yes
17589 then DYNLOADFILE="dynload_shlib.o"
17590 else DYNLOADFILE="dynload_aix.o"
17591 fi
17592 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017593 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017594 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17595 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017596 *)
17597 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17598 # out any dynamic loading
17599 if test "$ac_cv_func_dlopen" = yes
17600 then DYNLOADFILE="dynload_shlib.o"
17601 else DYNLOADFILE="dynload_stub.o"
17602 fi
17603 ;;
17604 esac
17605fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017606{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17607echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017608if test "$DYNLOADFILE" != "dynload_stub.o"
17609then
Martin v. Löwis11437992002-04-12 09:54:03 +000017610
17611cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017612#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017613_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017614
17615fi
17616
Neil Schemenauer4e425612001-06-19 15:44:15 +000017617# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17618
Michael W. Hudson54241132001-12-07 15:38:26 +000017619
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017620{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17621echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017622if test -z "$MACHDEP_OBJS"
17623then
Jack Jansene578a632001-08-15 01:27:14 +000017624 MACHDEP_OBJS=$extra_machdep_objs
17625else
17626 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017627fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017628{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17629echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017630
Guido van Rossum627b2d71993-12-24 10:39:16 +000017631# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
Martin v. Löwisd6320502004-08-12 13:45:08 +000017703
Martin v. Löwisc3001752005-01-23 09:27:24 +000017704
17705
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017706
17707
Thomas Wouterscf297e42007-02-23 15:07:44 +000017708
17709
Gregory P. Smith25523d22007-09-03 16:44:55 +000017710
Christian Heimes4e30a842007-11-30 22:12:06 +000017711
Martin v. Löwis92fab752008-03-08 10:40:41 +000017712
Martin v. Löwis823725e2008-03-24 13:39:54 +000017713
17714
Benjamin Peterson965ce872009-04-05 21:24:58 +000017715
17716
17717
17718
Martin v. Löwis011e8422009-05-05 04:43:17 +000017719
Martin v. Löwis113a0852009-05-29 17:25:39 +000017720
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017721
17722
17723
17724
Antoine Pitroub7572f02009-12-02 20:46:48 +000017725
Martin v. Löwis823725e2008-03-24 13:39:54 +000017726for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17727 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017728 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017729 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017730 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017731 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017732 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017733 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17734 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017735 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17736 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017737 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017738 truncate uname unsetenv utimes waitpid wait3 wait4 \
17739 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017740do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017741as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17742{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17743echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017746else
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017748/* confdefs.h. */
17749_ACEOF
17750cat confdefs.h >>conftest.$ac_ext
17751cat >>conftest.$ac_ext <<_ACEOF
17752/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017753/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17754 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17755#define $ac_func innocuous_$ac_func
17756
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017757/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017758 which can conflict with char $ac_func (); below.
17759 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017760 <limits.h> exists even on freestanding compilers. */
17761
17762#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017763# include <limits.h>
17764#else
17765# include <assert.h>
17766#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017767
17768#undef $ac_func
17769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770/* Override any GCC internal prototype to avoid an error.
17771 Use char because int might match the return type of a GCC
17772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017773#ifdef __cplusplus
17774extern "C"
17775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017776char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017777/* The GNU C library defines this for functions which it implements
17778 to always fail with ENOSYS. Some functions are actually named
17779 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017781choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017782#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017783
Skip Montanaro6dead952003-09-25 14:50:04 +000017784int
17785main ()
17786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017787return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017788 ;
17789 return 0;
17790}
17791_ACEOF
17792rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793if { (ac_try="$ac_link"
17794case "(($ac_try" in
17795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17796 *) ac_try_echo=$ac_try;;
17797esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017801 grep -v '^ *+' conftest.er1 >conftest.err
17802 rm -f conftest.er1
17803 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805 (exit $ac_status); } && {
17806 test -z "$ac_c_werror_flag" ||
17807 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017808 } && test -s conftest$ac_exeext &&
17809 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017810 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017811else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017813sed 's/^/| /' conftest.$ac_ext >&5
17814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817
17818rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017819 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017820fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017821ac_res=`eval echo '${'$as_ac_var'}'`
17822 { echo "$as_me:$LINENO: result: $ac_res" >&5
17823echo "${ECHO_T}$ac_res" >&6; }
17824if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017825 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017826#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017827_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017828
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017829fi
17830done
17831
Michael W. Hudson54241132001-12-07 15:38:26 +000017832
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017833# For some functions, having a definition is not sufficient, since
17834# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017835{ echo "$as_me:$LINENO: checking for chroot" >&5
17836echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017837cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017838/* confdefs.h. */
17839_ACEOF
17840cat confdefs.h >>conftest.$ac_ext
17841cat >>conftest.$ac_ext <<_ACEOF
17842/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017843#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017844int
17845main ()
17846{
17847void *x=chroot
17848 ;
17849 return 0;
17850}
17851_ACEOF
17852rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853if { (ac_try="$ac_compile"
17854case "(($ac_try" in
17855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17856 *) ac_try_echo=$ac_try;;
17857esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017861 grep -v '^ *+' conftest.er1 >conftest.err
17862 rm -f conftest.er1
17863 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017865 (exit $ac_status); } && {
17866 test -z "$ac_c_werror_flag" ||
17867 test ! -s conftest.err
17868 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017869
17870cat >>confdefs.h <<\_ACEOF
17871#define HAVE_CHROOT 1
17872_ACEOF
17873
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017874 { echo "$as_me:$LINENO: result: yes" >&5
17875echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017876else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017878sed 's/^/| /' conftest.$ac_ext >&5
17879
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017880 { echo "$as_me:$LINENO: result: no" >&5
17881echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017882
17883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884
17885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017886{ echo "$as_me:$LINENO: checking for link" >&5
17887echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017889/* confdefs.h. */
17890_ACEOF
17891cat confdefs.h >>conftest.$ac_ext
17892cat >>conftest.$ac_ext <<_ACEOF
17893/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017894#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017895int
17896main ()
17897{
17898void *x=link
17899 ;
17900 return 0;
17901}
17902_ACEOF
17903rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904if { (ac_try="$ac_compile"
17905case "(($ac_try" in
17906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17907 *) ac_try_echo=$ac_try;;
17908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017912 grep -v '^ *+' conftest.er1 >conftest.err
17913 rm -f conftest.er1
17914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017916 (exit $ac_status); } && {
17917 test -z "$ac_c_werror_flag" ||
17918 test ! -s conftest.err
17919 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017920
17921cat >>confdefs.h <<\_ACEOF
17922#define HAVE_LINK 1
17923_ACEOF
17924
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017925 { echo "$as_me:$LINENO: result: yes" >&5
17926echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017929sed 's/^/| /' conftest.$ac_ext >&5
17930
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017931 { echo "$as_me:$LINENO: result: no" >&5
17932echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017933
17934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017935
17936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017937{ echo "$as_me:$LINENO: checking for symlink" >&5
17938echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017940/* confdefs.h. */
17941_ACEOF
17942cat confdefs.h >>conftest.$ac_ext
17943cat >>conftest.$ac_ext <<_ACEOF
17944/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017945#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017946int
17947main ()
17948{
17949void *x=symlink
17950 ;
17951 return 0;
17952}
17953_ACEOF
17954rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017955if { (ac_try="$ac_compile"
17956case "(($ac_try" in
17957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17958 *) ac_try_echo=$ac_try;;
17959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017963 grep -v '^ *+' conftest.er1 >conftest.err
17964 rm -f conftest.er1
17965 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967 (exit $ac_status); } && {
17968 test -z "$ac_c_werror_flag" ||
17969 test ! -s conftest.err
17970 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017971
17972cat >>confdefs.h <<\_ACEOF
17973#define HAVE_SYMLINK 1
17974_ACEOF
17975
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017976 { echo "$as_me:$LINENO: result: yes" >&5
17977echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017980sed 's/^/| /' conftest.$ac_ext >&5
17981
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017982 { echo "$as_me:$LINENO: result: no" >&5
17983echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017984
17985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986
17987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017988{ echo "$as_me:$LINENO: checking for fchdir" >&5
17989echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017991/* confdefs.h. */
17992_ACEOF
17993cat confdefs.h >>conftest.$ac_ext
17994cat >>conftest.$ac_ext <<_ACEOF
17995/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017996#include <unistd.h>
17997int
17998main ()
17999{
18000void *x=fchdir
18001 ;
18002 return 0;
18003}
18004_ACEOF
18005rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006if { (ac_try="$ac_compile"
18007case "(($ac_try" in
18008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18009 *) ac_try_echo=$ac_try;;
18010esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018014 grep -v '^ *+' conftest.er1 >conftest.err
18015 rm -f conftest.er1
18016 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018 (exit $ac_status); } && {
18019 test -z "$ac_c_werror_flag" ||
18020 test ! -s conftest.err
18021 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018022
18023cat >>confdefs.h <<\_ACEOF
18024#define HAVE_FCHDIR 1
18025_ACEOF
18026
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018027 { echo "$as_me:$LINENO: result: yes" >&5
18028echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018029else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018031sed 's/^/| /' conftest.$ac_ext >&5
18032
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018033 { echo "$as_me:$LINENO: result: no" >&5
18034echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018035
18036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018037
18038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018039{ echo "$as_me:$LINENO: checking for fsync" >&5
18040echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018042/* confdefs.h. */
18043_ACEOF
18044cat confdefs.h >>conftest.$ac_ext
18045cat >>conftest.$ac_ext <<_ACEOF
18046/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018047#include <unistd.h>
18048int
18049main ()
18050{
18051void *x=fsync
18052 ;
18053 return 0;
18054}
18055_ACEOF
18056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057if { (ac_try="$ac_compile"
18058case "(($ac_try" in
18059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18060 *) ac_try_echo=$ac_try;;
18061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018065 grep -v '^ *+' conftest.er1 >conftest.err
18066 rm -f conftest.er1
18067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 (exit $ac_status); } && {
18070 test -z "$ac_c_werror_flag" ||
18071 test ! -s conftest.err
18072 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018073
18074cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018075#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018076_ACEOF
18077
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018078 { echo "$as_me:$LINENO: result: yes" >&5
18079echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018080else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018082sed 's/^/| /' conftest.$ac_ext >&5
18083
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018084 { echo "$as_me:$LINENO: result: no" >&5
18085echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018086
18087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088
18089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018090{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18091echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018093/* confdefs.h. */
18094_ACEOF
18095cat confdefs.h >>conftest.$ac_ext
18096cat >>conftest.$ac_ext <<_ACEOF
18097/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018098#include <unistd.h>
18099int
18100main ()
18101{
18102void *x=fdatasync
18103 ;
18104 return 0;
18105}
18106_ACEOF
18107rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018108if { (ac_try="$ac_compile"
18109case "(($ac_try" in
18110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18111 *) ac_try_echo=$ac_try;;
18112esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018116 grep -v '^ *+' conftest.er1 >conftest.err
18117 rm -f conftest.er1
18118 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120 (exit $ac_status); } && {
18121 test -z "$ac_c_werror_flag" ||
18122 test ! -s conftest.err
18123 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018124
18125cat >>confdefs.h <<\_ACEOF
18126#define HAVE_FDATASYNC 1
18127_ACEOF
18128
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018129 { echo "$as_me:$LINENO: result: yes" >&5
18130echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018131else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018133sed 's/^/| /' conftest.$ac_ext >&5
18134
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018135 { echo "$as_me:$LINENO: result: no" >&5
18136echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018137
18138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139
18140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018141{ echo "$as_me:$LINENO: checking for epoll" >&5
18142echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018143cat >conftest.$ac_ext <<_ACEOF
18144/* confdefs.h. */
18145_ACEOF
18146cat confdefs.h >>conftest.$ac_ext
18147cat >>conftest.$ac_ext <<_ACEOF
18148/* end confdefs.h. */
18149#include <sys/epoll.h>
18150int
18151main ()
18152{
18153void *x=epoll_create
18154 ;
18155 return 0;
18156}
18157_ACEOF
18158rm -f conftest.$ac_objext
18159if { (ac_try="$ac_compile"
18160case "(($ac_try" in
18161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18162 *) ac_try_echo=$ac_try;;
18163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018165 (eval "$ac_compile") 2>conftest.er1
18166 ac_status=$?
18167 grep -v '^ *+' conftest.er1 >conftest.err
18168 rm -f conftest.er1
18169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018171 (exit $ac_status); } && {
18172 test -z "$ac_c_werror_flag" ||
18173 test ! -s conftest.err
18174 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018175
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018176cat >>confdefs.h <<\_ACEOF
18177#define HAVE_EPOLL 1
18178_ACEOF
18179
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018180 { echo "$as_me:$LINENO: result: yes" >&5
18181echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018182else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018183 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018184sed 's/^/| /' conftest.$ac_ext >&5
18185
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018186 { echo "$as_me:$LINENO: result: no" >&5
18187echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018188
18189fi
18190
18191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018192{ echo "$as_me:$LINENO: checking for kqueue" >&5
18193echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018194cat >conftest.$ac_ext <<_ACEOF
18195/* confdefs.h. */
18196_ACEOF
18197cat confdefs.h >>conftest.$ac_ext
18198cat >>conftest.$ac_ext <<_ACEOF
18199/* end confdefs.h. */
18200
18201#include <sys/types.h>
18202#include <sys/event.h>
18203
18204int
18205main ()
18206{
18207int x=kqueue()
18208 ;
18209 return 0;
18210}
18211_ACEOF
18212rm -f conftest.$ac_objext
18213if { (ac_try="$ac_compile"
18214case "(($ac_try" in
18215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18216 *) ac_try_echo=$ac_try;;
18217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018219 (eval "$ac_compile") 2>conftest.er1
18220 ac_status=$?
18221 grep -v '^ *+' conftest.er1 >conftest.err
18222 rm -f conftest.er1
18223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018225 (exit $ac_status); } && {
18226 test -z "$ac_c_werror_flag" ||
18227 test ! -s conftest.err
18228 } && test -s conftest.$ac_objext; then
18229
18230cat >>confdefs.h <<\_ACEOF
18231#define HAVE_KQUEUE 1
18232_ACEOF
18233
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018234 { echo "$as_me:$LINENO: result: yes" >&5
18235echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018237 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018238sed 's/^/| /' conftest.$ac_ext >&5
18239
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018240 { echo "$as_me:$LINENO: result: no" >&5
18241echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018242
18243fi
18244
18245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018246# On some systems (eg. FreeBSD 5), we would find a definition of the
18247# functions ctermid_r, setgroups in the library, but no prototype
18248# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18249# address to avoid compiler warnings and potential miscompilations
18250# because of the missing prototypes.
18251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018252{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18253echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018255/* confdefs.h. */
18256_ACEOF
18257cat confdefs.h >>conftest.$ac_ext
18258cat >>conftest.$ac_ext <<_ACEOF
18259/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018260
18261#include "confdefs.h"
18262#include <stdio.h>
18263
Martin v. Löwisd5843682002-11-21 20:41:28 +000018264int
18265main ()
18266{
18267void* p = ctermid_r
18268 ;
18269 return 0;
18270}
18271_ACEOF
18272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273if { (ac_try="$ac_compile"
18274case "(($ac_try" in
18275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18276 *) ac_try_echo=$ac_try;;
18277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018281 grep -v '^ *+' conftest.er1 >conftest.err
18282 rm -f conftest.er1
18283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018285 (exit $ac_status); } && {
18286 test -z "$ac_c_werror_flag" ||
18287 test ! -s conftest.err
18288 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018289
18290cat >>confdefs.h <<\_ACEOF
18291#define HAVE_CTERMID_R 1
18292_ACEOF
18293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018294 { echo "$as_me:$LINENO: result: yes" >&5
18295echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018298sed 's/^/| /' conftest.$ac_ext >&5
18299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018300 { echo "$as_me:$LINENO: result: no" >&5
18301echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018302
18303fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18306
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018307{ echo "$as_me:$LINENO: checking for flock" >&5
18308echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018310/* confdefs.h. */
18311_ACEOF
18312cat confdefs.h >>conftest.$ac_ext
18313cat >>conftest.$ac_ext <<_ACEOF
18314/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018315
18316#include "confdefs.h"
18317#include <sys/file.h>
18318
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018319int
18320main ()
18321{
18322void* p = flock
18323 ;
18324 return 0;
18325}
18326_ACEOF
18327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018328if { (ac_try="$ac_compile"
18329case "(($ac_try" in
18330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18331 *) ac_try_echo=$ac_try;;
18332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018336 grep -v '^ *+' conftest.er1 >conftest.err
18337 rm -f conftest.er1
18338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340 (exit $ac_status); } && {
18341 test -z "$ac_c_werror_flag" ||
18342 test ! -s conftest.err
18343 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018344
18345cat >>confdefs.h <<\_ACEOF
18346#define HAVE_FLOCK 1
18347_ACEOF
18348
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018349 { echo "$as_me:$LINENO: result: yes" >&5
18350echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018351else
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
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018355 { echo "$as_me:$LINENO: result: no" >&5
18356echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018357
18358fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18361
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018362{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18363echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018364cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018365/* confdefs.h. */
18366_ACEOF
18367cat confdefs.h >>conftest.$ac_ext
18368cat >>conftest.$ac_ext <<_ACEOF
18369/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018370
18371#include "confdefs.h"
18372#include <unistd.h>
18373
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018374int
18375main ()
18376{
18377void* p = getpagesize
18378 ;
18379 return 0;
18380}
18381_ACEOF
18382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383if { (ac_try="$ac_compile"
18384case "(($ac_try" in
18385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18386 *) ac_try_echo=$ac_try;;
18387esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018391 grep -v '^ *+' conftest.er1 >conftest.err
18392 rm -f conftest.er1
18393 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395 (exit $ac_status); } && {
18396 test -z "$ac_c_werror_flag" ||
18397 test ! -s conftest.err
18398 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018399
18400cat >>confdefs.h <<\_ACEOF
18401#define HAVE_GETPAGESIZE 1
18402_ACEOF
18403
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018404 { echo "$as_me:$LINENO: result: yes" >&5
18405echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018406else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018408sed 's/^/| /' conftest.$ac_ext >&5
18409
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018410 { echo "$as_me:$LINENO: result: no" >&5
18411echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018412
18413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414
18415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018416
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018417for ac_prog in true
18418do
18419 # Extract the first word of "$ac_prog", so it can be a program name with args.
18420set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018423if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018425else
18426 if test -n "$TRUE"; then
18427 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18428else
18429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18430for as_dir in $PATH
18431do
18432 IFS=$as_save_IFS
18433 test -z "$as_dir" && as_dir=.
18434 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435 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 +000018436 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018437 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018438 break 2
18439 fi
18440done
18441done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018443
18444fi
18445fi
18446TRUE=$ac_cv_prog_TRUE
18447if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018448 { echo "$as_me:$LINENO: result: $TRUE" >&5
18449echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018451 { echo "$as_me:$LINENO: result: no" >&5
18452echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018453fi
18454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018456 test -n "$TRUE" && break
18457done
18458test -n "$TRUE" || TRUE="/bin/true"
18459
18460
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018461{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18462echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018463if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018465else
18466 ac_check_lib_save_LIBS=$LIBS
18467LIBS="-lc $LIBS"
18468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018469/* confdefs.h. */
18470_ACEOF
18471cat confdefs.h >>conftest.$ac_ext
18472cat >>conftest.$ac_ext <<_ACEOF
18473/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018475/* Override any GCC internal prototype to avoid an error.
18476 Use char because int might match the return type of a GCC
18477 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018478#ifdef __cplusplus
18479extern "C"
18480#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018481char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018482int
18483main ()
18484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018486 ;
18487 return 0;
18488}
18489_ACEOF
18490rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018491if { (ac_try="$ac_link"
18492case "(($ac_try" in
18493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18494 *) ac_try_echo=$ac_try;;
18495esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018499 grep -v '^ *+' conftest.er1 >conftest.err
18500 rm -f conftest.er1
18501 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018503 (exit $ac_status); } && {
18504 test -z "$ac_c_werror_flag" ||
18505 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018506 } && test -s conftest$ac_exeext &&
18507 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018508 ac_cv_lib_c_inet_aton=yes
18509else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018511sed 's/^/| /' conftest.$ac_ext >&5
18512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515
18516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018518LIBS=$ac_check_lib_save_LIBS
18519fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018520{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18521echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18522if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018523 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018524else
18525
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018526{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18527echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018528if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018529 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018530else
18531 ac_check_lib_save_LIBS=$LIBS
18532LIBS="-lresolv $LIBS"
18533cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018534/* confdefs.h. */
18535_ACEOF
18536cat confdefs.h >>conftest.$ac_ext
18537cat >>conftest.$ac_ext <<_ACEOF
18538/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540/* Override any GCC internal prototype to avoid an error.
18541 Use char because int might match the return type of a GCC
18542 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018543#ifdef __cplusplus
18544extern "C"
18545#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018546char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018547int
18548main ()
18549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018550return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018551 ;
18552 return 0;
18553}
18554_ACEOF
18555rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556if { (ac_try="$ac_link"
18557case "(($ac_try" in
18558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18559 *) ac_try_echo=$ac_try;;
18560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018564 grep -v '^ *+' conftest.er1 >conftest.err
18565 rm -f conftest.er1
18566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018568 (exit $ac_status); } && {
18569 test -z "$ac_c_werror_flag" ||
18570 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018571 } && test -s conftest$ac_exeext &&
18572 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018573 ac_cv_lib_resolv_inet_aton=yes
18574else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018576sed 's/^/| /' conftest.$ac_ext >&5
18577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580
18581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018582 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018583LIBS=$ac_check_lib_save_LIBS
18584fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018585{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18586echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18587if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018588 cat >>confdefs.h <<_ACEOF
18589#define HAVE_LIBRESOLV 1
18590_ACEOF
18591
18592 LIBS="-lresolv $LIBS"
18593
18594fi
18595
18596
18597fi
18598
18599
Christian Heimesd0764e22007-12-04 15:00:33 +000018600# On Tru64, chflags seems to be present, but calling it will
18601# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018602{ echo "$as_me:$LINENO: checking for chflags" >&5
18603echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018604if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018605 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018606else
18607 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018608 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018609else
18610 cat >conftest.$ac_ext <<_ACEOF
18611/* confdefs.h. */
18612_ACEOF
18613cat confdefs.h >>conftest.$ac_ext
18614cat >>conftest.$ac_ext <<_ACEOF
18615/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018616[
Christian Heimesd0764e22007-12-04 15:00:33 +000018617#include <sys/stat.h>
18618#include <unistd.h>
18619int main(int argc, char*argv[])
18620{
18621 if(chflags(argv[0], 0) != 0)
18622 return 1;
18623 return 0;
18624}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018625]
Christian Heimesd0764e22007-12-04 15:00:33 +000018626_ACEOF
18627rm -f conftest$ac_exeext
18628if { (ac_try="$ac_link"
18629case "(($ac_try" in
18630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18631 *) ac_try_echo=$ac_try;;
18632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018634 (eval "$ac_link") 2>&5
18635 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018637 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18638 { (case "(($ac_try" in
18639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18640 *) ac_try_echo=$ac_try;;
18641esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018643 (eval "$ac_try") 2>&5
18644 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018646 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018647 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018648else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018649 echo "$as_me: program exited with status $ac_status" >&5
18650echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018651sed 's/^/| /' conftest.$ac_ext >&5
18652
18653( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018654ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018655fi
18656rm -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 +000018657fi
18658
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018659
18660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018661fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018662{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18663echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018664if test "$ac_cv_have_chflags" = cross ; then
18665 { echo "$as_me:$LINENO: checking for chflags" >&5
18666echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18667if test "${ac_cv_func_chflags+set}" = set; then
18668 echo $ECHO_N "(cached) $ECHO_C" >&6
18669else
18670 cat >conftest.$ac_ext <<_ACEOF
18671/* confdefs.h. */
18672_ACEOF
18673cat confdefs.h >>conftest.$ac_ext
18674cat >>conftest.$ac_ext <<_ACEOF
18675/* end confdefs.h. */
18676/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18677 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18678#define chflags innocuous_chflags
18679
18680/* System header to define __stub macros and hopefully few prototypes,
18681 which can conflict with char chflags (); below.
18682 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18683 <limits.h> exists even on freestanding compilers. */
18684
18685#ifdef __STDC__
18686# include <limits.h>
18687#else
18688# include <assert.h>
18689#endif
18690
18691#undef chflags
18692
18693/* Override any GCC internal prototype to avoid an error.
18694 Use char because int might match the return type of a GCC
18695 builtin and then its argument prototype would still apply. */
18696#ifdef __cplusplus
18697extern "C"
18698#endif
18699char chflags ();
18700/* The GNU C library defines this for functions which it implements
18701 to always fail with ENOSYS. Some functions are actually named
18702 something starting with __ and the normal name is an alias. */
18703#if defined __stub_chflags || defined __stub___chflags
18704choke me
18705#endif
18706
18707int
18708main ()
18709{
18710return chflags ();
18711 ;
18712 return 0;
18713}
18714_ACEOF
18715rm -f conftest.$ac_objext conftest$ac_exeext
18716if { (ac_try="$ac_link"
18717case "(($ac_try" in
18718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18719 *) ac_try_echo=$ac_try;;
18720esac
18721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18722 (eval "$ac_link") 2>conftest.er1
18723 ac_status=$?
18724 grep -v '^ *+' conftest.er1 >conftest.err
18725 rm -f conftest.er1
18726 cat conftest.err >&5
18727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18728 (exit $ac_status); } && {
18729 test -z "$ac_c_werror_flag" ||
18730 test ! -s conftest.err
18731 } && test -s conftest$ac_exeext &&
18732 $as_test_x conftest$ac_exeext; then
18733 ac_cv_func_chflags=yes
18734else
18735 echo "$as_me: failed program was:" >&5
18736sed 's/^/| /' conftest.$ac_ext >&5
18737
18738 ac_cv_func_chflags=no
18739fi
18740
18741rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18742 conftest$ac_exeext conftest.$ac_ext
18743fi
18744{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18745echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18746if test $ac_cv_func_chflags = yes; then
18747 ac_cv_have_chflags="yes"
18748else
18749 ac_cv_have_chflags="no"
18750fi
18751
18752fi
18753if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018754
18755cat >>confdefs.h <<\_ACEOF
18756#define HAVE_CHFLAGS 1
18757_ACEOF
18758
18759fi
18760
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018761{ echo "$as_me:$LINENO: checking for lchflags" >&5
18762echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018763if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018764 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018765else
18766 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018767 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018768else
18769 cat >conftest.$ac_ext <<_ACEOF
18770/* confdefs.h. */
18771_ACEOF
18772cat confdefs.h >>conftest.$ac_ext
18773cat >>conftest.$ac_ext <<_ACEOF
18774/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018775[
Christian Heimesd0764e22007-12-04 15:00:33 +000018776#include <sys/stat.h>
18777#include <unistd.h>
18778int main(int argc, char*argv[])
18779{
18780 if(lchflags(argv[0], 0) != 0)
18781 return 1;
18782 return 0;
18783}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018784]
Christian Heimesd0764e22007-12-04 15:00:33 +000018785_ACEOF
18786rm -f conftest$ac_exeext
18787if { (ac_try="$ac_link"
18788case "(($ac_try" in
18789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18790 *) ac_try_echo=$ac_try;;
18791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018793 (eval "$ac_link") 2>&5
18794 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18797 { (case "(($ac_try" in
18798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18799 *) ac_try_echo=$ac_try;;
18800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018802 (eval "$ac_try") 2>&5
18803 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018805 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018806 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018807else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018808 echo "$as_me: program exited with status $ac_status" >&5
18809echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018810sed 's/^/| /' conftest.$ac_ext >&5
18811
18812( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018813ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018814fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18816fi
18817
18818
Christian Heimesd0764e22007-12-04 15:00:33 +000018819
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018820fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018821{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18822echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018823if test "$ac_cv_have_lchflags" = cross ; then
18824 { echo "$as_me:$LINENO: checking for lchflags" >&5
18825echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18826if test "${ac_cv_func_lchflags+set}" = set; then
18827 echo $ECHO_N "(cached) $ECHO_C" >&6
18828else
18829 cat >conftest.$ac_ext <<_ACEOF
18830/* confdefs.h. */
18831_ACEOF
18832cat confdefs.h >>conftest.$ac_ext
18833cat >>conftest.$ac_ext <<_ACEOF
18834/* end confdefs.h. */
18835/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18836 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18837#define lchflags innocuous_lchflags
18838
18839/* System header to define __stub macros and hopefully few prototypes,
18840 which can conflict with char lchflags (); below.
18841 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18842 <limits.h> exists even on freestanding compilers. */
18843
18844#ifdef __STDC__
18845# include <limits.h>
18846#else
18847# include <assert.h>
18848#endif
18849
18850#undef lchflags
18851
18852/* Override any GCC internal prototype to avoid an error.
18853 Use char because int might match the return type of a GCC
18854 builtin and then its argument prototype would still apply. */
18855#ifdef __cplusplus
18856extern "C"
18857#endif
18858char lchflags ();
18859/* The GNU C library defines this for functions which it implements
18860 to always fail with ENOSYS. Some functions are actually named
18861 something starting with __ and the normal name is an alias. */
18862#if defined __stub_lchflags || defined __stub___lchflags
18863choke me
18864#endif
18865
18866int
18867main ()
18868{
18869return lchflags ();
18870 ;
18871 return 0;
18872}
18873_ACEOF
18874rm -f conftest.$ac_objext conftest$ac_exeext
18875if { (ac_try="$ac_link"
18876case "(($ac_try" in
18877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18878 *) ac_try_echo=$ac_try;;
18879esac
18880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18881 (eval "$ac_link") 2>conftest.er1
18882 ac_status=$?
18883 grep -v '^ *+' conftest.er1 >conftest.err
18884 rm -f conftest.er1
18885 cat conftest.err >&5
18886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18887 (exit $ac_status); } && {
18888 test -z "$ac_c_werror_flag" ||
18889 test ! -s conftest.err
18890 } && test -s conftest$ac_exeext &&
18891 $as_test_x conftest$ac_exeext; then
18892 ac_cv_func_lchflags=yes
18893else
18894 echo "$as_me: failed program was:" >&5
18895sed 's/^/| /' conftest.$ac_ext >&5
18896
18897 ac_cv_func_lchflags=no
18898fi
18899
18900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18901 conftest$ac_exeext conftest.$ac_ext
18902fi
18903{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18904echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18905if test $ac_cv_func_lchflags = yes; then
18906 ac_cv_have_lchflags="yes"
18907else
18908 ac_cv_have_lchflags="no"
18909fi
18910
18911fi
18912if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018913
18914cat >>confdefs.h <<\_ACEOF
18915#define HAVE_LCHFLAGS 1
18916_ACEOF
18917
18918fi
18919
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018920case $ac_sys_system/$ac_sys_release in
18921Darwin/*)
18922 _CUR_CFLAGS="${CFLAGS}"
18923 _CUR_LDFLAGS="${LDFLAGS}"
18924 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18925 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18926 ;;
18927esac
18928
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018929{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18930echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018931if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018932 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018933else
18934 ac_check_lib_save_LIBS=$LIBS
18935LIBS="-lz $LIBS"
18936cat >conftest.$ac_ext <<_ACEOF
18937/* confdefs.h. */
18938_ACEOF
18939cat confdefs.h >>conftest.$ac_ext
18940cat >>conftest.$ac_ext <<_ACEOF
18941/* end confdefs.h. */
18942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018943/* Override any GCC internal prototype to avoid an error.
18944 Use char because int might match the return type of a GCC
18945 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018946#ifdef __cplusplus
18947extern "C"
18948#endif
18949char inflateCopy ();
18950int
18951main ()
18952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018953return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018954 ;
18955 return 0;
18956}
18957_ACEOF
18958rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018959if { (ac_try="$ac_link"
18960case "(($ac_try" in
18961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18962 *) ac_try_echo=$ac_try;;
18963esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018965 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018966 ac_status=$?
18967 grep -v '^ *+' conftest.er1 >conftest.err
18968 rm -f conftest.er1
18969 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018971 (exit $ac_status); } && {
18972 test -z "$ac_c_werror_flag" ||
18973 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018974 } && test -s conftest$ac_exeext &&
18975 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018976 ac_cv_lib_z_inflateCopy=yes
18977else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018978 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018979sed 's/^/| /' conftest.$ac_ext >&5
18980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018981 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018983
18984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018985 conftest$ac_exeext conftest.$ac_ext
18986LIBS=$ac_check_lib_save_LIBS
18987fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018988{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18989echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18990if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018991
18992cat >>confdefs.h <<\_ACEOF
18993#define HAVE_ZLIB_COPY 1
18994_ACEOF
18995
18996fi
18997
18998
18999case $ac_sys_system/$ac_sys_release in
19000Darwin/*)
19001 CFLAGS="${_CUR_CFLAGS}"
19002 LDFLAGS="${_CUR_LDFLAGS}"
19003 ;;
19004esac
19005
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019006{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19007echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019009/* confdefs.h. */
19010_ACEOF
19011cat confdefs.h >>conftest.$ac_ext
19012cat >>conftest.$ac_ext <<_ACEOF
19013/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019014
19015#include "confdefs.h"
19016#include <netdb.h>
19017
Martin v. Löwise9416172003-05-03 10:12:45 +000019018int
19019main ()
19020{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019021void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019022 ;
19023 return 0;
19024}
19025_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019026rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027if { (ac_try="$ac_link"
19028case "(($ac_try" in
19029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19030 *) ac_try_echo=$ac_try;;
19031esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019033 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019035 grep -v '^ *+' conftest.er1 >conftest.err
19036 rm -f conftest.er1
19037 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019039 (exit $ac_status); } && {
19040 test -z "$ac_c_werror_flag" ||
19041 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019042 } && test -s conftest$ac_exeext &&
19043 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019044
19045cat >>confdefs.h <<\_ACEOF
19046#define HAVE_HSTRERROR 1
19047_ACEOF
19048
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019049 { echo "$as_me:$LINENO: result: yes" >&5
19050echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019053sed 's/^/| /' conftest.$ac_ext >&5
19054
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019055 { echo "$as_me:$LINENO: result: no" >&5
19056echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019057
19058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019059
19060rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019061 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019062
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019063{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19064echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019065cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019066/* confdefs.h. */
19067_ACEOF
19068cat confdefs.h >>conftest.$ac_ext
19069cat >>conftest.$ac_ext <<_ACEOF
19070/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019071
19072#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019073#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019074#include <sys/socket.h>
19075#include <netinet/in.h>
19076#include <arpa/inet.h>
19077
Martin v. Löwise9416172003-05-03 10:12:45 +000019078int
19079main ()
19080{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019081void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019082 ;
19083 return 0;
19084}
19085_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019086rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019087if { (ac_try="$ac_link"
19088case "(($ac_try" in
19089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19090 *) ac_try_echo=$ac_try;;
19091esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019093 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019095 grep -v '^ *+' conftest.er1 >conftest.err
19096 rm -f conftest.er1
19097 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019099 (exit $ac_status); } && {
19100 test -z "$ac_c_werror_flag" ||
19101 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019102 } && test -s conftest$ac_exeext &&
19103 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019104
19105cat >>confdefs.h <<\_ACEOF
19106#define HAVE_INET_ATON 1
19107_ACEOF
19108
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019109 { echo "$as_me:$LINENO: result: yes" >&5
19110echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019113sed 's/^/| /' conftest.$ac_ext >&5
19114
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019115 { echo "$as_me:$LINENO: result: no" >&5
19116echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019117
19118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019119
19120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019121 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019122
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019123{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19124echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019126/* confdefs.h. */
19127_ACEOF
19128cat confdefs.h >>conftest.$ac_ext
19129cat >>conftest.$ac_ext <<_ACEOF
19130/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019131
19132#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019133#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019134#include <sys/socket.h>
19135#include <netinet/in.h>
19136#include <arpa/inet.h>
19137
Martin v. Löwise9416172003-05-03 10:12:45 +000019138int
19139main ()
19140{
19141void* p = inet_pton
19142 ;
19143 return 0;
19144}
19145_ACEOF
19146rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019147if { (ac_try="$ac_compile"
19148case "(($ac_try" in
19149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19150 *) ac_try_echo=$ac_try;;
19151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019155 grep -v '^ *+' conftest.er1 >conftest.err
19156 rm -f conftest.er1
19157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019159 (exit $ac_status); } && {
19160 test -z "$ac_c_werror_flag" ||
19161 test ! -s conftest.err
19162 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019163
19164cat >>confdefs.h <<\_ACEOF
19165#define HAVE_INET_PTON 1
19166_ACEOF
19167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019168 { echo "$as_me:$LINENO: result: yes" >&5
19169echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019172sed 's/^/| /' conftest.$ac_ext >&5
19173
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019174 { echo "$as_me:$LINENO: result: no" >&5
19175echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019176
19177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019178
19179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019180
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019181# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019182{ echo "$as_me:$LINENO: checking for setgroups" >&5
19183echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019185/* confdefs.h. */
19186_ACEOF
19187cat confdefs.h >>conftest.$ac_ext
19188cat >>conftest.$ac_ext <<_ACEOF
19189/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019190
19191#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019192#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019193#ifdef HAVE_GRP_H
19194#include <grp.h>
19195#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019196
Martin v. Löwisd5843682002-11-21 20:41:28 +000019197int
19198main ()
19199{
19200void* p = setgroups
19201 ;
19202 return 0;
19203}
19204_ACEOF
19205rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019206if { (ac_try="$ac_compile"
19207case "(($ac_try" in
19208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19209 *) ac_try_echo=$ac_try;;
19210esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019214 grep -v '^ *+' conftest.er1 >conftest.err
19215 rm -f conftest.er1
19216 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019218 (exit $ac_status); } && {
19219 test -z "$ac_c_werror_flag" ||
19220 test ! -s conftest.err
19221 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019222
19223cat >>confdefs.h <<\_ACEOF
19224#define HAVE_SETGROUPS 1
19225_ACEOF
19226
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019227 { echo "$as_me:$LINENO: result: yes" >&5
19228echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019231sed 's/^/| /' conftest.$ac_ext >&5
19232
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019233 { echo "$as_me:$LINENO: result: no" >&5
19234echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019235
19236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019237
19238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019239
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019240# check for openpty and forkpty
19241
Martin v. Löwis11437992002-04-12 09:54:03 +000019242
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019243for ac_func in openpty
19244do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019245as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19246{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19247echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019248if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019250else
Martin v. Löwis11437992002-04-12 09:54:03 +000019251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019252/* confdefs.h. */
19253_ACEOF
19254cat confdefs.h >>conftest.$ac_ext
19255cat >>conftest.$ac_ext <<_ACEOF
19256/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019257/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19258 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19259#define $ac_func innocuous_$ac_func
19260
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019261/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019262 which can conflict with char $ac_func (); below.
19263 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019264 <limits.h> exists even on freestanding compilers. */
19265
19266#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019267# include <limits.h>
19268#else
19269# include <assert.h>
19270#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019271
19272#undef $ac_func
19273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019274/* Override any GCC internal prototype to avoid an error.
19275 Use char because int might match the return type of a GCC
19276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019277#ifdef __cplusplus
19278extern "C"
19279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019280char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019281/* The GNU C library defines this for functions which it implements
19282 to always fail with ENOSYS. Some functions are actually named
19283 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019284#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019285choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019286#endif
19287
Skip Montanaro6dead952003-09-25 14:50:04 +000019288int
19289main ()
19290{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019291return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019292 ;
19293 return 0;
19294}
19295_ACEOF
19296rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019297if { (ac_try="$ac_link"
19298case "(($ac_try" in
19299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19300 *) ac_try_echo=$ac_try;;
19301esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019303 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019305 grep -v '^ *+' conftest.er1 >conftest.err
19306 rm -f conftest.er1
19307 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019309 (exit $ac_status); } && {
19310 test -z "$ac_c_werror_flag" ||
19311 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019312 } && test -s conftest$ac_exeext &&
19313 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019317sed 's/^/| /' conftest.$ac_ext >&5
19318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019319 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019321
19322rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019323 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019324fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019325ac_res=`eval echo '${'$as_ac_var'}'`
19326 { echo "$as_me:$LINENO: result: $ac_res" >&5
19327echo "${ECHO_T}$ac_res" >&6; }
19328if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019329 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019330#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019331_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019332
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019333else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019334 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19335echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019336if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019337 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019338else
Martin v. Löwis11437992002-04-12 09:54:03 +000019339 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019340LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019341cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019342/* confdefs.h. */
19343_ACEOF
19344cat confdefs.h >>conftest.$ac_ext
19345cat >>conftest.$ac_ext <<_ACEOF
19346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019348/* Override any GCC internal prototype to avoid an error.
19349 Use char because int might match the return type of a GCC
19350 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019351#ifdef __cplusplus
19352extern "C"
19353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019354char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019355int
19356main ()
19357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019358return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019359 ;
19360 return 0;
19361}
19362_ACEOF
19363rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019364if { (ac_try="$ac_link"
19365case "(($ac_try" in
19366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19367 *) ac_try_echo=$ac_try;;
19368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019370 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019372 grep -v '^ *+' conftest.er1 >conftest.err
19373 rm -f conftest.er1
19374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019376 (exit $ac_status); } && {
19377 test -z "$ac_c_werror_flag" ||
19378 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019379 } && test -s conftest$ac_exeext &&
19380 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019381 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019384sed 's/^/| /' conftest.$ac_ext >&5
19385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019386 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019388
19389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019391LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019392fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019393{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19394echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19395if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019396 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019397#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019398_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019399 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019401 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19402echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019403if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019404 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019405else
19406 ac_check_lib_save_LIBS=$LIBS
19407LIBS="-lbsd $LIBS"
19408cat >conftest.$ac_ext <<_ACEOF
19409/* confdefs.h. */
19410_ACEOF
19411cat confdefs.h >>conftest.$ac_ext
19412cat >>conftest.$ac_ext <<_ACEOF
19413/* end confdefs.h. */
19414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019415/* Override any GCC internal prototype to avoid an error.
19416 Use char because int might match the return type of a GCC
19417 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019418#ifdef __cplusplus
19419extern "C"
19420#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019421char openpty ();
19422int
19423main ()
19424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019425return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019426 ;
19427 return 0;
19428}
19429_ACEOF
19430rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019431if { (ac_try="$ac_link"
19432case "(($ac_try" in
19433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19434 *) ac_try_echo=$ac_try;;
19435esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019437 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019438 ac_status=$?
19439 grep -v '^ *+' conftest.er1 >conftest.err
19440 rm -f conftest.er1
19441 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019443 (exit $ac_status); } && {
19444 test -z "$ac_c_werror_flag" ||
19445 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019446 } && test -s conftest$ac_exeext &&
19447 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019448 ac_cv_lib_bsd_openpty=yes
19449else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019450 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019451sed 's/^/| /' conftest.$ac_ext >&5
19452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019453 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019455
19456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019457 conftest$ac_exeext conftest.$ac_ext
19458LIBS=$ac_check_lib_save_LIBS
19459fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019460{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19461echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19462if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019463 cat >>confdefs.h <<\_ACEOF
19464#define HAVE_OPENPTY 1
19465_ACEOF
19466 LIBS="$LIBS -lbsd"
19467fi
19468
19469
19470fi
19471
Fred Drake8cef4cf2000-06-28 16:40:38 +000019472
19473fi
19474done
19475
Martin v. Löwis11437992002-04-12 09:54:03 +000019476
Fred Drake8cef4cf2000-06-28 16:40:38 +000019477for ac_func in forkpty
19478do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019479as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19480{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19481echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019482if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019483 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019484else
Martin v. Löwis11437992002-04-12 09:54:03 +000019485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019486/* confdefs.h. */
19487_ACEOF
19488cat confdefs.h >>conftest.$ac_ext
19489cat >>conftest.$ac_ext <<_ACEOF
19490/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019491/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19492 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19493#define $ac_func innocuous_$ac_func
19494
Fred Drake8cef4cf2000-06-28 16:40:38 +000019495/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019496 which can conflict with char $ac_func (); below.
19497 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019498 <limits.h> exists even on freestanding compilers. */
19499
19500#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019501# include <limits.h>
19502#else
19503# include <assert.h>
19504#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019505
19506#undef $ac_func
19507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019508/* Override any GCC internal prototype to avoid an error.
19509 Use char because int might match the return type of a GCC
19510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019511#ifdef __cplusplus
19512extern "C"
19513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019514char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019515/* The GNU C library defines this for functions which it implements
19516 to always fail with ENOSYS. Some functions are actually named
19517 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019518#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019519choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019520#endif
19521
Skip Montanaro6dead952003-09-25 14:50:04 +000019522int
19523main ()
19524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019525return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019526 ;
19527 return 0;
19528}
19529_ACEOF
19530rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019531if { (ac_try="$ac_link"
19532case "(($ac_try" in
19533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19534 *) ac_try_echo=$ac_try;;
19535esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019537 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019539 grep -v '^ *+' conftest.er1 >conftest.err
19540 rm -f conftest.er1
19541 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019543 (exit $ac_status); } && {
19544 test -z "$ac_c_werror_flag" ||
19545 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019546 } && test -s conftest$ac_exeext &&
19547 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019548 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019551sed 's/^/| /' conftest.$ac_ext >&5
19552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019553 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019555
19556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019557 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019558fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019559ac_res=`eval echo '${'$as_ac_var'}'`
19560 { echo "$as_me:$LINENO: result: $ac_res" >&5
19561echo "${ECHO_T}$ac_res" >&6; }
19562if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019564#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019565_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019566
Fred Drake8cef4cf2000-06-28 16:40:38 +000019567else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019568 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19569echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019570if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019571 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019572else
Martin v. Löwis11437992002-04-12 09:54:03 +000019573 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019574LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019575cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019576/* confdefs.h. */
19577_ACEOF
19578cat confdefs.h >>conftest.$ac_ext
19579cat >>conftest.$ac_ext <<_ACEOF
19580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019582/* Override any GCC internal prototype to avoid an error.
19583 Use char because int might match the return type of a GCC
19584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019585#ifdef __cplusplus
19586extern "C"
19587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019588char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019589int
19590main ()
19591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019592return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019593 ;
19594 return 0;
19595}
19596_ACEOF
19597rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019598if { (ac_try="$ac_link"
19599case "(($ac_try" in
19600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19601 *) ac_try_echo=$ac_try;;
19602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019604 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019606 grep -v '^ *+' conftest.er1 >conftest.err
19607 rm -f conftest.er1
19608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019610 (exit $ac_status); } && {
19611 test -z "$ac_c_werror_flag" ||
19612 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019613 } && test -s conftest$ac_exeext &&
19614 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019615 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019616else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019618sed 's/^/| /' conftest.$ac_ext >&5
19619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019620 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019622
19623rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019624 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019625LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019626fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019627{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19628echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19629if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019631#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019632_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019633 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019635 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19636echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019637if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019638 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019639else
19640 ac_check_lib_save_LIBS=$LIBS
19641LIBS="-lbsd $LIBS"
19642cat >conftest.$ac_ext <<_ACEOF
19643/* confdefs.h. */
19644_ACEOF
19645cat confdefs.h >>conftest.$ac_ext
19646cat >>conftest.$ac_ext <<_ACEOF
19647/* end confdefs.h. */
19648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019649/* Override any GCC internal prototype to avoid an error.
19650 Use char because int might match the return type of a GCC
19651 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019652#ifdef __cplusplus
19653extern "C"
19654#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019655char forkpty ();
19656int
19657main ()
19658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019659return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019660 ;
19661 return 0;
19662}
19663_ACEOF
19664rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019665if { (ac_try="$ac_link"
19666case "(($ac_try" in
19667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19668 *) ac_try_echo=$ac_try;;
19669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019671 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019672 ac_status=$?
19673 grep -v '^ *+' conftest.er1 >conftest.err
19674 rm -f conftest.er1
19675 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019677 (exit $ac_status); } && {
19678 test -z "$ac_c_werror_flag" ||
19679 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019680 } && test -s conftest$ac_exeext &&
19681 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019682 ac_cv_lib_bsd_forkpty=yes
19683else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019684 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019685sed 's/^/| /' conftest.$ac_ext >&5
19686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019687 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019689
19690rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019691 conftest$ac_exeext conftest.$ac_ext
19692LIBS=$ac_check_lib_save_LIBS
19693fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019694{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19695echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19696if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019697 cat >>confdefs.h <<\_ACEOF
19698#define HAVE_FORKPTY 1
19699_ACEOF
19700 LIBS="$LIBS -lbsd"
19701fi
19702
19703
19704fi
19705
Fred Drake8cef4cf2000-06-28 16:40:38 +000019706
19707fi
19708done
19709
Jack Jansendd19cf82001-12-06 22:36:17 +000019710
Christian Heimesb186d002008-03-18 15:15:01 +000019711# Stuff for expat.
19712
19713for ac_func in memmove
19714do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019715as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19716{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19717echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019718if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019719 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019720else
19721 cat >conftest.$ac_ext <<_ACEOF
19722/* confdefs.h. */
19723_ACEOF
19724cat confdefs.h >>conftest.$ac_ext
19725cat >>conftest.$ac_ext <<_ACEOF
19726/* end confdefs.h. */
19727/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19728 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19729#define $ac_func innocuous_$ac_func
19730
19731/* System header to define __stub macros and hopefully few prototypes,
19732 which can conflict with char $ac_func (); below.
19733 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19734 <limits.h> exists even on freestanding compilers. */
19735
19736#ifdef __STDC__
19737# include <limits.h>
19738#else
19739# include <assert.h>
19740#endif
19741
19742#undef $ac_func
19743
19744/* Override any GCC internal prototype to avoid an error.
19745 Use char because int might match the return type of a GCC
19746 builtin and then its argument prototype would still apply. */
19747#ifdef __cplusplus
19748extern "C"
19749#endif
19750char $ac_func ();
19751/* The GNU C library defines this for functions which it implements
19752 to always fail with ENOSYS. Some functions are actually named
19753 something starting with __ and the normal name is an alias. */
19754#if defined __stub_$ac_func || defined __stub___$ac_func
19755choke me
19756#endif
19757
19758int
19759main ()
19760{
19761return $ac_func ();
19762 ;
19763 return 0;
19764}
19765_ACEOF
19766rm -f conftest.$ac_objext conftest$ac_exeext
19767if { (ac_try="$ac_link"
19768case "(($ac_try" in
19769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19770 *) ac_try_echo=$ac_try;;
19771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019773 (eval "$ac_link") 2>conftest.er1
19774 ac_status=$?
19775 grep -v '^ *+' conftest.er1 >conftest.err
19776 rm -f conftest.er1
19777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019779 (exit $ac_status); } && {
19780 test -z "$ac_c_werror_flag" ||
19781 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019782 } && test -s conftest$ac_exeext &&
19783 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019784 eval "$as_ac_var=yes"
19785else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019786 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019787sed 's/^/| /' conftest.$ac_ext >&5
19788
19789 eval "$as_ac_var=no"
19790fi
19791
19792rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19793 conftest$ac_exeext conftest.$ac_ext
19794fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019795ac_res=`eval echo '${'$as_ac_var'}'`
19796 { echo "$as_me:$LINENO: result: $ac_res" >&5
19797echo "${ECHO_T}$ac_res" >&6; }
19798if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019799 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019800#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019801_ACEOF
19802
19803fi
19804done
19805
19806
Michael W. Hudson54241132001-12-07 15:38:26 +000019807# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019808
19809
19810
19811
19812
19813
Fred Drake8cef4cf2000-06-28 16:40:38 +000019814for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19815do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019816as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19817{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19818echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019819if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019820 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019821else
Martin v. Löwis11437992002-04-12 09:54:03 +000019822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019823/* confdefs.h. */
19824_ACEOF
19825cat confdefs.h >>conftest.$ac_ext
19826cat >>conftest.$ac_ext <<_ACEOF
19827/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019828/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19829 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19830#define $ac_func innocuous_$ac_func
19831
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019832/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019833 which can conflict with char $ac_func (); below.
19834 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019835 <limits.h> exists even on freestanding compilers. */
19836
19837#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019838# include <limits.h>
19839#else
19840# include <assert.h>
19841#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019842
19843#undef $ac_func
19844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019845/* Override any GCC internal prototype to avoid an error.
19846 Use char because int might match the return type of a GCC
19847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019848#ifdef __cplusplus
19849extern "C"
19850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019851char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019852/* The GNU C library defines this for functions which it implements
19853 to always fail with ENOSYS. Some functions are actually named
19854 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019855#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019856choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019857#endif
19858
Skip Montanaro6dead952003-09-25 14:50:04 +000019859int
19860main ()
19861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019863 ;
19864 return 0;
19865}
19866_ACEOF
19867rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019868if { (ac_try="$ac_link"
19869case "(($ac_try" in
19870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19871 *) ac_try_echo=$ac_try;;
19872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019874 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019876 grep -v '^ *+' conftest.er1 >conftest.err
19877 rm -f conftest.er1
19878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019880 (exit $ac_status); } && {
19881 test -z "$ac_c_werror_flag" ||
19882 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019883 } && test -s conftest$ac_exeext &&
19884 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019886else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019888sed 's/^/| /' conftest.$ac_ext >&5
19889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019890 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019892
19893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019894 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019895fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019896ac_res=`eval echo '${'$as_ac_var'}'`
19897 { echo "$as_me:$LINENO: result: $ac_res" >&5
19898echo "${ECHO_T}$ac_res" >&6; }
19899if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019900 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019901#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019902_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019903
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019904fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019905done
19906
Michael W. Hudson54241132001-12-07 15:38:26 +000019907
Martin v. Löwis11437992002-04-12 09:54:03 +000019908
19909
19910
Christian Heimesb186d002008-03-18 15:15:01 +000019911for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019912do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019913as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19914{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19915echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019916if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019918else
Martin v. Löwis11437992002-04-12 09:54:03 +000019919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019920/* confdefs.h. */
19921_ACEOF
19922cat confdefs.h >>conftest.$ac_ext
19923cat >>conftest.$ac_ext <<_ACEOF
19924/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019925/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19926 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19927#define $ac_func innocuous_$ac_func
19928
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019929/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019930 which can conflict with char $ac_func (); below.
19931 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019932 <limits.h> exists even on freestanding compilers. */
19933
19934#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019935# include <limits.h>
19936#else
19937# include <assert.h>
19938#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019939
19940#undef $ac_func
19941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019942/* Override any GCC internal prototype to avoid an error.
19943 Use char because int might match the return type of a GCC
19944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019945#ifdef __cplusplus
19946extern "C"
19947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019948char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019949/* The GNU C library defines this for functions which it implements
19950 to always fail with ENOSYS. Some functions are actually named
19951 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019952#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019953choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019954#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019955
Skip Montanaro6dead952003-09-25 14:50:04 +000019956int
19957main ()
19958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019959return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019960 ;
19961 return 0;
19962}
19963_ACEOF
19964rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019965if { (ac_try="$ac_link"
19966case "(($ac_try" in
19967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19968 *) ac_try_echo=$ac_try;;
19969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019971 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019973 grep -v '^ *+' conftest.er1 >conftest.err
19974 rm -f conftest.er1
19975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019977 (exit $ac_status); } && {
19978 test -z "$ac_c_werror_flag" ||
19979 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019980 } && test -s conftest$ac_exeext &&
19981 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019985sed 's/^/| /' conftest.$ac_ext >&5
19986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019987 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019989
19990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019991 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019992fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019993ac_res=`eval echo '${'$as_ac_var'}'`
19994 { echo "$as_me:$LINENO: result: $ac_res" >&5
19995echo "${ECHO_T}$ac_res" >&6; }
19996if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019997 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019998#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019999_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020000
Martin v. Löwis1142de32002-03-29 16:28:31 +000020001else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020002 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020003 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020004 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20005 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020006esac
20007
Martin v. Löwis1142de32002-03-29 16:28:31 +000020008fi
20009done
20010
20011
Martin v. Löwis11437992002-04-12 09:54:03 +000020012
Martin v. Löwis1142de32002-03-29 16:28:31 +000020013for ac_func in getpgrp
20014do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020015as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20016{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20017echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020018if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020019 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020020else
Martin v. Löwis11437992002-04-12 09:54:03 +000020021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020022/* confdefs.h. */
20023_ACEOF
20024cat confdefs.h >>conftest.$ac_ext
20025cat >>conftest.$ac_ext <<_ACEOF
20026/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020027/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20028 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20029#define $ac_func innocuous_$ac_func
20030
Martin v. Löwis1142de32002-03-29 16:28:31 +000020031/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020032 which can conflict with char $ac_func (); below.
20033 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020034 <limits.h> exists even on freestanding compilers. */
20035
20036#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020037# include <limits.h>
20038#else
20039# include <assert.h>
20040#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020041
20042#undef $ac_func
20043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020044/* Override any GCC internal prototype to avoid an error.
20045 Use char because int might match the return type of a GCC
20046 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020047#ifdef __cplusplus
20048extern "C"
20049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020050char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020051/* The GNU C library defines this for functions which it implements
20052 to always fail with ENOSYS. Some functions are actually named
20053 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020054#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020055choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020056#endif
20057
Skip Montanaro6dead952003-09-25 14:50:04 +000020058int
20059main ()
20060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020061return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020062 ;
20063 return 0;
20064}
20065_ACEOF
20066rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020067if { (ac_try="$ac_link"
20068case "(($ac_try" in
20069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20070 *) ac_try_echo=$ac_try;;
20071esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020073 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020075 grep -v '^ *+' conftest.er1 >conftest.err
20076 rm -f conftest.er1
20077 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020079 (exit $ac_status); } && {
20080 test -z "$ac_c_werror_flag" ||
20081 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020082 } && test -s conftest$ac_exeext &&
20083 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020084 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020087sed 's/^/| /' conftest.$ac_ext >&5
20088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020089 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020091
20092rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020093 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020094fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020095ac_res=`eval echo '${'$as_ac_var'}'`
20096 { echo "$as_me:$LINENO: result: $ac_res" >&5
20097echo "${ECHO_T}$ac_res" >&6; }
20098if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020099 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020100#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020101_ACEOF
20102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020103/* confdefs.h. */
20104_ACEOF
20105cat confdefs.h >>conftest.$ac_ext
20106cat >>conftest.$ac_ext <<_ACEOF
20107/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020108#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020109int
20110main ()
20111{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020112getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 ;
20114 return 0;
20115}
20116_ACEOF
20117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020118if { (ac_try="$ac_compile"
20119case "(($ac_try" in
20120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20121 *) ac_try_echo=$ac_try;;
20122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020126 grep -v '^ *+' conftest.er1 >conftest.err
20127 rm -f conftest.er1
20128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020130 (exit $ac_status); } && {
20131 test -z "$ac_c_werror_flag" ||
20132 test ! -s conftest.err
20133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020134
20135cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020136#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020137_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020138
Martin v. Löwis11437992002-04-12 09:54:03 +000020139
Guido van Rossumf78abae1997-01-21 22:02:36 +000020140else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020142sed 's/^/| /' conftest.$ac_ext >&5
20143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020144
Guido van Rossum627b2d71993-12-24 10:39:16 +000020145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020146
20147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020148
Guido van Rossum627b2d71993-12-24 10:39:16 +000020149fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020150done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020151
Jack Jansen150753c2003-03-29 22:07:47 +000020152
20153for ac_func in setpgrp
20154do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020155as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20156{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20157echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020158if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020159 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020160else
Martin v. Löwis11437992002-04-12 09:54:03 +000020161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020162/* confdefs.h. */
20163_ACEOF
20164cat confdefs.h >>conftest.$ac_ext
20165cat >>conftest.$ac_ext <<_ACEOF
20166/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020167/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20168 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20169#define $ac_func innocuous_$ac_func
20170
Jack Jansen150753c2003-03-29 22:07:47 +000020171/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020172 which can conflict with char $ac_func (); below.
20173 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020174 <limits.h> exists even on freestanding compilers. */
20175
20176#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020177# include <limits.h>
20178#else
20179# include <assert.h>
20180#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020181
20182#undef $ac_func
20183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020184/* Override any GCC internal prototype to avoid an error.
20185 Use char because int might match the return type of a GCC
20186 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020187#ifdef __cplusplus
20188extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020189#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020190char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020191/* The GNU C library defines this for functions which it implements
20192 to always fail with ENOSYS. Some functions are actually named
20193 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020194#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020195choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020196#endif
20197
Skip Montanaro6dead952003-09-25 14:50:04 +000020198int
20199main ()
20200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020201return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020202 ;
20203 return 0;
20204}
20205_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020206rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020207if { (ac_try="$ac_link"
20208case "(($ac_try" in
20209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20210 *) ac_try_echo=$ac_try;;
20211esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020213 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020215 grep -v '^ *+' conftest.er1 >conftest.err
20216 rm -f conftest.er1
20217 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020219 (exit $ac_status); } && {
20220 test -z "$ac_c_werror_flag" ||
20221 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020222 } && test -s conftest$ac_exeext &&
20223 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020224 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020225else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020227sed 's/^/| /' conftest.$ac_ext >&5
20228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020229 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020231
20232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020233 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020234fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020235ac_res=`eval echo '${'$as_ac_var'}'`
20236 { echo "$as_me:$LINENO: result: $ac_res" >&5
20237echo "${ECHO_T}$ac_res" >&6; }
20238if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020239 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020240#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020241_ACEOF
20242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020243/* confdefs.h. */
20244_ACEOF
20245cat confdefs.h >>conftest.$ac_ext
20246cat >>conftest.$ac_ext <<_ACEOF
20247/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020248#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020249int
20250main ()
20251{
20252setpgrp(0,0);
20253 ;
20254 return 0;
20255}
20256_ACEOF
20257rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020258if { (ac_try="$ac_compile"
20259case "(($ac_try" in
20260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20261 *) ac_try_echo=$ac_try;;
20262esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020264 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020266 grep -v '^ *+' conftest.er1 >conftest.err
20267 rm -f conftest.er1
20268 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020270 (exit $ac_status); } && {
20271 test -z "$ac_c_werror_flag" ||
20272 test ! -s conftest.err
20273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020274
20275cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020276#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020277_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020278
Jack Jansen150753c2003-03-29 22:07:47 +000020279
20280else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020282sed 's/^/| /' conftest.$ac_ext >&5
20283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020284
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020286
20287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020288
20289fi
20290done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020291
Martin v. Löwis11437992002-04-12 09:54:03 +000020292
Thomas Wouters3a584202000-08-05 23:28:51 +000020293for ac_func in gettimeofday
20294do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020295as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20296{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20297echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020298if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020299 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020300else
Martin v. Löwis11437992002-04-12 09:54:03 +000020301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020302/* confdefs.h. */
20303_ACEOF
20304cat confdefs.h >>conftest.$ac_ext
20305cat >>conftest.$ac_ext <<_ACEOF
20306/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020307/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20308 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20309#define $ac_func innocuous_$ac_func
20310
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020311/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020312 which can conflict with char $ac_func (); below.
20313 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020314 <limits.h> exists even on freestanding compilers. */
20315
20316#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020317# include <limits.h>
20318#else
20319# include <assert.h>
20320#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020321
20322#undef $ac_func
20323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020324/* Override any GCC internal prototype to avoid an error.
20325 Use char because int might match the return type of a GCC
20326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020327#ifdef __cplusplus
20328extern "C"
20329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020330char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020331/* The GNU C library defines this for functions which it implements
20332 to always fail with ENOSYS. Some functions are actually named
20333 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020334#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020335choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020336#endif
20337
Skip Montanaro6dead952003-09-25 14:50:04 +000020338int
20339main ()
20340{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020341return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020342 ;
20343 return 0;
20344}
20345_ACEOF
20346rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020347if { (ac_try="$ac_link"
20348case "(($ac_try" in
20349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20350 *) ac_try_echo=$ac_try;;
20351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020353 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020355 grep -v '^ *+' conftest.er1 >conftest.err
20356 rm -f conftest.er1
20357 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020359 (exit $ac_status); } && {
20360 test -z "$ac_c_werror_flag" ||
20361 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020362 } && test -s conftest$ac_exeext &&
20363 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020364 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020367sed 's/^/| /' conftest.$ac_ext >&5
20368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020369 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020371
20372rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020373 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020374fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020375ac_res=`eval echo '${'$as_ac_var'}'`
20376 { echo "$as_me:$LINENO: result: $ac_res" >&5
20377echo "${ECHO_T}$ac_res" >&6; }
20378if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020379 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020380#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020381_ACEOF
20382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020383/* confdefs.h. */
20384_ACEOF
20385cat confdefs.h >>conftest.$ac_ext
20386cat >>conftest.$ac_ext <<_ACEOF
20387/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020388#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020389int
20390main ()
20391{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020392gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020393 ;
20394 return 0;
20395}
20396_ACEOF
20397rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020398if { (ac_try="$ac_compile"
20399case "(($ac_try" in
20400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20401 *) ac_try_echo=$ac_try;;
20402esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020406 grep -v '^ *+' conftest.er1 >conftest.err
20407 rm -f conftest.er1
20408 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410 (exit $ac_status); } && {
20411 test -z "$ac_c_werror_flag" ||
20412 test ! -s conftest.err
20413 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020414 :
20415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020417sed 's/^/| /' conftest.$ac_ext >&5
20418
Martin v. Löwis11437992002-04-12 09:54:03 +000020419
20420cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020421#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020422_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020423
Martin v. Löwis11437992002-04-12 09:54:03 +000020424
Guido van Rossum627b2d71993-12-24 10:39:16 +000020425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020426
20427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020429fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020430done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020431
Michael W. Hudson54241132001-12-07 15:38:26 +000020432
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020433{ echo "$as_me:$LINENO: checking for major" >&5
20434echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020435cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020436/* confdefs.h. */
20437_ACEOF
20438cat confdefs.h >>conftest.$ac_ext
20439cat >>conftest.$ac_ext <<_ACEOF
20440/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020441
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020442#if defined(MAJOR_IN_MKDEV)
20443#include <sys/mkdev.h>
20444#elif defined(MAJOR_IN_SYSMACROS)
20445#include <sys/sysmacros.h>
20446#else
20447#include <sys/types.h>
20448#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020449
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020450int
20451main ()
20452{
20453
20454 makedev(major(0),minor(0));
20455
20456 ;
20457 return 0;
20458}
20459_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020460rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020461if { (ac_try="$ac_link"
20462case "(($ac_try" in
20463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20464 *) ac_try_echo=$ac_try;;
20465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020467 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020469 grep -v '^ *+' conftest.er1 >conftest.err
20470 rm -f conftest.er1
20471 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020473 (exit $ac_status); } && {
20474 test -z "$ac_c_werror_flag" ||
20475 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020476 } && test -s conftest$ac_exeext &&
20477 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020478
20479
20480cat >>confdefs.h <<\_ACEOF
20481#define HAVE_DEVICE_MACROS 1
20482_ACEOF
20483
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020484 { echo "$as_me:$LINENO: result: yes" >&5
20485echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020486
20487else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020489sed 's/^/| /' conftest.$ac_ext >&5
20490
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020492 { echo "$as_me:$LINENO: result: no" >&5
20493echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020494
20495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020496
20497rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020498 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020499
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020500# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020501# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020502{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20503echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020504cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020505/* confdefs.h. */
20506_ACEOF
20507cat confdefs.h >>conftest.$ac_ext
20508cat >>conftest.$ac_ext <<_ACEOF
20509/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020510
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020511#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020512#include <sys/socket.h>
20513#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020514#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020515
Martin v. Löwis11437992002-04-12 09:54:03 +000020516int
20517main ()
20518{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020519getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020520 ;
20521 return 0;
20522}
20523_ACEOF
20524rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020525if { (ac_try="$ac_link"
20526case "(($ac_try" in
20527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20528 *) ac_try_echo=$ac_try;;
20529esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020531 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020533 grep -v '^ *+' conftest.er1 >conftest.err
20534 rm -f conftest.er1
20535 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020537 (exit $ac_status); } && {
20538 test -z "$ac_c_werror_flag" ||
20539 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020540 } && test -s conftest$ac_exeext &&
20541 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020542 have_getaddrinfo=yes
20543else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020544 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020545sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020546
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020547 have_getaddrinfo=no
20548fi
20549
20550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20551 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020552{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20553echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020554if test $have_getaddrinfo = yes
20555then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020556 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20557echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020558 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020559 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020560else
20561 if test "$cross_compiling" = yes; then
20562 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020563else
Martin v. Löwis11437992002-04-12 09:54:03 +000020564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020565/* confdefs.h. */
20566_ACEOF
20567cat confdefs.h >>conftest.$ac_ext
20568cat >>conftest.$ac_ext <<_ACEOF
20569/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020570
20571#include <sys/types.h>
20572#include <netdb.h>
20573#include <string.h>
20574#include <sys/socket.h>
20575#include <netinet/in.h>
20576
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020577int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020578{
20579 int passive, gaierr, inet4 = 0, inet6 = 0;
20580 struct addrinfo hints, *ai, *aitop;
20581 char straddr[INET6_ADDRSTRLEN], strport[16];
20582
20583 for (passive = 0; passive <= 1; passive++) {
20584 memset(&hints, 0, sizeof(hints));
20585 hints.ai_family = AF_UNSPEC;
20586 hints.ai_flags = passive ? AI_PASSIVE : 0;
20587 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020588 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020589 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20590 (void)gai_strerror(gaierr);
20591 goto bad;
20592 }
20593 for (ai = aitop; ai; ai = ai->ai_next) {
20594 if (ai->ai_addr == NULL ||
20595 ai->ai_addrlen == 0 ||
20596 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20597 straddr, sizeof(straddr), strport, sizeof(strport),
20598 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20599 goto bad;
20600 }
20601 switch (ai->ai_family) {
20602 case AF_INET:
20603 if (strcmp(strport, "54321") != 0) {
20604 goto bad;
20605 }
20606 if (passive) {
20607 if (strcmp(straddr, "0.0.0.0") != 0) {
20608 goto bad;
20609 }
20610 } else {
20611 if (strcmp(straddr, "127.0.0.1") != 0) {
20612 goto bad;
20613 }
20614 }
20615 inet4++;
20616 break;
20617 case AF_INET6:
20618 if (strcmp(strport, "54321") != 0) {
20619 goto bad;
20620 }
20621 if (passive) {
20622 if (strcmp(straddr, "::") != 0) {
20623 goto bad;
20624 }
20625 } else {
20626 if (strcmp(straddr, "::1") != 0) {
20627 goto bad;
20628 }
20629 }
20630 inet6++;
20631 break;
20632 case AF_UNSPEC:
20633 goto bad;
20634 break;
20635 default:
20636 /* another family support? */
20637 break;
20638 }
20639 }
20640 }
20641
20642 if (!(inet4 == 0 || inet4 == 2))
20643 goto bad;
20644 if (!(inet6 == 0 || inet6 == 2))
20645 goto bad;
20646
20647 if (aitop)
20648 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020649 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020650
20651 bad:
20652 if (aitop)
20653 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020654 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020655}
20656
Martin v. Löwis11437992002-04-12 09:54:03 +000020657_ACEOF
20658rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020659if { (ac_try="$ac_link"
20660case "(($ac_try" in
20661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20662 *) ac_try_echo=$ac_try;;
20663esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020665 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020666 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020669 { (case "(($ac_try" in
20670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20671 *) ac_try_echo=$ac_try;;
20672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020674 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020678 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020680 echo "$as_me: program exited with status $ac_status" >&5
20681echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020682sed 's/^/| /' conftest.$ac_ext >&5
20683
Martin v. Löwis11437992002-04-12 09:54:03 +000020684( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020685ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020687rm -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 +000020688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020689
20690
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020691fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020692
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020694
Mark Dickinson2df5d282009-12-31 21:22:50 +000020695if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020696then
20697 if test $ipv6 = yes
20698 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020699 echo 'Fatal: You must get working getaddrinfo() function.'
20700 echo ' or you can specify "--disable-ipv6"'.
20701 exit 1
20702 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020703else
Martin v. Löwis11437992002-04-12 09:54:03 +000020704
20705cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020706#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020707_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020708
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020710
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020711for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020712do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020713as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20714{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20715echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020716if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020717 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020718else
Martin v. Löwis11437992002-04-12 09:54:03 +000020719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020720/* confdefs.h. */
20721_ACEOF
20722cat confdefs.h >>conftest.$ac_ext
20723cat >>conftest.$ac_ext <<_ACEOF
20724/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020725/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20726 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20727#define $ac_func innocuous_$ac_func
20728
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020729/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020730 which can conflict with char $ac_func (); below.
20731 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020732 <limits.h> exists even on freestanding compilers. */
20733
20734#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020735# include <limits.h>
20736#else
20737# include <assert.h>
20738#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020739
20740#undef $ac_func
20741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742/* Override any GCC internal prototype to avoid an error.
20743 Use char because int might match the return type of a GCC
20744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020745#ifdef __cplusplus
20746extern "C"
20747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020748char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020749/* The GNU C library defines this for functions which it implements
20750 to always fail with ENOSYS. Some functions are actually named
20751 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020752#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020753choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020754#endif
20755
Skip Montanaro6dead952003-09-25 14:50:04 +000020756int
20757main ()
20758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020759return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020760 ;
20761 return 0;
20762}
20763_ACEOF
20764rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020765if { (ac_try="$ac_link"
20766case "(($ac_try" in
20767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20768 *) ac_try_echo=$ac_try;;
20769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020771 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020773 grep -v '^ *+' conftest.er1 >conftest.err
20774 rm -f conftest.er1
20775 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020777 (exit $ac_status); } && {
20778 test -z "$ac_c_werror_flag" ||
20779 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020780 } && test -s conftest$ac_exeext &&
20781 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020785sed 's/^/| /' conftest.$ac_ext >&5
20786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020787 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020789
20790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020791 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020792fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020793ac_res=`eval echo '${'$as_ac_var'}'`
20794 { echo "$as_me:$LINENO: result: $ac_res" >&5
20795echo "${ECHO_T}$ac_res" >&6; }
20796if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020797 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020798#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020799_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020800
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020801fi
20802done
20803
Michael W. Hudson54241132001-12-07 15:38:26 +000020804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020805# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020806{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20807echo $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 +000020808if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020810else
Martin v. Löwis11437992002-04-12 09:54:03 +000020811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020812/* confdefs.h. */
20813_ACEOF
20814cat confdefs.h >>conftest.$ac_ext
20815cat >>conftest.$ac_ext <<_ACEOF
20816/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020817#include <sys/types.h>
20818#include <sys/time.h>
20819#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020820
Martin v. Löwis11437992002-04-12 09:54:03 +000020821int
20822main ()
20823{
20824if ((struct tm *) 0)
20825return 0;
20826 ;
20827 return 0;
20828}
20829_ACEOF
20830rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020831if { (ac_try="$ac_compile"
20832case "(($ac_try" in
20833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20834 *) ac_try_echo=$ac_try;;
20835esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020839 grep -v '^ *+' conftest.er1 >conftest.err
20840 rm -f conftest.er1
20841 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020843 (exit $ac_status); } && {
20844 test -z "$ac_c_werror_flag" ||
20845 test ! -s conftest.err
20846 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020847 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020850sed 's/^/| /' conftest.$ac_ext >&5
20851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020852 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020854
20855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020856fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020857{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20858echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020859if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020860
20861cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020862#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020863_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020864
20865fi
20866
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020867{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20868echo $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 +000020869if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020871else
Martin v. Löwis11437992002-04-12 09:54:03 +000020872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020873/* confdefs.h. */
20874_ACEOF
20875cat confdefs.h >>conftest.$ac_ext
20876cat >>conftest.$ac_ext <<_ACEOF
20877/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020878#include <sys/types.h>
20879#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020880
Martin v. Löwis11437992002-04-12 09:54:03 +000020881int
20882main ()
20883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020884struct tm tm;
20885 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020886 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020887 ;
20888 return 0;
20889}
20890_ACEOF
20891rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020892if { (ac_try="$ac_compile"
20893case "(($ac_try" in
20894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20895 *) ac_try_echo=$ac_try;;
20896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020900 grep -v '^ *+' conftest.er1 >conftest.err
20901 rm -f conftest.er1
20902 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020904 (exit $ac_status); } && {
20905 test -z "$ac_c_werror_flag" ||
20906 test ! -s conftest.err
20907 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020908 ac_cv_struct_tm=time.h
20909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020911sed 's/^/| /' conftest.$ac_ext >&5
20912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020913 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020915
20916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020917fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020918{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20919echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020920if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020921
20922cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020923#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020924_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020925
20926fi
20927
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020928{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20929echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020930if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020932else
Martin v. Löwis11437992002-04-12 09:54:03 +000020933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020934/* confdefs.h. */
20935_ACEOF
20936cat confdefs.h >>conftest.$ac_ext
20937cat >>conftest.$ac_ext <<_ACEOF
20938/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020939#include <sys/types.h>
20940#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020941
20942
Martin v. Löwis11437992002-04-12 09:54:03 +000020943int
20944main ()
20945{
20946static struct tm ac_aggr;
20947if (ac_aggr.tm_zone)
20948return 0;
20949 ;
20950 return 0;
20951}
20952_ACEOF
20953rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020954if { (ac_try="$ac_compile"
20955case "(($ac_try" in
20956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20957 *) ac_try_echo=$ac_try;;
20958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020962 grep -v '^ *+' conftest.er1 >conftest.err
20963 rm -f conftest.er1
20964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020966 (exit $ac_status); } && {
20967 test -z "$ac_c_werror_flag" ||
20968 test ! -s conftest.err
20969 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020970 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020971else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020973sed 's/^/| /' conftest.$ac_ext >&5
20974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020976/* confdefs.h. */
20977_ACEOF
20978cat confdefs.h >>conftest.$ac_ext
20979cat >>conftest.$ac_ext <<_ACEOF
20980/* end confdefs.h. */
20981#include <sys/types.h>
20982#include <$ac_cv_struct_tm>
20983
20984
20985int
20986main ()
20987{
20988static struct tm ac_aggr;
20989if (sizeof ac_aggr.tm_zone)
20990return 0;
20991 ;
20992 return 0;
20993}
20994_ACEOF
20995rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020996if { (ac_try="$ac_compile"
20997case "(($ac_try" in
20998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20999 *) ac_try_echo=$ac_try;;
21000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021002 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021004 grep -v '^ *+' conftest.er1 >conftest.err
21005 rm -f conftest.er1
21006 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021008 (exit $ac_status); } && {
21009 test -z "$ac_c_werror_flag" ||
21010 test ! -s conftest.err
21011 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021012 ac_cv_member_struct_tm_tm_zone=yes
21013else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021015sed 's/^/| /' conftest.$ac_ext >&5
21016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021017 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021019
21020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021022
21023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021024fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021025{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21026echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21027if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021028
21029cat >>confdefs.h <<_ACEOF
21030#define HAVE_STRUCT_TM_TM_ZONE 1
21031_ACEOF
21032
21033
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021034fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021035
Martin v. Löwis11437992002-04-12 09:54:03 +000021036if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21037
21038cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021039#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021040_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021041
21042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021043 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21044echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021045if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021046 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021047else
21048 cat >conftest.$ac_ext <<_ACEOF
21049/* confdefs.h. */
21050_ACEOF
21051cat confdefs.h >>conftest.$ac_ext
21052cat >>conftest.$ac_ext <<_ACEOF
21053/* end confdefs.h. */
21054#include <time.h>
21055
21056int
21057main ()
21058{
21059#ifndef tzname
21060 (void) tzname;
21061#endif
21062
21063 ;
21064 return 0;
21065}
21066_ACEOF
21067rm -f conftest.$ac_objext
21068if { (ac_try="$ac_compile"
21069case "(($ac_try" in
21070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21071 *) ac_try_echo=$ac_try;;
21072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021074 (eval "$ac_compile") 2>conftest.er1
21075 ac_status=$?
21076 grep -v '^ *+' conftest.er1 >conftest.err
21077 rm -f conftest.er1
21078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021080 (exit $ac_status); } && {
21081 test -z "$ac_c_werror_flag" ||
21082 test ! -s conftest.err
21083 } && test -s conftest.$ac_objext; then
21084 ac_cv_have_decl_tzname=yes
21085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021086 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021087sed 's/^/| /' conftest.$ac_ext >&5
21088
21089 ac_cv_have_decl_tzname=no
21090fi
21091
21092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21093fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021094{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21095echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21096if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021097
21098cat >>confdefs.h <<_ACEOF
21099#define HAVE_DECL_TZNAME 1
21100_ACEOF
21101
21102
21103else
21104 cat >>confdefs.h <<_ACEOF
21105#define HAVE_DECL_TZNAME 0
21106_ACEOF
21107
21108
21109fi
21110
21111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021112 { echo "$as_me:$LINENO: checking for tzname" >&5
21113echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021114if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021115 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021116else
Martin v. Löwis11437992002-04-12 09:54:03 +000021117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021118/* confdefs.h. */
21119_ACEOF
21120cat confdefs.h >>conftest.$ac_ext
21121cat >>conftest.$ac_ext <<_ACEOF
21122/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021123#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021124#if !HAVE_DECL_TZNAME
21125extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021127
Martin v. Löwis11437992002-04-12 09:54:03 +000021128int
21129main ()
21130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021131return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021132 ;
21133 return 0;
21134}
21135_ACEOF
21136rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021137if { (ac_try="$ac_link"
21138case "(($ac_try" in
21139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21140 *) ac_try_echo=$ac_try;;
21141esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021143 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021145 grep -v '^ *+' conftest.er1 >conftest.err
21146 rm -f conftest.er1
21147 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021149 (exit $ac_status); } && {
21150 test -z "$ac_c_werror_flag" ||
21151 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021152 } && test -s conftest$ac_exeext &&
21153 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021154 ac_cv_var_tzname=yes
21155else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021157sed 's/^/| /' conftest.$ac_ext >&5
21158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021159 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021161
21162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021163 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021164fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021165{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21166echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021167 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021168
21169cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021170#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021171_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021172
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021173 fi
21174fi
21175
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021176{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21177echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021178if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021179 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021180else
21181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021182/* confdefs.h. */
21183_ACEOF
21184cat confdefs.h >>conftest.$ac_ext
21185cat >>conftest.$ac_ext <<_ACEOF
21186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021187$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021188int
21189main ()
21190{
21191static struct stat ac_aggr;
21192if (ac_aggr.st_rdev)
21193return 0;
21194 ;
21195 return 0;
21196}
21197_ACEOF
21198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021199if { (ac_try="$ac_compile"
21200case "(($ac_try" in
21201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21202 *) ac_try_echo=$ac_try;;
21203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021207 grep -v '^ *+' conftest.er1 >conftest.err
21208 rm -f conftest.er1
21209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021211 (exit $ac_status); } && {
21212 test -z "$ac_c_werror_flag" ||
21213 test ! -s conftest.err
21214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021215 ac_cv_member_struct_stat_st_rdev=yes
21216else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021218sed 's/^/| /' conftest.$ac_ext >&5
21219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021220 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021221/* confdefs.h. */
21222_ACEOF
21223cat confdefs.h >>conftest.$ac_ext
21224cat >>conftest.$ac_ext <<_ACEOF
21225/* end confdefs.h. */
21226$ac_includes_default
21227int
21228main ()
21229{
21230static struct stat ac_aggr;
21231if (sizeof ac_aggr.st_rdev)
21232return 0;
21233 ;
21234 return 0;
21235}
21236_ACEOF
21237rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021238if { (ac_try="$ac_compile"
21239case "(($ac_try" in
21240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21241 *) ac_try_echo=$ac_try;;
21242esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021244 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021246 grep -v '^ *+' conftest.er1 >conftest.err
21247 rm -f conftest.er1
21248 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021250 (exit $ac_status); } && {
21251 test -z "$ac_c_werror_flag" ||
21252 test ! -s conftest.err
21253 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021254 ac_cv_member_struct_stat_st_rdev=yes
21255else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021257sed 's/^/| /' conftest.$ac_ext >&5
21258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021259 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261
21262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021264
21265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021266fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021267{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21268echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21269if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021270
21271cat >>confdefs.h <<_ACEOF
21272#define HAVE_STRUCT_STAT_ST_RDEV 1
21273_ACEOF
21274
21275
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021276fi
21277
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021278{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21279echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021280if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021282else
Martin v. Löwis11437992002-04-12 09:54:03 +000021283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021284/* confdefs.h. */
21285_ACEOF
21286cat confdefs.h >>conftest.$ac_ext
21287cat >>conftest.$ac_ext <<_ACEOF
21288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021289$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021290int
21291main ()
21292{
21293static struct stat ac_aggr;
21294if (ac_aggr.st_blksize)
21295return 0;
21296 ;
21297 return 0;
21298}
21299_ACEOF
21300rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021301if { (ac_try="$ac_compile"
21302case "(($ac_try" in
21303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21304 *) ac_try_echo=$ac_try;;
21305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021307 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021309 grep -v '^ *+' conftest.er1 >conftest.err
21310 rm -f conftest.er1
21311 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021313 (exit $ac_status); } && {
21314 test -z "$ac_c_werror_flag" ||
21315 test ! -s conftest.err
21316 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021317 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021320sed 's/^/| /' conftest.$ac_ext >&5
21321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021323/* confdefs.h. */
21324_ACEOF
21325cat confdefs.h >>conftest.$ac_ext
21326cat >>conftest.$ac_ext <<_ACEOF
21327/* end confdefs.h. */
21328$ac_includes_default
21329int
21330main ()
21331{
21332static struct stat ac_aggr;
21333if (sizeof ac_aggr.st_blksize)
21334return 0;
21335 ;
21336 return 0;
21337}
21338_ACEOF
21339rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021340if { (ac_try="$ac_compile"
21341case "(($ac_try" in
21342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21343 *) ac_try_echo=$ac_try;;
21344esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021346 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021348 grep -v '^ *+' conftest.er1 >conftest.err
21349 rm -f conftest.er1
21350 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021352 (exit $ac_status); } && {
21353 test -z "$ac_c_werror_flag" ||
21354 test ! -s conftest.err
21355 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021356 ac_cv_member_struct_stat_st_blksize=yes
21357else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021359sed 's/^/| /' conftest.$ac_ext >&5
21360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021361 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021363
21364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021366
21367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021368fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021369{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21370echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21371if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021372
Martin v. Löwis11437992002-04-12 09:54:03 +000021373cat >>confdefs.h <<_ACEOF
21374#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21375_ACEOF
21376
21377
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021378fi
21379
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021380{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21381echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021382if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021383 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021384else
21385 cat >conftest.$ac_ext <<_ACEOF
21386/* confdefs.h. */
21387_ACEOF
21388cat confdefs.h >>conftest.$ac_ext
21389cat >>conftest.$ac_ext <<_ACEOF
21390/* end confdefs.h. */
21391$ac_includes_default
21392int
21393main ()
21394{
21395static struct stat ac_aggr;
21396if (ac_aggr.st_flags)
21397return 0;
21398 ;
21399 return 0;
21400}
21401_ACEOF
21402rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021403if { (ac_try="$ac_compile"
21404case "(($ac_try" in
21405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21406 *) ac_try_echo=$ac_try;;
21407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021409 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021410 ac_status=$?
21411 grep -v '^ *+' conftest.er1 >conftest.err
21412 rm -f conftest.er1
21413 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415 (exit $ac_status); } && {
21416 test -z "$ac_c_werror_flag" ||
21417 test ! -s conftest.err
21418 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021419 ac_cv_member_struct_stat_st_flags=yes
21420else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021421 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021422sed 's/^/| /' conftest.$ac_ext >&5
21423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021425/* confdefs.h. */
21426_ACEOF
21427cat confdefs.h >>conftest.$ac_ext
21428cat >>conftest.$ac_ext <<_ACEOF
21429/* end confdefs.h. */
21430$ac_includes_default
21431int
21432main ()
21433{
21434static struct stat ac_aggr;
21435if (sizeof ac_aggr.st_flags)
21436return 0;
21437 ;
21438 return 0;
21439}
21440_ACEOF
21441rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021442if { (ac_try="$ac_compile"
21443case "(($ac_try" in
21444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21445 *) ac_try_echo=$ac_try;;
21446esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021448 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021449 ac_status=$?
21450 grep -v '^ *+' conftest.er1 >conftest.err
21451 rm -f conftest.er1
21452 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021454 (exit $ac_status); } && {
21455 test -z "$ac_c_werror_flag" ||
21456 test ! -s conftest.err
21457 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021458 ac_cv_member_struct_stat_st_flags=yes
21459else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021460 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021461sed 's/^/| /' conftest.$ac_ext >&5
21462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021463 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021465
21466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021468
21469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021470fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021471{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21472echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21473if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021474
21475cat >>confdefs.h <<_ACEOF
21476#define HAVE_STRUCT_STAT_ST_FLAGS 1
21477_ACEOF
21478
21479
21480fi
21481
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021482{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21483echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021484if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021485 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021486else
21487 cat >conftest.$ac_ext <<_ACEOF
21488/* confdefs.h. */
21489_ACEOF
21490cat confdefs.h >>conftest.$ac_ext
21491cat >>conftest.$ac_ext <<_ACEOF
21492/* end confdefs.h. */
21493$ac_includes_default
21494int
21495main ()
21496{
21497static struct stat ac_aggr;
21498if (ac_aggr.st_gen)
21499return 0;
21500 ;
21501 return 0;
21502}
21503_ACEOF
21504rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021505if { (ac_try="$ac_compile"
21506case "(($ac_try" in
21507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21508 *) ac_try_echo=$ac_try;;
21509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021512 ac_status=$?
21513 grep -v '^ *+' conftest.er1 >conftest.err
21514 rm -f conftest.er1
21515 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021517 (exit $ac_status); } && {
21518 test -z "$ac_c_werror_flag" ||
21519 test ! -s conftest.err
21520 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021521 ac_cv_member_struct_stat_st_gen=yes
21522else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021523 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021524sed 's/^/| /' conftest.$ac_ext >&5
21525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021526 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021527/* confdefs.h. */
21528_ACEOF
21529cat confdefs.h >>conftest.$ac_ext
21530cat >>conftest.$ac_ext <<_ACEOF
21531/* end confdefs.h. */
21532$ac_includes_default
21533int
21534main ()
21535{
21536static struct stat ac_aggr;
21537if (sizeof ac_aggr.st_gen)
21538return 0;
21539 ;
21540 return 0;
21541}
21542_ACEOF
21543rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021544if { (ac_try="$ac_compile"
21545case "(($ac_try" in
21546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21547 *) ac_try_echo=$ac_try;;
21548esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021551 ac_status=$?
21552 grep -v '^ *+' conftest.er1 >conftest.err
21553 rm -f conftest.er1
21554 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021556 (exit $ac_status); } && {
21557 test -z "$ac_c_werror_flag" ||
21558 test ! -s conftest.err
21559 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021560 ac_cv_member_struct_stat_st_gen=yes
21561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021562 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021563sed 's/^/| /' conftest.$ac_ext >&5
21564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021565 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021567
21568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021570
21571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021572fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021573{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21574echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21575if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021576
21577cat >>confdefs.h <<_ACEOF
21578#define HAVE_STRUCT_STAT_ST_GEN 1
21579_ACEOF
21580
21581
21582fi
21583
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021584{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21585echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021586if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021588else
21589 cat >conftest.$ac_ext <<_ACEOF
21590/* confdefs.h. */
21591_ACEOF
21592cat confdefs.h >>conftest.$ac_ext
21593cat >>conftest.$ac_ext <<_ACEOF
21594/* end confdefs.h. */
21595$ac_includes_default
21596int
21597main ()
21598{
21599static struct stat ac_aggr;
21600if (ac_aggr.st_birthtime)
21601return 0;
21602 ;
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öwisebd9d5b2005-08-09 15:00:59 +000021614 ac_status=$?
21615 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öwisebd9d5b2005-08-09 15:00:59 +000021623 ac_cv_member_struct_stat_st_birthtime=yes
21624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021625 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021626sed 's/^/| /' conftest.$ac_ext >&5
21627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021628 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021629/* confdefs.h. */
21630_ACEOF
21631cat confdefs.h >>conftest.$ac_ext
21632cat >>conftest.$ac_ext <<_ACEOF
21633/* end confdefs.h. */
21634$ac_includes_default
21635int
21636main ()
21637{
21638static struct stat ac_aggr;
21639if (sizeof ac_aggr.st_birthtime)
21640return 0;
21641 ;
21642 return 0;
21643}
21644_ACEOF
21645rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021646if { (ac_try="$ac_compile"
21647case "(($ac_try" in
21648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21649 *) ac_try_echo=$ac_try;;
21650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021653 ac_status=$?
21654 grep -v '^ *+' conftest.er1 >conftest.err
21655 rm -f conftest.er1
21656 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021658 (exit $ac_status); } && {
21659 test -z "$ac_c_werror_flag" ||
21660 test ! -s conftest.err
21661 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021662 ac_cv_member_struct_stat_st_birthtime=yes
21663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021664 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021665sed 's/^/| /' conftest.$ac_ext >&5
21666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021667 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021669
21670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021672
21673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021674fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021675{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21676echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21677if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021678
21679cat >>confdefs.h <<_ACEOF
21680#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21681_ACEOF
21682
21683
21684fi
21685
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021686{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21687echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021688if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021689 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021690else
Martin v. Löwis11437992002-04-12 09:54:03 +000021691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021692/* confdefs.h. */
21693_ACEOF
21694cat confdefs.h >>conftest.$ac_ext
21695cat >>conftest.$ac_ext <<_ACEOF
21696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021697$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021698int
21699main ()
21700{
21701static struct stat ac_aggr;
21702if (ac_aggr.st_blocks)
21703return 0;
21704 ;
21705 return 0;
21706}
21707_ACEOF
21708rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021709if { (ac_try="$ac_compile"
21710case "(($ac_try" in
21711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21712 *) ac_try_echo=$ac_try;;
21713esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021717 grep -v '^ *+' conftest.er1 >conftest.err
21718 rm -f conftest.er1
21719 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021721 (exit $ac_status); } && {
21722 test -z "$ac_c_werror_flag" ||
21723 test ! -s conftest.err
21724 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021725 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021726else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021728sed 's/^/| /' conftest.$ac_ext >&5
21729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021731/* confdefs.h. */
21732_ACEOF
21733cat confdefs.h >>conftest.$ac_ext
21734cat >>conftest.$ac_ext <<_ACEOF
21735/* end confdefs.h. */
21736$ac_includes_default
21737int
21738main ()
21739{
21740static struct stat ac_aggr;
21741if (sizeof ac_aggr.st_blocks)
21742return 0;
21743 ;
21744 return 0;
21745}
21746_ACEOF
21747rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021748if { (ac_try="$ac_compile"
21749case "(($ac_try" in
21750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21751 *) ac_try_echo=$ac_try;;
21752esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021754 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021756 grep -v '^ *+' conftest.er1 >conftest.err
21757 rm -f conftest.er1
21758 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021760 (exit $ac_status); } && {
21761 test -z "$ac_c_werror_flag" ||
21762 test ! -s conftest.err
21763 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021764 ac_cv_member_struct_stat_st_blocks=yes
21765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021767sed 's/^/| /' conftest.$ac_ext >&5
21768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021769 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021771
21772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021774
21775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021776fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021777{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21778echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21779if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021780
Martin v. Löwis11437992002-04-12 09:54:03 +000021781cat >>confdefs.h <<_ACEOF
21782#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21783_ACEOF
21784
21785
21786cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021787#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021788_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021789
21790else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021791 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021792 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021793 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21794 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021795esac
21796
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021797fi
21798
Michael W. Hudson54241132001-12-07 15:38:26 +000021799
Martin v. Löwis11437992002-04-12 09:54:03 +000021800
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021801{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21802echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021803if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021805else
Martin v. Löwis11437992002-04-12 09:54:03 +000021806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021807/* confdefs.h. */
21808_ACEOF
21809cat confdefs.h >>conftest.$ac_ext
21810cat >>conftest.$ac_ext <<_ACEOF
21811/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021812#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021813int
21814main ()
21815{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021816return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021817 ;
21818 return 0;
21819}
21820_ACEOF
21821rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021822if { (ac_try="$ac_compile"
21823case "(($ac_try" in
21824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21825 *) ac_try_echo=$ac_try;;
21826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021830 grep -v '^ *+' conftest.er1 >conftest.err
21831 rm -f conftest.er1
21832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021834 (exit $ac_status); } && {
21835 test -z "$ac_c_werror_flag" ||
21836 test ! -s conftest.err
21837 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021838 ac_cv_header_time_altzone=yes
21839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021841sed 's/^/| /' conftest.$ac_ext >&5
21842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021843 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021844fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21847fi
21848
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021849{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21850echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021851if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021852
21853cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021854#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021855_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021856
21857fi
21858
Guido van Rossumda88dad1995-01-26 00:46:29 +000021859was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021860{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21861echo $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 +000021862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021863/* confdefs.h. */
21864_ACEOF
21865cat confdefs.h >>conftest.$ac_ext
21866cat >>conftest.$ac_ext <<_ACEOF
21867/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021868
21869#include <sys/types.h>
21870#include <sys/select.h>
21871#include <sys/time.h>
21872
Martin v. Löwis11437992002-04-12 09:54:03 +000021873int
21874main ()
21875{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021876;
Martin v. Löwis11437992002-04-12 09:54:03 +000021877 ;
21878 return 0;
21879}
21880_ACEOF
21881rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021882if { (ac_try="$ac_compile"
21883case "(($ac_try" in
21884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21885 *) ac_try_echo=$ac_try;;
21886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021890 grep -v '^ *+' conftest.er1 >conftest.err
21891 rm -f conftest.er1
21892 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021894 (exit $ac_status); } && {
21895 test -z "$ac_c_werror_flag" ||
21896 test ! -s conftest.err
21897 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021898
21899
21900cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021901#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021902_ACEOF
21903
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021904 was_it_defined=yes
21905
Guido van Rossumf78abae1997-01-21 22:02:36 +000021906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021908sed 's/^/| /' conftest.$ac_ext >&5
21909
Thomas Wouters477c8d52006-05-27 19:21:47 +000021910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021911fi
21912
21913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021914{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21915echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021916
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021917{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21918echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021919if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021920 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021921else
Martin v. Löwis11437992002-04-12 09:54:03 +000021922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021923/* confdefs.h. */
21924_ACEOF
21925cat confdefs.h >>conftest.$ac_ext
21926cat >>conftest.$ac_ext <<_ACEOF
21927/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021928
21929# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021930int
21931main ()
21932{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021933struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021934 ;
21935 return 0;
21936}
21937_ACEOF
21938rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021939if { (ac_try="$ac_compile"
21940case "(($ac_try" in
21941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21942 *) ac_try_echo=$ac_try;;
21943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021947 grep -v '^ *+' conftest.er1 >conftest.err
21948 rm -f conftest.er1
21949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021951 (exit $ac_status); } && {
21952 test -z "$ac_c_werror_flag" ||
21953 test ! -s conftest.err
21954 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021955 ac_cv_struct_addrinfo=yes
21956else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021958sed 's/^/| /' conftest.$ac_ext >&5
21959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021960 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021961fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21964fi
21965
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021966{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21967echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021968if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021969
21970cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021971#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021972_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021973
21974fi
21975
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021976{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21977echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021978if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021979 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021980else
Martin v. Löwis11437992002-04-12 09:54:03 +000021981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021982/* confdefs.h. */
21983_ACEOF
21984cat confdefs.h >>conftest.$ac_ext
21985cat >>conftest.$ac_ext <<_ACEOF
21986/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021987
21988# include <sys/types.h>
21989# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021990int
21991main ()
21992{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021993struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021994 ;
21995 return 0;
21996}
21997_ACEOF
21998rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021999if { (ac_try="$ac_compile"
22000case "(($ac_try" in
22001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22002 *) ac_try_echo=$ac_try;;
22003esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022007 grep -v '^ *+' conftest.er1 >conftest.err
22008 rm -f conftest.er1
22009 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022011 (exit $ac_status); } && {
22012 test -z "$ac_c_werror_flag" ||
22013 test ! -s conftest.err
22014 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022015 ac_cv_struct_sockaddr_storage=yes
22016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022018sed 's/^/| /' conftest.$ac_ext >&5
22019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022020 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022021fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22024fi
22025
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022026{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22027echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022028if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022029
22030cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022031#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022032_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022033
22034fi
22035
Guido van Rossum627b2d71993-12-24 10:39:16 +000022036# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022037
Michael W. Hudson54241132001-12-07 15:38:26 +000022038
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022039{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22040echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022041if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022042 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022043else
Martin v. Löwis11437992002-04-12 09:54:03 +000022044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022045/* confdefs.h. */
22046_ACEOF
22047cat confdefs.h >>conftest.$ac_ext
22048cat >>conftest.$ac_ext <<_ACEOF
22049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022050$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022051int
22052main ()
22053{
22054static int test_array [1 - 2 * !(((char) -1) < 0)];
22055test_array [0] = 0
22056
22057 ;
22058 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022059}
Martin v. Löwis11437992002-04-12 09:54:03 +000022060_ACEOF
22061rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022062if { (ac_try="$ac_compile"
22063case "(($ac_try" in
22064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22065 *) ac_try_echo=$ac_try;;
22066esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022070 grep -v '^ *+' conftest.er1 >conftest.err
22071 rm -f conftest.er1
22072 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022074 (exit $ac_status); } && {
22075 test -z "$ac_c_werror_flag" ||
22076 test ! -s conftest.err
22077 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022078 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022079else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022081sed 's/^/| /' conftest.$ac_ext >&5
22082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022083 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022085
22086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022087fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022088{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22089echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022090if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022091 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022092#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022093_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022094
22095fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022096
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022097{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22098echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022099if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022100 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022101else
22102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022103/* confdefs.h. */
22104_ACEOF
22105cat confdefs.h >>conftest.$ac_ext
22106cat >>conftest.$ac_ext <<_ACEOF
22107/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022108
Martin v. Löwis11437992002-04-12 09:54:03 +000022109int
22110main ()
22111{
22112/* FIXME: Include the comments suggested by Paul. */
22113#ifndef __cplusplus
22114 /* Ultrix mips cc rejects this. */
22115 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022116 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022117 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022118 char const *const *pcpcc;
22119 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022120 /* NEC SVR4.0.2 mips cc rejects this. */
22121 struct point {int x, y;};
22122 static struct point const zero = {0,0};
22123 /* AIX XL C 1.02.0.0 rejects this.
22124 It does not let you subtract one const X* pointer from another in
22125 an arm of an if-expression whose if-part is not a constant
22126 expression */
22127 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022128 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022129 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022130 ++pcpcc;
22131 ppc = (char**) pcpcc;
22132 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022133 { /* SCO 3.2v4 cc rejects this. */
22134 char *t;
22135 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022136
Martin v. Löwis11437992002-04-12 09:54:03 +000022137 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022138 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022139 }
22140 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22141 int x[] = {25, 17};
22142 const int *foo = &x[0];
22143 ++foo;
22144 }
22145 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22146 typedef const int *iptr;
22147 iptr p = 0;
22148 ++p;
22149 }
22150 { /* AIX XL C 1.02.0.0 rejects this saying
22151 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22152 struct s { int j; const int *ap[3]; };
22153 struct s *b; b->j = 5;
22154 }
22155 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22156 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022157 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022158 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022159 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022160#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022161
Martin v. Löwis11437992002-04-12 09:54:03 +000022162 ;
22163 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022164}
Martin v. Löwis11437992002-04-12 09:54:03 +000022165_ACEOF
22166rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022167if { (ac_try="$ac_compile"
22168case "(($ac_try" in
22169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22170 *) ac_try_echo=$ac_try;;
22171esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022175 grep -v '^ *+' conftest.er1 >conftest.err
22176 rm -f conftest.er1
22177 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022179 (exit $ac_status); } && {
22180 test -z "$ac_c_werror_flag" ||
22181 test ! -s conftest.err
22182 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022183 ac_cv_c_const=yes
22184else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022186sed 's/^/| /' conftest.$ac_ext >&5
22187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022188 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022190
22191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022192fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022193{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22194echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022195if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022196
22197cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022198#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022199_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022200
22201fi
22202
Michael W. Hudson54241132001-12-07 15:38:26 +000022203
Guido van Rossumda88dad1995-01-26 00:46:29 +000022204works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022205{ echo "$as_me:$LINENO: checking for working volatile" >&5
22206echo $ECHO_N "checking for working volatile... $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 Rossum627b2d71993-12-24 10:39:16 +000022213
Martin v. Löwis11437992002-04-12 09:54:03 +000022214int
22215main ()
22216{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022217volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022218 ;
22219 return 0;
22220}
22221_ACEOF
22222rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022223if { (ac_try="$ac_compile"
22224case "(($ac_try" in
22225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22226 *) ac_try_echo=$ac_try;;
22227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022231 grep -v '^ *+' conftest.er1 >conftest.err
22232 rm -f conftest.er1
22233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022235 (exit $ac_status); } && {
22236 test -z "$ac_c_werror_flag" ||
22237 test ! -s conftest.err
22238 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022239 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022242sed 's/^/| /' conftest.$ac_ext >&5
22243
Martin v. Löwis11437992002-04-12 09:54:03 +000022244
22245cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022246#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022247_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022248
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022249
Guido van Rossum627b2d71993-12-24 10:39:16 +000022250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022251
22252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022253{ echo "$as_me:$LINENO: result: $works" >&5
22254echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022255
Guido van Rossumda88dad1995-01-26 00:46:29 +000022256works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022257{ echo "$as_me:$LINENO: checking for working signed char" >&5
22258echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022259cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022260/* confdefs.h. */
22261_ACEOF
22262cat confdefs.h >>conftest.$ac_ext
22263cat >>conftest.$ac_ext <<_ACEOF
22264/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022265
Martin v. Löwis11437992002-04-12 09:54:03 +000022266int
22267main ()
22268{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022269signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022270 ;
22271 return 0;
22272}
22273_ACEOF
22274rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022275if { (ac_try="$ac_compile"
22276case "(($ac_try" in
22277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22278 *) ac_try_echo=$ac_try;;
22279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022283 grep -v '^ *+' conftest.er1 >conftest.err
22284 rm -f conftest.er1
22285 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022287 (exit $ac_status); } && {
22288 test -z "$ac_c_werror_flag" ||
22289 test ! -s conftest.err
22290 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022291 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022294sed 's/^/| /' conftest.$ac_ext >&5
22295
Martin v. Löwis11437992002-04-12 09:54:03 +000022296
22297cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022298#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022299_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022300
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022301
Guido van Rossum7f43da71994-08-01 12:15:30 +000022302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022303
22304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022305{ echo "$as_me:$LINENO: result: $works" >&5
22306echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022307
Guido van Rossumda88dad1995-01-26 00:46:29 +000022308have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022309{ echo "$as_me:$LINENO: checking for prototypes" >&5
22310echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022311cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022312/* confdefs.h. */
22313_ACEOF
22314cat confdefs.h >>conftest.$ac_ext
22315cat >>conftest.$ac_ext <<_ACEOF
22316/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022317int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022318int
22319main ()
22320{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022321return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022322 ;
22323 return 0;
22324}
22325_ACEOF
22326rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022327if { (ac_try="$ac_compile"
22328case "(($ac_try" in
22329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22330 *) ac_try_echo=$ac_try;;
22331esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022335 grep -v '^ *+' conftest.er1 >conftest.err
22336 rm -f conftest.er1
22337 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022339 (exit $ac_status); } && {
22340 test -z "$ac_c_werror_flag" ||
22341 test ! -s conftest.err
22342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022343
22344
22345cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022346#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022347_ACEOF
22348
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022349 have_prototypes=yes
22350
Guido van Rossumf78abae1997-01-21 22:02:36 +000022351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022353sed 's/^/| /' conftest.$ac_ext >&5
22354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022355
Guido van Rossum7f43da71994-08-01 12:15:30 +000022356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022357
22358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022359{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22360echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022361
Guido van Rossumda88dad1995-01-26 00:46:29 +000022362works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022363{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22364echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022366/* confdefs.h. */
22367_ACEOF
22368cat confdefs.h >>conftest.$ac_ext
22369cat >>conftest.$ac_ext <<_ACEOF
22370/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022371
22372#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022373int foo(int x, ...) {
22374 va_list va;
22375 va_start(va, x);
22376 va_arg(va, int);
22377 va_arg(va, char *);
22378 va_arg(va, double);
22379 return 0;
22380}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022381
Martin v. Löwis11437992002-04-12 09:54:03 +000022382int
22383main ()
22384{
Guido van Rossum90eea071996-08-30 20:58:57 +000022385return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022386 ;
22387 return 0;
22388}
22389_ACEOF
22390rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022391if { (ac_try="$ac_compile"
22392case "(($ac_try" in
22393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22394 *) ac_try_echo=$ac_try;;
22395esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022399 grep -v '^ *+' conftest.er1 >conftest.err
22400 rm -f conftest.er1
22401 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022403 (exit $ac_status); } && {
22404 test -z "$ac_c_werror_flag" ||
22405 test ! -s conftest.err
22406 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022407
22408
22409cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022410#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022411_ACEOF
22412
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022413 works=yes
22414
Guido van Rossumf78abae1997-01-21 22:02:36 +000022415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022417sed 's/^/| /' conftest.$ac_ext >&5
22418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022419
Guido van Rossum627b2d71993-12-24 10:39:16 +000022420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022421
22422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022423{ echo "$as_me:$LINENO: result: $works" >&5
22424echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022425
Martin v. Löwisd6320502004-08-12 13:45:08 +000022426# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022427{ echo "$as_me:$LINENO: checking for socketpair" >&5
22428echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022429cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022430/* confdefs.h. */
22431_ACEOF
22432cat confdefs.h >>conftest.$ac_ext
22433cat >>conftest.$ac_ext <<_ACEOF
22434/* end confdefs.h. */
22435
22436#include <sys/types.h>
22437#include <sys/socket.h>
22438
22439int
22440main ()
22441{
22442void *x=socketpair
22443 ;
22444 return 0;
22445}
22446_ACEOF
22447rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022448if { (ac_try="$ac_compile"
22449case "(($ac_try" in
22450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22451 *) ac_try_echo=$ac_try;;
22452esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022456 grep -v '^ *+' conftest.er1 >conftest.err
22457 rm -f conftest.er1
22458 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022460 (exit $ac_status); } && {
22461 test -z "$ac_c_werror_flag" ||
22462 test ! -s conftest.err
22463 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022464
22465cat >>confdefs.h <<\_ACEOF
22466#define HAVE_SOCKETPAIR 1
22467_ACEOF
22468
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022469 { echo "$as_me:$LINENO: result: yes" >&5
22470echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022472 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022473sed 's/^/| /' conftest.$ac_ext >&5
22474
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022475 { echo "$as_me:$LINENO: result: no" >&5
22476echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022477
22478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022479
22480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022481
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022482# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022483{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22484echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022486/* confdefs.h. */
22487_ACEOF
22488cat confdefs.h >>conftest.$ac_ext
22489cat >>conftest.$ac_ext <<_ACEOF
22490/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022491#include <sys/types.h>
22492#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022493int
22494main ()
22495{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022496struct sockaddr x;
22497x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022498 ;
22499 return 0;
22500}
22501_ACEOF
22502rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022503if { (ac_try="$ac_compile"
22504case "(($ac_try" in
22505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22506 *) ac_try_echo=$ac_try;;
22507esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022511 grep -v '^ *+' conftest.er1 >conftest.err
22512 rm -f conftest.er1
22513 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022515 (exit $ac_status); } && {
22516 test -z "$ac_c_werror_flag" ||
22517 test ! -s conftest.err
22518 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022519 { echo "$as_me:$LINENO: result: yes" >&5
22520echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022521
22522cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022523#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022524_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022525
22526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022528sed 's/^/| /' conftest.$ac_ext >&5
22529
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022530 { echo "$as_me:$LINENO: result: no" >&5
22531echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022533
22534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022535
Guido van Rossumda88dad1995-01-26 00:46:29 +000022536va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022537{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22538echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022540/* confdefs.h. */
22541_ACEOF
22542cat confdefs.h >>conftest.$ac_ext
22543cat >>conftest.$ac_ext <<_ACEOF
22544/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022545
22546#ifdef HAVE_STDARG_PROTOTYPES
22547#include <stdarg.h>
22548#else
22549#include <varargs.h>
22550#endif
22551
Martin v. Löwis11437992002-04-12 09:54:03 +000022552int
22553main ()
22554{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022555va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022556 ;
22557 return 0;
22558}
22559_ACEOF
22560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022561if { (ac_try="$ac_compile"
22562case "(($ac_try" in
22563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22564 *) ac_try_echo=$ac_try;;
22565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022569 grep -v '^ *+' conftest.er1 >conftest.err
22570 rm -f conftest.er1
22571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022573 (exit $ac_status); } && {
22574 test -z "$ac_c_werror_flag" ||
22575 test ! -s conftest.err
22576 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022577 :
22578else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022580sed 's/^/| /' conftest.$ac_ext >&5
22581
Martin v. Löwis11437992002-04-12 09:54:03 +000022582
22583
22584cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022585#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022586_ACEOF
22587
Guido van Rossumda88dad1995-01-26 00:46:29 +000022588 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022591
22592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022593{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22594echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022595
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022596# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022597
22598
22599
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022600{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22601echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022602if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022603 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022604else
Martin v. Löwis11437992002-04-12 09:54:03 +000022605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022606/* confdefs.h. */
22607_ACEOF
22608cat confdefs.h >>conftest.$ac_ext
22609cat >>conftest.$ac_ext <<_ACEOF
22610/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022611/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22612 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22613#define gethostbyname_r innocuous_gethostbyname_r
22614
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022615/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022616 which can conflict with char gethostbyname_r (); below.
22617 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022618 <limits.h> exists even on freestanding compilers. */
22619
22620#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022621# include <limits.h>
22622#else
22623# include <assert.h>
22624#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022625
22626#undef gethostbyname_r
22627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022628/* Override any GCC internal prototype to avoid an error.
22629 Use char because int might match the return type of a GCC
22630 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022631#ifdef __cplusplus
22632extern "C"
22633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022634char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022635/* The GNU C library defines this for functions which it implements
22636 to always fail with ENOSYS. Some functions are actually named
22637 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022638#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022639choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022640#endif
22641
Skip Montanaro6dead952003-09-25 14:50:04 +000022642int
22643main ()
22644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022645return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022646 ;
22647 return 0;
22648}
22649_ACEOF
22650rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022651if { (ac_try="$ac_link"
22652case "(($ac_try" in
22653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22654 *) ac_try_echo=$ac_try;;
22655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022657 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022659 grep -v '^ *+' conftest.er1 >conftest.err
22660 rm -f conftest.er1
22661 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022663 (exit $ac_status); } && {
22664 test -z "$ac_c_werror_flag" ||
22665 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022666 } && test -s conftest$ac_exeext &&
22667 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022669else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022671sed 's/^/| /' conftest.$ac_ext >&5
22672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022673 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022675
22676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022677 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022678fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022679{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22680echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22681if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022682
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022684#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022685_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022686
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022687 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22688echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022689 OLD_CFLAGS=$CFLAGS
22690 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022692/* confdefs.h. */
22693_ACEOF
22694cat confdefs.h >>conftest.$ac_ext
22695cat >>conftest.$ac_ext <<_ACEOF
22696/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022697
22698# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022699
Martin v. Löwis11437992002-04-12 09:54:03 +000022700int
22701main ()
22702{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022703
22704 char *name;
22705 struct hostent *he, *res;
22706 char buffer[2048];
22707 int buflen = 2048;
22708 int h_errnop;
22709
22710 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022711
22712 ;
22713 return 0;
22714}
22715_ACEOF
22716rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022717if { (ac_try="$ac_compile"
22718case "(($ac_try" in
22719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22720 *) ac_try_echo=$ac_try;;
22721esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022725 grep -v '^ *+' conftest.er1 >conftest.err
22726 rm -f conftest.er1
22727 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022729 (exit $ac_status); } && {
22730 test -z "$ac_c_werror_flag" ||
22731 test ! -s conftest.err
22732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022733
22734 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022735#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022736_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022737
Martin v. Löwis11437992002-04-12 09:54:03 +000022738
22739cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022740#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022741_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022742
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022743 { echo "$as_me:$LINENO: result: yes" >&5
22744echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022745
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022746else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022748sed 's/^/| /' conftest.$ac_ext >&5
22749
Martin v. Löwis11437992002-04-12 09:54:03 +000022750
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022751 { echo "$as_me:$LINENO: result: no" >&5
22752echo "${ECHO_T}no" >&6; }
22753 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22754echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022756/* confdefs.h. */
22757_ACEOF
22758cat confdefs.h >>conftest.$ac_ext
22759cat >>conftest.$ac_ext <<_ACEOF
22760/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022761
22762# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022763
Martin v. Löwis11437992002-04-12 09:54:03 +000022764int
22765main ()
22766{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022767
22768 char *name;
22769 struct hostent *he;
22770 char buffer[2048];
22771 int buflen = 2048;
22772 int h_errnop;
22773
22774 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022775
22776 ;
22777 return 0;
22778}
22779_ACEOF
22780rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022781if { (ac_try="$ac_compile"
22782case "(($ac_try" in
22783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22784 *) ac_try_echo=$ac_try;;
22785esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022789 grep -v '^ *+' conftest.er1 >conftest.err
22790 rm -f conftest.er1
22791 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022793 (exit $ac_status); } && {
22794 test -z "$ac_c_werror_flag" ||
22795 test ! -s conftest.err
22796 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022797
22798 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022799#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022800_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022801
Martin v. Löwis11437992002-04-12 09:54:03 +000022802
22803cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022804#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022805_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022806
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022807 { echo "$as_me:$LINENO: result: yes" >&5
22808echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022809
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022810else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022812sed 's/^/| /' conftest.$ac_ext >&5
22813
Martin v. Löwis11437992002-04-12 09:54:03 +000022814
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022815 { echo "$as_me:$LINENO: result: no" >&5
22816echo "${ECHO_T}no" >&6; }
22817 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22818echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022820/* confdefs.h. */
22821_ACEOF
22822cat confdefs.h >>conftest.$ac_ext
22823cat >>conftest.$ac_ext <<_ACEOF
22824/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022825
22826# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022827
Martin v. Löwis11437992002-04-12 09:54:03 +000022828int
22829main ()
22830{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022831
22832 char *name;
22833 struct hostent *he;
22834 struct hostent_data data;
22835
22836 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022837
22838 ;
22839 return 0;
22840}
22841_ACEOF
22842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022843if { (ac_try="$ac_compile"
22844case "(($ac_try" in
22845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22846 *) ac_try_echo=$ac_try;;
22847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022851 grep -v '^ *+' conftest.er1 >conftest.err
22852 rm -f conftest.er1
22853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022855 (exit $ac_status); } && {
22856 test -z "$ac_c_werror_flag" ||
22857 test ! -s conftest.err
22858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022859
22860 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022861#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022862_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022863
Martin v. Löwis11437992002-04-12 09:54:03 +000022864
22865cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022866#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022867_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022868
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022869 { echo "$as_me:$LINENO: result: yes" >&5
22870echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022871
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022874sed 's/^/| /' conftest.$ac_ext >&5
22875
Martin v. Löwis11437992002-04-12 09:54:03 +000022876
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022877 { echo "$as_me:$LINENO: result: no" >&5
22878echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022879
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022881
22882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022883
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022885
22886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022887
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022889
22890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022891 CFLAGS=$OLD_CFLAGS
22892
22893else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022894
Martin v. Löwis11437992002-04-12 09:54:03 +000022895
22896for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022897do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022898as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22899{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22900echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022901if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022902 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022903else
Martin v. Löwis11437992002-04-12 09:54:03 +000022904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022905/* confdefs.h. */
22906_ACEOF
22907cat confdefs.h >>conftest.$ac_ext
22908cat >>conftest.$ac_ext <<_ACEOF
22909/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022910/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22911 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22912#define $ac_func innocuous_$ac_func
22913
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022914/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022915 which can conflict with char $ac_func (); below.
22916 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022917 <limits.h> exists even on freestanding compilers. */
22918
22919#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022920# include <limits.h>
22921#else
22922# include <assert.h>
22923#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022924
22925#undef $ac_func
22926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022927/* Override any GCC internal prototype to avoid an error.
22928 Use char because int might match the return type of a GCC
22929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022930#ifdef __cplusplus
22931extern "C"
22932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022933char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022934/* The GNU C library defines this for functions which it implements
22935 to always fail with ENOSYS. Some functions are actually named
22936 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022937#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022938choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022939#endif
22940
Skip Montanaro6dead952003-09-25 14:50:04 +000022941int
22942main ()
22943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022944return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022945 ;
22946 return 0;
22947}
22948_ACEOF
22949rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022950if { (ac_try="$ac_link"
22951case "(($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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022956 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022958 grep -v '^ *+' conftest.er1 >conftest.err
22959 rm -f conftest.er1
22960 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022962 (exit $ac_status); } && {
22963 test -z "$ac_c_werror_flag" ||
22964 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022965 } && test -s conftest$ac_exeext &&
22966 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022967 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022968else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022970sed 's/^/| /' conftest.$ac_ext >&5
22971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022972 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022974
22975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022976 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022977fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022978ac_res=`eval echo '${'$as_ac_var'}'`
22979 { echo "$as_me:$LINENO: result: $ac_res" >&5
22980echo "${ECHO_T}$ac_res" >&6; }
22981if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022982 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022983#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022984_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022985
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022986fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022987done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022988
Michael W. Hudson54241132001-12-07 15:38:26 +000022989
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022990fi
22991
Michael W. Hudson54241132001-12-07 15:38:26 +000022992
22993
22994
22995
22996
22997
Guido van Rossum627b2d71993-12-24 10:39:16 +000022998# checks for system services
22999# (none yet)
23000
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023001# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023002{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23003echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023004if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023005 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023006else
Martin v. Löwis11437992002-04-12 09:54:03 +000023007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023008/* confdefs.h. */
23009_ACEOF
23010cat confdefs.h >>conftest.$ac_ext
23011cat >>conftest.$ac_ext <<_ACEOF
23012/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023013/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23014 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23015#define __fpu_control innocuous___fpu_control
23016
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023017/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023018 which can conflict with char __fpu_control (); below.
23019 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023020 <limits.h> exists even on freestanding compilers. */
23021
23022#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023023# include <limits.h>
23024#else
23025# include <assert.h>
23026#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023027
23028#undef __fpu_control
23029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023030/* Override any GCC internal prototype to avoid an error.
23031 Use char because int might match the return type of a GCC
23032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023033#ifdef __cplusplus
23034extern "C"
23035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023036char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023037/* The GNU C library defines this for functions which it implements
23038 to always fail with ENOSYS. Some functions are actually named
23039 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023040#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023041choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023042#endif
23043
Skip Montanaro6dead952003-09-25 14:50:04 +000023044int
23045main ()
23046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023047return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023048 ;
23049 return 0;
23050}
23051_ACEOF
23052rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023053if { (ac_try="$ac_link"
23054case "(($ac_try" in
23055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23056 *) ac_try_echo=$ac_try;;
23057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023059 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023061 grep -v '^ *+' conftest.er1 >conftest.err
23062 rm -f conftest.er1
23063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023065 (exit $ac_status); } && {
23066 test -z "$ac_c_werror_flag" ||
23067 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023068 } && test -s conftest$ac_exeext &&
23069 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023070 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023071else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023073sed 's/^/| /' conftest.$ac_ext >&5
23074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023075 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023077
23078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023079 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023080fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023081{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23082echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23083if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023084 :
23085else
Martin v. Löwis11437992002-04-12 09:54:03 +000023086
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023087{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23088echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023089if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023091else
Martin v. Löwis11437992002-04-12 09:54:03 +000023092 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023093LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023095/* confdefs.h. */
23096_ACEOF
23097cat confdefs.h >>conftest.$ac_ext
23098cat >>conftest.$ac_ext <<_ACEOF
23099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023101/* Override any GCC internal prototype to avoid an error.
23102 Use char because int might match the return type of a GCC
23103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023104#ifdef __cplusplus
23105extern "C"
23106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023107char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023108int
23109main ()
23110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023111return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023112 ;
23113 return 0;
23114}
23115_ACEOF
23116rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023117if { (ac_try="$ac_link"
23118case "(($ac_try" in
23119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23120 *) ac_try_echo=$ac_try;;
23121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023123 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023125 grep -v '^ *+' conftest.er1 >conftest.err
23126 rm -f conftest.er1
23127 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023129 (exit $ac_status); } && {
23130 test -z "$ac_c_werror_flag" ||
23131 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023132 } && test -s conftest$ac_exeext &&
23133 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023134 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023137sed 's/^/| /' conftest.$ac_ext >&5
23138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023139 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023141
23142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023144LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023145fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023146{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23147echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23148if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023149 cat >>confdefs.h <<_ACEOF
23150#define HAVE_LIBIEEE 1
23151_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023152
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023153 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023154
Guido van Rossum627b2d71993-12-24 10:39:16 +000023155fi
23156
Michael W. Hudson54241132001-12-07 15:38:26 +000023157
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023158fi
23159
Michael W. Hudson54241132001-12-07 15:38:26 +000023160
Guido van Rossum7f253911997-05-09 02:42:48 +000023161# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023162{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23163echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023165# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023166if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023167 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023168if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023169then
23170
23171cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023172#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023173_ACEOF
23174
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023175 { echo "$as_me:$LINENO: result: yes" >&5
23176echo "${ECHO_T}yes" >&6; }
23177else { echo "$as_me:$LINENO: result: no" >&5
23178echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023179fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023180else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023181 { echo "$as_me:$LINENO: result: no" >&5
23182echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023183fi
23184
Guido van Rossum7f253911997-05-09 02:42:48 +000023185
Guido van Rossum7f43da71994-08-01 12:15:30 +000023186# check for --with-libm=...
23187
Guido van Rossum563e7081996-09-10 18:20:48 +000023188case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023189Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023190*) LIBM=-lm
23191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023192{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23193echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023195# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023196if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023197 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023198if test "$withval" = no
23199then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023200 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23201echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023202elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023203then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023204 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23205echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23206else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23207echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023208 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023209fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023211 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23212echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023213fi
23214
Guido van Rossum7f43da71994-08-01 12:15:30 +000023215
23216# check for --with-libc=...
23217
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023218{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23219echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023221# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023222if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023223 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023224if test "$withval" = no
23225then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023226 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23227echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023228elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023229then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023230 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23231echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23232else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23233echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023234 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023235fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023237 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23238echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023239fi
23240
Guido van Rossum7f43da71994-08-01 12:15:30 +000023241
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023242# **************************************************
23243# * Check for various properties of floating point *
23244# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023246{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23247echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023248if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023249 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023250else
23251
23252if test "$cross_compiling" = yes; then
23253 ac_cv_little_endian_double=no
23254else
23255 cat >conftest.$ac_ext <<_ACEOF
23256/* confdefs.h. */
23257_ACEOF
23258cat confdefs.h >>conftest.$ac_ext
23259cat >>conftest.$ac_ext <<_ACEOF
23260/* end confdefs.h. */
23261
23262#include <string.h>
23263int main() {
23264 double x = 9006104071832581.0;
23265 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23266 return 0;
23267 else
23268 return 1;
23269}
23270
23271_ACEOF
23272rm -f conftest$ac_exeext
23273if { (ac_try="$ac_link"
23274case "(($ac_try" in
23275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23276 *) ac_try_echo=$ac_try;;
23277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023279 (eval "$ac_link") 2>&5
23280 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23283 { (case "(($ac_try" in
23284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23285 *) ac_try_echo=$ac_try;;
23286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023288 (eval "$ac_try") 2>&5
23289 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023291 (exit $ac_status); }; }; then
23292 ac_cv_little_endian_double=yes
23293else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023294 echo "$as_me: program exited with status $ac_status" >&5
23295echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023296sed 's/^/| /' conftest.$ac_ext >&5
23297
23298( exit $ac_status )
23299ac_cv_little_endian_double=no
23300fi
23301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23302fi
23303
23304
23305fi
23306
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023307{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23308echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023309if test "$ac_cv_little_endian_double" = yes
23310then
23311
23312cat >>confdefs.h <<\_ACEOF
23313#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23314_ACEOF
23315
23316fi
23317
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023318{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23319echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023320if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023321 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023322else
23323
23324if test "$cross_compiling" = yes; then
23325 ac_cv_big_endian_double=no
23326else
23327 cat >conftest.$ac_ext <<_ACEOF
23328/* confdefs.h. */
23329_ACEOF
23330cat confdefs.h >>conftest.$ac_ext
23331cat >>conftest.$ac_ext <<_ACEOF
23332/* end confdefs.h. */
23333
23334#include <string.h>
23335int main() {
23336 double x = 9006104071832581.0;
23337 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23338 return 0;
23339 else
23340 return 1;
23341}
23342
23343_ACEOF
23344rm -f conftest$ac_exeext
23345if { (ac_try="$ac_link"
23346case "(($ac_try" in
23347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23348 *) ac_try_echo=$ac_try;;
23349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023351 (eval "$ac_link") 2>&5
23352 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023354 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23355 { (case "(($ac_try" in
23356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23357 *) ac_try_echo=$ac_try;;
23358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023360 (eval "$ac_try") 2>&5
23361 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023363 (exit $ac_status); }; }; then
23364 ac_cv_big_endian_double=yes
23365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023366 echo "$as_me: program exited with status $ac_status" >&5
23367echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023368sed 's/^/| /' conftest.$ac_ext >&5
23369
23370( exit $ac_status )
23371ac_cv_big_endian_double=no
23372fi
23373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23374fi
23375
23376
23377fi
23378
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023379{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23380echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023381if test "$ac_cv_big_endian_double" = yes
23382then
23383
23384cat >>confdefs.h <<\_ACEOF
23385#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23386_ACEOF
23387
23388fi
23389
23390# Some ARM platforms use a mixed-endian representation for doubles.
23391# While Python doesn't currently have full support for these platforms
23392# (see e.g., issue 1762561), we can at least make sure that float <-> string
23393# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023394{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23395echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023396if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023397 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023398else
23399
23400if test "$cross_compiling" = yes; then
23401 ac_cv_mixed_endian_double=no
23402else
23403 cat >conftest.$ac_ext <<_ACEOF
23404/* confdefs.h. */
23405_ACEOF
23406cat confdefs.h >>conftest.$ac_ext
23407cat >>conftest.$ac_ext <<_ACEOF
23408/* end confdefs.h. */
23409
23410#include <string.h>
23411int main() {
23412 double x = 9006104071832581.0;
23413 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23414 return 0;
23415 else
23416 return 1;
23417}
23418
23419_ACEOF
23420rm -f conftest$ac_exeext
23421if { (ac_try="$ac_link"
23422case "(($ac_try" in
23423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23424 *) ac_try_echo=$ac_try;;
23425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023427 (eval "$ac_link") 2>&5
23428 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023430 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23431 { (case "(($ac_try" in
23432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23433 *) ac_try_echo=$ac_try;;
23434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023436 (eval "$ac_try") 2>&5
23437 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023439 (exit $ac_status); }; }; then
23440 ac_cv_mixed_endian_double=yes
23441else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023442 echo "$as_me: program exited with status $ac_status" >&5
23443echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023444sed 's/^/| /' conftest.$ac_ext >&5
23445
23446( exit $ac_status )
23447ac_cv_mixed_endian_double=no
23448fi
23449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23450fi
23451
23452
23453fi
23454
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023455{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23456echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023457if test "$ac_cv_mixed_endian_double" = yes
23458then
23459
23460cat >>confdefs.h <<\_ACEOF
23461#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23462_ACEOF
23463
23464fi
23465
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023466# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023467# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023468# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023469# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023470# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023471# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023472
23473# This inline assembler syntax may also work for suncc and icc,
23474# so we try it on all platforms.
23475
23476{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023477echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023478cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023479/* confdefs.h. */
23480_ACEOF
23481cat confdefs.h >>conftest.$ac_ext
23482cat >>conftest.$ac_ext <<_ACEOF
23483/* end confdefs.h. */
23484
23485int
23486main ()
23487{
23488
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023489 unsigned short cw;
23490 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23491 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023492
23493 ;
23494 return 0;
23495}
23496_ACEOF
23497rm -f conftest.$ac_objext
23498if { (ac_try="$ac_compile"
23499case "(($ac_try" in
23500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23501 *) ac_try_echo=$ac_try;;
23502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023504 (eval "$ac_compile") 2>conftest.er1
23505 ac_status=$?
23506 grep -v '^ *+' conftest.er1 >conftest.err
23507 rm -f conftest.er1
23508 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023510 (exit $ac_status); } && {
23511 test -z "$ac_c_werror_flag" ||
23512 test ! -s conftest.err
23513 } && test -s conftest.$ac_objext; then
23514 have_gcc_asm_for_x87=yes
23515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023516 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023517sed 's/^/| /' conftest.$ac_ext >&5
23518
23519 have_gcc_asm_for_x87=no
23520fi
23521
23522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023523{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023524echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023525if test "$have_gcc_asm_for_x87" = yes
23526then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023527
23528cat >>confdefs.h <<\_ACEOF
23529#define HAVE_GCC_ASM_FOR_X87 1
23530_ACEOF
23531
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023533
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023534# Detect whether system arithmetic is subject to x87-style double
23535# rounding issues. The result of this test has little meaning on non
23536# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23537# mode is round-to-nearest and double rounding issues are present, and
23538# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023539{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23540echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023541# $BASECFLAGS may affect the result
23542ac_save_cc="$CC"
23543CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023544if test "$cross_compiling" = yes; then
23545 ac_cv_x87_double_rounding=no
23546else
23547 cat >conftest.$ac_ext <<_ACEOF
23548/* confdefs.h. */
23549_ACEOF
23550cat confdefs.h >>conftest.$ac_ext
23551cat >>conftest.$ac_ext <<_ACEOF
23552/* end confdefs.h. */
23553
23554#include <stdlib.h>
23555#include <math.h>
23556int main() {
23557 volatile double x, y, z;
23558 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23559 x = 0.99999999999999989; /* 1-2**-53 */
23560 y = 1./x;
23561 if (y != 1.)
23562 exit(0);
23563 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23564 x = 1e16;
23565 y = 2.99999;
23566 z = x + y;
23567 if (z != 1e16+4.)
23568 exit(0);
23569 /* both tests show evidence of double rounding */
23570 exit(1);
23571}
23572
23573_ACEOF
23574rm -f conftest$ac_exeext
23575if { (ac_try="$ac_link"
23576case "(($ac_try" in
23577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23578 *) ac_try_echo=$ac_try;;
23579esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023581 (eval "$ac_link") 2>&5
23582 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023584 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23585 { (case "(($ac_try" in
23586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23587 *) ac_try_echo=$ac_try;;
23588esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023590 (eval "$ac_try") 2>&5
23591 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023593 (exit $ac_status); }; }; then
23594 ac_cv_x87_double_rounding=no
23595else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023596 echo "$as_me: program exited with status $ac_status" >&5
23597echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023598sed 's/^/| /' conftest.$ac_ext >&5
23599
23600( exit $ac_status )
23601ac_cv_x87_double_rounding=yes
23602fi
23603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23604fi
23605
23606
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023607CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023608{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23609echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023610if test "$ac_cv_x87_double_rounding" = yes
23611then
23612
23613cat >>confdefs.h <<\_ACEOF
23614#define X87_DOUBLE_ROUNDING 1
23615_ACEOF
23616
23617fi
23618
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023619# ************************************
23620# * Check for mathematical functions *
23621# ************************************
23622
23623LIBS_SAVE=$LIBS
23624LIBS="$LIBS $LIBM"
23625
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023626# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23627# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023628{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23629echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023630if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023631 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023632else
23633
23634if test "$cross_compiling" = yes; then
23635 ac_cv_tanh_preserves_zero_sign=no
23636else
23637 cat >conftest.$ac_ext <<_ACEOF
23638/* confdefs.h. */
23639_ACEOF
23640cat confdefs.h >>conftest.$ac_ext
23641cat >>conftest.$ac_ext <<_ACEOF
23642/* end confdefs.h. */
23643
23644#include <math.h>
23645#include <stdlib.h>
23646int main() {
23647 /* return 0 if either negative zeros don't exist
23648 on this platform or if negative zeros exist
23649 and tanh(-0.) == -0. */
23650 if (atan2(0., -1.) == atan2(-0., -1.) ||
23651 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23652 else exit(1);
23653}
23654
23655_ACEOF
23656rm -f conftest$ac_exeext
23657if { (ac_try="$ac_link"
23658case "(($ac_try" in
23659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23660 *) ac_try_echo=$ac_try;;
23661esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023663 (eval "$ac_link") 2>&5
23664 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23667 { (case "(($ac_try" in
23668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23669 *) ac_try_echo=$ac_try;;
23670esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023672 (eval "$ac_try") 2>&5
23673 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023675 (exit $ac_status); }; }; then
23676 ac_cv_tanh_preserves_zero_sign=yes
23677else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023678 echo "$as_me: program exited with status $ac_status" >&5
23679echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023680sed 's/^/| /' conftest.$ac_ext >&5
23681
23682( exit $ac_status )
23683ac_cv_tanh_preserves_zero_sign=no
23684fi
23685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23686fi
23687
23688
23689fi
23690
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023691{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23692echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023693if test "$ac_cv_tanh_preserves_zero_sign" = yes
23694then
23695
23696cat >>confdefs.h <<\_ACEOF
23697#define TANH_PRESERVES_ZERO_SIGN 1
23698_ACEOF
23699
23700fi
23701
23702
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023703
Michael W. Hudson54241132001-12-07 15:38:26 +000023704
Christian Heimes99170a52007-12-19 02:07:34 +000023705
23706
23707
23708
23709
Mark Dickinsonf2537862009-04-18 13:58:18 +000023710
Mark Dickinson9c113362009-09-05 10:36:23 +000023711for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23712do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023713as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23714{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23715echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023716if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023717 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023718else
23719 cat >conftest.$ac_ext <<_ACEOF
23720/* confdefs.h. */
23721_ACEOF
23722cat confdefs.h >>conftest.$ac_ext
23723cat >>conftest.$ac_ext <<_ACEOF
23724/* end confdefs.h. */
23725/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23726 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23727#define $ac_func innocuous_$ac_func
23728
23729/* System header to define __stub macros and hopefully few prototypes,
23730 which can conflict with char $ac_func (); below.
23731 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23732 <limits.h> exists even on freestanding compilers. */
23733
23734#ifdef __STDC__
23735# include <limits.h>
23736#else
23737# include <assert.h>
23738#endif
23739
23740#undef $ac_func
23741
23742/* Override any GCC internal prototype to avoid an error.
23743 Use char because int might match the return type of a GCC
23744 builtin and then its argument prototype would still apply. */
23745#ifdef __cplusplus
23746extern "C"
23747#endif
23748char $ac_func ();
23749/* The GNU C library defines this for functions which it implements
23750 to always fail with ENOSYS. Some functions are actually named
23751 something starting with __ and the normal name is an alias. */
23752#if defined __stub_$ac_func || defined __stub___$ac_func
23753choke me
23754#endif
23755
23756int
23757main ()
23758{
23759return $ac_func ();
23760 ;
23761 return 0;
23762}
23763_ACEOF
23764rm -f conftest.$ac_objext conftest$ac_exeext
23765if { (ac_try="$ac_link"
23766case "(($ac_try" in
23767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23768 *) ac_try_echo=$ac_try;;
23769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023771 (eval "$ac_link") 2>conftest.er1
23772 ac_status=$?
23773 grep -v '^ *+' conftest.er1 >conftest.err
23774 rm -f conftest.er1
23775 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023777 (exit $ac_status); } && {
23778 test -z "$ac_c_werror_flag" ||
23779 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023780 } && test -s conftest$ac_exeext &&
23781 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023782 eval "$as_ac_var=yes"
23783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023784 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023785sed 's/^/| /' conftest.$ac_ext >&5
23786
23787 eval "$as_ac_var=no"
23788fi
23789
23790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23791 conftest$ac_exeext conftest.$ac_ext
23792fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023793ac_res=`eval echo '${'$as_ac_var'}'`
23794 { echo "$as_me:$LINENO: result: $ac_res" >&5
23795echo "${ECHO_T}$ac_res" >&6; }
23796if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023797 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023798#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023799_ACEOF
23800
23801fi
23802done
23803
23804
23805
23806
23807
23808
23809for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023810do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023811as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23812{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23813echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023814if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023815 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023816else
23817 cat >conftest.$ac_ext <<_ACEOF
23818/* confdefs.h. */
23819_ACEOF
23820cat confdefs.h >>conftest.$ac_ext
23821cat >>conftest.$ac_ext <<_ACEOF
23822/* end confdefs.h. */
23823/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23824 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23825#define $ac_func innocuous_$ac_func
23826
23827/* System header to define __stub macros and hopefully few prototypes,
23828 which can conflict with char $ac_func (); below.
23829 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23830 <limits.h> exists even on freestanding compilers. */
23831
23832#ifdef __STDC__
23833# include <limits.h>
23834#else
23835# include <assert.h>
23836#endif
23837
23838#undef $ac_func
23839
23840/* Override any GCC internal prototype to avoid an error.
23841 Use char because int might match the return type of a GCC
23842 builtin and then its argument prototype would still apply. */
23843#ifdef __cplusplus
23844extern "C"
23845#endif
23846char $ac_func ();
23847/* The GNU C library defines this for functions which it implements
23848 to always fail with ENOSYS. Some functions are actually named
23849 something starting with __ and the normal name is an alias. */
23850#if defined __stub_$ac_func || defined __stub___$ac_func
23851choke me
23852#endif
23853
23854int
23855main ()
23856{
23857return $ac_func ();
23858 ;
23859 return 0;
23860}
23861_ACEOF
23862rm -f conftest.$ac_objext conftest$ac_exeext
23863if { (ac_try="$ac_link"
23864case "(($ac_try" in
23865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23866 *) ac_try_echo=$ac_try;;
23867esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023869 (eval "$ac_link") 2>conftest.er1
23870 ac_status=$?
23871 grep -v '^ *+' conftest.er1 >conftest.err
23872 rm -f conftest.er1
23873 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023875 (exit $ac_status); } && {
23876 test -z "$ac_c_werror_flag" ||
23877 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023878 } && test -s conftest$ac_exeext &&
23879 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023880 eval "$as_ac_var=yes"
23881else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023882 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023883sed 's/^/| /' conftest.$ac_ext >&5
23884
23885 eval "$as_ac_var=no"
23886fi
23887
23888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23889 conftest$ac_exeext conftest.$ac_ext
23890fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023891ac_res=`eval echo '${'$as_ac_var'}'`
23892 { echo "$as_me:$LINENO: result: $ac_res" >&5
23893echo "${ECHO_T}$ac_res" >&6; }
23894if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023895 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023896#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023897_ACEOF
23898
23899fi
23900done
23901
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023902{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23903echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023904if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023905 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023906else
23907 cat >conftest.$ac_ext <<_ACEOF
23908/* confdefs.h. */
23909_ACEOF
23910cat confdefs.h >>conftest.$ac_ext
23911cat >>conftest.$ac_ext <<_ACEOF
23912/* end confdefs.h. */
23913#include <math.h>
23914
23915int
23916main ()
23917{
23918#ifndef isinf
23919 (void) isinf;
23920#endif
23921
23922 ;
23923 return 0;
23924}
23925_ACEOF
23926rm -f conftest.$ac_objext
23927if { (ac_try="$ac_compile"
23928case "(($ac_try" in
23929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23930 *) ac_try_echo=$ac_try;;
23931esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023933 (eval "$ac_compile") 2>conftest.er1
23934 ac_status=$?
23935 grep -v '^ *+' conftest.er1 >conftest.err
23936 rm -f conftest.er1
23937 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023939 (exit $ac_status); } && {
23940 test -z "$ac_c_werror_flag" ||
23941 test ! -s conftest.err
23942 } && test -s conftest.$ac_objext; then
23943 ac_cv_have_decl_isinf=yes
23944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023945 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023946sed 's/^/| /' conftest.$ac_ext >&5
23947
23948 ac_cv_have_decl_isinf=no
23949fi
23950
23951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23952fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023953{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23954echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23955if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023956
23957cat >>confdefs.h <<_ACEOF
23958#define HAVE_DECL_ISINF 1
23959_ACEOF
23960
23961
23962else
23963 cat >>confdefs.h <<_ACEOF
23964#define HAVE_DECL_ISINF 0
23965_ACEOF
23966
23967
23968fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023969{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23970echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023971if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023972 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023973else
23974 cat >conftest.$ac_ext <<_ACEOF
23975/* confdefs.h. */
23976_ACEOF
23977cat confdefs.h >>conftest.$ac_ext
23978cat >>conftest.$ac_ext <<_ACEOF
23979/* end confdefs.h. */
23980#include <math.h>
23981
23982int
23983main ()
23984{
23985#ifndef isnan
23986 (void) isnan;
23987#endif
23988
23989 ;
23990 return 0;
23991}
23992_ACEOF
23993rm -f conftest.$ac_objext
23994if { (ac_try="$ac_compile"
23995case "(($ac_try" in
23996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23997 *) ac_try_echo=$ac_try;;
23998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024000 (eval "$ac_compile") 2>conftest.er1
24001 ac_status=$?
24002 grep -v '^ *+' conftest.er1 >conftest.err
24003 rm -f conftest.er1
24004 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024006 (exit $ac_status); } && {
24007 test -z "$ac_c_werror_flag" ||
24008 test ! -s conftest.err
24009 } && test -s conftest.$ac_objext; then
24010 ac_cv_have_decl_isnan=yes
24011else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024012 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024013sed 's/^/| /' conftest.$ac_ext >&5
24014
24015 ac_cv_have_decl_isnan=no
24016fi
24017
24018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24019fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024020{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24021echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24022if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024023
24024cat >>confdefs.h <<_ACEOF
24025#define HAVE_DECL_ISNAN 1
24026_ACEOF
24027
24028
24029else
24030 cat >>confdefs.h <<_ACEOF
24031#define HAVE_DECL_ISNAN 0
24032_ACEOF
24033
24034
24035fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024036{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24037echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024038if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024039 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024040else
24041 cat >conftest.$ac_ext <<_ACEOF
24042/* confdefs.h. */
24043_ACEOF
24044cat confdefs.h >>conftest.$ac_ext
24045cat >>conftest.$ac_ext <<_ACEOF
24046/* end confdefs.h. */
24047#include <math.h>
24048
24049int
24050main ()
24051{
24052#ifndef isfinite
24053 (void) isfinite;
24054#endif
24055
24056 ;
24057 return 0;
24058}
24059_ACEOF
24060rm -f conftest.$ac_objext
24061if { (ac_try="$ac_compile"
24062case "(($ac_try" in
24063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24064 *) ac_try_echo=$ac_try;;
24065esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024067 (eval "$ac_compile") 2>conftest.er1
24068 ac_status=$?
24069 grep -v '^ *+' conftest.er1 >conftest.err
24070 rm -f conftest.er1
24071 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024073 (exit $ac_status); } && {
24074 test -z "$ac_c_werror_flag" ||
24075 test ! -s conftest.err
24076 } && test -s conftest.$ac_objext; then
24077 ac_cv_have_decl_isfinite=yes
24078else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024079 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024080sed 's/^/| /' conftest.$ac_ext >&5
24081
24082 ac_cv_have_decl_isfinite=no
24083fi
24084
24085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24086fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024087{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24088echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24089if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024090
24091cat >>confdefs.h <<_ACEOF
24092#define HAVE_DECL_ISFINITE 1
24093_ACEOF
24094
24095
24096else
24097 cat >>confdefs.h <<_ACEOF
24098#define HAVE_DECL_ISFINITE 0
24099_ACEOF
24100
24101
24102fi
24103
24104
Christian Heimes99170a52007-12-19 02:07:34 +000024105
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024106LIBS=$LIBS_SAVE
24107
Mark Dickinsona614f042009-11-28 12:48:43 +000024108# For multiprocessing module, check that sem_open
24109# actually works. For FreeBSD versions <= 7.2,
24110# the kernel module that provides POSIX semaphores
24111# isn't loaded by default, so an attempt to call
24112# sem_open results in a 'Signal 12' error.
24113{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24114echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24115if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24116 echo $ECHO_N "(cached) $ECHO_C" >&6
24117else
24118 if test "$cross_compiling" = yes; then
24119 ac_cv_posix_semaphores_enabled=yes
24120else
24121 cat >conftest.$ac_ext <<_ACEOF
24122/* confdefs.h. */
24123_ACEOF
24124cat confdefs.h >>conftest.$ac_ext
24125cat >>conftest.$ac_ext <<_ACEOF
24126/* end confdefs.h. */
24127
24128#include <unistd.h>
24129#include <fcntl.h>
24130#include <stdio.h>
24131#include <semaphore.h>
24132#include <sys/stat.h>
24133
24134int main(void) {
24135 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24136 if (a == SEM_FAILED) {
24137 perror("sem_open");
24138 return 1;
24139 }
24140 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024141 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024142 return 0;
24143}
24144
24145_ACEOF
24146rm -f conftest$ac_exeext
24147if { (ac_try="$ac_link"
24148case "(($ac_try" in
24149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24150 *) ac_try_echo=$ac_try;;
24151esac
24152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24153 (eval "$ac_link") 2>&5
24154 ac_status=$?
24155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24157 { (case "(($ac_try" in
24158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24159 *) ac_try_echo=$ac_try;;
24160esac
24161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24162 (eval "$ac_try") 2>&5
24163 ac_status=$?
24164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24165 (exit $ac_status); }; }; then
24166 ac_cv_posix_semaphores_enabled=yes
24167else
24168 echo "$as_me: program exited with status $ac_status" >&5
24169echo "$as_me: failed program was:" >&5
24170sed 's/^/| /' conftest.$ac_ext >&5
24171
24172( exit $ac_status )
24173ac_cv_posix_semaphores_enabled=no
24174fi
24175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24176fi
24177
24178
24179
24180fi
24181
24182{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24183echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24184if test $ac_cv_posix_semaphores_enabled = no
24185then
24186
24187cat >>confdefs.h <<\_ACEOF
24188#define POSIX_SEMAPHORES_NOT_ENABLED 1
24189_ACEOF
24190
24191fi
24192
Mark Dickinson10683072009-04-18 21:18:19 +000024193# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024194{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24195echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024196if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024197 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024198else
24199 if test "$cross_compiling" = yes; then
24200 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024201else
24202 cat >conftest.$ac_ext <<_ACEOF
24203/* confdefs.h. */
24204_ACEOF
24205cat confdefs.h >>conftest.$ac_ext
24206cat >>conftest.$ac_ext <<_ACEOF
24207/* end confdefs.h. */
24208
24209#include <unistd.h>
24210#include <fcntl.h>
24211#include <stdio.h>
24212#include <semaphore.h>
24213#include <sys/stat.h>
24214
24215int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024216 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024217 int count;
24218 int res;
24219 if(a==SEM_FAILED){
24220 perror("sem_open");
24221 return 1;
24222
24223 }
24224 res = sem_getvalue(a, &count);
24225 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024226 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024227 return res==-1 ? 1 : 0;
24228}
24229
Mark Dickinson10683072009-04-18 21:18:19 +000024230_ACEOF
24231rm -f conftest$ac_exeext
24232if { (ac_try="$ac_link"
24233case "(($ac_try" in
24234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24235 *) ac_try_echo=$ac_try;;
24236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024238 (eval "$ac_link") 2>&5
24239 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24242 { (case "(($ac_try" in
24243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24244 *) ac_try_echo=$ac_try;;
24245esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024247 (eval "$ac_try") 2>&5
24248 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024250 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024251 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024253 echo "$as_me: program exited with status $ac_status" >&5
24254echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024255sed 's/^/| /' conftest.$ac_ext >&5
24256
24257( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024258ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024259fi
24260rm -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 +000024261fi
24262
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024263
24264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024265fi
24266
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024267{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24268echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024269if test $ac_cv_broken_sem_getvalue = yes
24270then
24271
24272cat >>confdefs.h <<\_ACEOF
24273#define HAVE_BROKEN_SEM_GETVALUE 1
24274_ACEOF
24275
24276fi
24277
Mark Dickinsonbd792642009-03-18 20:06:12 +000024278# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024279{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24280echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024281# Check whether --enable-big-digits was given.
24282if test "${enable_big_digits+set}" = set; then
24283 enableval=$enable_big_digits; case $enable_big_digits in
24284yes)
24285 enable_big_digits=30 ;;
24286no)
24287 enable_big_digits=15 ;;
2428815|30)
24289 ;;
24290*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024291 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24292echo "$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 +000024293 { (exit 1); exit 1; }; } ;;
24294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024295{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24296echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024297
24298cat >>confdefs.h <<_ACEOF
24299#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24300_ACEOF
24301
24302
24303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024304 { echo "$as_me:$LINENO: result: no value specified" >&5
24305echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024306fi
24307
24308
Guido van Rossumef2255b2000-03-10 22:30:29 +000024309# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024310if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024311 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24312echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024313if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024314 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024315fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024316{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24317echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024318else
Martin v. Löwis11437992002-04-12 09:54:03 +000024319 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024320{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24321echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024322cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024323/* confdefs.h. */
24324_ACEOF
24325cat confdefs.h >>conftest.$ac_ext
24326cat >>conftest.$ac_ext <<_ACEOF
24327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024328$ac_includes_default
24329#include <wchar.h>
24330_ACEOF
24331rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024332if { (ac_try="$ac_compile"
24333case "(($ac_try" in
24334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24335 *) ac_try_echo=$ac_try;;
24336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024338 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024340 grep -v '^ *+' conftest.er1 >conftest.err
24341 rm -f conftest.er1
24342 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024344 (exit $ac_status); } && {
24345 test -z "$ac_c_werror_flag" ||
24346 test ! -s conftest.err
24347 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024348 ac_header_compiler=yes
24349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024351sed 's/^/| /' conftest.$ac_ext >&5
24352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024353 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024355
24356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024357{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24358echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024359
24360# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024361{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24362echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024363cat >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. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024369#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024370_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024371if { (ac_try="$ac_cpp conftest.$ac_ext"
24372case "(($ac_try" in
24373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24374 *) ac_try_echo=$ac_try;;
24375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024377 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024378 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024379 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024380 rm -f conftest.er1
24381 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024383 (exit $ac_status); } >/dev/null && {
24384 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24385 test ! -s conftest.err
24386 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024387 ac_header_preproc=yes
24388else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024390sed 's/^/| /' conftest.$ac_ext >&5
24391
Martin v. Löwis11437992002-04-12 09:54:03 +000024392 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024394
Martin v. Löwis11437992002-04-12 09:54:03 +000024395rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024396{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24397echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024398
24399# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024400case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24401 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024402 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24403echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24404 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24405echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024406 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024407 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024408 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024409 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24410echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24411 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24412echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24413 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24414echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24415 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24416echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24417 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24418echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24419 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24420echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024421 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024422## -------------------------------------- ##
24423## Report this to http://bugs.python.org/ ##
24424## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024425_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024426 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024427 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024428esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024429{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24430echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024431if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024432 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024433else
24434 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024435fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024436{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24437echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024438
24439fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024440if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024441
24442
24443cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024444#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024445_ACEOF
24446
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024447 wchar_h="yes"
24448
Guido van Rossumef2255b2000-03-10 22:30:29 +000024449else
Martin v. Löwis11437992002-04-12 09:54:03 +000024450 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024451
24452fi
24453
Michael W. Hudson54241132001-12-07 15:38:26 +000024454
Martin v. Löwis11437992002-04-12 09:54:03 +000024455
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024456# determine wchar_t size
24457if test "$wchar_h" = yes
24458then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024459 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24460echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24461if test "${ac_cv_type_wchar_t+set}" = set; then
24462 echo $ECHO_N "(cached) $ECHO_C" >&6
24463else
24464 cat >conftest.$ac_ext <<_ACEOF
24465/* confdefs.h. */
24466_ACEOF
24467cat confdefs.h >>conftest.$ac_ext
24468cat >>conftest.$ac_ext <<_ACEOF
24469/* end confdefs.h. */
24470#include <wchar.h>
24471
24472typedef wchar_t ac__type_new_;
24473int
24474main ()
24475{
24476if ((ac__type_new_ *) 0)
24477 return 0;
24478if (sizeof (ac__type_new_))
24479 return 0;
24480 ;
24481 return 0;
24482}
24483_ACEOF
24484rm -f conftest.$ac_objext
24485if { (ac_try="$ac_compile"
24486case "(($ac_try" in
24487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24488 *) ac_try_echo=$ac_try;;
24489esac
24490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24491 (eval "$ac_compile") 2>conftest.er1
24492 ac_status=$?
24493 grep -v '^ *+' conftest.er1 >conftest.err
24494 rm -f conftest.er1
24495 cat conftest.err >&5
24496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24497 (exit $ac_status); } && {
24498 test -z "$ac_c_werror_flag" ||
24499 test ! -s conftest.err
24500 } && test -s conftest.$ac_objext; then
24501 ac_cv_type_wchar_t=yes
24502else
24503 echo "$as_me: failed program was:" >&5
24504sed 's/^/| /' conftest.$ac_ext >&5
24505
24506 ac_cv_type_wchar_t=no
24507fi
24508
24509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24510fi
24511{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24512echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24513
24514# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024515# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24516# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24517# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024518{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24519echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024520if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024522else
Martin v. Löwis11437992002-04-12 09:54:03 +000024523 if test "$cross_compiling" = yes; then
24524 # Depending upon the size, compute the lo and hi bounds.
24525cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024526/* confdefs.h. */
24527_ACEOF
24528cat confdefs.h >>conftest.$ac_ext
24529cat >>conftest.$ac_ext <<_ACEOF
24530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024531#include <wchar.h>
24532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024533 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024534int
24535main ()
24536{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024537static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024538test_array [0] = 0
24539
24540 ;
24541 return 0;
24542}
24543_ACEOF
24544rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024545if { (ac_try="$ac_compile"
24546case "(($ac_try" in
24547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24548 *) ac_try_echo=$ac_try;;
24549esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024553 grep -v '^ *+' conftest.er1 >conftest.err
24554 rm -f conftest.er1
24555 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024557 (exit $ac_status); } && {
24558 test -z "$ac_c_werror_flag" ||
24559 test ! -s conftest.err
24560 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024561 ac_lo=0 ac_mid=0
24562 while :; do
24563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024564/* confdefs.h. */
24565_ACEOF
24566cat confdefs.h >>conftest.$ac_ext
24567cat >>conftest.$ac_ext <<_ACEOF
24568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024569#include <wchar.h>
24570
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024571 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024572int
24573main ()
24574{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024576test_array [0] = 0
24577
24578 ;
24579 return 0;
24580}
24581_ACEOF
24582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024583if { (ac_try="$ac_compile"
24584case "(($ac_try" in
24585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24586 *) ac_try_echo=$ac_try;;
24587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024591 grep -v '^ *+' conftest.er1 >conftest.err
24592 rm -f conftest.er1
24593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024595 (exit $ac_status); } && {
24596 test -z "$ac_c_werror_flag" ||
24597 test ! -s conftest.err
24598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024599 ac_hi=$ac_mid; break
24600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024602sed 's/^/| /' conftest.$ac_ext >&5
24603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024604 ac_lo=`expr $ac_mid + 1`
24605 if test $ac_lo -le $ac_mid; then
24606 ac_lo= ac_hi=
24607 break
24608 fi
24609 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024611
24612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024613 done
24614else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024616sed 's/^/| /' conftest.$ac_ext >&5
24617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024619/* confdefs.h. */
24620_ACEOF
24621cat confdefs.h >>conftest.$ac_ext
24622cat >>conftest.$ac_ext <<_ACEOF
24623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024624#include <wchar.h>
24625
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024626 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024627int
24628main ()
24629{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024631test_array [0] = 0
24632
24633 ;
24634 return 0;
24635}
24636_ACEOF
24637rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024638if { (ac_try="$ac_compile"
24639case "(($ac_try" in
24640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24641 *) ac_try_echo=$ac_try;;
24642esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024646 grep -v '^ *+' conftest.er1 >conftest.err
24647 rm -f conftest.er1
24648 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024650 (exit $ac_status); } && {
24651 test -z "$ac_c_werror_flag" ||
24652 test ! -s conftest.err
24653 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024654 ac_hi=-1 ac_mid=-1
24655 while :; do
24656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024657/* confdefs.h. */
24658_ACEOF
24659cat confdefs.h >>conftest.$ac_ext
24660cat >>conftest.$ac_ext <<_ACEOF
24661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024662#include <wchar.h>
24663
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024664 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024665int
24666main ()
24667{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024668static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024669test_array [0] = 0
24670
24671 ;
24672 return 0;
24673}
24674_ACEOF
24675rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024676if { (ac_try="$ac_compile"
24677case "(($ac_try" in
24678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24679 *) ac_try_echo=$ac_try;;
24680esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024682 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024684 grep -v '^ *+' conftest.er1 >conftest.err
24685 rm -f conftest.er1
24686 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024688 (exit $ac_status); } && {
24689 test -z "$ac_c_werror_flag" ||
24690 test ! -s conftest.err
24691 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024692 ac_lo=$ac_mid; break
24693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024695sed 's/^/| /' conftest.$ac_ext >&5
24696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024697 ac_hi=`expr '(' $ac_mid ')' - 1`
24698 if test $ac_mid -le $ac_hi; then
24699 ac_lo= ac_hi=
24700 break
24701 fi
24702 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024704
24705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024706 done
24707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024709sed 's/^/| /' conftest.$ac_ext >&5
24710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024711 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024713
24714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024716
24717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024718# Binary search between lo and hi bounds.
24719while test "x$ac_lo" != "x$ac_hi"; do
24720 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024722/* confdefs.h. */
24723_ACEOF
24724cat confdefs.h >>conftest.$ac_ext
24725cat >>conftest.$ac_ext <<_ACEOF
24726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024727#include <wchar.h>
24728
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024729 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024730int
24731main ()
24732{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024733static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024734test_array [0] = 0
24735
24736 ;
24737 return 0;
24738}
24739_ACEOF
24740rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024741if { (ac_try="$ac_compile"
24742case "(($ac_try" in
24743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24744 *) ac_try_echo=$ac_try;;
24745esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024749 grep -v '^ *+' conftest.er1 >conftest.err
24750 rm -f conftest.er1
24751 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024753 (exit $ac_status); } && {
24754 test -z "$ac_c_werror_flag" ||
24755 test ! -s conftest.err
24756 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024757 ac_hi=$ac_mid
24758else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024760sed 's/^/| /' conftest.$ac_ext >&5
24761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024762 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024764
24765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024766done
24767case $ac_lo in
24768?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024769'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024770 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024771See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024772echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024773See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024774 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024775 else
24776 ac_cv_sizeof_wchar_t=0
24777 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024778esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024779else
Martin v. Löwis11437992002-04-12 09:54:03 +000024780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024781/* confdefs.h. */
24782_ACEOF
24783cat confdefs.h >>conftest.$ac_ext
24784cat >>conftest.$ac_ext <<_ACEOF
24785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024786#include <wchar.h>
24787
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024788 typedef wchar_t ac__type_sizeof_;
24789static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24790static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024791#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024792#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024793int
24794main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024795{
Martin v. Löwis11437992002-04-12 09:54:03 +000024796
24797 FILE *f = fopen ("conftest.val", "w");
24798 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024799 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024800 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024801 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024802 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024803 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024804 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024805 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024806 }
24807 else
24808 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024809 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024810 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024811 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024812 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024813 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024814 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024815
24816 ;
24817 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024818}
Martin v. Löwis11437992002-04-12 09:54:03 +000024819_ACEOF
24820rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024821if { (ac_try="$ac_link"
24822case "(($ac_try" in
24823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24824 *) ac_try_echo=$ac_try;;
24825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024827 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024828 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024830 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024831 { (case "(($ac_try" in
24832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24833 *) ac_try_echo=$ac_try;;
24834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024836 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024837 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024839 (exit $ac_status); }; }; then
24840 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024842 echo "$as_me: program exited with status $ac_status" >&5
24843echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024844sed 's/^/| /' conftest.$ac_ext >&5
24845
Martin v. Löwis11437992002-04-12 09:54:03 +000024846( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024847if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024849See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024850echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024851See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024852 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024853 else
24854 ac_cv_sizeof_wchar_t=0
24855 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024857rm -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 +000024858fi
24859rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024860fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024861{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24862echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024863
24864
24865
Martin v. Löwis11437992002-04-12 09:54:03 +000024866cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024867#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024868_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024869
Michael W. Hudson54241132001-12-07 15:38:26 +000024870
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024871fi
24872
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024873{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24874echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024875have_ucs4_tcl=no
24876cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024877/* confdefs.h. */
24878_ACEOF
24879cat confdefs.h >>conftest.$ac_ext
24880cat >>conftest.$ac_ext <<_ACEOF
24881/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024882
24883#include <tcl.h>
24884#if TCL_UTF_MAX != 6
24885# error "NOT UCS4_TCL"
24886#endif
24887int
24888main ()
24889{
24890
24891 ;
24892 return 0;
24893}
24894_ACEOF
24895rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024896if { (ac_try="$ac_compile"
24897case "(($ac_try" in
24898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24899 *) ac_try_echo=$ac_try;;
24900esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024904 grep -v '^ *+' conftest.er1 >conftest.err
24905 rm -f conftest.er1
24906 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024908 (exit $ac_status); } && {
24909 test -z "$ac_c_werror_flag" ||
24910 test ! -s conftest.err
24911 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024912
24913
24914cat >>confdefs.h <<\_ACEOF
24915#define HAVE_UCS4_TCL 1
24916_ACEOF
24917
24918 have_ucs4_tcl=yes
24919
24920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024922sed 's/^/| /' conftest.$ac_ext >&5
24923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024924
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024926
24927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024928{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24929echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024930
Skip Montanaro6dead952003-09-25 14:50:04 +000024931# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024932if test "$wchar_h" = yes
24933then
24934 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024935 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24936echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024937 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024938 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024939else
24940
24941 if test "$cross_compiling" = yes; then
24942 ac_cv_wchar_t_signed=yes
24943else
24944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024945/* confdefs.h. */
24946_ACEOF
24947cat confdefs.h >>conftest.$ac_ext
24948cat >>conftest.$ac_ext <<_ACEOF
24949/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024950
24951 #include <wchar.h>
24952 int main()
24953 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024954 /* Success: exit code 0 */
24955 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024956 }
24957
24958_ACEOF
24959rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024960if { (ac_try="$ac_link"
24961case "(($ac_try" in
24962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24963 *) ac_try_echo=$ac_try;;
24964esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024966 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024967 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024969 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024970 { (case "(($ac_try" in
24971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24972 *) ac_try_echo=$ac_try;;
24973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024975 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024976 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024978 (exit $ac_status); }; }; then
24979 ac_cv_wchar_t_signed=yes
24980else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024981 echo "$as_me: program exited with status $ac_status" >&5
24982echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024983sed 's/^/| /' conftest.$ac_ext >&5
24984
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024985( exit $ac_status )
24986ac_cv_wchar_t_signed=no
24987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024988rm -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 +000024989fi
24990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024991
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024992fi
24993
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024994 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24995echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024996fi
24997
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024998{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24999echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025000
25001# Check whether --with-wide-unicode was given.
25002if test "${with_wide_unicode+set}" = set; then
25003 withval=$with_wide_unicode;
25004if test "$withval" != no
25005then unicode_size="4"
25006else unicode_size="2"
25007fi
25008
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025009else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025010
Georg Brandl52d168a2008-01-07 18:10:24 +000025011case "$have_ucs4_tcl" in
25012 yes) unicode_size="4" ;;
25013 *) unicode_size="2" ;;
25014esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025015
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025016fi
25017
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025018
25019
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025020
Georg Brandl52d168a2008-01-07 18:10:24 +000025021case "$unicode_size" in
25022 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025023#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025024_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025025 ;;
25026 *) cat >>confdefs.h <<\_ACEOF
25027#define Py_UNICODE_SIZE 2
25028_ACEOF
25029 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025030esac
25031
Michael W. Hudson54241132001-12-07 15:38:26 +000025032
Martin v. Löwis11437992002-04-12 09:54:03 +000025033
25034
Georg Brandl52d168a2008-01-07 18:10:24 +000025035# wchar_t is only usable if it maps to an unsigned type
25036if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025037 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025038then
25039 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025040
Martin v. Löwis11437992002-04-12 09:54:03 +000025041cat >>confdefs.h <<\_ACEOF
25042#define HAVE_USABLE_WCHAR_T 1
25043_ACEOF
25044
Georg Brandl52d168a2008-01-07 18:10:24 +000025045 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025046#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025047_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025048
Georg Brandl52d168a2008-01-07 18:10:24 +000025049elif test "$ac_cv_sizeof_short" = "$unicode_size"
25050then
25051 PY_UNICODE_TYPE="unsigned short"
25052 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025053#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025054_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025055
Georg Brandl52d168a2008-01-07 18:10:24 +000025056elif test "$ac_cv_sizeof_long" = "$unicode_size"
25057then
25058 PY_UNICODE_TYPE="unsigned long"
25059 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025060#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025061_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025062
Georg Brandl52d168a2008-01-07 18:10:24 +000025063else
25064 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025065fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025066{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25067echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025068
25069# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025070{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25071echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025072if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025074else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025075 # See if sys/param.h defines the BYTE_ORDER macro.
25076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025077/* confdefs.h. */
25078_ACEOF
25079cat confdefs.h >>conftest.$ac_ext
25080cat >>conftest.$ac_ext <<_ACEOF
25081/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025082#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025083#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025084
Martin v. Löwis11437992002-04-12 09:54:03 +000025085int
25086main ()
25087{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025088#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25089 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25090 bogus endian macros
25091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025092
25093 ;
25094 return 0;
25095}
25096_ACEOF
25097rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025098if { (ac_try="$ac_compile"
25099case "(($ac_try" in
25100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25101 *) ac_try_echo=$ac_try;;
25102esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025106 grep -v '^ *+' conftest.er1 >conftest.err
25107 rm -f conftest.er1
25108 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025110 (exit $ac_status); } && {
25111 test -z "$ac_c_werror_flag" ||
25112 test ! -s conftest.err
25113 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025114 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025115cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025116/* confdefs.h. */
25117_ACEOF
25118cat confdefs.h >>conftest.$ac_ext
25119cat >>conftest.$ac_ext <<_ACEOF
25120/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025121#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025122#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025123
Martin v. Löwis11437992002-04-12 09:54:03 +000025124int
25125main ()
25126{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025127#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025128 not big endian
25129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025130
25131 ;
25132 return 0;
25133}
25134_ACEOF
25135rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025136if { (ac_try="$ac_compile"
25137case "(($ac_try" in
25138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25139 *) ac_try_echo=$ac_try;;
25140esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025144 grep -v '^ *+' conftest.er1 >conftest.err
25145 rm -f conftest.er1
25146 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025148 (exit $ac_status); } && {
25149 test -z "$ac_c_werror_flag" ||
25150 test ! -s conftest.err
25151 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025152 ac_cv_c_bigendian=yes
25153else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025155sed 's/^/| /' conftest.$ac_ext >&5
25156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025157 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025159
25160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025163sed 's/^/| /' conftest.$ac_ext >&5
25164
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025165 # It does not; compile a test program.
25166if test "$cross_compiling" = yes; then
25167 # try to guess the endianness by grepping values into an object file
25168 ac_cv_c_bigendian=unknown
25169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025170/* confdefs.h. */
25171_ACEOF
25172cat confdefs.h >>conftest.$ac_ext
25173cat >>conftest.$ac_ext <<_ACEOF
25174/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025175short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25176short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25177void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25178short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25179short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25180void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025181int
25182main ()
25183{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025184 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025185 ;
25186 return 0;
25187}
25188_ACEOF
25189rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025190if { (ac_try="$ac_compile"
25191case "(($ac_try" in
25192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25193 *) ac_try_echo=$ac_try;;
25194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025198 grep -v '^ *+' conftest.er1 >conftest.err
25199 rm -f conftest.er1
25200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025202 (exit $ac_status); } && {
25203 test -z "$ac_c_werror_flag" ||
25204 test ! -s conftest.err
25205 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025206 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025207 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025208fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025209if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25210 if test "$ac_cv_c_bigendian" = unknown; then
25211 ac_cv_c_bigendian=no
25212 else
25213 # finding both strings is unlikely to happen, but who knows?
25214 ac_cv_c_bigendian=unknown
25215 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025216fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025219sed 's/^/| /' conftest.$ac_ext >&5
25220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025221
Martin v. Löwis11437992002-04-12 09:54:03 +000025222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025223
25224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025225else
25226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025227/* confdefs.h. */
25228_ACEOF
25229cat confdefs.h >>conftest.$ac_ext
25230cat >>conftest.$ac_ext <<_ACEOF
25231/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025232$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025233int
25234main ()
25235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025236
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025237 /* Are we little or big endian? From Harbison&Steele. */
25238 union
25239 {
25240 long int l;
25241 char c[sizeof (long int)];
25242 } u;
25243 u.l = 1;
25244 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025245
25246 ;
25247 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025248}
Martin v. Löwis11437992002-04-12 09:54:03 +000025249_ACEOF
25250rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025251if { (ac_try="$ac_link"
25252case "(($ac_try" in
25253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25254 *) ac_try_echo=$ac_try;;
25255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025257 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025258 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025261 { (case "(($ac_try" in
25262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25263 *) ac_try_echo=$ac_try;;
25264esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025266 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025267 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025270 ac_cv_c_bigendian=no
25271else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025272 echo "$as_me: program exited with status $ac_status" >&5
25273echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025274sed 's/^/| /' conftest.$ac_ext >&5
25275
Martin v. Löwis11437992002-04-12 09:54:03 +000025276( exit $ac_status )
25277ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025279rm -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 +000025280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025281
25282
Martin v. Löwis11437992002-04-12 09:54:03 +000025283fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025284
25285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25286fi
25287{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25288echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25289case $ac_cv_c_bigendian in
25290 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025291
25292cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025293#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025294_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025295 ;;
25296 no)
25297 ;;
25298 *)
25299 { { echo "$as_me:$LINENO: error: unknown endianness
25300presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25301echo "$as_me: error: unknown endianness
25302presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025303 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025304esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025305
Michael W. Hudson54241132001-12-07 15:38:26 +000025306
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025307# Check whether right shifting a negative integer extends the sign bit
25308# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025309{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25310echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025311if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025312 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025313else
Martin v. Löwis11437992002-04-12 09:54:03 +000025314
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025315if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025316 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025317else
Martin v. Löwis11437992002-04-12 09:54:03 +000025318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025319/* confdefs.h. */
25320_ACEOF
25321cat confdefs.h >>conftest.$ac_ext
25322cat >>conftest.$ac_ext <<_ACEOF
25323/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025324
25325int main()
25326{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025327 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025328}
25329
Martin v. Löwis11437992002-04-12 09:54:03 +000025330_ACEOF
25331rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025332if { (ac_try="$ac_link"
25333case "(($ac_try" in
25334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25335 *) ac_try_echo=$ac_try;;
25336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025338 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025339 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025342 { (case "(($ac_try" in
25343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25344 *) ac_try_echo=$ac_try;;
25345esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025347 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025348 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025350 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025351 ac_cv_rshift_extends_sign=yes
25352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025353 echo "$as_me: program exited with status $ac_status" >&5
25354echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025355sed 's/^/| /' conftest.$ac_ext >&5
25356
Martin v. Löwis11437992002-04-12 09:54:03 +000025357( exit $ac_status )
25358ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025360rm -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 +000025361fi
25362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025363
25364fi
25365
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025366{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25367echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025368if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025369then
Martin v. Löwis11437992002-04-12 09:54:03 +000025370
25371cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025372#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025373_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025374
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025375fi
25376
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025377# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025378{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25379echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025380if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025382else
Martin v. Löwis11437992002-04-12 09:54:03 +000025383
25384cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025385/* confdefs.h. */
25386_ACEOF
25387cat confdefs.h >>conftest.$ac_ext
25388cat >>conftest.$ac_ext <<_ACEOF
25389/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025390#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025391int
25392main ()
25393{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025394
25395 FILE *f = fopen("/dev/null", "r");
25396 flockfile(f);
25397 getc_unlocked(f);
25398 funlockfile(f);
25399
Martin v. Löwis11437992002-04-12 09:54:03 +000025400 ;
25401 return 0;
25402}
25403_ACEOF
25404rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025405if { (ac_try="$ac_link"
25406case "(($ac_try" in
25407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25408 *) ac_try_echo=$ac_try;;
25409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025411 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025413 grep -v '^ *+' conftest.er1 >conftest.err
25414 rm -f conftest.er1
25415 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025417 (exit $ac_status); } && {
25418 test -z "$ac_c_werror_flag" ||
25419 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025420 } && test -s conftest$ac_exeext &&
25421 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025422 ac_cv_have_getc_unlocked=yes
25423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025425sed 's/^/| /' conftest.$ac_ext >&5
25426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025427 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025429
25430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025431 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025432fi
25433
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025434{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25435echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025436if test "$ac_cv_have_getc_unlocked" = yes
25437then
Martin v. Löwis11437992002-04-12 09:54:03 +000025438
25439cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025440#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025441_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025442
25443fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025444
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025445# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025446# save the value of LIBS so we don't actually link Python with readline
25447LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025448
Gregory P. Smith18820942008-09-07 06:24:49 +000025449# On some systems we need to link readline to a termcap compatible
25450# library. NOTE: Keep the precedence of listed libraries synchronised
25451# with setup.py.
25452py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025453{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25454echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025455for py_libtermcap in "" ncursesw ncurses curses termcap; do
25456 if test -z "$py_libtermcap"; then
25457 READLINE_LIBS="-lreadline"
25458 else
25459 READLINE_LIBS="-lreadline -l$py_libtermcap"
25460 fi
25461 LIBS="$READLINE_LIBS $LIBS_no_readline"
25462 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025463/* confdefs.h. */
25464_ACEOF
25465cat confdefs.h >>conftest.$ac_ext
25466cat >>conftest.$ac_ext <<_ACEOF
25467/* end confdefs.h. */
25468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025469/* Override any GCC internal prototype to avoid an error.
25470 Use char because int might match the return type of a GCC
25471 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025472#ifdef __cplusplus
25473extern "C"
25474#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025475char readline ();
25476int
25477main ()
25478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025479return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025480 ;
25481 return 0;
25482}
25483_ACEOF
25484rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025485if { (ac_try="$ac_link"
25486case "(($ac_try" in
25487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25488 *) ac_try_echo=$ac_try;;
25489esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025491 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025492 ac_status=$?
25493 grep -v '^ *+' conftest.er1 >conftest.err
25494 rm -f conftest.er1
25495 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025497 (exit $ac_status); } && {
25498 test -z "$ac_c_werror_flag" ||
25499 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025500 } && test -s conftest$ac_exeext &&
25501 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025502 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025503else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025504 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025505sed 's/^/| /' conftest.$ac_ext >&5
25506
Gregory P. Smith18820942008-09-07 06:24:49 +000025507
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025509
25510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025511 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025512 if test $py_cv_lib_readline = yes; then
25513 break
25514 fi
25515done
25516# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25517#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025518if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025519 { echo "$as_me:$LINENO: result: none" >&5
25520echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025521else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025522 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25523echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025524
25525cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025526#define HAVE_LIBREADLINE 1
25527_ACEOF
25528
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025529fi
25530
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025531# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025532{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25533echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025534if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025535 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025536else
25537 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025538LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025539cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025540/* confdefs.h. */
25541_ACEOF
25542cat confdefs.h >>conftest.$ac_ext
25543cat >>conftest.$ac_ext <<_ACEOF
25544/* end confdefs.h. */
25545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025546/* Override any GCC internal prototype to avoid an error.
25547 Use char because int might match the return type of a GCC
25548 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025549#ifdef __cplusplus
25550extern "C"
25551#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025552char rl_callback_handler_install ();
25553int
25554main ()
25555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025556return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025557 ;
25558 return 0;
25559}
25560_ACEOF
25561rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025562if { (ac_try="$ac_link"
25563case "(($ac_try" in
25564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25565 *) ac_try_echo=$ac_try;;
25566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025568 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025570 grep -v '^ *+' conftest.er1 >conftest.err
25571 rm -f conftest.er1
25572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025574 (exit $ac_status); } && {
25575 test -z "$ac_c_werror_flag" ||
25576 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025577 } && test -s conftest$ac_exeext &&
25578 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025579 ac_cv_lib_readline_rl_callback_handler_install=yes
25580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025581 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025582sed 's/^/| /' conftest.$ac_ext >&5
25583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025584 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025586
25587rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025588 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025589LIBS=$ac_check_lib_save_LIBS
25590fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025591{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25592echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25593if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025594
25595cat >>confdefs.h <<\_ACEOF
25596#define HAVE_RL_CALLBACK 1
25597_ACEOF
25598
25599fi
25600
25601
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025602# check for readline 2.2
25603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025604/* confdefs.h. */
25605_ACEOF
25606cat confdefs.h >>conftest.$ac_ext
25607cat >>conftest.$ac_ext <<_ACEOF
25608/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025609#include <readline/readline.h>
25610_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025611if { (ac_try="$ac_cpp conftest.$ac_ext"
25612case "(($ac_try" in
25613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25614 *) ac_try_echo=$ac_try;;
25615esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025617 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025618 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025619 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025620 rm -f conftest.er1
25621 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025623 (exit $ac_status); } >/dev/null && {
25624 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25625 test ! -s conftest.err
25626 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025627 have_readline=yes
25628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025630sed 's/^/| /' conftest.$ac_ext >&5
25631
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025632 have_readline=no
25633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025634
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025635rm -f conftest.err conftest.$ac_ext
25636if test $have_readline = yes
25637then
25638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025639/* confdefs.h. */
25640_ACEOF
25641cat confdefs.h >>conftest.$ac_ext
25642cat >>conftest.$ac_ext <<_ACEOF
25643/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025644#include <readline/readline.h>
25645
25646_ACEOF
25647if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025648 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025649
25650cat >>confdefs.h <<\_ACEOF
25651#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25652_ACEOF
25653
25654fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000025655rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025656
Antoine Pitroud5131772009-10-26 19:22:14 +000025657 cat >conftest.$ac_ext <<_ACEOF
25658/* confdefs.h. */
25659_ACEOF
25660cat confdefs.h >>conftest.$ac_ext
25661cat >>conftest.$ac_ext <<_ACEOF
25662/* end confdefs.h. */
25663#include <readline/readline.h>
25664
25665_ACEOF
25666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25667 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25668
25669cat >>confdefs.h <<\_ACEOF
25670#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25671_ACEOF
25672
25673fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000025674rm -f -r conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025675
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025676fi
25677
Martin v. Löwis0daad592001-09-30 21:09:59 +000025678# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025679{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25680echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025681if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025683else
Martin v. Löwis11437992002-04-12 09:54:03 +000025684 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025685LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025687/* confdefs.h. */
25688_ACEOF
25689cat confdefs.h >>conftest.$ac_ext
25690cat >>conftest.$ac_ext <<_ACEOF
25691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025693/* Override any GCC internal prototype to avoid an error.
25694 Use char because int might match the return type of a GCC
25695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025696#ifdef __cplusplus
25697extern "C"
25698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025699char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025700int
25701main ()
25702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025703return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025704 ;
25705 return 0;
25706}
25707_ACEOF
25708rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025709if { (ac_try="$ac_link"
25710case "(($ac_try" in
25711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25712 *) ac_try_echo=$ac_try;;
25713esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025715 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025717 grep -v '^ *+' conftest.er1 >conftest.err
25718 rm -f conftest.er1
25719 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025721 (exit $ac_status); } && {
25722 test -z "$ac_c_werror_flag" ||
25723 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025724 } && test -s conftest$ac_exeext &&
25725 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025726 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025729sed 's/^/| /' conftest.$ac_ext >&5
25730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025731 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025733
25734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025736LIBS=$ac_check_lib_save_LIBS
25737fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025738{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25739echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25740if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025741
Martin v. Löwis11437992002-04-12 09:54:03 +000025742cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025743#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025744_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025745
Martin v. Löwis0daad592001-09-30 21:09:59 +000025746fi
25747
Michael W. Hudson54241132001-12-07 15:38:26 +000025748
Thomas Wouters89d996e2007-09-08 17:39:28 +000025749# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025750{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25751echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025752if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025753 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025754else
25755 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025756LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025757cat >conftest.$ac_ext <<_ACEOF
25758/* confdefs.h. */
25759_ACEOF
25760cat confdefs.h >>conftest.$ac_ext
25761cat >>conftest.$ac_ext <<_ACEOF
25762/* end confdefs.h. */
25763
25764/* Override any GCC internal prototype to avoid an error.
25765 Use char because int might match the return type of a GCC
25766 builtin and then its argument prototype would still apply. */
25767#ifdef __cplusplus
25768extern "C"
25769#endif
25770char rl_completion_display_matches_hook ();
25771int
25772main ()
25773{
25774return rl_completion_display_matches_hook ();
25775 ;
25776 return 0;
25777}
25778_ACEOF
25779rm -f conftest.$ac_objext conftest$ac_exeext
25780if { (ac_try="$ac_link"
25781case "(($ac_try" in
25782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25783 *) ac_try_echo=$ac_try;;
25784esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025786 (eval "$ac_link") 2>conftest.er1
25787 ac_status=$?
25788 grep -v '^ *+' conftest.er1 >conftest.err
25789 rm -f conftest.er1
25790 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025792 (exit $ac_status); } && {
25793 test -z "$ac_c_werror_flag" ||
25794 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025795 } && test -s conftest$ac_exeext &&
25796 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025797 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25798else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025799 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025800sed 's/^/| /' conftest.$ac_ext >&5
25801
25802 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25803fi
25804
25805rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25806 conftest$ac_exeext conftest.$ac_ext
25807LIBS=$ac_check_lib_save_LIBS
25808fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025809{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25810echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25811if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025812
25813cat >>confdefs.h <<\_ACEOF
25814#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25815_ACEOF
25816
25817fi
25818
25819
Martin v. Löwis0daad592001-09-30 21:09:59 +000025820# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025821{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25822echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025823if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025824 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025825else
Martin v. Löwis11437992002-04-12 09:54:03 +000025826 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025827LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025829/* confdefs.h. */
25830_ACEOF
25831cat confdefs.h >>conftest.$ac_ext
25832cat >>conftest.$ac_ext <<_ACEOF
25833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025835/* Override any GCC internal prototype to avoid an error.
25836 Use char because int might match the return type of a GCC
25837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025838#ifdef __cplusplus
25839extern "C"
25840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025841char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025842int
25843main ()
25844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025845return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025846 ;
25847 return 0;
25848}
25849_ACEOF
25850rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025851if { (ac_try="$ac_link"
25852case "(($ac_try" in
25853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25854 *) ac_try_echo=$ac_try;;
25855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025857 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025859 grep -v '^ *+' conftest.er1 >conftest.err
25860 rm -f conftest.er1
25861 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025863 (exit $ac_status); } && {
25864 test -z "$ac_c_werror_flag" ||
25865 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025866 } && test -s conftest$ac_exeext &&
25867 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025868 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025871sed 's/^/| /' conftest.$ac_ext >&5
25872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025873 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025875
25876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025878LIBS=$ac_check_lib_save_LIBS
25879fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025880{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25881echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25882if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025883
Martin v. Löwis11437992002-04-12 09:54:03 +000025884cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025885#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025886_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025887
Guido van Rossum353ae582001-07-10 16:45:32 +000025888fi
25889
Jack Jansendd19cf82001-12-06 22:36:17 +000025890
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025891# also in readline 4.2
25892cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025893/* confdefs.h. */
25894_ACEOF
25895cat confdefs.h >>conftest.$ac_ext
25896cat >>conftest.$ac_ext <<_ACEOF
25897/* end confdefs.h. */
25898#include <readline/readline.h>
25899_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025900if { (ac_try="$ac_cpp conftest.$ac_ext"
25901case "(($ac_try" in
25902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25903 *) ac_try_echo=$ac_try;;
25904esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025906 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025907 ac_status=$?
25908 grep -v '^ *+' conftest.er1 >conftest.err
25909 rm -f conftest.er1
25910 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025912 (exit $ac_status); } >/dev/null && {
25913 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25914 test ! -s conftest.err
25915 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025916 have_readline=yes
25917else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025918 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025919sed 's/^/| /' conftest.$ac_ext >&5
25920
25921 have_readline=no
25922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025923
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025924rm -f conftest.err conftest.$ac_ext
25925if test $have_readline = yes
25926then
25927 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025928/* confdefs.h. */
25929_ACEOF
25930cat confdefs.h >>conftest.$ac_ext
25931cat >>conftest.$ac_ext <<_ACEOF
25932/* end confdefs.h. */
25933#include <readline/readline.h>
25934
25935_ACEOF
25936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25937 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25938
25939cat >>confdefs.h <<\_ACEOF
25940#define HAVE_RL_CATCH_SIGNAL 1
25941_ACEOF
25942
25943fi
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000025944rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025945
25946fi
25947
Martin v. Löwis82bca632006-02-10 20:49:30 +000025948# End of readline checks: restore LIBS
25949LIBS=$LIBS_no_readline
25950
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025951{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25952echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025953if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025954 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025955else
Martin v. Löwis11437992002-04-12 09:54:03 +000025956
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025957if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025958 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025959else
Martin v. Löwis11437992002-04-12 09:54:03 +000025960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025961/* confdefs.h. */
25962_ACEOF
25963cat confdefs.h >>conftest.$ac_ext
25964cat >>conftest.$ac_ext <<_ACEOF
25965/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025966
25967int main()
25968{
25969 int val1 = nice(1);
25970 if (val1 != -1 && val1 == nice(2))
25971 exit(0);
25972 exit(1);
25973}
25974
Martin v. Löwis11437992002-04-12 09:54:03 +000025975_ACEOF
25976rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025977if { (ac_try="$ac_link"
25978case "(($ac_try" in
25979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25980 *) ac_try_echo=$ac_try;;
25981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025983 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025984 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025987 { (case "(($ac_try" in
25988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25989 *) ac_try_echo=$ac_try;;
25990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025992 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025993 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025995 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025996 ac_cv_broken_nice=yes
25997else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025998 echo "$as_me: program exited with status $ac_status" >&5
25999echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026000sed 's/^/| /' conftest.$ac_ext >&5
26001
Martin v. Löwis11437992002-04-12 09:54:03 +000026002( exit $ac_status )
26003ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026005rm -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 +000026006fi
26007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026008
26009fi
26010
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026011{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26012echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026013if test "$ac_cv_broken_nice" = yes
26014then
Martin v. Löwis11437992002-04-12 09:54:03 +000026015
26016cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026017#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026018_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026019
26020fi
26021
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026022{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26023echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026024if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026025 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026026else
26027 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026028 ac_cv_broken_poll=no
26029else
26030 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026031/* confdefs.h. */
26032_ACEOF
26033cat confdefs.h >>conftest.$ac_ext
26034cat >>conftest.$ac_ext <<_ACEOF
26035/* end confdefs.h. */
26036
26037#include <poll.h>
26038
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026039int main()
26040{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026041 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026042 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026043
26044 close (42);
26045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026046 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026047 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026048 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026049 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026050 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026051 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026052 return 1;
26053}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026054
26055_ACEOF
26056rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026057if { (ac_try="$ac_link"
26058case "(($ac_try" in
26059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26060 *) ac_try_echo=$ac_try;;
26061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026063 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026064 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026067 { (case "(($ac_try" in
26068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26069 *) ac_try_echo=$ac_try;;
26070esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026072 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026073 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026075 (exit $ac_status); }; }; then
26076 ac_cv_broken_poll=yes
26077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026078 echo "$as_me: program exited with status $ac_status" >&5
26079echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026080sed 's/^/| /' conftest.$ac_ext >&5
26081
26082( exit $ac_status )
26083ac_cv_broken_poll=no
26084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026085rm -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 +000026086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026087
26088
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026089fi
26090
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026091{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26092echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026093if test "$ac_cv_broken_poll" = yes
26094then
26095
26096cat >>confdefs.h <<\_ACEOF
26097#define HAVE_BROKEN_POLL 1
26098_ACEOF
26099
26100fi
26101
Brett Cannon43802422005-02-10 20:48:03 +000026102# 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 +000026103# (which is not required by ISO C or UNIX spec) and/or if we support
26104# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026105{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26106echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026107if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026108 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026109else
26110 cat >conftest.$ac_ext <<_ACEOF
26111/* confdefs.h. */
26112_ACEOF
26113cat confdefs.h >>conftest.$ac_ext
26114cat >>conftest.$ac_ext <<_ACEOF
26115/* end confdefs.h. */
26116#include <sys/types.h>
26117#include <$ac_cv_struct_tm>
26118
26119
26120int
26121main ()
26122{
26123static struct tm ac_aggr;
26124if (ac_aggr.tm_zone)
26125return 0;
26126 ;
26127 return 0;
26128}
26129_ACEOF
26130rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026131if { (ac_try="$ac_compile"
26132case "(($ac_try" in
26133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26134 *) ac_try_echo=$ac_try;;
26135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026137 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026138 ac_status=$?
26139 grep -v '^ *+' conftest.er1 >conftest.err
26140 rm -f conftest.er1
26141 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026143 (exit $ac_status); } && {
26144 test -z "$ac_c_werror_flag" ||
26145 test ! -s conftest.err
26146 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026147 ac_cv_member_struct_tm_tm_zone=yes
26148else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026149 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026150sed 's/^/| /' conftest.$ac_ext >&5
26151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026152 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026153/* confdefs.h. */
26154_ACEOF
26155cat confdefs.h >>conftest.$ac_ext
26156cat >>conftest.$ac_ext <<_ACEOF
26157/* end confdefs.h. */
26158#include <sys/types.h>
26159#include <$ac_cv_struct_tm>
26160
26161
26162int
26163main ()
26164{
26165static struct tm ac_aggr;
26166if (sizeof ac_aggr.tm_zone)
26167return 0;
26168 ;
26169 return 0;
26170}
26171_ACEOF
26172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026173if { (ac_try="$ac_compile"
26174case "(($ac_try" in
26175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26176 *) ac_try_echo=$ac_try;;
26177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026179 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026180 ac_status=$?
26181 grep -v '^ *+' conftest.er1 >conftest.err
26182 rm -f conftest.er1
26183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026185 (exit $ac_status); } && {
26186 test -z "$ac_c_werror_flag" ||
26187 test ! -s conftest.err
26188 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026189 ac_cv_member_struct_tm_tm_zone=yes
26190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026191 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026192sed 's/^/| /' conftest.$ac_ext >&5
26193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026194 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026196
26197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026199
26200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026201fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026202{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26203echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26204if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026205
26206cat >>confdefs.h <<_ACEOF
26207#define HAVE_STRUCT_TM_TM_ZONE 1
26208_ACEOF
26209
26210
26211fi
26212
26213if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26214
26215cat >>confdefs.h <<\_ACEOF
26216#define HAVE_TM_ZONE 1
26217_ACEOF
26218
26219else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026220 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26221echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026222if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026223 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026224else
26225 cat >conftest.$ac_ext <<_ACEOF
26226/* confdefs.h. */
26227_ACEOF
26228cat confdefs.h >>conftest.$ac_ext
26229cat >>conftest.$ac_ext <<_ACEOF
26230/* end confdefs.h. */
26231#include <time.h>
26232
26233int
26234main ()
26235{
26236#ifndef tzname
26237 (void) tzname;
26238#endif
26239
26240 ;
26241 return 0;
26242}
26243_ACEOF
26244rm -f conftest.$ac_objext
26245if { (ac_try="$ac_compile"
26246case "(($ac_try" in
26247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26248 *) ac_try_echo=$ac_try;;
26249esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026251 (eval "$ac_compile") 2>conftest.er1
26252 ac_status=$?
26253 grep -v '^ *+' conftest.er1 >conftest.err
26254 rm -f conftest.er1
26255 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026257 (exit $ac_status); } && {
26258 test -z "$ac_c_werror_flag" ||
26259 test ! -s conftest.err
26260 } && test -s conftest.$ac_objext; then
26261 ac_cv_have_decl_tzname=yes
26262else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026263 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026264sed 's/^/| /' conftest.$ac_ext >&5
26265
26266 ac_cv_have_decl_tzname=no
26267fi
26268
26269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26270fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026271{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26272echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26273if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026274
26275cat >>confdefs.h <<_ACEOF
26276#define HAVE_DECL_TZNAME 1
26277_ACEOF
26278
26279
26280else
26281 cat >>confdefs.h <<_ACEOF
26282#define HAVE_DECL_TZNAME 0
26283_ACEOF
26284
26285
26286fi
26287
26288
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026289 { echo "$as_me:$LINENO: checking for tzname" >&5
26290echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026291if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026292 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026293else
26294 cat >conftest.$ac_ext <<_ACEOF
26295/* confdefs.h. */
26296_ACEOF
26297cat confdefs.h >>conftest.$ac_ext
26298cat >>conftest.$ac_ext <<_ACEOF
26299/* end confdefs.h. */
26300#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026301#if !HAVE_DECL_TZNAME
26302extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026303#endif
26304
26305int
26306main ()
26307{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026308return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026309 ;
26310 return 0;
26311}
26312_ACEOF
26313rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026314if { (ac_try="$ac_link"
26315case "(($ac_try" in
26316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26317 *) ac_try_echo=$ac_try;;
26318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026320 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026321 ac_status=$?
26322 grep -v '^ *+' conftest.er1 >conftest.err
26323 rm -f conftest.er1
26324 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026326 (exit $ac_status); } && {
26327 test -z "$ac_c_werror_flag" ||
26328 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026329 } && test -s conftest$ac_exeext &&
26330 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026331 ac_cv_var_tzname=yes
26332else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026333 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026334sed 's/^/| /' conftest.$ac_ext >&5
26335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026336 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026338
26339rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026340 conftest$ac_exeext conftest.$ac_ext
26341fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026342{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26343echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026344 if test $ac_cv_var_tzname = yes; then
26345
26346cat >>confdefs.h <<\_ACEOF
26347#define HAVE_TZNAME 1
26348_ACEOF
26349
26350 fi
26351fi
26352
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026353
Martin v. Löwis1d459062005-03-14 21:23:33 +000026354# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026355{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26356echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026357if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026358 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026359else
26360
26361if test "$cross_compiling" = yes; then
26362 ac_cv_working_tzset=no
26363else
26364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026365/* confdefs.h. */
26366_ACEOF
26367cat confdefs.h >>conftest.$ac_ext
26368cat >>conftest.$ac_ext <<_ACEOF
26369/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026370
26371#include <stdlib.h>
26372#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026373#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026374
26375#if HAVE_TZNAME
26376extern char *tzname[];
26377#endif
26378
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026379int main()
26380{
Brett Cannon18367812003-09-19 00:59:16 +000026381 /* Note that we need to ensure that not only does tzset(3)
26382 do 'something' with localtime, but it works as documented
26383 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026384 This includes making sure that tzname is set properly if
26385 tm->tm_zone does not exist since it is the alternative way
26386 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026387
26388 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026389 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026390 */
26391
Martin v. Löwis1d459062005-03-14 21:23:33 +000026392 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026393 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26394
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026395 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026396 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026397 if (localtime(&groundhogday)->tm_hour != 0)
26398 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026399#if HAVE_TZNAME
26400 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26401 if (strcmp(tzname[0], "UTC") ||
26402 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26403 exit(1);
26404#endif
Brett Cannon18367812003-09-19 00:59:16 +000026405
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026406 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026407 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026408 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026409 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026410#if HAVE_TZNAME
26411 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26412 exit(1);
26413#endif
Brett Cannon18367812003-09-19 00:59:16 +000026414
26415 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26416 tzset();
26417 if (localtime(&groundhogday)->tm_hour != 11)
26418 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026419#if HAVE_TZNAME
26420 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26421 exit(1);
26422#endif
26423
26424#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026425 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26426 exit(1);
26427 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26428 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026429#endif
Brett Cannon18367812003-09-19 00:59:16 +000026430
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026431 exit(0);
26432}
26433
26434_ACEOF
26435rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026436if { (ac_try="$ac_link"
26437case "(($ac_try" in
26438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26439 *) ac_try_echo=$ac_try;;
26440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026442 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026446 { (case "(($ac_try" in
26447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26448 *) ac_try_echo=$ac_try;;
26449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026452 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026454 (exit $ac_status); }; }; then
26455 ac_cv_working_tzset=yes
26456else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026457 echo "$as_me: program exited with status $ac_status" >&5
26458echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026459sed 's/^/| /' conftest.$ac_ext >&5
26460
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026461( exit $ac_status )
26462ac_cv_working_tzset=no
26463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026464rm -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 +000026465fi
26466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026467
26468fi
26469
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026470{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26471echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026472if test "$ac_cv_working_tzset" = yes
26473then
26474
26475cat >>confdefs.h <<\_ACEOF
26476#define HAVE_WORKING_TZSET 1
26477_ACEOF
26478
26479fi
26480
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026481# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026482{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26483echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026484if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026485 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026486else
26487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026488/* confdefs.h. */
26489_ACEOF
26490cat confdefs.h >>conftest.$ac_ext
26491cat >>conftest.$ac_ext <<_ACEOF
26492/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026493#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026494int
26495main ()
26496{
26497
26498struct stat st;
26499st.st_mtim.tv_nsec = 1;
26500
26501 ;
26502 return 0;
26503}
26504_ACEOF
26505rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026506if { (ac_try="$ac_compile"
26507case "(($ac_try" in
26508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26509 *) ac_try_echo=$ac_try;;
26510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026514 grep -v '^ *+' conftest.er1 >conftest.err
26515 rm -f conftest.er1
26516 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026518 (exit $ac_status); } && {
26519 test -z "$ac_c_werror_flag" ||
26520 test ! -s conftest.err
26521 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026522 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026523else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026525sed 's/^/| /' conftest.$ac_ext >&5
26526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026527 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026528fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26531fi
26532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026533{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26534echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026535if test "$ac_cv_stat_tv_nsec" = yes
26536then
26537
26538cat >>confdefs.h <<\_ACEOF
26539#define HAVE_STAT_TV_NSEC 1
26540_ACEOF
26541
26542fi
26543
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026544# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026545{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26546echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026547if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026549else
26550 cat >conftest.$ac_ext <<_ACEOF
26551/* confdefs.h. */
26552_ACEOF
26553cat confdefs.h >>conftest.$ac_ext
26554cat >>conftest.$ac_ext <<_ACEOF
26555/* end confdefs.h. */
26556#include <sys/stat.h>
26557int
26558main ()
26559{
26560
26561struct stat st;
26562st.st_mtimespec.tv_nsec = 1;
26563
26564 ;
26565 return 0;
26566}
26567_ACEOF
26568rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026569if { (ac_try="$ac_compile"
26570case "(($ac_try" in
26571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26572 *) ac_try_echo=$ac_try;;
26573esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026576 ac_status=$?
26577 grep -v '^ *+' conftest.er1 >conftest.err
26578 rm -f conftest.er1
26579 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026581 (exit $ac_status); } && {
26582 test -z "$ac_c_werror_flag" ||
26583 test ! -s conftest.err
26584 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026585 ac_cv_stat_tv_nsec2=yes
26586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026587 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026588sed 's/^/| /' conftest.$ac_ext >&5
26589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026590 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026591fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26594fi
26595
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026596{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26597echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026598if test "$ac_cv_stat_tv_nsec2" = yes
26599then
26600
26601cat >>confdefs.h <<\_ACEOF
26602#define HAVE_STAT_TV_NSEC2 1
26603_ACEOF
26604
26605fi
26606
Jack Jansen666b1e72001-10-31 12:11:48 +000026607# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026608{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26609echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026610if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026611 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026612else
Martin v. Löwis11437992002-04-12 09:54:03 +000026613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026614/* confdefs.h. */
26615_ACEOF
26616cat confdefs.h >>conftest.$ac_ext
26617cat >>conftest.$ac_ext <<_ACEOF
26618/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026619#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026620int
26621main ()
26622{
Jack Jansen666b1e72001-10-31 12:11:48 +000026623
26624 int rtn;
26625 rtn = mvwdelch(0,0,0);
26626
Martin v. Löwis11437992002-04-12 09:54:03 +000026627 ;
26628 return 0;
26629}
26630_ACEOF
26631rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026632if { (ac_try="$ac_compile"
26633case "(($ac_try" in
26634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26635 *) ac_try_echo=$ac_try;;
26636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026640 grep -v '^ *+' conftest.er1 >conftest.err
26641 rm -f conftest.er1
26642 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026644 (exit $ac_status); } && {
26645 test -z "$ac_c_werror_flag" ||
26646 test ! -s conftest.err
26647 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026648 ac_cv_mvwdelch_is_expression=yes
26649else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026651sed 's/^/| /' conftest.$ac_ext >&5
26652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026653 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026654fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26657fi
26658
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026659{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26660echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026661
26662if test "$ac_cv_mvwdelch_is_expression" = yes
26663then
Martin v. Löwis11437992002-04-12 09:54:03 +000026664
26665cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026666#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026667_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026668
26669fi
26670
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026671{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26672echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026673if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026674 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026675else
Martin v. Löwis11437992002-04-12 09:54:03 +000026676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026677/* confdefs.h. */
26678_ACEOF
26679cat confdefs.h >>conftest.$ac_ext
26680cat >>conftest.$ac_ext <<_ACEOF
26681/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026682#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026683int
26684main ()
26685{
Jack Jansen666b1e72001-10-31 12:11:48 +000026686
26687 WINDOW *w;
26688 w->_flags = 0;
26689
Martin v. Löwis11437992002-04-12 09:54:03 +000026690 ;
26691 return 0;
26692}
26693_ACEOF
26694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026695if { (ac_try="$ac_compile"
26696case "(($ac_try" in
26697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26698 *) ac_try_echo=$ac_try;;
26699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026703 grep -v '^ *+' conftest.er1 >conftest.err
26704 rm -f conftest.er1
26705 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026707 (exit $ac_status); } && {
26708 test -z "$ac_c_werror_flag" ||
26709 test ! -s conftest.err
26710 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026711 ac_cv_window_has_flags=yes
26712else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026714sed 's/^/| /' conftest.$ac_ext >&5
26715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026716 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026717fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26720fi
26721
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026722{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26723echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026724
Jack Jansen666b1e72001-10-31 12:11:48 +000026725
26726if test "$ac_cv_window_has_flags" = yes
26727then
Martin v. Löwis11437992002-04-12 09:54:03 +000026728
26729cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026730#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026731_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026732
26733fi
26734
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026735{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26736echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026737cat >conftest.$ac_ext <<_ACEOF
26738/* confdefs.h. */
26739_ACEOF
26740cat confdefs.h >>conftest.$ac_ext
26741cat >>conftest.$ac_ext <<_ACEOF
26742/* end confdefs.h. */
26743#include <curses.h>
26744int
26745main ()
26746{
26747void *x=is_term_resized
26748 ;
26749 return 0;
26750}
26751_ACEOF
26752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026753if { (ac_try="$ac_compile"
26754case "(($ac_try" in
26755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26756 *) ac_try_echo=$ac_try;;
26757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026759 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026760 ac_status=$?
26761 grep -v '^ *+' conftest.er1 >conftest.err
26762 rm -f conftest.er1
26763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026765 (exit $ac_status); } && {
26766 test -z "$ac_c_werror_flag" ||
26767 test ! -s conftest.err
26768 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026769
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026770cat >>confdefs.h <<\_ACEOF
26771#define HAVE_CURSES_IS_TERM_RESIZED 1
26772_ACEOF
26773
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026774 { echo "$as_me:$LINENO: result: yes" >&5
26775echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026776else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026777 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026778sed 's/^/| /' conftest.$ac_ext >&5
26779
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026780 { echo "$as_me:$LINENO: result: no" >&5
26781echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026782
26783fi
26784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26786
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026787{ echo "$as_me:$LINENO: checking for resize_term" >&5
26788echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026789cat >conftest.$ac_ext <<_ACEOF
26790/* confdefs.h. */
26791_ACEOF
26792cat confdefs.h >>conftest.$ac_ext
26793cat >>conftest.$ac_ext <<_ACEOF
26794/* end confdefs.h. */
26795#include <curses.h>
26796int
26797main ()
26798{
26799void *x=resize_term
26800 ;
26801 return 0;
26802}
26803_ACEOF
26804rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026805if { (ac_try="$ac_compile"
26806case "(($ac_try" in
26807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26808 *) ac_try_echo=$ac_try;;
26809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026811 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026812 ac_status=$?
26813 grep -v '^ *+' conftest.er1 >conftest.err
26814 rm -f conftest.er1
26815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026817 (exit $ac_status); } && {
26818 test -z "$ac_c_werror_flag" ||
26819 test ! -s conftest.err
26820 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026821
26822cat >>confdefs.h <<\_ACEOF
26823#define HAVE_CURSES_RESIZE_TERM 1
26824_ACEOF
26825
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026826 { echo "$as_me:$LINENO: result: yes" >&5
26827echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026829 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026830sed 's/^/| /' conftest.$ac_ext >&5
26831
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026832 { echo "$as_me:$LINENO: result: no" >&5
26833echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026834
26835fi
26836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26838
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026839{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26840echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026841cat >conftest.$ac_ext <<_ACEOF
26842/* confdefs.h. */
26843_ACEOF
26844cat confdefs.h >>conftest.$ac_ext
26845cat >>conftest.$ac_ext <<_ACEOF
26846/* end confdefs.h. */
26847#include <curses.h>
26848int
26849main ()
26850{
26851void *x=resizeterm
26852 ;
26853 return 0;
26854}
26855_ACEOF
26856rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026857if { (ac_try="$ac_compile"
26858case "(($ac_try" in
26859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26860 *) ac_try_echo=$ac_try;;
26861esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026863 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026864 ac_status=$?
26865 grep -v '^ *+' conftest.er1 >conftest.err
26866 rm -f conftest.er1
26867 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026869 (exit $ac_status); } && {
26870 test -z "$ac_c_werror_flag" ||
26871 test ! -s conftest.err
26872 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026873
26874cat >>confdefs.h <<\_ACEOF
26875#define HAVE_CURSES_RESIZETERM 1
26876_ACEOF
26877
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026878 { echo "$as_me:$LINENO: result: yes" >&5
26879echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026881 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026882sed 's/^/| /' conftest.$ac_ext >&5
26883
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026884 { echo "$as_me:$LINENO: result: no" >&5
26885echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026886
26887fi
26888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26890
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026891{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26892echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026893
26894if test -r /dev/ptmx
26895then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026896 { echo "$as_me:$LINENO: result: yes" >&5
26897echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026898
26899cat >>confdefs.h <<\_ACEOF
26900#define HAVE_DEV_PTMX 1
26901_ACEOF
26902
Thomas Wouters89f507f2006-12-13 04:49:30 +000026903else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026904 { echo "$as_me:$LINENO: result: no" >&5
26905echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026906fi
26907
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026908{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26909echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026910
26911if test -r /dev/ptc
26912then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026913 { echo "$as_me:$LINENO: result: yes" >&5
26914echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026915
26916cat >>confdefs.h <<\_ACEOF
26917#define HAVE_DEV_PTC 1
26918_ACEOF
26919
Thomas Wouters89f507f2006-12-13 04:49:30 +000026920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026921 { echo "$as_me:$LINENO: result: no" >&5
26922echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026923fi
26924
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026925if test "$have_long_long" = yes
26926then
26927 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26928echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26929 if test "${ac_cv_have_long_long_format+set}" = set; then
26930 echo $ECHO_N "(cached) $ECHO_C" >&6
26931else
26932 if test "$cross_compiling" = yes; then
26933 ac_cv_have_long_long_format=no
26934else
26935 cat >conftest.$ac_ext <<_ACEOF
26936/* confdefs.h. */
26937_ACEOF
26938cat confdefs.h >>conftest.$ac_ext
26939cat >>conftest.$ac_ext <<_ACEOF
26940/* end confdefs.h. */
26941
26942 #include <stdio.h>
26943 #include <stddef.h>
26944 #include <string.h>
26945
26946 #ifdef HAVE_SYS_TYPES_H
26947 #include <sys/types.h>
26948 #endif
26949
26950 int main()
26951 {
26952 char buffer[256];
26953
26954 if (sprintf(buffer, "%lld", (long long)123) < 0)
26955 return 1;
26956 if (strcmp(buffer, "123"))
26957 return 1;
26958
26959 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26960 return 1;
26961 if (strcmp(buffer, "-123"))
26962 return 1;
26963
26964 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26965 return 1;
26966 if (strcmp(buffer, "123"))
26967 return 1;
26968
26969 return 0;
26970 }
26971
26972_ACEOF
26973rm -f conftest$ac_exeext
26974if { (ac_try="$ac_link"
26975case "(($ac_try" in
26976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26977 *) ac_try_echo=$ac_try;;
26978esac
26979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26980 (eval "$ac_link") 2>&5
26981 ac_status=$?
26982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26984 { (case "(($ac_try" in
26985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26986 *) ac_try_echo=$ac_try;;
26987esac
26988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26989 (eval "$ac_try") 2>&5
26990 ac_status=$?
26991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26992 (exit $ac_status); }; }; then
26993 ac_cv_have_long_long_format=yes
26994else
26995 echo "$as_me: program exited with status $ac_status" >&5
26996echo "$as_me: failed program was:" >&5
26997sed 's/^/| /' conftest.$ac_ext >&5
26998
26999( exit $ac_status )
27000ac_cv_have_long_long_format=no
27001fi
27002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27003fi
27004
27005
27006
27007fi
27008
27009 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27010echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27011fi
27012
Mark Dickinson89d7d412009-12-31 20:50:59 +000027013if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027014then
27015
27016cat >>confdefs.h <<\_ACEOF
27017#define PY_FORMAT_LONG_LONG "ll"
27018_ACEOF
27019
27020fi
27021
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027022if test $ac_sys_system = Darwin
27023then
27024 LIBS="$LIBS -framework CoreFoundation"
27025fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027026
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027027{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27028echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027029if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027030 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027031else
27032 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027033 ac_cv_have_size_t_format="cross -- assuming yes"
27034
Thomas Wouters477c8d52006-05-27 19:21:47 +000027035else
27036 cat >conftest.$ac_ext <<_ACEOF
27037/* confdefs.h. */
27038_ACEOF
27039cat confdefs.h >>conftest.$ac_ext
27040cat >>conftest.$ac_ext <<_ACEOF
27041/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027042
Thomas Wouters477c8d52006-05-27 19:21:47 +000027043#include <stdio.h>
27044#include <stddef.h>
27045#include <string.h>
27046
Christian Heimes2c181612007-12-17 20:04:13 +000027047#ifdef HAVE_SYS_TYPES_H
27048#include <sys/types.h>
27049#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027050
27051#ifdef HAVE_SSIZE_T
27052typedef ssize_t Py_ssize_t;
27053#elif SIZEOF_VOID_P == SIZEOF_LONG
27054typedef long Py_ssize_t;
27055#else
27056typedef int Py_ssize_t;
27057#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027058
Christian Heimes2c181612007-12-17 20:04:13 +000027059int main()
27060{
27061 char buffer[256];
27062
Thomas Wouters477c8d52006-05-27 19:21:47 +000027063 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27064 return 1;
27065
Thomas Wouters89f507f2006-12-13 04:49:30 +000027066 if (strcmp(buffer, "123"))
27067 return 1;
27068
27069 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27070 return 1;
27071
27072 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027073 return 1;
27074
27075 return 0;
27076}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027077
Thomas Wouters477c8d52006-05-27 19:21:47 +000027078_ACEOF
27079rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027080if { (ac_try="$ac_link"
27081case "(($ac_try" in
27082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27083 *) ac_try_echo=$ac_try;;
27084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027086 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027087 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027090 { (case "(($ac_try" in
27091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27092 *) ac_try_echo=$ac_try;;
27093esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027095 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027096 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027098 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027099 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027101 echo "$as_me: program exited with status $ac_status" >&5
27102echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027103sed 's/^/| /' conftest.$ac_ext >&5
27104
27105( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027106ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027107fi
27108rm -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 +000027109fi
27110
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027111
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027112fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027113{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27114echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027115if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027116
27117cat >>confdefs.h <<\_ACEOF
27118#define PY_FORMAT_SIZE_T "z"
27119_ACEOF
27120
27121fi
27122
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027123{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27124echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027125if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027126 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027127else
Martin v. Löwis11437992002-04-12 09:54:03 +000027128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027129/* confdefs.h. */
27130_ACEOF
27131cat confdefs.h >>conftest.$ac_ext
27132cat >>conftest.$ac_ext <<_ACEOF
27133/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027134
27135#ifdef HAVE_SYS_TYPES_H
27136#include <sys/types.h>
27137#endif
27138#ifdef HAVE_SYS_SOCKET_H
27139#include <sys/socket.h>
27140#endif
27141
27142
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027143typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027144int
27145main ()
27146{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027147if ((ac__type_new_ *) 0)
27148 return 0;
27149if (sizeof (ac__type_new_))
27150 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027151 ;
27152 return 0;
27153}
27154_ACEOF
27155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027156if { (ac_try="$ac_compile"
27157case "(($ac_try" in
27158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27159 *) ac_try_echo=$ac_try;;
27160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027164 grep -v '^ *+' conftest.er1 >conftest.err
27165 rm -f conftest.er1
27166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027168 (exit $ac_status); } && {
27169 test -z "$ac_c_werror_flag" ||
27170 test ! -s conftest.err
27171 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027172 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027175sed 's/^/| /' conftest.$ac_ext >&5
27176
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027177 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027179
27180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027181fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027182{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27183echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27184if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027185 :
27186else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027187
Martin v. Löwis01c04012002-11-11 14:58:44 +000027188cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027189#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027190_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027191
27192fi
27193
Michael W. Hudson54241132001-12-07 15:38:26 +000027194
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027195{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27196echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027197if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027198 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027199else
27200 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027201 ac_cv_broken_mbstowcs=no
27202else
27203 cat >conftest.$ac_ext <<_ACEOF
27204/* confdefs.h. */
27205_ACEOF
27206cat confdefs.h >>conftest.$ac_ext
27207cat >>conftest.$ac_ext <<_ACEOF
27208/* end confdefs.h. */
27209
27210#include<stdlib.h>
27211int main() {
27212 size_t len = -1;
27213 const char *str = "text";
27214 len = mbstowcs(NULL, str, 0);
27215 return (len != 4);
27216}
27217
27218_ACEOF
27219rm -f conftest$ac_exeext
27220if { (ac_try="$ac_link"
27221case "(($ac_try" in
27222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27223 *) ac_try_echo=$ac_try;;
27224esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027226 (eval "$ac_link") 2>&5
27227 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027229 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27230 { (case "(($ac_try" in
27231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27232 *) ac_try_echo=$ac_try;;
27233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027235 (eval "$ac_try") 2>&5
27236 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027238 (exit $ac_status); }; }; then
27239 ac_cv_broken_mbstowcs=no
27240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027241 echo "$as_me: program exited with status $ac_status" >&5
27242echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027243sed 's/^/| /' conftest.$ac_ext >&5
27244
27245( exit $ac_status )
27246ac_cv_broken_mbstowcs=yes
27247fi
27248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27249fi
27250
27251
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027252fi
27253
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027254{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27255echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027256if test "$ac_cv_broken_mbstowcs" = yes
27257then
27258
27259cat >>confdefs.h <<\_ACEOF
27260#define HAVE_BROKEN_MBSTOWCS 1
27261_ACEOF
27262
27263fi
27264
Antoine Pitroub52ec782009-01-25 16:34:23 +000027265# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027266{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27267echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027268
27269# Check whether --with-computed-gotos was given.
27270if test "${with_computed_gotos+set}" = set; then
27271 withval=$with_computed_gotos;
27272if test "$withval" != no
27273then
27274
27275cat >>confdefs.h <<\_ACEOF
27276#define USE_COMPUTED_GOTOS 1
27277_ACEOF
27278
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027279 { echo "$as_me:$LINENO: result: yes" >&5
27280echo "${ECHO_T}yes" >&6; }
27281else { echo "$as_me:$LINENO: result: no" >&5
27282echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027283fi
27284else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027285 { echo "$as_me:$LINENO: result: no" >&5
27286echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027287fi
27288
27289
27290
Michael W. Hudson54241132001-12-07 15:38:26 +000027291
27292
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027293for h in `(cd $srcdir;echo Python/thread_*.h)`
27294do
27295 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27296done
27297
Michael W. Hudson54241132001-12-07 15:38:26 +000027298
Neal Norwitzd24499d2005-12-18 21:36:39 +000027299SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027300{ echo "$as_me:$LINENO: checking for build directories" >&5
27301echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027302for dir in $SRCDIRS; do
27303 if test ! -d $dir; then
27304 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027305 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027306done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027307{ echo "$as_me:$LINENO: result: done" >&5
27308echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027309
Guido van Rossum627b2d71993-12-24 10:39:16 +000027310# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027311ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027312
Martin v. Löwis11437992002-04-12 09:54:03 +000027313cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027314# This file is a shell script that caches the results of configure
27315# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027316# scripts and configure runs, see configure's option --config-cache.
27317# It is not useful on other systems. If it contains results you don't
27318# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027319#
Martin v. Löwis11437992002-04-12 09:54:03 +000027320# config.status only pays attention to the cache file if you give it
27321# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027322#
Skip Montanaro6dead952003-09-25 14:50:04 +000027323# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027324# loading this file, other *unset* `ac_cv_foo' will be assigned the
27325# following values.
27326
27327_ACEOF
27328
Guido van Rossumf78abae1997-01-21 22:02:36 +000027329# The following way of writing the cache mishandles newlines in values,
27330# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027331# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027332# Ultrix sh set writes to stderr and can't be redirected directly,
27333# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027334(
27335 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27336 eval ac_val=\$$ac_var
27337 case $ac_val in #(
27338 *${as_nl}*)
27339 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027340 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27341echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027342 esac
27343 case $ac_var in #(
27344 _ | IFS | as_nl) ;; #(
27345 *) $as_unset $ac_var ;;
27346 esac ;;
27347 esac
27348 done
27349
Martin v. Löwis11437992002-04-12 09:54:03 +000027350 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027351 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27352 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027353 # `set' does not quote correctly, so add quotes (double-quote
27354 # substitution turns \\\\ into \\, and sed turns \\ into \).
27355 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027356 "s/'/'\\\\''/g;
27357 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027358 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027359 *)
27360 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027361 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027362 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027363 esac |
27364 sort
27365) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027366 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027367 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027368 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027369 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027370 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27371 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027372 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27373 :end' >>confcache
27374if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27375 if test -w "$cache_file"; then
27376 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027377 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27378echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027379 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027380 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027381 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27382echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027383 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027384fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027385rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027386
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027387test "x$prefix" = xNONE && prefix=$ac_default_prefix
27388# Let make expand exec_prefix.
27389test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027390
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027391DEFS=-DHAVE_CONFIG_H
27392
Skip Montanaro6dead952003-09-25 14:50:04 +000027393ac_libobjs=
27394ac_ltlibobjs=
27395for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27396 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027397 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027398 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027399 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27400 # will be set to the directory where LIBOBJS objects are built.
27401 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27402 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027403done
27404LIBOBJS=$ac_libobjs
27405
27406LTLIBOBJS=$ac_ltlibobjs
27407
27408
Martin v. Löwis11437992002-04-12 09:54:03 +000027409
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027410: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027411ac_clean_files_save=$ac_clean_files
27412ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027413{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27414echo "$as_me: creating $CONFIG_STATUS" >&6;}
27415cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027416#! $SHELL
27417# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027418# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027419# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027420# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027421
Martin v. Löwis11437992002-04-12 09:54:03 +000027422debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027423ac_cs_recheck=false
27424ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027425SHELL=\${CONFIG_SHELL-$SHELL}
27426_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027427
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027428cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027429## --------------------- ##
27430## M4sh Initialization. ##
27431## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027433# Be more Bourne compatible
27434DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027435if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27436 emulate sh
27437 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027438 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027439 # is contrary to our usage. Disable this feature.
27440 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027441 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027442else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027443 case `(set -o) 2>/dev/null` in
27444 *posix*) set -o posix ;;
27445esac
27446
Michael W. Hudson54241132001-12-07 15:38:26 +000027447fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027448
27449
Michael W. Hudson54241132001-12-07 15:38:26 +000027450
Michael W. Hudson54241132001-12-07 15:38:26 +000027451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027452# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027453# Avoid depending upon Character Ranges.
27454as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27455as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27456as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27457as_cr_digits='0123456789'
27458as_cr_alnum=$as_cr_Letters$as_cr_digits
27459
27460# The user is always right.
27461if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027462 echo "#! /bin/sh" >conf$$.sh
27463 echo "exit 0" >>conf$$.sh
27464 chmod +x conf$$.sh
27465 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27466 PATH_SEPARATOR=';'
27467 else
27468 PATH_SEPARATOR=:
27469 fi
27470 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027471fi
27472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027473# Support unset when possible.
27474if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27475 as_unset=unset
27476else
27477 as_unset=false
27478fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027480
27481# IFS
27482# We need space, tab and new line, in precisely that order. Quoting is
27483# there to prevent editors from complaining about space-tab.
27484# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27485# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027486as_nl='
27487'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027488IFS=" "" $as_nl"
27489
27490# Find who we are. Look in the path if we contain no directory separator.
27491case $0 in
27492 *[\\/]* ) as_myself=$0 ;;
27493 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027494for as_dir in $PATH
27495do
27496 IFS=$as_save_IFS
27497 test -z "$as_dir" && as_dir=.
27498 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27499done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027502 ;;
27503esac
27504# We did not find ourselves, most probably we were run as `sh COMMAND'
27505# in which case we are not to be found in the path.
27506if test "x$as_myself" = x; then
27507 as_myself=$0
27508fi
27509if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027510 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027511 { (exit 1); exit 1; }
27512fi
27513
27514# Work around bugs in pre-3.0 UWIN ksh.
27515for as_var in ENV MAIL MAILPATH
27516do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27517done
27518PS1='$ '
27519PS2='> '
27520PS4='+ '
27521
27522# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027523for as_var in \
27524 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27525 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27526 LC_TELEPHONE LC_TIME
27527do
27528 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27529 eval $as_var=C; export $as_var
27530 else
27531 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27532 fi
27533done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027534
27535# Required to use basename.
27536if expr a : '\(a\)' >/dev/null 2>&1 &&
27537 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27538 as_expr=expr
27539else
27540 as_expr=false
27541fi
27542
27543if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27544 as_basename=basename
27545else
27546 as_basename=false
27547fi
27548
27549
27550# Name of the executable.
27551as_me=`$as_basename -- "$0" ||
27552$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27553 X"$0" : 'X\(//\)$' \| \
27554 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027555echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027556 sed '/^.*\/\([^/][^/]*\)\/*$/{
27557 s//\1/
27558 q
27559 }
27560 /^X\/\(\/\/\)$/{
27561 s//\1/
27562 q
27563 }
27564 /^X\/\(\/\).*/{
27565 s//\1/
27566 q
27567 }
27568 s/.*/./; q'`
27569
27570# CDPATH.
27571$as_unset CDPATH
27572
27573
27574
Martin v. Löwis11437992002-04-12 09:54:03 +000027575 as_lineno_1=$LINENO
27576 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027577 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027578 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027579
Martin v. Löwis11437992002-04-12 09:54:03 +000027580 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27581 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027582 # line-number line after each line using $LINENO; the second 'sed'
27583 # does the real work. The second script uses 'N' to pair each
27584 # line-number line with the line containing $LINENO, and appends
27585 # trailing '-' during substitution so that $LINENO is not a special
27586 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027587 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027588 # scripts with optimization help from Paolo Bonzini. Blame Lee
27589 # E. McMahon (1931-1989) for sed's syntax. :-)
27590 sed -n '
27591 p
27592 /[$]LINENO/=
27593 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027594 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027595 s/[$]LINENO.*/&-/
27596 t lineno
27597 b
27598 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027599 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027600 :loop
27601 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027602 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027603 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027604 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027605 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027606 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027607 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027608
Martin v. Löwis11437992002-04-12 09:54:03 +000027609 # Don't try to exec as it changes $[0], causing all sort of problems
27610 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027611 # original and so on. Autoconf is especially sensitive to this).
27612 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027613 # Exit status is that of the last command.
27614 exit
27615}
27616
27617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27619 as_dirname=dirname
27620else
27621 as_dirname=false
27622fi
27623
27624ECHO_C= ECHO_N= ECHO_T=
27625case `echo -n x` in
27626-n*)
27627 case `echo 'x\c'` in
27628 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27629 *) ECHO_C='\c';;
27630 esac;;
27631*)
27632 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027635if expr a : '\(a\)' >/dev/null 2>&1 &&
27636 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027637 as_expr=expr
27638else
27639 as_expr=false
27640fi
27641
27642rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027643if test -d conf$$.dir; then
27644 rm -f conf$$.dir/conf$$.file
27645else
27646 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027647 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027648fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027649echo >conf$$.file
27650if ln -s conf$$.file conf$$ 2>/dev/null; then
27651 as_ln_s='ln -s'
27652 # ... but there are two gotchas:
27653 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27654 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27655 # In both cases, we have to default to `cp -p'.
27656 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027657 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027658elif ln conf$$.file conf$$ 2>/dev/null; then
27659 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027660else
27661 as_ln_s='cp -p'
27662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027663rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27664rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027665
Skip Montanaro6dead952003-09-25 14:50:04 +000027666if mkdir -p . 2>/dev/null; then
27667 as_mkdir_p=:
27668else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027669 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027670 as_mkdir_p=false
27671fi
27672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027673if test -x / >/dev/null 2>&1; then
27674 as_test_x='test -x'
27675else
27676 if ls -dL / >/dev/null 2>&1; then
27677 as_ls_L_option=L
27678 else
27679 as_ls_L_option=
27680 fi
27681 as_test_x='
27682 eval sh -c '\''
27683 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027684 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027685 else
27686 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027687 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027688 esac;
27689 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27690 ???[sx]*):;;*)false;;esac;fi
27691 '\'' sh
27692 '
27693fi
27694as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027695
27696# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027697as_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 +000027698
27699# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027700as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027701
27702
Martin v. Löwis11437992002-04-12 09:54:03 +000027703exec 6>&1
27704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027705# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027706# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027707# values after options handling.
27708ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027709This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027710generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027711
27712 CONFIG_FILES = $CONFIG_FILES
27713 CONFIG_HEADERS = $CONFIG_HEADERS
27714 CONFIG_LINKS = $CONFIG_LINKS
27715 CONFIG_COMMANDS = $CONFIG_COMMANDS
27716 $ $0 $@
27717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027718on `(hostname || uname -n) 2>/dev/null | sed 1q`
27719"
27720
Martin v. Löwis11437992002-04-12 09:54:03 +000027721_ACEOF
27722
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027723cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027724# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027725config_files="$ac_config_files"
27726config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027728_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027729
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027730cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027731ac_cs_usage="\
27732\`$as_me' instantiates files from templates according to the
27733current configuration.
27734
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027735Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027736
27737 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027738 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027739 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027740 -d, --debug don't remove temporary files
27741 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027742 --file=FILE[:TEMPLATE]
27743 instantiate the configuration file FILE
27744 --header=FILE[:TEMPLATE]
27745 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027746
27747Configuration files:
27748$config_files
27749
27750Configuration headers:
27751$config_headers
27752
27753Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027755_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027756cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027757ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027758python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027759configured by $0, generated by GNU Autoconf 2.61,
27760 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027761
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027762Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027763This config.status script is free software; the Free Software Foundation
27764gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027765
27766ac_pwd='$ac_pwd'
27767srcdir='$srcdir'
27768INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027769_ACEOF
27770
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027771cat >>$CONFIG_STATUS <<\_ACEOF
27772# If no file are specified by the user, then we need to provide default
27773# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027774ac_need_defaults=:
27775while test $# != 0
27776do
27777 case $1 in
27778 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027779 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27780 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027781 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027782 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027783 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027784 ac_option=$1
27785 ac_optarg=$2
27786 ac_shift=shift
27787 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027788 esac
27789
Skip Montanaro6dead952003-09-25 14:50:04 +000027790 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027791 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027792 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27793 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027794 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027795 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027796 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027797 debug=: ;;
27798 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027799 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027800 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027801 ac_need_defaults=false;;
27802 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027803 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027804 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027805 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806 --he | --h)
27807 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027808 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027809Try \`$0 --help' for more information." >&2
27810 { (exit 1); exit 1; }; };;
27811 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027812 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027813 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27814 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27815 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027816
27817 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027818 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027819Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027820 { (exit 1); exit 1; }; } ;;
27821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027822 *) ac_config_targets="$ac_config_targets $1"
27823 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027824
27825 esac
27826 shift
27827done
27828
Skip Montanaro6dead952003-09-25 14:50:04 +000027829ac_configure_extra_args=
27830
27831if $ac_cs_silent; then
27832 exec 6>/dev/null
27833 ac_configure_extra_args="$ac_configure_extra_args --silent"
27834fi
27835
27836_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027837cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027838if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027839 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27840 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027841 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027842 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027843fi
27844
Martin v. Löwis11437992002-04-12 09:54:03 +000027845_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027846cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027847exec 5>>config.log
27848{
27849 echo
27850 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27851## Running $as_me. ##
27852_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027853 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027854} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027856_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027857cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027858_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027859
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027860cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027861
27862# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027863for ac_config_target in $ac_config_targets
27864do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027865 case $ac_config_target in
27866 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27867 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27868 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027869 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27870 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27872 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027873 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027874
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027875 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27876echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027877 { (exit 1); exit 1; }; };;
27878 esac
27879done
27880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027881
Martin v. Löwis11437992002-04-12 09:54:03 +000027882# If the user did not use the arguments to specify the items to instantiate,
27883# then the envvar interface is used. Set only those that are not.
27884# We use the long form for the default assignment because of an extremely
27885# bizarre bug on SunOS 4.1.3.
27886if $ac_need_defaults; then
27887 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27888 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27889fi
27890
Skip Montanaro6dead952003-09-25 14:50:04 +000027891# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027892# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027893# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027894# Hook for its removal unless debugging.
27895# Note that there is a small window in which the directory will not be cleaned:
27896# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027897$debug ||
27898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027899 tmp=
27900 trap 'exit_status=$?
27901 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27902' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027903 trap '{ (exit 1); exit 1; }' 1 2 13 15
27904}
Martin v. Löwis11437992002-04-12 09:54:03 +000027905# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027906
Martin v. Löwis11437992002-04-12 09:54:03 +000027907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027908 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027909 test -n "$tmp" && test -d "$tmp"
27910} ||
27911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027912 tmp=./conf$$-$RANDOM
27913 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027914} ||
27915{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027916 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027917 { (exit 1); exit 1; }
27918}
27919
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027920#
27921# Set up the sed scripts for CONFIG_FILES section.
27922#
27923
27924# No need to generate the scripts if there are no CONFIG_FILES.
27925# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027926if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027927
27928_ACEOF
27929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027930
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027932ac_delim='%!_!# '
27933for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027934 cat >conf$$subs.sed <<_ACEOF
27935SHELL!$SHELL$ac_delim
27936PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27937PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27938PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27939PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27940PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27941PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27942exec_prefix!$exec_prefix$ac_delim
27943prefix!$prefix$ac_delim
27944program_transform_name!$program_transform_name$ac_delim
27945bindir!$bindir$ac_delim
27946sbindir!$sbindir$ac_delim
27947libexecdir!$libexecdir$ac_delim
27948datarootdir!$datarootdir$ac_delim
27949datadir!$datadir$ac_delim
27950sysconfdir!$sysconfdir$ac_delim
27951sharedstatedir!$sharedstatedir$ac_delim
27952localstatedir!$localstatedir$ac_delim
27953includedir!$includedir$ac_delim
27954oldincludedir!$oldincludedir$ac_delim
27955docdir!$docdir$ac_delim
27956infodir!$infodir$ac_delim
27957htmldir!$htmldir$ac_delim
27958dvidir!$dvidir$ac_delim
27959pdfdir!$pdfdir$ac_delim
27960psdir!$psdir$ac_delim
27961libdir!$libdir$ac_delim
27962localedir!$localedir$ac_delim
27963mandir!$mandir$ac_delim
27964DEFS!$DEFS$ac_delim
27965ECHO_C!$ECHO_C$ac_delim
27966ECHO_N!$ECHO_N$ac_delim
27967ECHO_T!$ECHO_T$ac_delim
27968LIBS!$LIBS$ac_delim
27969build_alias!$build_alias$ac_delim
27970host_alias!$host_alias$ac_delim
27971target_alias!$target_alias$ac_delim
27972VERSION!$VERSION$ac_delim
27973SOVERSION!$SOVERSION$ac_delim
27974CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27975UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27976ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027977LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027978PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27979PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27980PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27981PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27982PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27983FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27984FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27985FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27986FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27987FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27988MACHDEP!$MACHDEP$ac_delim
27989SGI_ABI!$SGI_ABI$ac_delim
27990CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27991EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27992CC!$CC$ac_delim
27993CFLAGS!$CFLAGS$ac_delim
27994LDFLAGS!$LDFLAGS$ac_delim
27995CPPFLAGS!$CPPFLAGS$ac_delim
27996ac_ct_CC!$ac_ct_CC$ac_delim
27997EXEEXT!$EXEEXT$ac_delim
27998OBJEXT!$OBJEXT$ac_delim
27999CXX!$CXX$ac_delim
28000MAINCC!$MAINCC$ac_delim
28001CPP!$CPP$ac_delim
28002GREP!$GREP$ac_delim
28003EGREP!$EGREP$ac_delim
28004BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28005LIBRARY!$LIBRARY$ac_delim
28006LDLIBRARY!$LDLIBRARY$ac_delim
28007DLLLIBRARY!$DLLLIBRARY$ac_delim
28008BLDLIBRARY!$BLDLIBRARY$ac_delim
28009LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28010INSTSONAME!$INSTSONAME$ac_delim
28011RUNSHARED!$RUNSHARED$ac_delim
28012LINKCC!$LINKCC$ac_delim
28013GNULD!$GNULD$ac_delim
28014RANLIB!$RANLIB$ac_delim
28015AR!$AR$ac_delim
28016ARFLAGS!$ARFLAGS$ac_delim
28017SVNVERSION!$SVNVERSION$ac_delim
28018INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28019INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28020INSTALL_DATA!$INSTALL_DATA$ac_delim
28021LN!$LN$ac_delim
28022OPT!$OPT$ac_delim
28023BASECFLAGS!$BASECFLAGS$ac_delim
28024UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28025OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28026LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28027SO!$SO$ac_delim
28028LDSHARED!$LDSHARED$ac_delim
28029BLDSHARED!$BLDSHARED$ac_delim
28030CCSHARED!$CCSHARED$ac_delim
28031LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028032_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028033
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028034 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028035 break
28036 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028037 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28038echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028039 { (exit 1); exit 1; }; }
28040 else
28041 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028042 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028043done
28044
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028045ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28046if test -n "$ac_eof"; then
28047 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28048 ac_eof=`expr $ac_eof + 1`
28049fi
28050
28051cat >>$CONFIG_STATUS <<_ACEOF
28052cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28053/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028054_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028055sed '
28056s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28057s/^/s,@/; s/!/@,|#_!!_#|/
28058:n
28059t n
28060s/'"$ac_delim"'$/,g/; t
28061s/$/\\/; p
28062N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28063' >>$CONFIG_STATUS <conf$$subs.sed
28064rm -f conf$$subs.sed
28065cat >>$CONFIG_STATUS <<_ACEOF
28066CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028067_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028068
28069
28070ac_delim='%!_!# '
28071for ac_last_try in false false false false false :; do
28072 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028073CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028074SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028075PKG_CONFIG!$PKG_CONFIG$ac_delim
28076LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028077USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28078SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28079USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28080LDLAST!$LDLAST$ac_delim
28081THREADOBJ!$THREADOBJ$ac_delim
28082DLINCLDIR!$DLINCLDIR$ac_delim
28083DYNLOADFILE!$DYNLOADFILE$ac_delim
28084MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28085TRUE!$TRUE$ac_delim
28086LIBOBJS!$LIBOBJS$ac_delim
28087HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28088HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28089HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28090HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28091HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28092LIBM!$LIBM$ac_delim
28093LIBC!$LIBC$ac_delim
28094THREADHEADERS!$THREADHEADERS$ac_delim
28095SRCDIRS!$SRCDIRS$ac_delim
28096LTLIBOBJS!$LTLIBOBJS$ac_delim
28097_ACEOF
28098
Benjamin Petersond78735d2010-01-01 16:04:23 +000028099 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028100 break
28101 elif $ac_last_try; then
28102 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28103echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028104 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028105 else
28106 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28107 fi
28108done
28109
28110ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28111if test -n "$ac_eof"; then
28112 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28113 ac_eof=`expr $ac_eof + 1`
28114fi
28115
28116cat >>$CONFIG_STATUS <<_ACEOF
28117cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28118/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028119_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028120sed '
28121s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28122s/^/s,@/; s/!/@,|#_!!_#|/
28123:n
28124t n
28125s/'"$ac_delim"'$/,g/; t
28126s/$/\\/; p
28127N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28128' >>$CONFIG_STATUS <conf$$subs.sed
28129rm -f conf$$subs.sed
28130cat >>$CONFIG_STATUS <<_ACEOF
28131:end
28132s/|#_!!_#|//g
28133CEOF$ac_eof
28134_ACEOF
28135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028136
28137# VPATH may cause trouble with some makes, so we remove $(srcdir),
28138# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28139# trailing colons and then remove the whole line if VPATH becomes empty
28140# (actually we leave an empty line to preserve line numbers).
28141if test "x$srcdir" = x.; then
28142 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28143s/:*\$(srcdir):*/:/
28144s/:*\${srcdir}:*/:/
28145s/:*@srcdir@:*/:/
28146s/^\([^=]*=[ ]*\):*/\1/
28147s/:*$//
28148s/^[^=]*=[ ]*$//
28149}'
28150fi
28151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028152cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028153fi # test -n "$CONFIG_FILES"
28154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028155
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028156for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028157do
28158 case $ac_tag in
28159 :[FHLC]) ac_mode=$ac_tag; continue;;
28160 esac
28161 case $ac_mode$ac_tag in
28162 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028163 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28164echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028165 { (exit 1); exit 1; }; };;
28166 :[FH]-) ac_tag=-:-;;
28167 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28168 esac
28169 ac_save_IFS=$IFS
28170 IFS=:
28171 set x $ac_tag
28172 IFS=$ac_save_IFS
28173 shift
28174 ac_file=$1
28175 shift
28176
28177 case $ac_mode in
28178 :L) ac_source=$1;;
28179 :[FH])
28180 ac_file_inputs=
28181 for ac_f
28182 do
28183 case $ac_f in
28184 -) ac_f="$tmp/stdin";;
28185 *) # Look for the file first in the build tree, then in the source tree
28186 # (if the path is not absolute). The absolute path cannot be DOS-style,
28187 # because $ac_f cannot contain `:'.
28188 test -f "$ac_f" ||
28189 case $ac_f in
28190 [\\/$]*) false;;
28191 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28192 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028193 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28194echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028195 { (exit 1); exit 1; }; };;
28196 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028197 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028198 done
28199
28200 # Let's still pretend it is `configure' which instantiates (i.e., don't
28201 # use $as_me), people would be surprised to read:
28202 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028203 configure_input="Generated from "`IFS=:
28204 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028205 if test x"$ac_file" != x-; then
28206 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028207 { echo "$as_me:$LINENO: creating $ac_file" >&5
28208echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028209 fi
28210
28211 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028212 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028213 esac
28214 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028215 esac
28216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028217 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028218$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028219 X"$ac_file" : 'X\(//\)[^/]' \| \
28220 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028221 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028222echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028223 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28224 s//\1/
28225 q
28226 }
28227 /^X\(\/\/\)[^/].*/{
28228 s//\1/
28229 q
28230 }
28231 /^X\(\/\/\)$/{
28232 s//\1/
28233 q
28234 }
28235 /^X\(\/\).*/{
28236 s//\1/
28237 q
28238 }
28239 s/.*/./; q'`
28240 { as_dir="$ac_dir"
28241 case $as_dir in #(
28242 -*) as_dir=./$as_dir;;
28243 esac
28244 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028245 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028246 while :; do
28247 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028248 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028249 *) as_qdir=$as_dir;;
28250 esac
28251 as_dirs="'$as_qdir' $as_dirs"
28252 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028253$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028254 X"$as_dir" : 'X\(//\)[^/]' \| \
28255 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028256 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028257echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028258 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28259 s//\1/
28260 q
28261 }
28262 /^X\(\/\/\)[^/].*/{
28263 s//\1/
28264 q
28265 }
28266 /^X\(\/\/\)$/{
28267 s//\1/
28268 q
28269 }
28270 /^X\(\/\).*/{
28271 s//\1/
28272 q
28273 }
28274 s/.*/./; q'`
28275 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028276 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028277 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028278 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28279echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028280 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028281 ac_builddir=.
28282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028283case "$ac_dir" in
28284.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28285*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028286 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028287 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028288 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028289 case $ac_top_builddir_sub in
28290 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28291 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28292 esac ;;
28293esac
28294ac_abs_top_builddir=$ac_pwd
28295ac_abs_builddir=$ac_pwd$ac_dir_suffix
28296# for backward compatibility:
28297ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028298
28299case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028300 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028301 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028302 ac_top_srcdir=$ac_top_builddir_sub
28303 ac_abs_top_srcdir=$ac_pwd ;;
28304 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028305 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028306 ac_top_srcdir=$srcdir
28307 ac_abs_top_srcdir=$srcdir ;;
28308 *) # Relative name.
28309 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28310 ac_top_srcdir=$ac_top_build_prefix$srcdir
28311 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028312esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028313ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028314
Martin v. Löwis11437992002-04-12 09:54:03 +000028315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028316 case $ac_mode in
28317 :F)
28318 #
28319 # CONFIG_FILE
28320 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028321
28322 case $INSTALL in
28323 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028324 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028325 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028326_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028327
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028328cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028329# If the template does not know about datarootdir, expand it.
28330# FIXME: This hack should be removed a few years after 2.60.
28331ac_datarootdir_hack=; ac_datarootdir_seen=
28332
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028333case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028334 p
28335 q
28336}
28337/@datadir@/p
28338/@docdir@/p
28339/@infodir@/p
28340/@localedir@/p
28341/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028342' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028343*datarootdir*) ac_datarootdir_seen=yes;;
28344*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028345 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28346echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028347_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028348cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028349 ac_datarootdir_hack='
28350 s&@datadir@&$datadir&g
28351 s&@docdir@&$docdir&g
28352 s&@infodir@&$infodir&g
28353 s&@localedir@&$localedir&g
28354 s&@mandir@&$mandir&g
28355 s&\\\${datarootdir}&$datarootdir&g' ;;
28356esac
28357_ACEOF
28358
28359# Neutralize VPATH when `$srcdir' = `.'.
28360# Shell code in configure.ac might set extrasub.
28361# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028362cat >>$CONFIG_STATUS <<_ACEOF
28363 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028364$extrasub
28365_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028366cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028367:t
28368/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028369s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028370s&@top_builddir@&$ac_top_builddir_sub&;t t
28371s&@srcdir@&$ac_srcdir&;t t
28372s&@abs_srcdir@&$ac_abs_srcdir&;t t
28373s&@top_srcdir@&$ac_top_srcdir&;t t
28374s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28375s&@builddir@&$ac_builddir&;t t
28376s&@abs_builddir@&$ac_abs_builddir&;t t
28377s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28378s&@INSTALL@&$ac_INSTALL&;t t
28379$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028380" $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 +000028381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028382test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28383 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28384 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028385 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028386which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028387echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028388which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028390 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028391 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028392 -) cat "$tmp/out"; rm -f "$tmp/out";;
28393 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28394 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028395 ;;
28396 :H)
28397 #
28398 # CONFIG_HEADER
28399 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028400_ACEOF
28401
28402# Transform confdefs.h into a sed script `conftest.defines', that
28403# substitutes the proper values into config.h.in to produce config.h.
28404rm -f conftest.defines conftest.tail
28405# First, append a space to every undef/define line, to ease matching.
28406echo 's/$/ /' >conftest.defines
28407# Then, protect against being on the right side of a sed subst, or in
28408# an unquoted here document, in config.status. If some macros were
28409# called several times there might be several #defines for the same
28410# symbol, which is useless. But do not sort them, since the last
28411# AC_DEFINE must be honored.
28412ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28413# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28414# NAME is the cpp macro being defined, VALUE is the value it is being given.
28415# PARAMS is the parameter list in the macro definition--in most cases, it's
28416# just an empty string.
28417ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28418ac_dB='\\)[ (].*,\\1define\\2'
28419ac_dC=' '
28420ac_dD=' ,'
28421
28422uniq confdefs.h |
28423 sed -n '
28424 t rset
28425 :rset
28426 s/^[ ]*#[ ]*define[ ][ ]*//
28427 t ok
28428 d
28429 :ok
28430 s/[\\&,]/\\&/g
28431 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28432 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28433 ' >>conftest.defines
28434
28435# Remove the space that was appended to ease matching.
28436# Then replace #undef with comments. This is necessary, for
28437# example, in the case of _POSIX_SOURCE, which is predefined and required
28438# on some systems where configure will not decide to define it.
28439# (The regexp can be short, since the line contains either #define or #undef.)
28440echo 's/ $//
28441s,^[ #]*u.*,/* & */,' >>conftest.defines
28442
28443# Break up conftest.defines:
28444ac_max_sed_lines=50
28445
28446# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28447# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28448# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28449# et cetera.
28450ac_in='$ac_file_inputs'
28451ac_out='"$tmp/out1"'
28452ac_nxt='"$tmp/out2"'
28453
28454while :
28455do
28456 # Write a here document:
28457 cat >>$CONFIG_STATUS <<_ACEOF
28458 # First, check the format of the line:
28459 cat >"\$tmp/defines.sed" <<\\CEOF
28460/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28461/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28462b
28463:def
28464_ACEOF
28465 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28466 echo 'CEOF
28467 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28468 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28469 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28470 grep . conftest.tail >/dev/null || break
28471 rm -f conftest.defines
28472 mv conftest.tail conftest.defines
28473done
28474rm -f conftest.defines conftest.tail
28475
28476echo "ac_result=$ac_in" >>$CONFIG_STATUS
28477cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028478 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028479 echo "/* $configure_input */" >"$tmp/config.h"
28480 cat "$ac_result" >>"$tmp/config.h"
28481 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28482 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28483echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028484 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028485 rm -f $ac_file
28486 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028487 fi
28488 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028489 echo "/* $configure_input */"
28490 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028491 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028492 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028493 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028495
28496 esac
28497
28498done # for ac_tag
28499
Guido van Rossum627b2d71993-12-24 10:39:16 +000028500
Martin v. Löwis11437992002-04-12 09:54:03 +000028501{ (exit 0); exit 0; }
28502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028503chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028504ac_clean_files=$ac_clean_files_save
28505
28506
28507# configure is writing to config.log, and then calls config.status.
28508# config.status does its own redirection, appending to config.log.
28509# Unfortunately, on DOS this fails, as config.log is still kept open
28510# by configure, so config.status won't be able to write to it; its
28511# output is simply discarded. So we exec the FD to /dev/null,
28512# effectively closing config.log, so it can be properly (re)opened and
28513# appended to by config.status. When coming back to configure, we
28514# need to make the FD available again.
28515if test "$no_create" != yes; then
28516 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028517 ac_config_status_args=
28518 test "$silent" = yes &&
28519 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028520 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028521 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028522 exec 5>>config.log
28523 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28524 # would make configure fail if this is the last instruction.
28525 $ac_cs_success || { (exit 1); exit 1; }
28526fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028527
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028528
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028529echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028530if test ! -f Modules/Setup
28531then
28532 cp $srcdir/Modules/Setup.dist Modules/Setup
28533fi
28534
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028535echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028536if test ! -f Modules/Setup.local
28537then
28538 echo "# Edit this file for local setup changes" >Modules/Setup.local
28539fi
28540
28541echo "creating Makefile"
28542$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28543 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028544 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028545mv config.c Modules