blob: 8f10758c0a68f87d00961e1c311005d2b23f5c56 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00002# From configure.in Revision: 78476 .
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.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002103 # In addition, Stefan Krah confirms that issue #1244610 exists through
2104 # OpenBSD 4.6, but is fixed in 4.7.
2105 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002106 define_xopen_source=no
2107 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2108 # also defined. This can be overridden by defining _BSD_SOURCE
2109 # As this has a different meaning on Linux, only define it on OpenBSD
2110
2111cat >>confdefs.h <<\_ACEOF
2112#define _BSD_SOURCE 1
2113_ACEOF
2114
2115 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002116 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002117 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2118 # also defined. This can be overridden by defining _BSD_SOURCE
2119 # As this has a different meaning on Linux, only define it on OpenBSD
2120
2121cat >>confdefs.h <<\_ACEOF
2122#define _BSD_SOURCE 1
2123_ACEOF
2124
2125 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002126 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2127 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2128 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002129 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 +00002130 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002131 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2132 # of union __?sigval. Reported by Stuart Bishop.
2133 SunOS/5.6)
2134 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002135 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2136 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002137 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002138 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002139 define_xopen_source=no;;
2140 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002141 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002142 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002143 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002144 # On FreeBSD 4, the math functions C89 does not cover are never defined
2145 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2146 FreeBSD/4.*)
2147 define_xopen_source=no;;
2148 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2149 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2150 # identifies itself as Darwin/7.*
2151 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2152 # disables platform specific features beyond repair.
2153 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2154 # has no effect, don't bother defining them
2155 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002156 define_xopen_source=no;;
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00002157 Darwin/1[6789].*)
2158 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002159 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2160 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2161 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002162 AIX/4)
2163 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002164 AIX/5)
2165 if test `uname -r` -eq 1; then
2166 define_xopen_source=no
2167 fi
2168 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002169 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2170 # defining NI_NUMERICHOST.
2171 QNX/6.3.2)
2172 define_xopen_source=no
2173 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002174
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002175esac
2176
2177if test $define_xopen_source = yes
2178then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002179 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2180 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002181 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2182 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002183 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002184 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002185
2186cat >>confdefs.h <<\_ACEOF
2187#define _XOPEN_SOURCE 500
2188_ACEOF
2189
2190 ;;
2191 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002192
2193cat >>confdefs.h <<\_ACEOF
2194#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195_ACEOF
2196
Skip Montanarof0d5f792004-08-15 14:08:23 +00002197 ;;
2198 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002199
2200 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2201 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2202 # several APIs are not declared. Since this is also needed in some
2203 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002204 # except for Solaris 10, where it must not be defined,
2205 # as it implies XPG4.2
2206 case $ac_sys_system/$ac_sys_release in
2207 SunOS/5.10)
2208 ;;
2209 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002210
2211cat >>confdefs.h <<\_ACEOF
2212#define _XOPEN_SOURCE_EXTENDED 1
2213_ACEOF
2214
Martin v. Löwis7dece662005-11-26 11:38:24 +00002215 ;;
2216 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002217
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002218
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002219cat >>confdefs.h <<\_ACEOF
2220#define _POSIX_C_SOURCE 200112L
2221_ACEOF
2222
2223
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002224fi
2225
Guido van Rossum91922671997-10-09 20:24:13 +00002226#
2227# SGI compilers allow the specification of the both the ABI and the
2228# ISA on the command line. Depending on the values of these switches,
2229# different and often incompatable code will be generated.
2230#
2231# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2232# thus supply support for various ABI/ISA combinations. The MACHDEP
2233# variable is also adjusted.
2234#
2235
2236if test ! -z "$SGI_ABI"
2237then
2238 CC="cc $SGI_ABI"
2239 LDFLAGS="$SGI_ABI $LDFLAGS"
2240 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2241fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002242{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2243echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002244
Jack Jansen6b08a402004-06-03 12:41:45 +00002245# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2246# it may influence the way we can build extensions, so distutils
2247# needs to check it
2248
Thomas Wouters477c8d52006-05-27 19:21:47 +00002249
Jack Jansen6b08a402004-06-03 12:41:45 +00002250CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002251EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002252
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002253{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2254echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002255ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002256{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2257echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002258
Guido van Rossum627b2d71993-12-24 10:39:16 +00002259# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002260
2261# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2262# for debug/optimization stuff. BASECFLAGS is for flags that are required
2263# just to get things to compile and link. Users are free to override OPT
2264# when running configure or make. The build should not break if they do.
2265# BASECFLAGS should generally not be messed with, however.
2266
2267# XXX shouldn't some/most/all of this code be merged with the stuff later
2268# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002269{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2270echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002272# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002273if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002274 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002275 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002276 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002277 without_gcc=yes;;
2278 yes) CC=gcc
2279 without_gcc=no;;
2280 *) CC=$withval
2281 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002282 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002283else
Martin v. Löwis11437992002-04-12 09:54:03 +00002284
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002285 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002286 AIX*) CC=cc_r
2287 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002288 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002289 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002290fi
2291
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002292{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2293echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002294
Guido van Rossum8b131c51995-03-09 14:10:13 +00002295# If the user switches compilers, we can't believe the cache
2296if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2297then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002298 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002299(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002300echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002301(it is also a good idea to do 'make clean' before compiling)" >&2;}
2302 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002303fi
2304
Martin v. Löwis11437992002-04-12 09:54:03 +00002305ac_ext=c
2306ac_cpp='$CPP $CPPFLAGS'
2307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2309ac_compiler_gnu=$ac_cv_c_compiler_gnu
2310if test -n "$ac_tool_prefix"; then
2311 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2312set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002313{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2314echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002315if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002317else
2318 if test -n "$CC"; then
2319 ac_cv_prog_CC="$CC" # Let the user override the test.
2320else
Martin v. Löwis11437992002-04-12 09:54:03 +00002321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2322for as_dir in $PATH
2323do
2324 IFS=$as_save_IFS
2325 test -z "$as_dir" && as_dir=.
2326 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002327 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 +00002328 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002329 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002330 break 2
2331 fi
2332done
2333done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
Jack Jansendd19cf82001-12-06 22:36:17 +00002336fi
2337fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002338CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002339if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002340 { echo "$as_me:$LINENO: result: $CC" >&5
2341echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002343 { echo "$as_me:$LINENO: result: no" >&5
2344echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002345fi
2346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347
Martin v. Löwis11437992002-04-12 09:54:03 +00002348fi
2349if test -z "$ac_cv_prog_CC"; then
2350 ac_ct_CC=$CC
2351 # Extract the first word of "gcc", so it can be a program name with args.
2352set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002353{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002355if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002356 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002357else
2358 if test -n "$ac_ct_CC"; then
2359 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2360else
2361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2362for as_dir in $PATH
2363do
2364 IFS=$as_save_IFS
2365 test -z "$as_dir" && as_dir=.
2366 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367 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 +00002368 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002369 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002370 break 2
2371 fi
2372done
2373done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002374IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002375
2376fi
2377fi
2378ac_ct_CC=$ac_cv_prog_ac_ct_CC
2379if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002380 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2381echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002383 { echo "$as_me:$LINENO: result: no" >&5
2384echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002385fi
2386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387 if test "x$ac_ct_CC" = x; then
2388 CC=""
2389 else
2390 case $cross_compiling:$ac_tool_warned in
2391yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002392{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2393whose name does not start with the host triplet. If you think this
2394configuration is useful to you, please write to autoconf@gnu.org." >&5
2395echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2396whose name does not start with the host triplet. If you think this
2397configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002398ac_tool_warned=yes ;;
2399esac
2400 CC=$ac_ct_CC
2401 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002402else
2403 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002404fi
2405
Jack Jansendd19cf82001-12-06 22:36:17 +00002406if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407 if test -n "$ac_tool_prefix"; then
2408 # 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 +00002409set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002410{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2411echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002413 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002414else
2415 if test -n "$CC"; then
2416 ac_cv_prog_CC="$CC" # Let the user override the test.
2417else
Martin v. Löwis11437992002-04-12 09:54:03 +00002418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2419for as_dir in $PATH
2420do
2421 IFS=$as_save_IFS
2422 test -z "$as_dir" && as_dir=.
2423 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 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 +00002425 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002426 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002427 break 2
2428 fi
2429done
2430done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002431IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433fi
2434fi
2435CC=$ac_cv_prog_CC
2436if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002437 { echo "$as_me:$LINENO: result: $CC" >&5
2438echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002439else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002440 { echo "$as_me:$LINENO: result: no" >&5
2441echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002442fi
2443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444
Martin v. Löwis11437992002-04-12 09:54:03 +00002445 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002446fi
2447if test -z "$CC"; then
2448 # Extract the first word of "cc", so it can be a program name with args.
2449set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002450{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2451echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002453 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002454else
2455 if test -n "$CC"; then
2456 ac_cv_prog_CC="$CC" # Let the user override the test.
2457else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2460for as_dir in $PATH
2461do
2462 IFS=$as_save_IFS
2463 test -z "$as_dir" && as_dir=.
2464 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 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 +00002466 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2467 ac_prog_rejected=yes
2468 continue
2469 fi
2470 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002471 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 break 2
2473 fi
2474done
2475done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002478if test $ac_prog_rejected = yes; then
2479 # We found a bogon in the path, so make sure we never use it.
2480 set dummy $ac_cv_prog_CC
2481 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002483 # We chose a different compiler from the bogus one.
2484 # However, it has the same basename, so the bogon will be chosen
2485 # first if we set CC to just the basename; use the full file name.
2486 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002488 fi
2489fi
2490fi
2491fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002492CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002493if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002494 { echo "$as_me:$LINENO: result: $CC" >&5
2495echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002497 { echo "$as_me:$LINENO: result: no" >&5
2498echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002499fi
2500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501
Martin v. Löwis11437992002-04-12 09:54:03 +00002502fi
2503if test -z "$CC"; then
2504 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 do
2507 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2508set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002509{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2510echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002511if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002512 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002513else
2514 if test -n "$CC"; then
2515 ac_cv_prog_CC="$CC" # Let the user override the test.
2516else
Martin v. Löwis11437992002-04-12 09:54:03 +00002517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2518for as_dir in $PATH
2519do
2520 IFS=$as_save_IFS
2521 test -z "$as_dir" && as_dir=.
2522 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 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 +00002524 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002525 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002527 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002531
2532fi
2533fi
2534CC=$ac_cv_prog_CC
2535if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002536 { echo "$as_me:$LINENO: result: $CC" >&5
2537echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002539 { echo "$as_me:$LINENO: result: no" >&5
2540echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002541fi
2542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 test -n "$CC" && break
2545 done
2546fi
2547if test -z "$CC"; then
2548 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002550do
2551 # Extract the first word of "$ac_prog", so it can be a program name with args.
2552set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002553{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2554echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002555if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002557else
2558 if test -n "$ac_ct_CC"; then
2559 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2560else
2561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2562for as_dir in $PATH
2563do
2564 IFS=$as_save_IFS
2565 test -z "$as_dir" && as_dir=.
2566 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 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 +00002568 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002569 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 break 2
2571 fi
2572done
2573done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576fi
2577fi
2578ac_ct_CC=$ac_cv_prog_ac_ct_CC
2579if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002580 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2581echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002582else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002583 { echo "$as_me:$LINENO: result: no" >&5
2584echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002585fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 test -n "$ac_ct_CC" && break
2589done
Michael W. Hudson54241132001-12-07 15:38:26 +00002590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 if test "x$ac_ct_CC" = x; then
2592 CC=""
2593 else
2594 case $cross_compiling:$ac_tool_warned in
2595yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002596{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2597whose name does not start with the host triplet. If you think this
2598configuration is useful to you, please write to autoconf@gnu.org." >&5
2599echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2600whose name does not start with the host triplet. If you think this
2601configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602ac_tool_warned=yes ;;
2603esac
2604 CC=$ac_ct_CC
2605 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002606fi
2607
2608fi
2609
2610
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002611test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002612See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002613echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002614See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002615 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002616
2617# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002618echo "$as_me:$LINENO: checking for C compiler version" >&5
2619ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620{ (ac_try="$ac_compiler --version >&5"
2621case "(($ac_try" in
2622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2623 *) ac_try_echo=$ac_try;;
2624esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630{ (ac_try="$ac_compiler -v >&5"
2631case "(($ac_try" in
2632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2633 *) ac_try_echo=$ac_try;;
2634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640{ (ac_try="$ac_compiler -V >&5"
2641case "(($ac_try" in
2642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2643 *) ac_try_echo=$ac_try;;
2644esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 (exit $ac_status); }
2650
2651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002652/* confdefs.h. */
2653_ACEOF
2654cat confdefs.h >>conftest.$ac_ext
2655cat >>conftest.$ac_ext <<_ACEOF
2656/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002657
Martin v. Löwis11437992002-04-12 09:54:03 +00002658int
2659main ()
2660{
2661
2662 ;
2663 return 0;
2664}
2665_ACEOF
2666ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002667ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002668# Try to create an executable without -o first, disregard a.out.
2669# It will help us diagnose broken compilers, and finding out an intuition
2670# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002671{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2672echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2673ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2674#
2675# List of possible output files, starting from the most likely.
2676# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2677# only as a last resort. b.out is created by i960 compilers.
2678ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2679#
2680# The IRIX 6 linker writes into existing files which may not be
2681# executable, retaining their permissions. Remove them first so a
2682# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683ac_rmfiles=
2684for ac_file in $ac_files
2685do
2686 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002687 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2689 esac
2690done
2691rm -f $ac_rmfiles
2692
2693if { (ac_try="$ac_link_default"
2694case "(($ac_try" in
2695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696 *) ac_try_echo=$ac_try;;
2697esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2704# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2705# in a Makefile. We should not override ac_cv_exeext if it was cached,
2706# so that the user can short-circuit this test for compilers unknown to
2707# Autoconf.
2708for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002709do
2710 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002712 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002713 ;;
2714 [ab].out )
2715 # We found the default executable, but exeext='' is most
2716 # certainly right.
2717 break;;
2718 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2720 then :; else
2721 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2722 fi
2723 # We set ac_cv_exeext here because the later test for it is not
2724 # safe: cross compilers may not add the suffix if given an `-o'
2725 # argument, so we may need to know it at that point already.
2726 # Even if this section looks crufty: it has the advantage of
2727 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002728 break;;
2729 * )
2730 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 esac
2732done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733test "$ac_cv_exeext" = no && ac_cv_exeext=
2734
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002735else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 ac_file=''
2737fi
2738
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002739{ echo "$as_me:$LINENO: result: $ac_file" >&5
2740echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002743sed 's/^/| /' conftest.$ac_ext >&5
2744
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002746See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002748See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002749 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002750fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002751
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002752ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002755# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002756{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2757echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002758# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2759# If not cross compiling, check that we can run a simple program.
2760if test "$cross_compiling" != yes; then
2761 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762 { (case "(($ac_try" in
2763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2764 *) ac_try_echo=$ac_try;;
2765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 (exit $ac_status); }; }; then
2771 cross_compiling=no
2772 else
2773 if test "$cross_compiling" = maybe; then
2774 cross_compiling=yes
2775 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002776 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002777If you meant to cross compile, use \`--host'.
2778See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002779echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002780If you meant to cross compile, use \`--host'.
2781See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002782 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002783 fi
2784 fi
2785fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002786{ echo "$as_me:$LINENO: result: yes" >&5
2787echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002788
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002789rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002790ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002792# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2794echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2795{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2796echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002797
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002798{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2799echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002800if { (ac_try="$ac_link"
2801case "(($ac_try" in
2802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2803 *) ac_try_echo=$ac_try;;
2804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002806 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002807 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002810 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2811# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2812# work properly (i.e., refer to `conftest.exe'), while it won't with
2813# `rm'.
2814for ac_file in conftest.exe conftest conftest.*; do
2815 test -f "$ac_file" || continue
2816 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002817 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002818 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2819 break;;
2820 * ) break;;
2821 esac
2822done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002823else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002824 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002825See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002826echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002827See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002828 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002829fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002830
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002831rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002832{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2833echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002834
2835rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002836EXEEXT=$ac_cv_exeext
2837ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002838{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2839echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002840if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002841 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002842else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002843 cat >conftest.$ac_ext <<_ACEOF
2844/* confdefs.h. */
2845_ACEOF
2846cat confdefs.h >>conftest.$ac_ext
2847cat >>conftest.$ac_ext <<_ACEOF
2848/* end confdefs.h. */
2849
2850int
2851main ()
2852{
2853
2854 ;
2855 return 0;
2856}
2857_ACEOF
2858rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002859if { (ac_try="$ac_compile"
2860case "(($ac_try" in
2861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2862 *) ac_try_echo=$ac_try;;
2863esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002865 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002866 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002868 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002869 for ac_file in conftest.o conftest.obj conftest.*; do
2870 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002872 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2874 break;;
2875 esac
2876done
2877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002879sed 's/^/| /' conftest.$ac_ext >&5
2880
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002881{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002882See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002883echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002884See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002885 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002886fi
2887
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002888rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002889fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002890{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2891echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002892OBJEXT=$ac_cv_objext
2893ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002894{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2895echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002896if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002897 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002898else
2899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002900/* confdefs.h. */
2901_ACEOF
2902cat confdefs.h >>conftest.$ac_ext
2903cat >>conftest.$ac_ext <<_ACEOF
2904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002905
Martin v. Löwis11437992002-04-12 09:54:03 +00002906int
2907main ()
2908{
2909#ifndef __GNUC__
2910 choke me
2911#endif
2912
2913 ;
2914 return 0;
2915}
2916_ACEOF
2917rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002918if { (ac_try="$ac_compile"
2919case "(($ac_try" in
2920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2921 *) ac_try_echo=$ac_try;;
2922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002926 grep -v '^ *+' conftest.er1 >conftest.err
2927 rm -f conftest.er1
2928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930 (exit $ac_status); } && {
2931 test -z "$ac_c_werror_flag" ||
2932 test ! -s conftest.err
2933 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 ac_compiler_gnu=yes
2935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002937sed 's/^/| /' conftest.$ac_ext >&5
2938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002939 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941
2942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002943ac_cv_c_compiler_gnu=$ac_compiler_gnu
2944
2945fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002946{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2947echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2948GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002949ac_test_CFLAGS=${CFLAGS+set}
2950ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002951{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2952echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002953if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002955else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002956 ac_save_c_werror_flag=$ac_c_werror_flag
2957 ac_c_werror_flag=yes
2958 ac_cv_prog_cc_g=no
2959 CFLAGS="-g"
2960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002961/* confdefs.h. */
2962_ACEOF
2963cat confdefs.h >>conftest.$ac_ext
2964cat >>conftest.$ac_ext <<_ACEOF
2965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967int
2968main ()
2969{
2970
2971 ;
2972 return 0;
2973}
2974_ACEOF
2975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002976if { (ac_try="$ac_compile"
2977case "(($ac_try" in
2978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2979 *) ac_try_echo=$ac_try;;
2980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002984 grep -v '^ *+' conftest.er1 >conftest.err
2985 rm -f conftest.er1
2986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988 (exit $ac_status); } && {
2989 test -z "$ac_c_werror_flag" ||
2990 test ! -s conftest.err
2991 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002992 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002995sed 's/^/| /' conftest.$ac_ext >&5
2996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002997 CFLAGS=""
2998 cat >conftest.$ac_ext <<_ACEOF
2999/* confdefs.h. */
3000_ACEOF
3001cat confdefs.h >>conftest.$ac_ext
3002cat >>conftest.$ac_ext <<_ACEOF
3003/* end confdefs.h. */
3004
3005int
3006main ()
3007{
3008
3009 ;
3010 return 0;
3011}
3012_ACEOF
3013rm -f conftest.$ac_objext
3014if { (ac_try="$ac_compile"
3015case "(($ac_try" in
3016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3017 *) ac_try_echo=$ac_try;;
3018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020 (eval "$ac_compile") 2>conftest.er1
3021 ac_status=$?
3022 grep -v '^ *+' conftest.er1 >conftest.err
3023 rm -f conftest.er1
3024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026 (exit $ac_status); } && {
3027 test -z "$ac_c_werror_flag" ||
3028 test ! -s conftest.err
3029 } && test -s conftest.$ac_objext; then
3030 :
3031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003032 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033sed 's/^/| /' conftest.$ac_ext >&5
3034
3035 ac_c_werror_flag=$ac_save_c_werror_flag
3036 CFLAGS="-g"
3037 cat >conftest.$ac_ext <<_ACEOF
3038/* confdefs.h. */
3039_ACEOF
3040cat confdefs.h >>conftest.$ac_ext
3041cat >>conftest.$ac_ext <<_ACEOF
3042/* end confdefs.h. */
3043
3044int
3045main ()
3046{
3047
3048 ;
3049 return 0;
3050}
3051_ACEOF
3052rm -f conftest.$ac_objext
3053if { (ac_try="$ac_compile"
3054case "(($ac_try" in
3055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056 *) ac_try_echo=$ac_try;;
3057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059 (eval "$ac_compile") 2>conftest.er1
3060 ac_status=$?
3061 grep -v '^ *+' conftest.er1 >conftest.err
3062 rm -f conftest.er1
3063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065 (exit $ac_status); } && {
3066 test -z "$ac_c_werror_flag" ||
3067 test ! -s conftest.err
3068 } && test -s conftest.$ac_objext; then
3069 ac_cv_prog_cc_g=yes
3070else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003071 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003072sed 's/^/| /' conftest.$ac_ext >&5
3073
3074
Guido van Rossum627b2d71993-12-24 10:39:16 +00003075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076
3077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079
3080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3081fi
3082
3083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084 ac_c_werror_flag=$ac_save_c_werror_flag
3085fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003086{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3087echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003088if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003089 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003090elif test $ac_cv_prog_cc_g = yes; then
3091 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003092 CFLAGS="-g -O2"
3093 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003094 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003095 fi
3096else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003097 if test "$GCC" = yes; then
3098 CFLAGS="-O2"
3099 else
3100 CFLAGS=
3101 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003102fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003103{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3104echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003106 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003107else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003109ac_save_CC=$CC
3110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003111/* confdefs.h. */
3112_ACEOF
3113cat confdefs.h >>conftest.$ac_ext
3114cat >>conftest.$ac_ext <<_ACEOF
3115/* end confdefs.h. */
3116#include <stdarg.h>
3117#include <stdio.h>
3118#include <sys/types.h>
3119#include <sys/stat.h>
3120/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3121struct buf { int x; };
3122FILE * (*rcsopen) (struct buf *, struct stat *, int);
3123static char *e (p, i)
3124 char **p;
3125 int i;
3126{
3127 return p[i];
3128}
3129static char *f (char * (*g) (char **, int), char **p, ...)
3130{
3131 char *s;
3132 va_list v;
3133 va_start (v,p);
3134 s = g (p, va_arg (v,int));
3135 va_end (v);
3136 return s;
3137}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003138
3139/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3140 function prototypes and stuff, but not '\xHH' hex character constants.
3141 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003143 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3144 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003146int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3149 inside strings and character constants. */
3150#define FOO(x) 'x'
3151int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3152
Skip Montanaro6dead952003-09-25 14:50:04 +00003153int test (int i, double x);
3154struct s1 {int (*f) (int a);};
3155struct s2 {int (*f) (double a);};
3156int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3157int argc;
3158char **argv;
3159int
3160main ()
3161{
3162return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3163 ;
3164 return 0;
3165}
3166_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003167for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3168 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003169do
3170 CC="$ac_save_CC $ac_arg"
3171 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172if { (ac_try="$ac_compile"
3173case "(($ac_try" in
3174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3175 *) ac_try_echo=$ac_try;;
3176esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003180 grep -v '^ *+' conftest.er1 >conftest.err
3181 rm -f conftest.er1
3182 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 (exit $ac_status); } && {
3185 test -z "$ac_c_werror_flag" ||
3186 test ! -s conftest.err
3187 } && test -s conftest.$ac_objext; then
3188 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003191sed 's/^/| /' conftest.$ac_ext >&5
3192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193
Skip Montanaro6dead952003-09-25 14:50:04 +00003194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195
3196rm -f core conftest.err conftest.$ac_objext
3197 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003198done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003200CC=$ac_save_CC
3201
3202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203# AC_CACHE_VAL
3204case "x$ac_cv_prog_cc_c89" in
3205 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003206 { echo "$as_me:$LINENO: result: none needed" >&5
3207echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003209 { echo "$as_me:$LINENO: result: unsupported" >&5
3210echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003211 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003213 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3214echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003215esac
3216
Skip Montanaro6dead952003-09-25 14:50:04 +00003217
Martin v. Löwis11437992002-04-12 09:54:03 +00003218ac_ext=c
3219ac_cpp='$CPP $CPPFLAGS'
3220ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3221ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3222ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003223
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003224
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003225
3226
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003227{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3228echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233
3234 case $withval in
3235 no) with_cxx_main=no
3236 MAINCC='$(CC)';;
3237 yes) with_cxx_main=yes
3238 MAINCC='$(CXX)';;
3239 *) with_cxx_main=yes
3240 MAINCC=$withval
3241 if test -z "$CXX"
3242 then
3243 CXX=$withval
3244 fi;;
3245 esac
3246else
3247
3248 with_cxx_main=no
3249 MAINCC='$(CC)'
3250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251fi
3252
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003253{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3254echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255
3256preset_cxx="$CXX"
3257if test -z "$CXX"
3258then
3259 case "$CC" in
3260 gcc) # Extract the first word of "g++", so it can be a program name with args.
3261set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003262{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3263echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003264if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003265 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003266else
3267 case $CXX in
3268 [\\/]* | ?:[\\/]*)
3269 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3270 ;;
3271 *)
3272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3273for as_dir in notfound
3274do
3275 IFS=$as_save_IFS
3276 test -z "$as_dir" && as_dir=.
3277 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278 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 +00003279 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003281 break 2
3282 fi
3283done
3284done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003286
3287 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3288 ;;
3289esac
3290fi
3291CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003292if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003293 { echo "$as_me:$LINENO: result: $CXX" >&5
3294echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003296 { echo "$as_me:$LINENO: result: no" >&5
3297echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003299
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003300 ;;
3301 cc) # Extract the first word of "c++", so it can be a program name with args.
3302set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003303{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003305if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003306 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003307else
3308 case $CXX in
3309 [\\/]* | ?:[\\/]*)
3310 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3311 ;;
3312 *)
3313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3314for as_dir in notfound
3315do
3316 IFS=$as_save_IFS
3317 test -z "$as_dir" && as_dir=.
3318 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319 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 +00003320 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003321 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003322 break 2
3323 fi
3324done
3325done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327
3328 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3329 ;;
3330esac
3331fi
3332CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003333if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003334 { echo "$as_me:$LINENO: result: $CXX" >&5
3335echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003336else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003337 { echo "$as_me:$LINENO: result: no" >&5
3338echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003340
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003341 ;;
3342 esac
3343 if test "$CXX" = "notfound"
3344 then
3345 CXX=""
3346 fi
3347fi
3348if test -z "$CXX"
3349then
3350 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3351do
3352 # Extract the first word of "$ac_prog", so it can be a program name with args.
3353set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003354{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3355echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003356if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003357 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358else
3359 if test -n "$CXX"; then
3360 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3361else
3362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3363for as_dir in $PATH
3364do
3365 IFS=$as_save_IFS
3366 test -z "$as_dir" && as_dir=.
3367 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003368 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 +00003369 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003370 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003371 break 2
3372 fi
3373done
3374done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003375IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003376
3377fi
3378fi
3379CXX=$ac_cv_prog_CXX
3380if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003381 { echo "$as_me:$LINENO: result: $CXX" >&5
3382echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003383else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003384 { echo "$as_me:$LINENO: result: no" >&5
3385echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003386fi
3387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003389 test -n "$CXX" && break
3390done
3391test -n "$CXX" || CXX="notfound"
3392
3393 if test "$CXX" = "notfound"
3394 then
3395 CXX=""
3396 fi
3397fi
3398if test "$preset_cxx" != "$CXX"
3399then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003400 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003401
3402 By default, distutils will build C++ extension modules with \"$CXX\".
3403 If this is not intended, then set CXX on the configure command line.
3404 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003405echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003406
3407 By default, distutils will build C++ extension modules with \"$CXX\".
3408 If this is not intended, then set CXX on the configure command line.
3409 " >&2;}
3410fi
3411
3412
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003413# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003414
3415ac_ext=c
3416ac_cpp='$CPP $CPPFLAGS'
3417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3419ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003420{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3421echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003422# On Suns, sometimes $CPP names a directory.
3423if test -n "$CPP" && test -d "$CPP"; then
3424 CPP=
3425fi
3426if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003428 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003429else
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 # Double quotes because CPP needs to be expanded
3431 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3432 do
3433 ac_preproc_ok=false
3434for ac_c_preproc_warn_flag in '' yes
3435do
3436 # Use a header file that comes with gcc, so configuring glibc
3437 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003438 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3439 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 # not just through cpp. "Syntax error" is here to catch this case.
3442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003443/* confdefs.h. */
3444_ACEOF
3445cat confdefs.h >>conftest.$ac_ext
3446cat >>conftest.$ac_ext <<_ACEOF
3447/* end confdefs.h. */
3448#ifdef __STDC__
3449# include <limits.h>
3450#else
3451# include <assert.h>
3452#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003453 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003454_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455if { (ac_try="$ac_cpp conftest.$ac_ext"
3456case "(($ac_try" in
3457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3458 *) ac_try_echo=$ac_try;;
3459esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003463 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 rm -f conftest.er1
3465 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (exit $ac_status); } >/dev/null && {
3468 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3469 test ! -s conftest.err
3470 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003471 :
3472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003474sed 's/^/| /' conftest.$ac_ext >&5
3475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 # Broken: fails on valid input.
3477continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479
Martin v. Löwis11437992002-04-12 09:54:03 +00003480rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 # can be detected and how.
3484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003485/* confdefs.h. */
3486_ACEOF
3487cat confdefs.h >>conftest.$ac_ext
3488cat >>conftest.$ac_ext <<_ACEOF
3489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003490#include <ac_nonexistent.h>
3491_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492if { (ac_try="$ac_cpp conftest.$ac_ext"
3493case "(($ac_try" in
3494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3495 *) ac_try_echo=$ac_try;;
3496esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003498 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003499 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003500 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 rm -f conftest.er1
3502 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504 (exit $ac_status); } >/dev/null && {
3505 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3506 test ! -s conftest.err
3507 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 # Broken: success on invalid input.
3509continue
3510else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003512sed 's/^/| /' conftest.$ac_ext >&5
3513
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 # Passes both tests.
3515ac_preproc_ok=:
3516break
3517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003518
Martin v. Löwis11437992002-04-12 09:54:03 +00003519rm -f conftest.err conftest.$ac_ext
3520
3521done
3522# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3523rm -f conftest.err conftest.$ac_ext
3524if $ac_preproc_ok; then
3525 break
3526fi
3527
3528 done
3529 ac_cv_prog_CPP=$CPP
3530
3531fi
3532 CPP=$ac_cv_prog_CPP
3533else
3534 ac_cv_prog_CPP=$CPP
3535fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003536{ echo "$as_me:$LINENO: result: $CPP" >&5
3537echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003538ac_preproc_ok=false
3539for ac_c_preproc_warn_flag in '' yes
3540do
3541 # Use a header file that comes with gcc, so configuring glibc
3542 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003543 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3544 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 # On the NeXT, cc -E runs the code through the compiler's parser,
3546 # not just through cpp. "Syntax error" is here to catch this case.
3547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003548/* confdefs.h. */
3549_ACEOF
3550cat confdefs.h >>conftest.$ac_ext
3551cat >>conftest.$ac_ext <<_ACEOF
3552/* end confdefs.h. */
3553#ifdef __STDC__
3554# include <limits.h>
3555#else
3556# include <assert.h>
3557#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003558 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003559_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560if { (ac_try="$ac_cpp conftest.$ac_ext"
3561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003568 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 rm -f conftest.er1
3570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (exit $ac_status); } >/dev/null && {
3573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3574 test ! -s conftest.err
3575 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 :
3577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003579sed 's/^/| /' conftest.$ac_ext >&5
3580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 # Broken: fails on valid input.
3582continue
3583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584
Martin v. Löwis11437992002-04-12 09:54:03 +00003585rm -f conftest.err conftest.$ac_ext
3586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # can be detected and how.
3589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003590/* confdefs.h. */
3591_ACEOF
3592cat confdefs.h >>conftest.$ac_ext
3593cat >>conftest.$ac_ext <<_ACEOF
3594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003595#include <ac_nonexistent.h>
3596_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597if { (ac_try="$ac_cpp conftest.$ac_ext"
3598case "(($ac_try" in
3599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3600 *) ac_try_echo=$ac_try;;
3601esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003605 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 rm -f conftest.er1
3607 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609 (exit $ac_status); } >/dev/null && {
3610 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3611 test ! -s conftest.err
3612 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 # Broken: success on invalid input.
3614continue
3615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003617sed 's/^/| /' conftest.$ac_ext >&5
3618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 # Passes both tests.
3620ac_preproc_ok=:
3621break
3622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624rm -f conftest.err conftest.$ac_ext
3625
3626done
3627# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3628rm -f conftest.err conftest.$ac_ext
3629if $ac_preproc_ok; then
3630 :
3631else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003632 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003633See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003635See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003636 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003637fi
3638
3639ac_ext=c
3640ac_cpp='$CPP $CPPFLAGS'
3641ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3642ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3643ac_compiler_gnu=$ac_cv_c_compiler_gnu
3644
3645
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003646{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3647echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003649 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003650else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003651 # Extract the first word of "grep ggrep" to use in msg output
3652if test -z "$GREP"; then
3653set dummy grep ggrep; ac_prog_name=$2
3654if test "${ac_cv_path_GREP+set}" = set; then
3655 echo $ECHO_N "(cached) $ECHO_C" >&6
3656else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003658# Loop through the user's path and test for each of PROGNAME-LIST
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
3664 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003665 for ac_exec_ext in '' $ac_executable_extensions; do
3666 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3667 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3668 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 # Check for GNU $ac_path_GREP
3670case `"$ac_path_GREP" --version 2>&1` in
3671*GNU*)
3672 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3673*)
3674 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003675 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 while :
3677 do
3678 cat "conftest.in" "conftest.in" >"conftest.tmp"
3679 mv "conftest.tmp" "conftest.in"
3680 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3683 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3684 ac_count=`expr $ac_count + 1`
3685 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3686 # Best one so far, save it but keep looking for a better one
3687 ac_cv_path_GREP="$ac_path_GREP"
3688 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003689 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690 # 10*(2^10) chars as input seems more than enough
3691 test $ac_count -gt 10 && break
3692 done
3693 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3694esac
3695
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003696
3697 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698 done
3699done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003700
3701done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003703
3704
3705fi
3706
3707GREP="$ac_cv_path_GREP"
3708if test -z "$GREP"; then
3709 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3710echo "$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 +00003711 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003712fi
3713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714else
3715 ac_cv_path_GREP=$GREP
3716fi
3717
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003720{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3721echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722 GREP="$ac_cv_path_GREP"
3723
3724
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003725{ echo "$as_me:$LINENO: checking for egrep" >&5
3726echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003728 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729else
3730 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3731 then ac_cv_path_EGREP="$GREP -E"
3732 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003733 # Extract the first word of "egrep" to use in msg output
3734if test -z "$EGREP"; then
3735set dummy egrep; ac_prog_name=$2
3736if test "${ac_cv_path_EGREP+set}" = set; then
3737 echo $ECHO_N "(cached) $ECHO_C" >&6
3738else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003740# Loop through the user's path and test for each of PROGNAME-LIST
3741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3743do
3744 IFS=$as_save_IFS
3745 test -z "$as_dir" && as_dir=.
3746 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003747 for ac_exec_ext in '' $ac_executable_extensions; do
3748 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3749 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3750 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 # Check for GNU $ac_path_EGREP
3752case `"$ac_path_EGREP" --version 2>&1` in
3753*GNU*)
3754 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3755*)
3756 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003757 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758 while :
3759 do
3760 cat "conftest.in" "conftest.in" >"conftest.tmp"
3761 mv "conftest.tmp" "conftest.in"
3762 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003763 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3765 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3766 ac_count=`expr $ac_count + 1`
3767 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3768 # Best one so far, save it but keep looking for a better one
3769 ac_cv_path_EGREP="$ac_path_EGREP"
3770 ac_path_EGREP_max=$ac_count
3771 fi
3772 # 10*(2^10) chars as input seems more than enough
3773 test $ac_count -gt 10 && break
3774 done
3775 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3776esac
3777
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003778
3779 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780 done
3781done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003782
3783done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003785
3786
3787fi
3788
3789EGREP="$ac_cv_path_EGREP"
3790if test -z "$EGREP"; then
3791 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3792echo "$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 +00003793 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003794fi
3795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796else
3797 ac_cv_path_EGREP=$EGREP
3798fi
3799
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 fi
3802fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003803{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3804echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003806
3807
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003808
3809{ echo "$as_me:$LINENO: checking for AIX" >&5
3810echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3811cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003812/* confdefs.h. */
3813_ACEOF
3814cat confdefs.h >>conftest.$ac_ext
3815cat >>conftest.$ac_ext <<_ACEOF
3816/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003817#ifdef _AIX
3818 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003819#endif
3820
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003821_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3823 $EGREP "yes" >/dev/null 2>&1; then
3824 { echo "$as_me:$LINENO: result: yes" >&5
3825echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003826cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003827#define _ALL_SOURCE 1
3828_ACEOF
3829
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003830else
3831 { echo "$as_me:$LINENO: result: no" >&5
3832echo "${ECHO_T}no" >&6; }
3833fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003834rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003835
3836
3837
3838# Check for unsupported systems
3839case $ac_sys_system/$ac_sys_release in
3840atheos*|Linux*/1*)
3841 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3842 echo See README for details.
3843 exit 1;;
3844esac
3845
3846
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003847{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3848echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003849
3850# Check whether --with-suffix was given.
3851if test "${with_suffix+set}" = set; then
3852 withval=$with_suffix;
3853 case $withval in
3854 no) EXEEXT=;;
3855 yes) EXEEXT=.exe;;
3856 *) EXEEXT=$withval;;
3857 esac
3858fi
3859
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003860{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3861echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003862
3863# Test whether we're running on a non-case-sensitive system, in which
3864# case we give a warning if no ext is given
3865
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003866{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3867echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003868if test ! -d CaseSensitiveTestDir; then
3869mkdir CaseSensitiveTestDir
3870fi
3871
3872if test -d casesensitivetestdir
3873then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003874 { echo "$as_me:$LINENO: result: yes" >&5
3875echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003876 BUILDEXEEXT=.exe
3877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003878 { echo "$as_me:$LINENO: result: no" >&5
3879echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003880 BUILDEXEEXT=$EXEEXT
3881fi
3882rmdir CaseSensitiveTestDir
3883
3884case $MACHDEP in
3885bsdos*)
3886 case $CC in
3887 gcc) CC="$CC -D_HAVE_BSDI";;
3888 esac;;
3889esac
3890
3891case $ac_sys_system in
3892hp*|HP*)
3893 case $CC in
3894 cc|*/cc) CC="$CC -Ae";;
3895 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003896SunOS*)
3897 # Some functions have a prototype only with that define, e.g. confstr
3898
3899cat >>confdefs.h <<\_ACEOF
3900#define __EXTENSIONS__ 1
3901_ACEOF
3902
3903 ;;
3904esac
3905
3906
3907
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003908{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3909echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003910if test -z "$LIBRARY"
3911then
3912 LIBRARY='libpython$(VERSION).a'
3913fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003914{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3915echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003916
3917# LDLIBRARY is the name of the library to link against (as opposed to the
3918# name of the library into which to insert object files). BLDLIBRARY is also
3919# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3920# is blank as the main program is not linked directly against LDLIBRARY.
3921# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3922# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3923# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3924# DLLLIBRARY is the shared (i.e., DLL) library.
3925#
3926# RUNSHARED is used to run shared python without installed libraries
3927#
3928# INSTSONAME is the name of the shared library that will be use to install
3929# on the system - some systems like version suffix, others don't
3930
3931
3932
3933
3934
3935
3936LDLIBRARY="$LIBRARY"
3937BLDLIBRARY='$(LDLIBRARY)'
3938INSTSONAME='$(LDLIBRARY)'
3939DLLLIBRARY=''
3940LDLIBRARYDIR=''
3941RUNSHARED=''
3942
3943# LINKCC is the command that links the python executable -- default is $(CC).
3944# If CXX is set, and if it is needed to link a main function that was
3945# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3946# python might then depend on the C++ runtime
3947# This is altered for AIX in order to build the export list before
3948# linking.
3949
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003950{ echo "$as_me:$LINENO: checking LINKCC" >&5
3951echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003952if test -z "$LINKCC"
3953then
3954 LINKCC='$(PURIFY) $(MAINCC)'
3955 case $ac_sys_system in
3956 AIX*)
3957 exp_extra="\"\""
3958 if test $ac_sys_release -ge 5 -o \
3959 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3960 exp_extra="."
3961 fi
3962 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003963 QNX*)
3964 # qcc must be used because the other compilers do not
3965 # support -N.
3966 LINKCC=qcc;;
3967 esac
3968fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003969{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3970echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003971
3972# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3973# make sure we default having it set to "no": this is used by
3974# distutils.unixccompiler to know if it should add --enable-new-dtags
3975# to linker command lines, and failing to detect GNU ld simply results
3976# in the same bahaviour as before.
3977
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003978{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3979echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003980ac_prog=ld
3981if test "$GCC" = yes; then
3982 ac_prog=`$CC -print-prog-name=ld`
3983fi
3984case `"$ac_prog" -V 2>&1 < /dev/null` in
3985 *GNU*)
3986 GNULD=yes;;
3987 *)
3988 GNULD=no;;
3989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003990{ echo "$as_me:$LINENO: result: $GNULD" >&5
3991echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003992
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003993{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3994echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003995# Check whether --enable-shared was given.
3996if test "${enable_shared+set}" = set; then
3997 enableval=$enable_shared;
3998fi
3999
4000
4001if test -z "$enable_shared"
4002then
4003 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004004 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004005 enable_shared="yes";;
4006 *)
4007 enable_shared="no";;
4008 esac
4009fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004010{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4011echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004012
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004013{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4014echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015# Check whether --enable-profiling was given.
4016if test "${enable_profiling+set}" = set; then
4017 enableval=$enable_profiling; ac_save_cc="$CC"
4018 CC="$CC -pg"
4019 if test "$cross_compiling" = yes; then
4020 ac_enable_profiling="no"
4021else
4022 cat >conftest.$ac_ext <<_ACEOF
4023/* confdefs.h. */
4024_ACEOF
4025cat confdefs.h >>conftest.$ac_ext
4026cat >>conftest.$ac_ext <<_ACEOF
4027/* end confdefs.h. */
4028int main() { return 0; }
4029_ACEOF
4030rm -f conftest$ac_exeext
4031if { (ac_try="$ac_link"
4032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004037 (eval "$ac_link") 2>&5
4038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4041 { (case "(($ac_try" in
4042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4043 *) ac_try_echo=$ac_try;;
4044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004046 (eval "$ac_try") 2>&5
4047 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004049 (exit $ac_status); }; }; then
4050 ac_enable_profiling="yes"
4051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004052 echo "$as_me: program exited with status $ac_status" >&5
4053echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004054sed 's/^/| /' conftest.$ac_ext >&5
4055
4056( exit $ac_status )
4057ac_enable_profiling="no"
4058fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4060fi
4061
4062
4063 CC="$ac_save_cc"
4064fi
4065
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004066{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4067echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004068
4069case "$ac_enable_profiling" in
4070 "yes")
4071 BASECFLAGS="-pg $BASECFLAGS"
4072 LDFLAGS="-pg $LDFLAGS"
4073 ;;
4074esac
4075
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004076{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4077echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004078
4079# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4080# library that we build, but we do not want to link against it (we
4081# will find it with a -framework option). For this reason there is an
4082# extra variable BLDLIBRARY against which Python and the extension
4083# modules are linked, BLDLIBRARY. This is normally the same as
4084# LDLIBRARY, but empty for MacOSX framework builds.
4085if test "$enable_framework"
4086then
4087 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4088 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4089 BLDLIBRARY=''
4090else
4091 BLDLIBRARY='$(LDLIBRARY)'
4092fi
4093
4094# Other platforms follow
4095if test $enable_shared = "yes"; then
4096
4097cat >>confdefs.h <<\_ACEOF
4098#define Py_ENABLE_SHARED 1
4099_ACEOF
4100
4101 case $ac_sys_system in
4102 CYGWIN*)
4103 LDLIBRARY='libpython$(VERSION).dll.a'
4104 DLLLIBRARY='libpython$(VERSION).dll'
4105 ;;
4106 SunOS*)
4107 LDLIBRARY='libpython$(VERSION).so'
4108 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4109 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4110 INSTSONAME="$LDLIBRARY".$SOVERSION
4111 ;;
4112 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4113 LDLIBRARY='libpython$(VERSION).so'
4114 BLDLIBRARY='-L. -lpython$(VERSION)'
4115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4116 case $ac_sys_system in
4117 FreeBSD*)
4118 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4119 ;;
4120 esac
4121 INSTSONAME="$LDLIBRARY".$SOVERSION
4122 ;;
4123 hp*|HP*)
4124 case `uname -m` in
4125 ia64)
4126 LDLIBRARY='libpython$(VERSION).so'
4127 ;;
4128 *)
4129 LDLIBRARY='libpython$(VERSION).sl'
4130 ;;
4131 esac
4132 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4133 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4134 ;;
4135 OSF*)
4136 LDLIBRARY='libpython$(VERSION).so'
4137 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4139 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004140 Darwin*)
4141 LDLIBRARY='libpython$(VERSION).dylib'
4142 BLDLIBRARY='-L. -lpython$(VERSION)'
4143 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4144 ;;
4145
4146 esac
4147else # shared is disabled
4148 case $ac_sys_system in
4149 CYGWIN*)
4150 BLDLIBRARY='$(LIBRARY)'
4151 LDLIBRARY='libpython$(VERSION).dll.a'
4152 ;;
4153 esac
4154fi
4155
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004156{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4157echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004158
4159if test -n "$ac_tool_prefix"; then
4160 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4161set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004162{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004164if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004165 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004166else
4167 if test -n "$RANLIB"; then
4168 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4169else
4170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4171for as_dir in $PATH
4172do
4173 IFS=$as_save_IFS
4174 test -z "$as_dir" && as_dir=.
4175 for ac_exec_ext in '' $ac_executable_extensions; do
4176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4177 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004178 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004179 break 2
4180 fi
4181done
4182done
4183IFS=$as_save_IFS
4184
4185fi
4186fi
4187RANLIB=$ac_cv_prog_RANLIB
4188if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004189 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4190echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004192 { echo "$as_me:$LINENO: result: no" >&5
4193echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004194fi
4195
4196
4197fi
4198if test -z "$ac_cv_prog_RANLIB"; then
4199 ac_ct_RANLIB=$RANLIB
4200 # Extract the first word of "ranlib", so it can be a program name with args.
4201set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004202{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4203echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004204if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004205 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004206else
4207 if test -n "$ac_ct_RANLIB"; then
4208 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4209else
4210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4211for as_dir in $PATH
4212do
4213 IFS=$as_save_IFS
4214 test -z "$as_dir" && as_dir=.
4215 for ac_exec_ext in '' $ac_executable_extensions; do
4216 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4217 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004218 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004219 break 2
4220 fi
4221done
4222done
4223IFS=$as_save_IFS
4224
4225fi
4226fi
4227ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4228if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004229 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4230echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004232 { echo "$as_me:$LINENO: result: no" >&5
4233echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004234fi
4235
4236 if test "x$ac_ct_RANLIB" = x; then
4237 RANLIB=":"
4238 else
4239 case $cross_compiling:$ac_tool_warned in
4240yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004241{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4242whose name does not start with the host triplet. If you think this
4243configuration is useful to you, please write to autoconf@gnu.org." >&5
4244echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4245whose name does not start with the host triplet. If you think this
4246configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004247ac_tool_warned=yes ;;
4248esac
4249 RANLIB=$ac_ct_RANLIB
4250 fi
4251else
4252 RANLIB="$ac_cv_prog_RANLIB"
4253fi
4254
4255
4256for ac_prog in ar aal
4257do
4258 # Extract the first word of "$ac_prog", so it can be a program name with args.
4259set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004260{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4261echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004262if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004263 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004264else
4265 if test -n "$AR"; then
4266 ac_cv_prog_AR="$AR" # Let the user override the test.
4267else
4268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269for as_dir in $PATH
4270do
4271 IFS=$as_save_IFS
4272 test -z "$as_dir" && as_dir=.
4273 for ac_exec_ext in '' $ac_executable_extensions; do
4274 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4275 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004276 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004277 break 2
4278 fi
4279done
4280done
4281IFS=$as_save_IFS
4282
4283fi
4284fi
4285AR=$ac_cv_prog_AR
4286if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004287 { echo "$as_me:$LINENO: result: $AR" >&5
4288echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004289else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004290 { echo "$as_me:$LINENO: result: no" >&5
4291echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004292fi
4293
4294
4295 test -n "$AR" && break
4296done
4297test -n "$AR" || AR="ar"
4298
4299
4300# tweak ARFLAGS only if the user didn't set it on the command line
4301
4302if test -z "$ARFLAGS"
4303then
4304 ARFLAGS="rc"
4305fi
4306
4307
4308# Extract the first word of "svnversion", so it can be a program name with args.
4309set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004310{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4311echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004313 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004314else
4315 if test -n "$SVNVERSION"; then
4316 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4317else
4318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319for as_dir in $PATH
4320do
4321 IFS=$as_save_IFS
4322 test -z "$as_dir" && as_dir=.
4323 for ac_exec_ext in '' $ac_executable_extensions; do
4324 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4325 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004326 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004327 break 2
4328 fi
4329done
4330done
4331IFS=$as_save_IFS
4332
4333 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4334fi
4335fi
4336SVNVERSION=$ac_cv_prog_SVNVERSION
4337if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004338 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4339echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004340else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004341 { echo "$as_me:$LINENO: result: no" >&5
4342echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004343fi
4344
4345
4346if test $SVNVERSION = found
4347then
4348 SVNVERSION="svnversion \$(srcdir)"
4349else
4350 SVNVERSION="echo Unversioned directory"
4351fi
4352
4353case $MACHDEP in
4354bsdos*|hp*|HP*)
4355 # install -d does not work on BSDI or HP-UX
4356 if test -z "$INSTALL"
4357 then
4358 INSTALL="${srcdir}/install-sh -c"
4359 fi
4360esac
4361ac_aux_dir=
4362for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4363 if test -f "$ac_dir/install-sh"; then
4364 ac_aux_dir=$ac_dir
4365 ac_install_sh="$ac_aux_dir/install-sh -c"
4366 break
4367 elif test -f "$ac_dir/install.sh"; then
4368 ac_aux_dir=$ac_dir
4369 ac_install_sh="$ac_aux_dir/install.sh -c"
4370 break
4371 elif test -f "$ac_dir/shtool"; then
4372 ac_aux_dir=$ac_dir
4373 ac_install_sh="$ac_aux_dir/shtool install -c"
4374 break
4375 fi
4376done
4377if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004378 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4379echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004380 { (exit 1); exit 1; }; }
4381fi
4382
4383# These three variables are undocumented and unsupported,
4384# and are intended to be withdrawn in a future Autoconf release.
4385# They can cause serious problems if a builder's source tree is in a directory
4386# whose full name contains unusual characters.
4387ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4388ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4389ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4390
4391
4392# Find a good install program. We prefer a C program (faster),
4393# so one script is as good as another. But avoid the broken or
4394# incompatible versions:
4395# SysV /etc/install, /usr/sbin/install
4396# SunOS /usr/etc/install
4397# IRIX /sbin/install
4398# AIX /bin/install
4399# AmigaOS /C/install, which installs bootblocks on floppy discs
4400# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4401# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4402# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4403# OS/2's system install, which has a completely different semantic
4404# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004405{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4406echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004407if test -z "$INSTALL"; then
4408if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004409 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004410else
4411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4412for as_dir in $PATH
4413do
4414 IFS=$as_save_IFS
4415 test -z "$as_dir" && as_dir=.
4416 # Account for people who put trailing slashes in PATH elements.
4417case $as_dir/ in
4418 ./ | .// | /cC/* | \
4419 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4420 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4421 /usr/ucb/* ) ;;
4422 *)
4423 # OSF1 and SCO ODT 3.0 have their own names for install.
4424 # Don't use installbsd from OSF since it installs stuff as root
4425 # by default.
4426 for ac_prog in ginstall scoinst install; do
4427 for ac_exec_ext in '' $ac_executable_extensions; do
4428 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4429 if test $ac_prog = install &&
4430 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4431 # AIX install. It has an incompatible calling convention.
4432 :
4433 elif test $ac_prog = install &&
4434 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4435 # program-specific install script used by HP pwplus--don't use.
4436 :
4437 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004438 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4439 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004440 fi
4441 fi
4442 done
4443 done
4444 ;;
4445esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004446done
4447IFS=$as_save_IFS
4448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004449
4450fi
4451 if test "${ac_cv_path_install+set}" = set; then
4452 INSTALL=$ac_cv_path_install
4453 else
4454 # As a last resort, use the slow shell script. Don't cache a
4455 # value for INSTALL within a source directory, because that will
4456 # break other packages using the cache if that directory is
4457 # removed, or if the value is a relative name.
4458 INSTALL=$ac_install_sh
4459 fi
4460fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004461{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4462echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004463
4464# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4465# It thinks the first close brace ends the variable substitution.
4466test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4467
4468test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4469
4470test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4471
4472
4473# Not every filesystem supports hard links
4474
4475if test -z "$LN" ; then
4476 case $ac_sys_system in
4477 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004478 *) LN=ln;;
4479 esac
4480fi
4481
4482# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004483{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4484echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004485
4486# Check whether --with-pydebug was given.
4487if test "${with_pydebug+set}" = set; then
4488 withval=$with_pydebug;
4489if test "$withval" != no
4490then
4491
4492cat >>confdefs.h <<\_ACEOF
4493#define Py_DEBUG 1
4494_ACEOF
4495
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004496 { echo "$as_me:$LINENO: result: yes" >&5
4497echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004498 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004499else { echo "$as_me:$LINENO: result: no" >&5
4500echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004501fi
4502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004503 { echo "$as_me:$LINENO: result: no" >&5
4504echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004505fi
4506
4507
4508# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4509# merged with this chunk of code?
4510
4511# Optimizer/debugger flags
4512# ------------------------
4513# (The following bit of code is complicated enough - please keep things
4514# indented properly. Just pretend you're editing Python code. ;-)
4515
4516# There are two parallel sets of case statements below, one that checks to
4517# see if OPT was set and one that does BASECFLAGS setting based upon
4518# compiler and platform. BASECFLAGS tweaks need to be made even if the
4519# user set OPT.
4520
4521# tweak OPT based on compiler and platform, only if the user didn't set
4522# it on the command line
4523
4524if test -z "$OPT"
4525then
4526 case $GCC in
4527 yes)
4528 if test "$CC" != 'g++' ; then
4529 STRICT_PROTO="-Wstrict-prototypes"
4530 fi
4531 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4532 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4533 WRAP="-fwrapv"
4534 fi
4535 case $ac_cv_prog_cc_g in
4536 yes)
4537 if test "$Py_DEBUG" = 'true' ; then
4538 # Optimization messes up debuggers, so turn it off for
4539 # debug builds.
4540 OPT="-g -Wall $STRICT_PROTO"
4541 else
4542 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4543 fi
4544 ;;
4545 *)
4546 OPT="-O3 -Wall $STRICT_PROTO"
4547 ;;
4548 esac
4549 case $ac_sys_system in
4550 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4551 ;;
4552 esac
4553 ;;
4554
4555 *)
4556 OPT="-O"
4557 ;;
4558 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004559fi
4560
4561
4562
4563# The -arch flags for universal builds on OSX
4564UNIVERSAL_ARCH_FLAGS=
4565
4566
4567# tweak BASECFLAGS based on compiler and platform
4568case $GCC in
4569yes)
4570 # Python violates C99 rules, by casting between incompatible
4571 # pointer types. GCC may generate bad code as a result of that,
4572 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004573 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4574echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004575 ac_save_cc="$CC"
4576 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004577 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004578 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004579else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004580 cat >conftest.$ac_ext <<_ACEOF
4581/* confdefs.h. */
4582_ACEOF
4583cat confdefs.h >>conftest.$ac_ext
4584cat >>conftest.$ac_ext <<_ACEOF
4585/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004586
4587int
4588main ()
4589{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004590int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004591 ;
4592 return 0;
4593}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004594_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004595rm -f conftest.$ac_objext
4596if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004597case "(($ac_try" in
4598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4599 *) ac_try_echo=$ac_try;;
4600esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004602 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004603 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004604 grep -v '^ *+' conftest.er1 >conftest.err
4605 rm -f conftest.er1
4606 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004608 (exit $ac_status); } && {
4609 test -z "$ac_c_werror_flag" ||
4610 test ! -s conftest.err
4611 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004612 ac_cv_no_strict_aliasing_ok=yes
4613else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004614 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615sed 's/^/| /' conftest.$ac_ext >&5
4616
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004617 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004618fi
4619
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004621fi
4622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004623 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004624 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4625echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004626 if test $ac_cv_no_strict_aliasing_ok = yes
4627 then
4628 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4629 fi
4630
4631 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4632 # support. Without this, treatment of subnormals doesn't follow
4633 # the standard.
4634 case $ac_sys_machine in
4635 alpha*)
4636 BASECFLAGS="$BASECFLAGS -mieee"
4637 ;;
4638 esac
4639
4640 case $ac_sys_system in
4641 SCO_SV*)
4642 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4643 ;;
4644 # is there any other compiler on Darwin besides gcc?
4645 Darwin*)
4646 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4647 # used to be here, but non-Apple gcc doesn't accept them.
4648
4649
4650 if test "${enable_universalsdk}"; then
4651 UNIVERSAL_ARCH_FLAGS=""
4652 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4653 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4654 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004655 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004656
Ronald Oussoren755740f2010-02-07 19:56:39 +00004657 # You have to use different flags on various versions of
4658 # OSX to extract PPC code from an universal binary, basically
4659 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4660 # newer.
4661 # Because '-arch pp7400' works on OSX 10.5 or higher this
4662 # test is only present in the '32-bit' branch, all other
4663 # branches require OSX 10.5 to compile.
4664
4665 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4666echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4667 FN="test.$$"
4668 cat >${FN}.c <<-EOF
4669 int main() { return 0; }
4670EOF
4671 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4672 if test $? != 0 ; then
4673 rm ${FN} ${FN}.c
4674 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4675echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4676 else
4677 lipo "${FN}" -extract ppc7400 -output "${FN}.out" 2>/dev/null
4678 if test $? != 0 ; then
4679 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4680 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4681echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4682 else
4683 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4684echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4685 fi
4686 rm -f ${FN} ${FN}.c ${FN}.out
4687 fi
4688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004689 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4690 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004691 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004692 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693
4694 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4695 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004696 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004697 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004699 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4700 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004701 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004702 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004703
4704 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4705 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004706 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004707 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004710 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4711echo "$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 +00004712 { (exit 1); exit 1; }; }
4713
4714 fi
4715
4716
4717 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4718 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4719 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4720 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4721 fi
4722 fi
4723
4724 # Calculate the right deployment target for this build.
4725 #
4726 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4727 if test ${cur_target} '>' 10.2; then
4728 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004729 if test ${enable_universalsdk}; then
4730 if test "${UNIVERSAL_ARCHS}" = "all"; then
4731 # Ensure that the default platform for a
4732 # 4-way universal build is OSX 10.5,
4733 # that's the first OS release where
4734 # 4-way builds make sense.
4735 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004736
4737 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4738 cur_target='10.5'
4739
4740 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4741 cur_target='10.5'
4742
4743 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4744 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004745 fi
4746 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004747 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004748 # On Intel macs default to a deployment
4749 # target of 10.4, that's the first OSX
4750 # release with Intel support.
4751 cur_target="10.4"
4752 fi
4753 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754 fi
4755 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4756
4757 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4758 # environment with a value that is the same as what we'll use
4759 # in the Makefile to ensure that we'll get the same compiler
4760 # environment during configure and build time.
4761 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4762 export MACOSX_DEPLOYMENT_TARGET
4763 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4764
4765 ;;
4766 OSF*)
4767 BASECFLAGS="$BASECFLAGS -mieee"
4768 ;;
4769 esac
4770 ;;
4771
4772*)
4773 case $ac_sys_system in
4774 OpenUNIX*|UnixWare*)
4775 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4776 ;;
4777 OSF*)
4778 BASECFLAGS="$BASECFLAGS -ieee -std"
4779 ;;
4780 SCO_SV*)
4781 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4782 ;;
4783 esac
4784 ;;
4785esac
4786
4787if test "$Py_DEBUG" = 'true'; then
4788 :
4789else
4790 OPT="-DNDEBUG $OPT"
4791fi
4792
4793if test "$ac_arch_flags"
4794then
4795 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4796fi
4797
4798# disable check for icc since it seems to pass, but generates a warning
4799if test "$CC" = icc
4800then
4801 ac_cv_opt_olimit_ok=no
4802fi
4803
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004804{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4805echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004806if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004807 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808else
4809 ac_save_cc="$CC"
4810CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004811cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812/* confdefs.h. */
4813_ACEOF
4814cat confdefs.h >>conftest.$ac_ext
4815cat >>conftest.$ac_ext <<_ACEOF
4816/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004817
4818int
4819main ()
4820{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004822 ;
4823 return 0;
4824}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004826rm -f conftest.$ac_objext
4827if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004828case "(($ac_try" in
4829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4830 *) ac_try_echo=$ac_try;;
4831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004833 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004835 grep -v '^ *+' conftest.er1 >conftest.err
4836 rm -f conftest.er1
4837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004839 (exit $ac_status); } && {
4840 test -z "$ac_c_werror_flag" ||
4841 test ! -s conftest.err
4842 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 ac_cv_opt_olimit_ok=yes
4844else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004845 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846sed 's/^/| /' conftest.$ac_ext >&5
4847
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004848 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849fi
4850
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852CC="$ac_save_cc"
4853fi
4854
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004855{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4856echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857if test $ac_cv_opt_olimit_ok = yes; then
4858 case $ac_sys_system in
4859 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4860 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4861 # environment?
4862 Darwin*)
4863 ;;
4864 *)
4865 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4866 ;;
4867 esac
4868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004869 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4870echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004871 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004872 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873else
4874 ac_save_cc="$CC"
4875 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876 cat >conftest.$ac_ext <<_ACEOF
4877/* confdefs.h. */
4878_ACEOF
4879cat confdefs.h >>conftest.$ac_ext
4880cat >>conftest.$ac_ext <<_ACEOF
4881/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004882
4883int
4884main ()
4885{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004886int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004887 ;
4888 return 0;
4889}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004891rm -f conftest.$ac_objext
4892if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004898 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004900 grep -v '^ *+' conftest.er1 >conftest.err
4901 rm -f conftest.er1
4902 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004904 (exit $ac_status); } && {
4905 test -z "$ac_c_werror_flag" ||
4906 test ! -s conftest.err
4907 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908 ac_cv_olimit_ok=yes
4909else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004910 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004911sed 's/^/| /' conftest.$ac_ext >&5
4912
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004913 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914fi
4915
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917 CC="$ac_save_cc"
4918fi
4919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004920 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4921echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922 if test $ac_cv_olimit_ok = yes; then
4923 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4924 fi
4925fi
4926
4927# Check whether GCC supports PyArg_ParseTuple format
4928if test "$GCC" = "yes"
4929then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004930 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4931echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932 save_CFLAGS=$CFLAGS
4933 CFLAGS="$CFLAGS -Werror"
4934 cat >conftest.$ac_ext <<_ACEOF
4935/* confdefs.h. */
4936_ACEOF
4937cat confdefs.h >>conftest.$ac_ext
4938cat >>conftest.$ac_ext <<_ACEOF
4939/* end confdefs.h. */
4940
4941 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4942
4943int
4944main ()
4945{
4946
4947 ;
4948 return 0;
4949}
4950_ACEOF
4951rm -f conftest.$ac_objext
4952if { (ac_try="$ac_compile"
4953case "(($ac_try" in
4954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4955 *) ac_try_echo=$ac_try;;
4956esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004958 (eval "$ac_compile") 2>conftest.er1
4959 ac_status=$?
4960 grep -v '^ *+' conftest.er1 >conftest.err
4961 rm -f conftest.er1
4962 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004964 (exit $ac_status); } && {
4965 test -z "$ac_c_werror_flag" ||
4966 test ! -s conftest.err
4967 } && test -s conftest.$ac_objext; then
4968
4969cat >>confdefs.h <<\_ACEOF
4970#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4971_ACEOF
4972
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004973 { echo "$as_me:$LINENO: result: yes" >&5
4974echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004976 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977sed 's/^/| /' conftest.$ac_ext >&5
4978
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004979 { echo "$as_me:$LINENO: result: no" >&5
4980echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981
4982fi
4983
4984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4985 CFLAGS=$save_CFLAGS
4986fi
4987
4988# On some compilers, pthreads are available without further options
4989# (e.g. MacOS X). On some of these systems, the compiler will not
4990# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4991# So we have to see first whether pthreads are available without
4992# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004993{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4994echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004996 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997else
4998 if test "$cross_compiling" = yes; then
4999 ac_cv_pthread_is_default=no
5000else
5001 cat >conftest.$ac_ext <<_ACEOF
5002/* confdefs.h. */
5003_ACEOF
5004cat confdefs.h >>conftest.$ac_ext
5005cat >>conftest.$ac_ext <<_ACEOF
5006/* end confdefs.h. */
5007
5008#include <pthread.h>
5009
5010void* routine(void* p){return NULL;}
5011
5012int main(){
5013 pthread_t p;
5014 if(pthread_create(&p,NULL,routine,NULL)!=0)
5015 return 1;
5016 (void)pthread_detach(p);
5017 return 0;
5018}
5019
5020_ACEOF
5021rm -f conftest$ac_exeext
5022if { (ac_try="$ac_link"
5023case "(($ac_try" in
5024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5025 *) ac_try_echo=$ac_try;;
5026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 (eval "$ac_link") 2>&5
5029 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5032 { (case "(($ac_try" in
5033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5034 *) ac_try_echo=$ac_try;;
5035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 (eval "$ac_try") 2>&5
5038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040 (exit $ac_status); }; }; then
5041
5042 ac_cv_pthread_is_default=yes
5043 ac_cv_kthread=no
5044 ac_cv_pthread=no
5045
5046else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005047 echo "$as_me: program exited with status $ac_status" >&5
5048echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049sed 's/^/| /' conftest.$ac_ext >&5
5050
5051( exit $ac_status )
5052ac_cv_pthread_is_default=no
5053fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5055fi
5056
5057
5058
5059fi
5060
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005061{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5062echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063
5064
5065if test $ac_cv_pthread_is_default = yes
5066then
5067 ac_cv_kpthread=no
5068else
5069# -Kpthread, if available, provides the right #defines
5070# and linker options to make pthread_create available
5071# Some compilers won't report that they do not support -Kpthread,
5072# so we need to run a program to see whether it really made the
5073# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005074{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5075echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005077 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078else
5079 ac_save_cc="$CC"
5080CC="$CC -Kpthread"
5081if test "$cross_compiling" = yes; then
5082 ac_cv_kpthread=no
5083else
5084 cat >conftest.$ac_ext <<_ACEOF
5085/* confdefs.h. */
5086_ACEOF
5087cat confdefs.h >>conftest.$ac_ext
5088cat >>conftest.$ac_ext <<_ACEOF
5089/* end confdefs.h. */
5090
5091#include <pthread.h>
5092
5093void* routine(void* p){return NULL;}
5094
5095int main(){
5096 pthread_t p;
5097 if(pthread_create(&p,NULL,routine,NULL)!=0)
5098 return 1;
5099 (void)pthread_detach(p);
5100 return 0;
5101}
5102
5103_ACEOF
5104rm -f conftest$ac_exeext
5105if { (ac_try="$ac_link"
5106case "(($ac_try" in
5107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5108 *) ac_try_echo=$ac_try;;
5109esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005111 (eval "$ac_link") 2>&5
5112 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5115 { (case "(($ac_try" in
5116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5117 *) ac_try_echo=$ac_try;;
5118esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 (eval "$ac_try") 2>&5
5121 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 (exit $ac_status); }; }; then
5124 ac_cv_kpthread=yes
5125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005126 echo "$as_me: program exited with status $ac_status" >&5
5127echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128sed 's/^/| /' conftest.$ac_ext >&5
5129
5130( exit $ac_status )
5131ac_cv_kpthread=no
5132fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5134fi
5135
5136
5137CC="$ac_save_cc"
5138fi
5139
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5141echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142fi
5143
5144if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5145then
5146# -Kthread, if available, provides the right #defines
5147# and linker options to make pthread_create available
5148# Some compilers won't report that they do not support -Kthread,
5149# so we need to run a program to see whether it really made the
5150# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005151{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5152echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005153if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005154 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155else
5156 ac_save_cc="$CC"
5157CC="$CC -Kthread"
5158if test "$cross_compiling" = yes; then
5159 ac_cv_kthread=no
5160else
5161 cat >conftest.$ac_ext <<_ACEOF
5162/* confdefs.h. */
5163_ACEOF
5164cat confdefs.h >>conftest.$ac_ext
5165cat >>conftest.$ac_ext <<_ACEOF
5166/* end confdefs.h. */
5167
5168#include <pthread.h>
5169
5170void* routine(void* p){return NULL;}
5171
5172int main(){
5173 pthread_t p;
5174 if(pthread_create(&p,NULL,routine,NULL)!=0)
5175 return 1;
5176 (void)pthread_detach(p);
5177 return 0;
5178}
5179
5180_ACEOF
5181rm -f conftest$ac_exeext
5182if { (ac_try="$ac_link"
5183case "(($ac_try" in
5184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5185 *) ac_try_echo=$ac_try;;
5186esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188 (eval "$ac_link") 2>&5
5189 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5192 { (case "(($ac_try" in
5193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5194 *) ac_try_echo=$ac_try;;
5195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 (eval "$ac_try") 2>&5
5198 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200 (exit $ac_status); }; }; then
5201 ac_cv_kthread=yes
5202else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005203 echo "$as_me: program exited with status $ac_status" >&5
5204echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205sed 's/^/| /' conftest.$ac_ext >&5
5206
5207( exit $ac_status )
5208ac_cv_kthread=no
5209fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5211fi
5212
5213
5214CC="$ac_save_cc"
5215fi
5216
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005217{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5218echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219fi
5220
5221if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5222then
5223# -pthread, if available, provides the right #defines
5224# and linker options to make pthread_create available
5225# Some compilers won't report that they do not support -pthread,
5226# so we need to run a program to see whether it really made the
5227# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005228{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5229echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005230if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005231 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232else
5233 ac_save_cc="$CC"
5234CC="$CC -pthread"
5235if test "$cross_compiling" = yes; then
5236 ac_cv_pthread=no
5237else
5238 cat >conftest.$ac_ext <<_ACEOF
5239/* confdefs.h. */
5240_ACEOF
5241cat confdefs.h >>conftest.$ac_ext
5242cat >>conftest.$ac_ext <<_ACEOF
5243/* end confdefs.h. */
5244
5245#include <pthread.h>
5246
5247void* routine(void* p){return NULL;}
5248
5249int main(){
5250 pthread_t p;
5251 if(pthread_create(&p,NULL,routine,NULL)!=0)
5252 return 1;
5253 (void)pthread_detach(p);
5254 return 0;
5255}
5256
5257_ACEOF
5258rm -f conftest$ac_exeext
5259if { (ac_try="$ac_link"
5260case "(($ac_try" in
5261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5262 *) ac_try_echo=$ac_try;;
5263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265 (eval "$ac_link") 2>&5
5266 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5269 { (case "(($ac_try" in
5270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271 *) ac_try_echo=$ac_try;;
5272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274 (eval "$ac_try") 2>&5
5275 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277 (exit $ac_status); }; }; then
5278 ac_cv_pthread=yes
5279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005280 echo "$as_me: program exited with status $ac_status" >&5
5281echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282sed 's/^/| /' conftest.$ac_ext >&5
5283
5284( exit $ac_status )
5285ac_cv_pthread=no
5286fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5288fi
5289
5290
5291CC="$ac_save_cc"
5292fi
5293
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005294{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5295echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005296fi
5297
5298# If we have set a CC compiler flag for thread support then
5299# check if it works for CXX, too.
5300ac_cv_cxx_thread=no
5301if test ! -z "$CXX"
5302then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005303{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5304echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305ac_save_cxx="$CXX"
5306
5307if test "$ac_cv_kpthread" = "yes"
5308then
5309 CXX="$CXX -Kpthread"
5310 ac_cv_cxx_thread=yes
5311elif test "$ac_cv_kthread" = "yes"
5312then
5313 CXX="$CXX -Kthread"
5314 ac_cv_cxx_thread=yes
5315elif test "$ac_cv_pthread" = "yes"
5316then
5317 CXX="$CXX -pthread"
5318 ac_cv_cxx_thread=yes
5319fi
5320
5321if test $ac_cv_cxx_thread = yes
5322then
5323 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5324 $CXX -c conftest.$ac_ext 2>&5
5325 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5326 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5327 then
5328 ac_cv_cxx_thread=yes
5329 else
5330 ac_cv_cxx_thread=no
5331 fi
5332 rm -fr conftest*
5333fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005334{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5335echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336fi
5337CXX="$ac_save_cxx"
5338
5339
5340# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005341{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5342echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005344 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345else
5346 cat >conftest.$ac_ext <<_ACEOF
5347/* confdefs.h. */
5348_ACEOF
5349cat confdefs.h >>conftest.$ac_ext
5350cat >>conftest.$ac_ext <<_ACEOF
5351/* end confdefs.h. */
5352#include <stdlib.h>
5353#include <stdarg.h>
5354#include <string.h>
5355#include <float.h>
5356
5357int
5358main ()
5359{
5360
5361 ;
5362 return 0;
5363}
5364_ACEOF
5365rm -f conftest.$ac_objext
5366if { (ac_try="$ac_compile"
5367case "(($ac_try" in
5368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5369 *) ac_try_echo=$ac_try;;
5370esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372 (eval "$ac_compile") 2>conftest.er1
5373 ac_status=$?
5374 grep -v '^ *+' conftest.er1 >conftest.err
5375 rm -f conftest.er1
5376 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378 (exit $ac_status); } && {
5379 test -z "$ac_c_werror_flag" ||
5380 test ! -s conftest.err
5381 } && test -s conftest.$ac_objext; then
5382 ac_cv_header_stdc=yes
5383else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005384 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385sed 's/^/| /' conftest.$ac_ext >&5
5386
5387 ac_cv_header_stdc=no
5388fi
5389
5390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5391
5392if test $ac_cv_header_stdc = yes; then
5393 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5394 cat >conftest.$ac_ext <<_ACEOF
5395/* confdefs.h. */
5396_ACEOF
5397cat confdefs.h >>conftest.$ac_ext
5398cat >>conftest.$ac_ext <<_ACEOF
5399/* end confdefs.h. */
5400#include <string.h>
5401
5402_ACEOF
5403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5404 $EGREP "memchr" >/dev/null 2>&1; then
5405 :
5406else
5407 ac_cv_header_stdc=no
5408fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00005409rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410
5411fi
5412
5413if test $ac_cv_header_stdc = yes; then
5414 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5415 cat >conftest.$ac_ext <<_ACEOF
5416/* confdefs.h. */
5417_ACEOF
5418cat confdefs.h >>conftest.$ac_ext
5419cat >>conftest.$ac_ext <<_ACEOF
5420/* end confdefs.h. */
5421#include <stdlib.h>
5422
5423_ACEOF
5424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5425 $EGREP "free" >/dev/null 2>&1; then
5426 :
5427else
5428 ac_cv_header_stdc=no
5429fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00005430rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431
5432fi
5433
5434if test $ac_cv_header_stdc = yes; then
5435 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5436 if test "$cross_compiling" = yes; then
5437 :
5438else
5439 cat >conftest.$ac_ext <<_ACEOF
5440/* confdefs.h. */
5441_ACEOF
5442cat confdefs.h >>conftest.$ac_ext
5443cat >>conftest.$ac_ext <<_ACEOF
5444/* end confdefs.h. */
5445#include <ctype.h>
5446#include <stdlib.h>
5447#if ((' ' & 0x0FF) == 0x020)
5448# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5449# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5450#else
5451# define ISLOWER(c) \
5452 (('a' <= (c) && (c) <= 'i') \
5453 || ('j' <= (c) && (c) <= 'r') \
5454 || ('s' <= (c) && (c) <= 'z'))
5455# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5456#endif
5457
5458#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5459int
5460main ()
5461{
5462 int i;
5463 for (i = 0; i < 256; i++)
5464 if (XOR (islower (i), ISLOWER (i))
5465 || toupper (i) != TOUPPER (i))
5466 return 2;
5467 return 0;
5468}
5469_ACEOF
5470rm -f conftest$ac_exeext
5471if { (ac_try="$ac_link"
5472case "(($ac_try" in
5473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5474 *) ac_try_echo=$ac_try;;
5475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477 (eval "$ac_link") 2>&5
5478 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5481 { (case "(($ac_try" in
5482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5483 *) ac_try_echo=$ac_try;;
5484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486 (eval "$ac_try") 2>&5
5487 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489 (exit $ac_status); }; }; then
5490 :
5491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005492 echo "$as_me: program exited with status $ac_status" >&5
5493echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494sed 's/^/| /' conftest.$ac_ext >&5
5495
5496( exit $ac_status )
5497ac_cv_header_stdc=no
5498fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5500fi
5501
5502
5503fi
5504fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005505{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5506echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507if test $ac_cv_header_stdc = yes; then
5508
5509cat >>confdefs.h <<\_ACEOF
5510#define STDC_HEADERS 1
5511_ACEOF
5512
5513fi
5514
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005515# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5526 inttypes.h stdint.h unistd.h
5527do
5528as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5529{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5530echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5531if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5532 echo $ECHO_N "(cached) $ECHO_C" >&6
5533else
5534 cat >conftest.$ac_ext <<_ACEOF
5535/* confdefs.h. */
5536_ACEOF
5537cat confdefs.h >>conftest.$ac_ext
5538cat >>conftest.$ac_ext <<_ACEOF
5539/* end confdefs.h. */
5540$ac_includes_default
5541
5542#include <$ac_header>
5543_ACEOF
5544rm -f conftest.$ac_objext
5545if { (ac_try="$ac_compile"
5546case "(($ac_try" in
5547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5548 *) ac_try_echo=$ac_try;;
5549esac
5550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5551 (eval "$ac_compile") 2>conftest.er1
5552 ac_status=$?
5553 grep -v '^ *+' conftest.er1 >conftest.err
5554 rm -f conftest.er1
5555 cat conftest.err >&5
5556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5557 (exit $ac_status); } && {
5558 test -z "$ac_c_werror_flag" ||
5559 test ! -s conftest.err
5560 } && test -s conftest.$ac_objext; then
5561 eval "$as_ac_Header=yes"
5562else
5563 echo "$as_me: failed program was:" >&5
5564sed 's/^/| /' conftest.$ac_ext >&5
5565
5566 eval "$as_ac_Header=no"
5567fi
5568
5569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5570fi
5571ac_res=`eval echo '${'$as_ac_Header'}'`
5572 { echo "$as_me:$LINENO: result: $ac_res" >&5
5573echo "${ECHO_T}$ac_res" >&6; }
5574if test `eval echo '${'$as_ac_Header'}'` = yes; then
5575 cat >>confdefs.h <<_ACEOF
5576#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5577_ACEOF
5578
5579fi
5580
5581done
5582
5583
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005584
Martin v. Löwis11437992002-04-12 09:54:03 +00005585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
Anthony Baxter8a560de2004-10-13 15:30:56 +00005620
Martin v. Löwisc3001752005-01-23 09:27:24 +00005621
Martin v. Löwis11017b12006-01-14 18:12:57 +00005622
Thomas Wouters477c8d52006-05-27 19:21:47 +00005623
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005624
5625
5626
5627
5628
5629
5630
5631
Thomas Wouters89f507f2006-12-13 04:49:30 +00005632
Christian Heimes043d6f62008-01-07 17:19:16 +00005633
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005634
5635
Christian Heimesbbe741d2008-03-28 10:53:29 +00005636
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005637
Ronald Oussoren755740f2010-02-07 19:56:39 +00005638
5639
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005640for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5641fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005642ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005643shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005644unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005645sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5646sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005647sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005648sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005649sys/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 +00005650sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005651bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005652do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005653as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005654if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005655 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5656echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005657if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005658 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005659fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005660ac_res=`eval echo '${'$as_ac_Header'}'`
5661 { echo "$as_me:$LINENO: result: $ac_res" >&5
5662echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005663else
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005665{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5666echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005668/* confdefs.h. */
5669_ACEOF
5670cat confdefs.h >>conftest.$ac_ext
5671cat >>conftest.$ac_ext <<_ACEOF
5672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005673$ac_includes_default
5674#include <$ac_header>
5675_ACEOF
5676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005677if { (ac_try="$ac_compile"
5678case "(($ac_try" in
5679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5680 *) ac_try_echo=$ac_try;;
5681esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005685 grep -v '^ *+' conftest.er1 >conftest.err
5686 rm -f conftest.er1
5687 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005689 (exit $ac_status); } && {
5690 test -z "$ac_c_werror_flag" ||
5691 test ! -s conftest.err
5692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005693 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005696sed 's/^/| /' conftest.$ac_ext >&5
5697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005698 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005700
5701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005702{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5703echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005704
5705# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005706{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5707echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005714#include <$ac_header>
5715_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005716if { (ac_try="$ac_cpp conftest.$ac_ext"
5717case "(($ac_try" in
5718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5719 *) ac_try_echo=$ac_try;;
5720esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005722 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005723 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005724 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 rm -f conftest.er1
5726 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005728 (exit $ac_status); } >/dev/null && {
5729 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5730 test ! -s conftest.err
5731 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005732 ac_header_preproc=yes
5733else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005735sed 's/^/| /' conftest.$ac_ext >&5
5736
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005739
Martin v. Löwis11437992002-04-12 09:54:03 +00005740rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005741{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5742echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005743
5744# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005745case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5746 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005747 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5748echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5749 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5750echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005751 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005752 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005753 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005754 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5755echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5756 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5757echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5758 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5759echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5761echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5763echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5765echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005766 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005767## -------------------------------------- ##
5768## Report this to http://bugs.python.org/ ##
5769## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005770_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005771 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005772 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005774{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5775echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005776if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005777 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005778else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005781ac_res=`eval echo '${'$as_ac_Header'}'`
5782 { echo "$as_me:$LINENO: result: $ac_res" >&5
5783echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005784
5785fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005786if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005788#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005789_ACEOF
5790
5791fi
5792
Guido van Rossum627b2d71993-12-24 10:39:16 +00005793done
5794
Martin v. Löwis11437992002-04-12 09:54:03 +00005795
5796
5797
5798
5799
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005801for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005802 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5803{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5804echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005805if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005806 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005807else
Martin v. Löwis11437992002-04-12 09:54:03 +00005808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005809/* confdefs.h. */
5810_ACEOF
5811cat confdefs.h >>conftest.$ac_ext
5812cat >>conftest.$ac_ext <<_ACEOF
5813/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814#include <sys/types.h>
5815#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005816
Martin v. Löwis11437992002-04-12 09:54:03 +00005817int
5818main ()
5819{
5820if ((DIR *) 0)
5821return 0;
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005827if { (ac_try="$ac_compile"
5828case "(($ac_try" in
5829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5830 *) ac_try_echo=$ac_try;;
5831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005835 grep -v '^ *+' conftest.er1 >conftest.err
5836 rm -f conftest.er1
5837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005839 (exit $ac_status); } && {
5840 test -z "$ac_c_werror_flag" ||
5841 test ! -s conftest.err
5842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005846sed 's/^/| /' conftest.$ac_ext >&5
5847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005848 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005850
5851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005852fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853ac_res=`eval echo '${'$as_ac_Header'}'`
5854 { echo "$as_me:$LINENO: result: $ac_res" >&5
5855echo "${ECHO_T}$ac_res" >&6; }
5856if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005857 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005858#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005859_ACEOF
5860
5861ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005864done
5865# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5866if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005867 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5868echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005869if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871else
Martin v. Löwis11437992002-04-12 09:54:03 +00005872 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005874/* confdefs.h. */
5875_ACEOF
5876cat confdefs.h >>conftest.$ac_ext
5877cat >>conftest.$ac_ext <<_ACEOF
5878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005880/* Override any GCC internal prototype to avoid an error.
5881 Use char because int might match the return type of a GCC
5882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005883#ifdef __cplusplus
5884extern "C"
5885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005886char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005887int
5888main ()
5889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005890return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005891 ;
5892 return 0;
5893}
5894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895for ac_lib in '' dir; do
5896 if test -z "$ac_lib"; then
5897 ac_res="none required"
5898 else
5899 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005901 fi
5902 rm -f conftest.$ac_objext conftest$ac_exeext
5903if { (ac_try="$ac_link"
5904case "(($ac_try" in
5905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5906 *) ac_try_echo=$ac_try;;
5907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005909 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005910 ac_status=$?
5911 grep -v '^ *+' conftest.er1 >conftest.err
5912 rm -f conftest.er1
5913 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005915 (exit $ac_status); } && {
5916 test -z "$ac_c_werror_flag" ||
5917 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005918 } && test -s conftest$ac_exeext &&
5919 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005920 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005922 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005923sed 's/^/| /' conftest.$ac_ext >&5
5924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005925
Thomas Wouters477c8d52006-05-27 19:21:47 +00005926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927
5928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5929 conftest$ac_exeext
5930 if test "${ac_cv_search_opendir+set}" = set; then
5931 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005933done
5934if test "${ac_cv_search_opendir+set}" = set; then
5935 :
5936else
5937 ac_cv_search_opendir=no
5938fi
5939rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005940LIBS=$ac_func_search_save_LIBS
5941fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005942{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5943echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005944ac_res=$ac_cv_search_opendir
5945if test "$ac_res" != no; then
5946 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
Michael W. Hudson54241132001-12-07 15:38:26 +00005950else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005951 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5952echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005953if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005955else
5956 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005958/* confdefs.h. */
5959_ACEOF
5960cat confdefs.h >>conftest.$ac_ext
5961cat >>conftest.$ac_ext <<_ACEOF
5962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005964/* Override any GCC internal prototype to avoid an error.
5965 Use char because int might match the return type of a GCC
5966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005967#ifdef __cplusplus
5968extern "C"
5969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005970char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005971int
5972main ()
5973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005974return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005975 ;
5976 return 0;
5977}
5978_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005979for ac_lib in '' x; do
5980 if test -z "$ac_lib"; then
5981 ac_res="none required"
5982 else
5983 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005984 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005985 fi
5986 rm -f conftest.$ac_objext conftest$ac_exeext
5987if { (ac_try="$ac_link"
5988case "(($ac_try" in
5989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990 *) ac_try_echo=$ac_try;;
5991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005993 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005994 ac_status=$?
5995 grep -v '^ *+' conftest.er1 >conftest.err
5996 rm -f conftest.er1
5997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005999 (exit $ac_status); } && {
6000 test -z "$ac_c_werror_flag" ||
6001 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006002 } && test -s conftest$ac_exeext &&
6003 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006004 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006006 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006007sed 's/^/| /' conftest.$ac_ext >&5
6008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006009
Thomas Wouters477c8d52006-05-27 19:21:47 +00006010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011
6012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6013 conftest$ac_exeext
6014 if test "${ac_cv_search_opendir+set}" = set; then
6015 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006017done
6018if test "${ac_cv_search_opendir+set}" = set; then
6019 :
6020else
6021 ac_cv_search_opendir=no
6022fi
6023rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006024LIBS=$ac_func_search_save_LIBS
6025fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006026{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6027echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006028ac_res=$ac_cv_search_opendir
6029if test "$ac_res" != no; then
6030 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032fi
6033
6034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006035
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006036{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6037echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040else
6041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006042/* confdefs.h. */
6043_ACEOF
6044cat confdefs.h >>conftest.$ac_ext
6045cat >>conftest.$ac_ext <<_ACEOF
6046/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048int
6049main ()
6050{
6051return makedev(0, 0);
6052 ;
6053 return 0;
6054}
6055_ACEOF
6056rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006057if { (ac_try="$ac_link"
6058case "(($ac_try" in
6059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6060 *) ac_try_echo=$ac_try;;
6061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006065 grep -v '^ *+' conftest.er1 >conftest.err
6066 rm -f conftest.er1
6067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006069 (exit $ac_status); } && {
6070 test -z "$ac_c_werror_flag" ||
6071 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006072 } && test -s conftest$ac_exeext &&
6073 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074 ac_cv_header_sys_types_h_makedev=yes
6075else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006077sed 's/^/| /' conftest.$ac_ext >&5
6078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006079 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081
6082rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084
6085fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006086{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6087echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088
6089if test $ac_cv_header_sys_types_h_makedev = no; then
6090if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006091 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6092echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006094 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006096{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6097echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098else
6099 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006100{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6101echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108$ac_includes_default
6109#include <sys/mkdev.h>
6110_ACEOF
6111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112if { (ac_try="$ac_compile"
6113case "(($ac_try" in
6114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6115 *) ac_try_echo=$ac_try;;
6116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006120 grep -v '^ *+' conftest.er1 >conftest.err
6121 rm -f conftest.er1
6122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006124 (exit $ac_status); } && {
6125 test -z "$ac_c_werror_flag" ||
6126 test ! -s conftest.err
6127 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128 ac_header_compiler=yes
6129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006131sed 's/^/| /' conftest.$ac_ext >&5
6132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006133 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135
6136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006137{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6138echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139
6140# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006141{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6142echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006144/* confdefs.h. */
6145_ACEOF
6146cat confdefs.h >>conftest.$ac_ext
6147cat >>conftest.$ac_ext <<_ACEOF
6148/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149#include <sys/mkdev.h>
6150_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006151if { (ac_try="$ac_cpp conftest.$ac_ext"
6152case "(($ac_try" in
6153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6154 *) ac_try_echo=$ac_try;;
6155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006159 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160 rm -f conftest.er1
6161 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163 (exit $ac_status); } >/dev/null && {
6164 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6165 test ! -s conftest.err
6166 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167 ac_header_preproc=yes
6168else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006170sed 's/^/| /' conftest.$ac_ext >&5
6171
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_header_preproc=no
6173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006176{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6177echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178
6179# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006180case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6181 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006182 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6183echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6185echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006186 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006187 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006188 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006202## -------------------------------------- ##
6203## Report this to http://bugs.python.org/ ##
6204## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006205_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006207 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006209{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6210echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213else
6214 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6215fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006216{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6217echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218
6219fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006220if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222cat >>confdefs.h <<\_ACEOF
6223#define MAJOR_IN_MKDEV 1
6224_ACEOF
6225
6226fi
6227
6228
6229
6230 if test $ac_cv_header_sys_mkdev_h = no; then
6231 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006232 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6233echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006235 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006237{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6238echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239else
6240 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006241{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6242echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006244/* confdefs.h. */
6245_ACEOF
6246cat confdefs.h >>conftest.$ac_ext
6247cat >>conftest.$ac_ext <<_ACEOF
6248/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249$ac_includes_default
6250#include <sys/sysmacros.h>
6251_ACEOF
6252rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253if { (ac_try="$ac_compile"
6254case "(($ac_try" in
6255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6256 *) ac_try_echo=$ac_try;;
6257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006261 grep -v '^ *+' conftest.er1 >conftest.err
6262 rm -f conftest.er1
6263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006265 (exit $ac_status); } && {
6266 test -z "$ac_c_werror_flag" ||
6267 test ! -s conftest.err
6268 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269 ac_header_compiler=yes
6270else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006272sed 's/^/| /' conftest.$ac_ext >&5
6273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006274 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006276
6277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006278{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6279echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280
6281# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006282{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6283echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290#include <sys/sysmacros.h>
6291_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006292if { (ac_try="$ac_cpp conftest.$ac_ext"
6293case "(($ac_try" in
6294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295 *) ac_try_echo=$ac_try;;
6296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301 rm -f conftest.er1
6302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006304 (exit $ac_status); } >/dev/null && {
6305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6306 test ! -s conftest.err
6307 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308 ac_header_preproc=yes
6309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006311sed 's/^/| /' conftest.$ac_ext >&5
6312
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313 ac_header_preproc=no
6314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006315
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006317{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6318echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006319
6320# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6322 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006323 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6324echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6325 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6326echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006328 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006342 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006343## -------------------------------------- ##
6344## Report this to http://bugs.python.org/ ##
6345## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006346_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006348 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006350{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6351echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354else
6355 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6356fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006357{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6358echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359
6360fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006361if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006362
6363cat >>confdefs.h <<\_ACEOF
6364#define MAJOR_IN_SYSMACROS 1
6365_ACEOF
6366
6367fi
6368
6369
6370 fi
6371fi
6372
Michael W. Hudson54241132001-12-07 15:38:26 +00006373
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006375
6376for ac_header in term.h
6377do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006378as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6379{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6380echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006381if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383else
6384 cat >conftest.$ac_ext <<_ACEOF
6385/* confdefs.h. */
6386_ACEOF
6387cat confdefs.h >>conftest.$ac_ext
6388cat >>conftest.$ac_ext <<_ACEOF
6389/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006390
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006391#ifdef HAVE_CURSES_H
6392#include <curses.h>
6393#endif
6394
6395
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006396#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397_ACEOF
6398rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006399if { (ac_try="$ac_compile"
6400case "(($ac_try" in
6401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402 *) ac_try_echo=$ac_try;;
6403esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006406 ac_status=$?
6407 grep -v '^ *+' conftest.er1 >conftest.err
6408 rm -f conftest.er1
6409 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006411 (exit $ac_status); } && {
6412 test -z "$ac_c_werror_flag" ||
6413 test ! -s conftest.err
6414 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006415 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006417 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006418sed 's/^/| /' conftest.$ac_ext >&5
6419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006422
6423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006424fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006425ac_res=`eval echo '${'$as_ac_Header'}'`
6426 { echo "$as_me:$LINENO: result: $ac_res" >&5
6427echo "${ECHO_T}$ac_res" >&6; }
6428if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006429 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006430#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006431_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006432
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006433fi
6434
6435done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006436
6437
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438# On Linux, netlink.h requires asm/types.h
6439
6440for ac_header in linux/netlink.h
6441do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006442as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6443{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6444echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006445if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006447else
6448 cat >conftest.$ac_ext <<_ACEOF
6449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
6454
6455#ifdef HAVE_ASM_TYPES_H
6456#include <asm/types.h>
6457#endif
6458#ifdef HAVE_SYS_SOCKET_H
6459#include <sys/socket.h>
6460#endif
6461
6462
6463#include <$ac_header>
6464_ACEOF
6465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006466if { (ac_try="$ac_compile"
6467case "(($ac_try" in
6468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6469 *) ac_try_echo=$ac_try;;
6470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006473 ac_status=$?
6474 grep -v '^ *+' conftest.er1 >conftest.err
6475 rm -f conftest.er1
6476 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006478 (exit $ac_status); } && {
6479 test -z "$ac_c_werror_flag" ||
6480 test ! -s conftest.err
6481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006482 eval "$as_ac_Header=yes"
6483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006484 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006485sed 's/^/| /' conftest.$ac_ext >&5
6486
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006487 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006489
6490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006491fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006492ac_res=`eval echo '${'$as_ac_Header'}'`
6493 { echo "$as_me:$LINENO: result: $ac_res" >&5
6494echo "${ECHO_T}$ac_res" >&6; }
6495if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006497#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006498_ACEOF
6499
6500fi
6501
6502done
6503
6504
Guido van Rossum627b2d71993-12-24 10:39:16 +00006505# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006506was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006507{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6508echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006515#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006516
6517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006519 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006520 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523
6524cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006526_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006528
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00006530rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006531
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006532{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6533echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006534
Neal Norwitz11690112002-07-30 01:08:28 +00006535# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006536{ echo "$as_me:$LINENO: checking for makedev" >&5
6537echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006539/* confdefs.h. */
6540_ACEOF
6541cat confdefs.h >>conftest.$ac_ext
6542cat >>conftest.$ac_ext <<_ACEOF
6543/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006544#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006545int
6546main ()
6547{
6548 makedev(0, 0)
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554if { (ac_try="$ac_link"
6555case "(($ac_try" in
6556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6557 *) ac_try_echo=$ac_try;;
6558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562 grep -v '^ *+' conftest.er1 >conftest.err
6563 rm -f conftest.er1
6564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006566 (exit $ac_status); } && {
6567 test -z "$ac_c_werror_flag" ||
6568 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006569 } && test -s conftest$ac_exeext &&
6570 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ac_cv_has_makedev=yes
6572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006574sed 's/^/| /' conftest.$ac_ext >&5
6575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578
6579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006581if test "$ac_cv_has_makedev" = "no"; then
6582 # we didn't link, try if _OSF_SOURCE will allow us to link
6583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006584/* confdefs.h. */
6585_ACEOF
6586cat confdefs.h >>conftest.$ac_ext
6587cat >>conftest.$ac_ext <<_ACEOF
6588/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006589
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006590#define _OSF_SOURCE 1
6591#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006592
Neal Norwitz11690112002-07-30 01:08:28 +00006593int
6594main ()
6595{
6596 makedev(0, 0)
6597 ;
6598 return 0;
6599}
6600_ACEOF
6601rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006602if { (ac_try="$ac_link"
6603case "(($ac_try" in
6604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6605 *) ac_try_echo=$ac_try;;
6606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006608 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006610 grep -v '^ *+' conftest.er1 >conftest.err
6611 rm -f conftest.er1
6612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006614 (exit $ac_status); } && {
6615 test -z "$ac_c_werror_flag" ||
6616 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006617 } && test -s conftest$ac_exeext &&
6618 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006619 ac_cv_has_makedev=yes
6620else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006622sed 's/^/| /' conftest.$ac_ext >&5
6623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626
6627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006628 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006629 if test "$ac_cv_has_makedev" = "yes"; then
6630
6631cat >>confdefs.h <<\_ACEOF
6632#define _OSF_SOURCE 1
6633_ACEOF
6634
6635 fi
6636fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006637{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6638echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006639if test "$ac_cv_has_makedev" = "yes"; then
6640
6641cat >>confdefs.h <<\_ACEOF
6642#define HAVE_MAKEDEV 1
6643_ACEOF
6644
6645fi
6646
Martin v. Löwis399a6892002-10-04 10:22:02 +00006647# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6648# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6649# defined, but the compiler does not support pragma redefine_extname,
6650# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6651# structures (such as rlimit64) without declaring them. As a
6652# work-around, disable LFS on such configurations
6653
6654use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006655{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6656echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006658/* confdefs.h. */
6659_ACEOF
6660cat confdefs.h >>conftest.$ac_ext
6661cat >>conftest.$ac_ext <<_ACEOF
6662/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663
6664#define _LARGEFILE_SOURCE 1
6665#define _FILE_OFFSET_BITS 64
6666#include <sys/resource.h>
6667
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668int
6669main ()
6670{
6671struct rlimit foo;
6672 ;
6673 return 0;
6674}
6675_ACEOF
6676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006677if { (ac_try="$ac_compile"
6678case "(($ac_try" in
6679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6680 *) ac_try_echo=$ac_try;;
6681esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006685 grep -v '^ *+' conftest.er1 >conftest.err
6686 rm -f conftest.er1
6687 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006689 (exit $ac_status); } && {
6690 test -z "$ac_c_werror_flag" ||
6691 test ! -s conftest.err
6692 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006693 sol_lfs_bug=no
6694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006696sed 's/^/| /' conftest.$ac_ext >&5
6697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700
6701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006702{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6703echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704if test "$sol_lfs_bug" = "yes"; then
6705 use_lfs=no
6706fi
6707
6708if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006709# Two defines needed to enable largefile support on various platforms
6710# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<\_ACEOF
6713#define _LARGEFILE_SOURCE 1
6714_ACEOF
6715
6716
6717cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006718#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006719_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006720
Martin v. Löwis399a6892002-10-04 10:22:02 +00006721fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006722
Guido van Rossum84e7b241996-08-19 21:59:00 +00006723# Add some code to confdefs.h so that the test for off_t works on SCO
6724cat >> confdefs.h <<\EOF
6725#if defined(SCO_DS)
6726#undef _OFF_T
6727#endif
6728EOF
6729
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006731{ echo "$as_me:$LINENO: checking for mode_t" >&5
6732echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006733if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006735else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006736 cat >conftest.$ac_ext <<_ACEOF
6737/* confdefs.h. */
6738_ACEOF
6739cat confdefs.h >>conftest.$ac_ext
6740cat >>conftest.$ac_ext <<_ACEOF
6741/* end confdefs.h. */
6742$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006743typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006744int
6745main ()
6746{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006747if ((ac__type_new_ *) 0)
6748 return 0;
6749if (sizeof (ac__type_new_))
6750 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
6756if { (ac_try="$ac_compile"
6757case "(($ac_try" in
6758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6759 *) ac_try_echo=$ac_try;;
6760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006762 (eval "$ac_compile") 2>conftest.er1
6763 ac_status=$?
6764 grep -v '^ *+' conftest.er1 >conftest.err
6765 rm -f conftest.er1
6766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006768 (exit $ac_status); } && {
6769 test -z "$ac_c_werror_flag" ||
6770 test ! -s conftest.err
6771 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006772 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006775sed 's/^/| /' conftest.$ac_ext >&5
6776
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006777 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779
6780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006782{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6783echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6784if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006785 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006786else
Martin v. Löwis11437992002-04-12 09:54:03 +00006787
6788cat >>confdefs.h <<_ACEOF
6789#define mode_t int
6790_ACEOF
6791
6792fi
6793
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006794{ echo "$as_me:$LINENO: checking for off_t" >&5
6795echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006796if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006797 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006798else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006799 cat >conftest.$ac_ext <<_ACEOF
6800/* confdefs.h. */
6801_ACEOF
6802cat confdefs.h >>conftest.$ac_ext
6803cat >>conftest.$ac_ext <<_ACEOF
6804/* end confdefs.h. */
6805$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006806typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006807int
6808main ()
6809{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006810if ((ac__type_new_ *) 0)
6811 return 0;
6812if (sizeof (ac__type_new_))
6813 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006814 ;
6815 return 0;
6816}
6817_ACEOF
6818rm -f conftest.$ac_objext
6819if { (ac_try="$ac_compile"
6820case "(($ac_try" in
6821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6822 *) ac_try_echo=$ac_try;;
6823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006825 (eval "$ac_compile") 2>conftest.er1
6826 ac_status=$?
6827 grep -v '^ *+' conftest.er1 >conftest.err
6828 rm -f conftest.er1
6829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006831 (exit $ac_status); } && {
6832 test -z "$ac_c_werror_flag" ||
6833 test ! -s conftest.err
6834 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006835 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006836else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006838sed 's/^/| /' conftest.$ac_ext >&5
6839
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006840 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006842
6843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006844fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006845{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6846echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6847if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006848 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006849else
Martin v. Löwis11437992002-04-12 09:54:03 +00006850
6851cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006853_ACEOF
6854
6855fi
6856
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006857{ echo "$as_me:$LINENO: checking for pid_t" >&5
6858echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006859if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006861else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006862 cat >conftest.$ac_ext <<_ACEOF
6863/* confdefs.h. */
6864_ACEOF
6865cat confdefs.h >>conftest.$ac_ext
6866cat >>conftest.$ac_ext <<_ACEOF
6867/* end confdefs.h. */
6868$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006869typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006870int
6871main ()
6872{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006873if ((ac__type_new_ *) 0)
6874 return 0;
6875if (sizeof (ac__type_new_))
6876 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006877 ;
6878 return 0;
6879}
6880_ACEOF
6881rm -f conftest.$ac_objext
6882if { (ac_try="$ac_compile"
6883case "(($ac_try" in
6884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6885 *) ac_try_echo=$ac_try;;
6886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006888 (eval "$ac_compile") 2>conftest.er1
6889 ac_status=$?
6890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006894 (exit $ac_status); } && {
6895 test -z "$ac_c_werror_flag" ||
6896 test ! -s conftest.err
6897 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006898 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006899else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006901sed 's/^/| /' conftest.$ac_ext >&5
6902
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006903 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006905
6906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006907fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006908{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6909echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6910if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912else
Martin v. Löwis11437992002-04-12 09:54:03 +00006913
6914cat >>confdefs.h <<_ACEOF
6915#define pid_t int
6916_ACEOF
6917
6918fi
6919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6921echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006922if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006924else
6925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006926/* confdefs.h. */
6927_ACEOF
6928cat confdefs.h >>conftest.$ac_ext
6929cat >>conftest.$ac_ext <<_ACEOF
6930/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006931#include <sys/types.h>
6932#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934int
6935main ()
6936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006943if { (ac_try="$ac_compile"
6944case "(($ac_try" in
6945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6946 *) ac_try_echo=$ac_try;;
6947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006951 grep -v '^ *+' conftest.er1 >conftest.err
6952 rm -f conftest.er1
6953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955 (exit $ac_status); } && {
6956 test -z "$ac_c_werror_flag" ||
6957 test ! -s conftest.err
6958 } && test -s conftest.$ac_objext; then
6959 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006962sed 's/^/| /' conftest.$ac_ext >&5
6963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006966
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006968fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006969{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6970echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006974_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006975
Michael W. Hudson54241132001-12-07 15:38:26 +00006976
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006977{ echo "$as_me:$LINENO: checking for size_t" >&5
6978echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006979if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006982 cat >conftest.$ac_ext <<_ACEOF
6983/* confdefs.h. */
6984_ACEOF
6985cat confdefs.h >>conftest.$ac_ext
6986cat >>conftest.$ac_ext <<_ACEOF
6987/* end confdefs.h. */
6988$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006989typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006990int
6991main ()
6992{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006993if ((ac__type_new_ *) 0)
6994 return 0;
6995if (sizeof (ac__type_new_))
6996 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006997 ;
6998 return 0;
6999}
7000_ACEOF
7001rm -f conftest.$ac_objext
7002if { (ac_try="$ac_compile"
7003case "(($ac_try" in
7004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7005 *) ac_try_echo=$ac_try;;
7006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007008 (eval "$ac_compile") 2>conftest.er1
7009 ac_status=$?
7010 grep -v '^ *+' conftest.er1 >conftest.err
7011 rm -f conftest.er1
7012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007014 (exit $ac_status); } && {
7015 test -z "$ac_c_werror_flag" ||
7016 test ! -s conftest.err
7017 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007018 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007019else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007021sed 's/^/| /' conftest.$ac_ext >&5
7022
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007023 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025
7026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007027fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007028{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7029echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7030if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007031 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007032else
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
7034cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007036_ACEOF
7037
7038fi
7039
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007040{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7041echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007042if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007044else
7045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007046/* confdefs.h. */
7047_ACEOF
7048cat confdefs.h >>conftest.$ac_ext
7049cat >>conftest.$ac_ext <<_ACEOF
7050/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007051#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007052
7053_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007055 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056 ac_cv_type_uid_t=yes
7057else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058 ac_cv_type_uid_t=no
7059fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00007060rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007063{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7064echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007065if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067cat >>confdefs.h <<\_ACEOF
7068#define uid_t int
7069_ACEOF
7070
7071
7072cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007074_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075
7076fi
7077
Mark Dickinsonbd792642009-03-18 20:06:12 +00007078
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007079 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7080echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007081if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007082 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007083else
7084 ac_cv_c_uint32_t=no
7085 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7086 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7087 cat >conftest.$ac_ext <<_ACEOF
7088/* confdefs.h. */
7089_ACEOF
7090cat confdefs.h >>conftest.$ac_ext
7091cat >>conftest.$ac_ext <<_ACEOF
7092/* end confdefs.h. */
7093$ac_includes_default
7094int
7095main ()
7096{
7097static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7098test_array [0] = 0
7099
7100 ;
7101 return 0;
7102}
7103_ACEOF
7104rm -f conftest.$ac_objext
7105if { (ac_try="$ac_compile"
7106case "(($ac_try" in
7107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7108 *) ac_try_echo=$ac_try;;
7109esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007111 (eval "$ac_compile") 2>conftest.er1
7112 ac_status=$?
7113 grep -v '^ *+' conftest.er1 >conftest.err
7114 rm -f conftest.er1
7115 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007117 (exit $ac_status); } && {
7118 test -z "$ac_c_werror_flag" ||
7119 test ! -s conftest.err
7120 } && test -s conftest.$ac_objext; then
7121 case $ac_type in
7122 uint32_t) ac_cv_c_uint32_t=yes ;;
7123 *) ac_cv_c_uint32_t=$ac_type ;;
7124esac
7125
7126else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007127 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007128sed 's/^/| /' conftest.$ac_ext >&5
7129
7130
7131fi
7132
7133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7134 test "$ac_cv_c_uint32_t" != no && break
7135 done
7136fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007137{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7138echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007139 case $ac_cv_c_uint32_t in #(
7140 no|yes) ;; #(
7141 *)
7142
7143cat >>confdefs.h <<\_ACEOF
7144#define _UINT32_T 1
7145_ACEOF
7146
7147
7148cat >>confdefs.h <<_ACEOF
7149#define uint32_t $ac_cv_c_uint32_t
7150_ACEOF
7151;;
7152 esac
7153
7154
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007155 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7156echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007157if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007158 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007159else
7160 ac_cv_c_uint64_t=no
7161 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7162 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7163 cat >conftest.$ac_ext <<_ACEOF
7164/* confdefs.h. */
7165_ACEOF
7166cat confdefs.h >>conftest.$ac_ext
7167cat >>conftest.$ac_ext <<_ACEOF
7168/* end confdefs.h. */
7169$ac_includes_default
7170int
7171main ()
7172{
7173static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7174test_array [0] = 0
7175
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext
7181if { (ac_try="$ac_compile"
7182case "(($ac_try" in
7183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7184 *) ac_try_echo=$ac_try;;
7185esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007187 (eval "$ac_compile") 2>conftest.er1
7188 ac_status=$?
7189 grep -v '^ *+' conftest.er1 >conftest.err
7190 rm -f conftest.er1
7191 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007193 (exit $ac_status); } && {
7194 test -z "$ac_c_werror_flag" ||
7195 test ! -s conftest.err
7196 } && test -s conftest.$ac_objext; then
7197 case $ac_type in
7198 uint64_t) ac_cv_c_uint64_t=yes ;;
7199 *) ac_cv_c_uint64_t=$ac_type ;;
7200esac
7201
7202else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007203 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007204sed 's/^/| /' conftest.$ac_ext >&5
7205
7206
7207fi
7208
7209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7210 test "$ac_cv_c_uint64_t" != no && break
7211 done
7212fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007213{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7214echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007215 case $ac_cv_c_uint64_t in #(
7216 no|yes) ;; #(
7217 *)
7218
7219cat >>confdefs.h <<\_ACEOF
7220#define _UINT64_T 1
7221_ACEOF
7222
7223
7224cat >>confdefs.h <<_ACEOF
7225#define uint64_t $ac_cv_c_uint64_t
7226_ACEOF
7227;;
7228 esac
7229
7230
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007231 { echo "$as_me:$LINENO: checking for int32_t" >&5
7232echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007233if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007234 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007235else
7236 ac_cv_c_int32_t=no
7237 for ac_type in 'int32_t' 'int' 'long int' \
7238 'long long int' 'short int' 'signed char'; do
7239 cat >conftest.$ac_ext <<_ACEOF
7240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
7245$ac_includes_default
7246int
7247main ()
7248{
7249static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (ac_try="$ac_compile"
7258case "(($ac_try" in
7259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7260 *) ac_try_echo=$ac_try;;
7261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007263 (eval "$ac_compile") 2>conftest.er1
7264 ac_status=$?
7265 grep -v '^ *+' conftest.er1 >conftest.err
7266 rm -f conftest.er1
7267 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007269 (exit $ac_status); } && {
7270 test -z "$ac_c_werror_flag" ||
7271 test ! -s conftest.err
7272 } && test -s conftest.$ac_objext; then
7273 cat >conftest.$ac_ext <<_ACEOF
7274/* confdefs.h. */
7275_ACEOF
7276cat confdefs.h >>conftest.$ac_ext
7277cat >>conftest.$ac_ext <<_ACEOF
7278/* end confdefs.h. */
7279$ac_includes_default
7280int
7281main ()
7282{
7283static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007284 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007285test_array [0] = 0
7286
7287 ;
7288 return 0;
7289}
7290_ACEOF
7291rm -f conftest.$ac_objext
7292if { (ac_try="$ac_compile"
7293case "(($ac_try" in
7294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7295 *) ac_try_echo=$ac_try;;
7296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007298 (eval "$ac_compile") 2>conftest.er1
7299 ac_status=$?
7300 grep -v '^ *+' conftest.er1 >conftest.err
7301 rm -f conftest.er1
7302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007304 (exit $ac_status); } && {
7305 test -z "$ac_c_werror_flag" ||
7306 test ! -s conftest.err
7307 } && test -s conftest.$ac_objext; then
7308 :
7309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007310 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007311sed 's/^/| /' conftest.$ac_ext >&5
7312
7313 case $ac_type in
7314 int32_t) ac_cv_c_int32_t=yes ;;
7315 *) ac_cv_c_int32_t=$ac_type ;;
7316esac
7317
7318fi
7319
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007322 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007323sed 's/^/| /' conftest.$ac_ext >&5
7324
7325
7326fi
7327
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329 test "$ac_cv_c_int32_t" != no && break
7330 done
7331fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007332{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7333echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007334 case $ac_cv_c_int32_t in #(
7335 no|yes) ;; #(
7336 *)
7337
7338cat >>confdefs.h <<_ACEOF
7339#define int32_t $ac_cv_c_int32_t
7340_ACEOF
7341;;
7342 esac
7343
7344
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007345 { echo "$as_me:$LINENO: checking for int64_t" >&5
7346echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007347if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007348 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007349else
7350 ac_cv_c_int64_t=no
7351 for ac_type in 'int64_t' 'int' 'long int' \
7352 'long long int' 'short int' 'signed char'; do
7353 cat >conftest.$ac_ext <<_ACEOF
7354/* confdefs.h. */
7355_ACEOF
7356cat confdefs.h >>conftest.$ac_ext
7357cat >>conftest.$ac_ext <<_ACEOF
7358/* end confdefs.h. */
7359$ac_includes_default
7360int
7361main ()
7362{
7363static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7364test_array [0] = 0
7365
7366 ;
7367 return 0;
7368}
7369_ACEOF
7370rm -f conftest.$ac_objext
7371if { (ac_try="$ac_compile"
7372case "(($ac_try" in
7373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7374 *) ac_try_echo=$ac_try;;
7375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007377 (eval "$ac_compile") 2>conftest.er1
7378 ac_status=$?
7379 grep -v '^ *+' conftest.er1 >conftest.err
7380 rm -f conftest.er1
7381 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007383 (exit $ac_status); } && {
7384 test -z "$ac_c_werror_flag" ||
7385 test ! -s conftest.err
7386 } && test -s conftest.$ac_objext; then
7387 cat >conftest.$ac_ext <<_ACEOF
7388/* confdefs.h. */
7389_ACEOF
7390cat confdefs.h >>conftest.$ac_ext
7391cat >>conftest.$ac_ext <<_ACEOF
7392/* end confdefs.h. */
7393$ac_includes_default
7394int
7395main ()
7396{
7397static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007398 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007399test_array [0] = 0
7400
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405rm -f conftest.$ac_objext
7406if { (ac_try="$ac_compile"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007412 (eval "$ac_compile") 2>conftest.er1
7413 ac_status=$?
7414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007418 (exit $ac_status); } && {
7419 test -z "$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 } && test -s conftest.$ac_objext; then
7422 :
7423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007424 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007425sed 's/^/| /' conftest.$ac_ext >&5
7426
7427 case $ac_type in
7428 int64_t) ac_cv_c_int64_t=yes ;;
7429 *) ac_cv_c_int64_t=$ac_type ;;
7430esac
7431
7432fi
7433
7434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007436 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007437sed 's/^/| /' conftest.$ac_ext >&5
7438
7439
7440fi
7441
7442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7443 test "$ac_cv_c_int64_t" != no && break
7444 done
7445fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007446{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7447echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007448 case $ac_cv_c_int64_t in #(
7449 no|yes) ;; #(
7450 *)
7451
7452cat >>confdefs.h <<_ACEOF
7453#define int64_t $ac_cv_c_int64_t
7454_ACEOF
7455;;
7456 esac
7457
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007458{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7459echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007462else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007463 cat >conftest.$ac_ext <<_ACEOF
7464/* confdefs.h. */
7465_ACEOF
7466cat confdefs.h >>conftest.$ac_ext
7467cat >>conftest.$ac_ext <<_ACEOF
7468/* end confdefs.h. */
7469$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007470typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007471int
7472main ()
7473{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007474if ((ac__type_new_ *) 0)
7475 return 0;
7476if (sizeof (ac__type_new_))
7477 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007478 ;
7479 return 0;
7480}
7481_ACEOF
7482rm -f conftest.$ac_objext
7483if { (ac_try="$ac_compile"
7484case "(($ac_try" in
7485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7486 *) ac_try_echo=$ac_try;;
7487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007489 (eval "$ac_compile") 2>conftest.er1
7490 ac_status=$?
7491 grep -v '^ *+' conftest.er1 >conftest.err
7492 rm -f conftest.er1
7493 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007495 (exit $ac_status); } && {
7496 test -z "$ac_c_werror_flag" ||
7497 test ! -s conftest.err
7498 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007499 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007500else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007501 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502sed 's/^/| /' conftest.$ac_ext >&5
7503
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007504 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007506
7507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007508fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007509{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7510echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7511if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007512
7513cat >>confdefs.h <<\_ACEOF
7514#define HAVE_SSIZE_T 1
7515_ACEOF
7516
7517fi
7518
Jack Jansendd19cf82001-12-06 22:36:17 +00007519
Michael W. Hudson54241132001-12-07 15:38:26 +00007520# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007521# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007522{ echo "$as_me:$LINENO: checking for int" >&5
7523echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7524if test "${ac_cv_type_int+set}" = set; then
7525 echo $ECHO_N "(cached) $ECHO_C" >&6
7526else
7527 cat >conftest.$ac_ext <<_ACEOF
7528/* confdefs.h. */
7529_ACEOF
7530cat confdefs.h >>conftest.$ac_ext
7531cat >>conftest.$ac_ext <<_ACEOF
7532/* end confdefs.h. */
7533$ac_includes_default
7534typedef int ac__type_new_;
7535int
7536main ()
7537{
7538if ((ac__type_new_ *) 0)
7539 return 0;
7540if (sizeof (ac__type_new_))
7541 return 0;
7542 ;
7543 return 0;
7544}
7545_ACEOF
7546rm -f conftest.$ac_objext
7547if { (ac_try="$ac_compile"
7548case "(($ac_try" in
7549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7550 *) ac_try_echo=$ac_try;;
7551esac
7552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7553 (eval "$ac_compile") 2>conftest.er1
7554 ac_status=$?
7555 grep -v '^ *+' conftest.er1 >conftest.err
7556 rm -f conftest.er1
7557 cat conftest.err >&5
7558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559 (exit $ac_status); } && {
7560 test -z "$ac_c_werror_flag" ||
7561 test ! -s conftest.err
7562 } && test -s conftest.$ac_objext; then
7563 ac_cv_type_int=yes
7564else
7565 echo "$as_me: failed program was:" >&5
7566sed 's/^/| /' conftest.$ac_ext >&5
7567
7568 ac_cv_type_int=no
7569fi
7570
7571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7572fi
7573{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7574echo "${ECHO_T}$ac_cv_type_int" >&6; }
7575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007576# The cast to long int works around a bug in the HP C Compiler
7577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7579# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007580{ echo "$as_me:$LINENO: checking size of int" >&5
7581echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007582if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007584else
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 if test "$cross_compiling" = yes; then
7586 # Depending upon the size, compute the lo and hi bounds.
7587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* confdefs.h. */
7589_ACEOF
7590cat confdefs.h >>conftest.$ac_ext
7591cat >>conftest.$ac_ext <<_ACEOF
7592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007593$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007594 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007595int
7596main ()
7597{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007599test_array [0] = 0
7600
7601 ;
7602 return 0;
7603}
7604_ACEOF
7605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606if { (ac_try="$ac_compile"
7607case "(($ac_try" in
7608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7609 *) ac_try_echo=$ac_try;;
7610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007614 grep -v '^ *+' conftest.er1 >conftest.err
7615 rm -f conftest.er1
7616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618 (exit $ac_status); } && {
7619 test -z "$ac_c_werror_flag" ||
7620 test ! -s conftest.err
7621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007622 ac_lo=0 ac_mid=0
7623 while :; do
7624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007625/* confdefs.h. */
7626_ACEOF
7627cat confdefs.h >>conftest.$ac_ext
7628cat >>conftest.$ac_ext <<_ACEOF
7629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007630$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007631 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007632int
7633main ()
7634{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007635static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007636test_array [0] = 0
7637
7638 ;
7639 return 0;
7640}
7641_ACEOF
7642rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007643if { (ac_try="$ac_compile"
7644case "(($ac_try" in
7645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7646 *) ac_try_echo=$ac_try;;
7647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007651 grep -v '^ *+' conftest.er1 >conftest.err
7652 rm -f conftest.er1
7653 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007655 (exit $ac_status); } && {
7656 test -z "$ac_c_werror_flag" ||
7657 test ! -s conftest.err
7658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
7665 if test $ac_lo -le $ac_mid; then
7666 ac_lo= ac_hi=
7667 break
7668 fi
7669 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671
7672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 done
7674else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007676sed 's/^/| /' conftest.$ac_ext >&5
7677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007679/* confdefs.h. */
7680_ACEOF
7681cat confdefs.h >>conftest.$ac_ext
7682cat >>conftest.$ac_ext <<_ACEOF
7683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007684$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007685 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007686int
7687main ()
7688{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007690test_array [0] = 0
7691
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697if { (ac_try="$ac_compile"
7698case "(($ac_try" in
7699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7700 *) ac_try_echo=$ac_try;;
7701esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007705 grep -v '^ *+' conftest.er1 >conftest.err
7706 rm -f conftest.er1
7707 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709 (exit $ac_status); } && {
7710 test -z "$ac_c_werror_flag" ||
7711 test ! -s conftest.err
7712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 ac_hi=-1 ac_mid=-1
7714 while :; do
7715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007716/* confdefs.h. */
7717_ACEOF
7718cat confdefs.h >>conftest.$ac_ext
7719cat >>conftest.$ac_ext <<_ACEOF
7720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007721$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007722 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007727test_array [0] = 0
7728
7729 ;
7730 return 0;
7731}
7732_ACEOF
7733rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734if { (ac_try="$ac_compile"
7735case "(($ac_try" in
7736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7737 *) ac_try_echo=$ac_try;;
7738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007742 grep -v '^ *+' conftest.er1 >conftest.err
7743 rm -f conftest.er1
7744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746 (exit $ac_status); } && {
7747 test -z "$ac_c_werror_flag" ||
7748 test ! -s conftest.err
7749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
7756 if test $ac_mid -le $ac_hi; then
7757 ac_lo= ac_hi=
7758 break
7759 fi
7760 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762
7763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 done
7765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007767sed 's/^/| /' conftest.$ac_ext >&5
7768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771
7772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774
7775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007776# Binary search between lo and hi bounds.
7777while test "x$ac_lo" != "x$ac_hi"; do
7778 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007785$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007786 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007787int
7788main ()
7789{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798if { (ac_try="$ac_compile"
7799case "(($ac_try" in
7800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7801 *) ac_try_echo=$ac_try;;
7802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007806 grep -v '^ *+' conftest.er1 >conftest.err
7807 rm -f conftest.er1
7808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 (exit $ac_status); } && {
7811 test -z "$ac_c_werror_flag" ||
7812 test ! -s conftest.err
7813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_hi=$ac_mid
7815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007817sed 's/^/| /' conftest.$ac_ext >&5
7818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821
7822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007823done
7824case $ac_lo in
7825?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007827 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007828See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007829echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007830See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007831 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832 else
7833 ac_cv_sizeof_int=0
7834 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007835esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007836else
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007838/* confdefs.h. */
7839_ACEOF
7840cat confdefs.h >>conftest.$ac_ext
7841cat >>conftest.$ac_ext <<_ACEOF
7842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007843$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007844 typedef int ac__type_sizeof_;
7845static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7846static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007847#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007848#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851{
Martin v. Löwis11437992002-04-12 09:54:03 +00007852
7853 FILE *f = fopen ("conftest.val", "w");
7854 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007856 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007859 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007861 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 }
7863 else
7864 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007866 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007868 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007871
7872 ;
7873 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007874}
Martin v. Löwis11437992002-04-12 09:54:03 +00007875_ACEOF
7876rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877if { (ac_try="$ac_link"
7878case "(($ac_try" in
7879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7880 *) ac_try_echo=$ac_try;;
7881esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 { (case "(($ac_try" in
7888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7889 *) ac_try_echo=$ac_try;;
7890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 (exit $ac_status); }; }; then
7896 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007898 echo "$as_me: program exited with status $ac_status" >&5
7899echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007900sed 's/^/| /' conftest.$ac_ext >&5
7901
Martin v. Löwis11437992002-04-12 09:54:03 +00007902( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007904 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007905See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007906echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007907See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007908 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909 else
7910 ac_cv_sizeof_int=0
7911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913rm -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 +00007914fi
7915rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007917{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7918echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919
7920
7921
Martin v. Löwis11437992002-04-12 09:54:03 +00007922cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007923#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007924_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007925
7926
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007927{ echo "$as_me:$LINENO: checking for long" >&5
7928echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7929if test "${ac_cv_type_long+set}" = set; then
7930 echo $ECHO_N "(cached) $ECHO_C" >&6
7931else
7932 cat >conftest.$ac_ext <<_ACEOF
7933/* confdefs.h. */
7934_ACEOF
7935cat confdefs.h >>conftest.$ac_ext
7936cat >>conftest.$ac_ext <<_ACEOF
7937/* end confdefs.h. */
7938$ac_includes_default
7939typedef long ac__type_new_;
7940int
7941main ()
7942{
7943if ((ac__type_new_ *) 0)
7944 return 0;
7945if (sizeof (ac__type_new_))
7946 return 0;
7947 ;
7948 return 0;
7949}
7950_ACEOF
7951rm -f conftest.$ac_objext
7952if { (ac_try="$ac_compile"
7953case "(($ac_try" in
7954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7955 *) ac_try_echo=$ac_try;;
7956esac
7957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7958 (eval "$ac_compile") 2>conftest.er1
7959 ac_status=$?
7960 grep -v '^ *+' conftest.er1 >conftest.err
7961 rm -f conftest.er1
7962 cat conftest.err >&5
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } && {
7965 test -z "$ac_c_werror_flag" ||
7966 test ! -s conftest.err
7967 } && test -s conftest.$ac_objext; then
7968 ac_cv_type_long=yes
7969else
7970 echo "$as_me: failed program was:" >&5
7971sed 's/^/| /' conftest.$ac_ext >&5
7972
7973 ac_cv_type_long=no
7974fi
7975
7976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7977fi
7978{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7979echo "${ECHO_T}$ac_cv_type_long" >&6; }
7980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981# The cast to long int works around a bug in the HP C Compiler
7982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7984# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007985{ echo "$as_me:$LINENO: checking size of long" >&5
7986echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007987if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007989else
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 if test "$cross_compiling" = yes; then
7991 # Depending upon the size, compute the lo and hi bounds.
7992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007998$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007999 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008000int
8001main ()
8002{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008004test_array [0] = 0
8005
8006 ;
8007 return 0;
8008}
8009_ACEOF
8010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011if { (ac_try="$ac_compile"
8012case "(($ac_try" in
8013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8014 *) ac_try_echo=$ac_try;;
8015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008019 grep -v '^ *+' conftest.er1 >conftest.err
8020 rm -f conftest.er1
8021 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023 (exit $ac_status); } && {
8024 test -z "$ac_c_werror_flag" ||
8025 test ! -s conftest.err
8026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008027 ac_lo=0 ac_mid=0
8028 while :; do
8029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008030/* confdefs.h. */
8031_ACEOF
8032cat confdefs.h >>conftest.$ac_ext
8033cat >>conftest.$ac_ext <<_ACEOF
8034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008035$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008036 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008037int
8038main ()
8039{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008040static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008041test_array [0] = 0
8042
8043 ;
8044 return 0;
8045}
8046_ACEOF
8047rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048if { (ac_try="$ac_compile"
8049case "(($ac_try" in
8050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8051 *) ac_try_echo=$ac_try;;
8052esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008056 grep -v '^ *+' conftest.er1 >conftest.err
8057 rm -f conftest.er1
8058 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060 (exit $ac_status); } && {
8061 test -z "$ac_c_werror_flag" ||
8062 test ! -s conftest.err
8063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
8070 if test $ac_lo -le $ac_mid; then
8071 ac_lo= ac_hi=
8072 break
8073 fi
8074 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076
8077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 done
8079else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008081sed 's/^/| /' conftest.$ac_ext >&5
8082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* confdefs.h. */
8085_ACEOF
8086cat confdefs.h >>conftest.$ac_ext
8087cat >>conftest.$ac_ext <<_ACEOF
8088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008089$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008090 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008091int
8092main ()
8093{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008095test_array [0] = 0
8096
8097 ;
8098 return 0;
8099}
8100_ACEOF
8101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102if { (ac_try="$ac_compile"
8103case "(($ac_try" in
8104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8105 *) ac_try_echo=$ac_try;;
8106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008110 grep -v '^ *+' conftest.er1 >conftest.err
8111 rm -f conftest.er1
8112 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114 (exit $ac_status); } && {
8115 test -z "$ac_c_werror_flag" ||
8116 test ! -s conftest.err
8117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ac_hi=-1 ac_mid=-1
8119 while :; do
8120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* confdefs.h. */
8122_ACEOF
8123cat confdefs.h >>conftest.$ac_ext
8124cat >>conftest.$ac_ext <<_ACEOF
8125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008126$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008127 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008128int
8129main ()
8130{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008131static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008132test_array [0] = 0
8133
8134 ;
8135 return 0;
8136}
8137_ACEOF
8138rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139if { (ac_try="$ac_compile"
8140case "(($ac_try" in
8141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8142 *) ac_try_echo=$ac_try;;
8143esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008147 grep -v '^ *+' conftest.er1 >conftest.err
8148 rm -f conftest.er1
8149 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151 (exit $ac_status); } && {
8152 test -z "$ac_c_werror_flag" ||
8153 test ! -s conftest.err
8154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
8161 if test $ac_mid -le $ac_hi; then
8162 ac_lo= ac_hi=
8163 break
8164 fi
8165 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167
8168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 done
8170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008172sed 's/^/| /' conftest.$ac_ext >&5
8173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176
8177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179
8180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008181# Binary search between lo and hi bounds.
8182while test "x$ac_lo" != "x$ac_hi"; do
8183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008191 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192int
8193main ()
8194{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008196test_array [0] = 0
8197
8198 ;
8199 return 0;
8200}
8201_ACEOF
8202rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203if { (ac_try="$ac_compile"
8204case "(($ac_try" in
8205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8206 *) ac_try_echo=$ac_try;;
8207esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008211 grep -v '^ *+' conftest.er1 >conftest.err
8212 rm -f conftest.er1
8213 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 (exit $ac_status); } && {
8216 test -z "$ac_c_werror_flag" ||
8217 test ! -s conftest.err
8218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_hi=$ac_mid
8220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008222sed 's/^/| /' conftest.$ac_ext >&5
8223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226
8227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008228done
8229case $ac_lo in
8230?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008231'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008232 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008233See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008234echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008235See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008236 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 else
8238 ac_cv_sizeof_long=0
8239 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008240esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241else
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008243/* confdefs.h. */
8244_ACEOF
8245cat confdefs.h >>conftest.$ac_ext
8246cat >>conftest.$ac_ext <<_ACEOF
8247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008248$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008249 typedef long ac__type_sizeof_;
8250static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8251static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008252#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008253#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008254int
8255main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008256{
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
8258 FILE *f = fopen ("conftest.val", "w");
8259 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008261 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008264 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008266 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 }
8268 else
8269 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008271 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008273 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277 ;
8278 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008279}
Martin v. Löwis11437992002-04-12 09:54:03 +00008280_ACEOF
8281rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282if { (ac_try="$ac_link"
8283case "(($ac_try" in
8284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8285 *) ac_try_echo=$ac_try;;
8286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292 { (case "(($ac_try" in
8293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8294 *) ac_try_echo=$ac_try;;
8295esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 (exit $ac_status); }; }; then
8301 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008303 echo "$as_me: program exited with status $ac_status" >&5
8304echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008305sed 's/^/| /' conftest.$ac_ext >&5
8306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008309 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008310See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008311echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008312See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008313 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314 else
8315 ac_cv_sizeof_long=0
8316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318rm -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 +00008319fi
8320rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008322{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8323echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324
8325
8326
Martin v. Löwis11437992002-04-12 09:54:03 +00008327cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008328#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008329_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008330
8331
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008332{ echo "$as_me:$LINENO: checking for void *" >&5
8333echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8334if test "${ac_cv_type_void_p+set}" = set; then
8335 echo $ECHO_N "(cached) $ECHO_C" >&6
8336else
8337 cat >conftest.$ac_ext <<_ACEOF
8338/* confdefs.h. */
8339_ACEOF
8340cat confdefs.h >>conftest.$ac_ext
8341cat >>conftest.$ac_ext <<_ACEOF
8342/* end confdefs.h. */
8343$ac_includes_default
8344typedef void * ac__type_new_;
8345int
8346main ()
8347{
8348if ((ac__type_new_ *) 0)
8349 return 0;
8350if (sizeof (ac__type_new_))
8351 return 0;
8352 ;
8353 return 0;
8354}
8355_ACEOF
8356rm -f conftest.$ac_objext
8357if { (ac_try="$ac_compile"
8358case "(($ac_try" in
8359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8360 *) ac_try_echo=$ac_try;;
8361esac
8362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8363 (eval "$ac_compile") 2>conftest.er1
8364 ac_status=$?
8365 grep -v '^ *+' conftest.er1 >conftest.err
8366 rm -f conftest.er1
8367 cat conftest.err >&5
8368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8369 (exit $ac_status); } && {
8370 test -z "$ac_c_werror_flag" ||
8371 test ! -s conftest.err
8372 } && test -s conftest.$ac_objext; then
8373 ac_cv_type_void_p=yes
8374else
8375 echo "$as_me: failed program was:" >&5
8376sed 's/^/| /' conftest.$ac_ext >&5
8377
8378 ac_cv_type_void_p=no
8379fi
8380
8381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8382fi
8383{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8384echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386# The cast to long int works around a bug in the HP C Compiler
8387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8389# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008390{ echo "$as_me:$LINENO: checking size of void *" >&5
8391echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008392if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 if test "$cross_compiling" = yes; then
8396 # Depending upon the size, compute the lo and hi bounds.
8397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008398/* confdefs.h. */
8399_ACEOF
8400cat confdefs.h >>conftest.$ac_ext
8401cat >>conftest.$ac_ext <<_ACEOF
8402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008403$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008404 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
8407{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008409test_array [0] = 0
8410
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416if { (ac_try="$ac_compile"
8417case "(($ac_try" in
8418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8419 *) ac_try_echo=$ac_try;;
8420esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008424 grep -v '^ *+' conftest.er1 >conftest.err
8425 rm -f conftest.er1
8426 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 (exit $ac_status); } && {
8429 test -z "$ac_c_werror_flag" ||
8430 test ! -s conftest.err
8431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 ac_lo=0 ac_mid=0
8433 while :; do
8434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008435/* confdefs.h. */
8436_ACEOF
8437cat confdefs.h >>conftest.$ac_ext
8438cat >>conftest.$ac_ext <<_ACEOF
8439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008440$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008441 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008442int
8443main ()
8444{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008445static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008446test_array [0] = 0
8447
8448 ;
8449 return 0;
8450}
8451_ACEOF
8452rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453if { (ac_try="$ac_compile"
8454case "(($ac_try" in
8455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8456 *) ac_try_echo=$ac_try;;
8457esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008461 grep -v '^ *+' conftest.er1 >conftest.err
8462 rm -f conftest.er1
8463 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465 (exit $ac_status); } && {
8466 test -z "$ac_c_werror_flag" ||
8467 test ! -s conftest.err
8468 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
8475 if test $ac_lo -le $ac_mid; then
8476 ac_lo= ac_hi=
8477 break
8478 fi
8479 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481
8482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 done
8484else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008486sed 's/^/| /' conftest.$ac_ext >&5
8487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* confdefs.h. */
8490_ACEOF
8491cat confdefs.h >>conftest.$ac_ext
8492cat >>conftest.$ac_ext <<_ACEOF
8493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008494$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008495 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008496int
8497main ()
8498{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008500test_array [0] = 0
8501
8502 ;
8503 return 0;
8504}
8505_ACEOF
8506rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507if { (ac_try="$ac_compile"
8508case "(($ac_try" in
8509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8510 *) ac_try_echo=$ac_try;;
8511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008515 grep -v '^ *+' conftest.er1 >conftest.err
8516 rm -f conftest.er1
8517 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519 (exit $ac_status); } && {
8520 test -z "$ac_c_werror_flag" ||
8521 test ! -s conftest.err
8522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ac_hi=-1 ac_mid=-1
8524 while :; do
8525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008526/* confdefs.h. */
8527_ACEOF
8528cat confdefs.h >>conftest.$ac_ext
8529cat >>conftest.$ac_ext <<_ACEOF
8530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008531$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008532 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008533int
8534main ()
8535{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008536static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008537test_array [0] = 0
8538
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544if { (ac_try="$ac_compile"
8545case "(($ac_try" in
8546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8547 *) ac_try_echo=$ac_try;;
8548esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008552 grep -v '^ *+' conftest.er1 >conftest.err
8553 rm -f conftest.er1
8554 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 (exit $ac_status); } && {
8557 test -z "$ac_c_werror_flag" ||
8558 test ! -s conftest.err
8559 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
8566 if test $ac_mid -le $ac_hi; then
8567 ac_lo= ac_hi=
8568 break
8569 fi
8570 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572
8573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 done
8575else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008577sed 's/^/| /' conftest.$ac_ext >&5
8578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581
8582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584
8585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008586# Binary search between lo and hi bounds.
8587while test "x$ac_lo" != "x$ac_hi"; do
8588 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008596 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597int
8598main ()
8599{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008601test_array [0] = 0
8602
8603 ;
8604 return 0;
8605}
8606_ACEOF
8607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608if { (ac_try="$ac_compile"
8609case "(($ac_try" in
8610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8611 *) ac_try_echo=$ac_try;;
8612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008616 grep -v '^ *+' conftest.er1 >conftest.err
8617 rm -f conftest.er1
8618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620 (exit $ac_status); } && {
8621 test -z "$ac_c_werror_flag" ||
8622 test ! -s conftest.err
8623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_hi=$ac_mid
8625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008627sed 's/^/| /' conftest.$ac_ext >&5
8628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631
8632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008633done
8634case $ac_lo in
8635?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008637 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008638See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008639echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008640See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008641 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642 else
8643 ac_cv_sizeof_void_p=0
8644 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008645esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008646else
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* confdefs.h. */
8649_ACEOF
8650cat confdefs.h >>conftest.$ac_ext
8651cat >>conftest.$ac_ext <<_ACEOF
8652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008654 typedef void * ac__type_sizeof_;
8655static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8656static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008657#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008658#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008661{
Martin v. Löwis11437992002-04-12 09:54:03 +00008662
8663 FILE *f = fopen ("conftest.val", "w");
8664 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008666 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008669 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008671 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 }
8673 else
8674 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008676 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008678 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008681
8682 ;
8683 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008684}
Martin v. Löwis11437992002-04-12 09:54:03 +00008685_ACEOF
8686rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687if { (ac_try="$ac_link"
8688case "(($ac_try" in
8689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8690 *) ac_try_echo=$ac_try;;
8691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008697 { (case "(($ac_try" in
8698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8699 *) ac_try_echo=$ac_try;;
8700esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 (exit $ac_status); }; }; then
8706 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008707else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008708 echo "$as_me: program exited with status $ac_status" >&5
8709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008714 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008715See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008716echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008717See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008718 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719 else
8720 ac_cv_sizeof_void_p=0
8721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723rm -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 +00008724fi
8725rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008726fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008727{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8728echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729
8730
8731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008733#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008734_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008735
8736
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008737{ echo "$as_me:$LINENO: checking for short" >&5
8738echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8739if test "${ac_cv_type_short+set}" = set; then
8740 echo $ECHO_N "(cached) $ECHO_C" >&6
8741else
8742 cat >conftest.$ac_ext <<_ACEOF
8743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
8748$ac_includes_default
8749typedef short ac__type_new_;
8750int
8751main ()
8752{
8753if ((ac__type_new_ *) 0)
8754 return 0;
8755if (sizeof (ac__type_new_))
8756 return 0;
8757 ;
8758 return 0;
8759}
8760_ACEOF
8761rm -f conftest.$ac_objext
8762if { (ac_try="$ac_compile"
8763case "(($ac_try" in
8764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8765 *) ac_try_echo=$ac_try;;
8766esac
8767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8768 (eval "$ac_compile") 2>conftest.er1
8769 ac_status=$?
8770 grep -v '^ *+' conftest.er1 >conftest.err
8771 rm -f conftest.er1
8772 cat conftest.err >&5
8773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8774 (exit $ac_status); } && {
8775 test -z "$ac_c_werror_flag" ||
8776 test ! -s conftest.err
8777 } && test -s conftest.$ac_objext; then
8778 ac_cv_type_short=yes
8779else
8780 echo "$as_me: failed program was:" >&5
8781sed 's/^/| /' conftest.$ac_ext >&5
8782
8783 ac_cv_type_short=no
8784fi
8785
8786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8787fi
8788{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8789echo "${ECHO_T}$ac_cv_type_short" >&6; }
8790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791# The cast to long int works around a bug in the HP C Compiler
8792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8794# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008795{ echo "$as_me:$LINENO: checking size of short" >&5
8796echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008797if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008798 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008799else
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 if test "$cross_compiling" = yes; then
8801 # Depending upon the size, compute the lo and hi bounds.
8802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008803/* confdefs.h. */
8804_ACEOF
8805cat confdefs.h >>conftest.$ac_ext
8806cat >>conftest.$ac_ext <<_ACEOF
8807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008808$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008809 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008810int
8811main ()
8812{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008814test_array [0] = 0
8815
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821if { (ac_try="$ac_compile"
8822case "(($ac_try" in
8823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8824 *) ac_try_echo=$ac_try;;
8825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008829 grep -v '^ *+' conftest.er1 >conftest.err
8830 rm -f conftest.er1
8831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 (exit $ac_status); } && {
8834 test -z "$ac_c_werror_flag" ||
8835 test ! -s conftest.err
8836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_lo=0 ac_mid=0
8838 while :; do
8839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* confdefs.h. */
8841_ACEOF
8842cat confdefs.h >>conftest.$ac_ext
8843cat >>conftest.$ac_ext <<_ACEOF
8844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008846 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008851test_array [0] = 0
8852
8853 ;
8854 return 0;
8855}
8856_ACEOF
8857rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858if { (ac_try="$ac_compile"
8859case "(($ac_try" in
8860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8861 *) ac_try_echo=$ac_try;;
8862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008866 grep -v '^ *+' conftest.er1 >conftest.err
8867 rm -f conftest.er1
8868 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870 (exit $ac_status); } && {
8871 test -z "$ac_c_werror_flag" ||
8872 test ! -s conftest.err
8873 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
8880 if test $ac_lo -le $ac_mid; then
8881 ac_lo= ac_hi=
8882 break
8883 fi
8884 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886
8887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 done
8889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008891sed 's/^/| /' conftest.$ac_ext >&5
8892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* confdefs.h. */
8895_ACEOF
8896cat confdefs.h >>conftest.$ac_ext
8897cat >>conftest.$ac_ext <<_ACEOF
8898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008900 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008901int
8902main ()
8903{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008905test_array [0] = 0
8906
8907 ;
8908 return 0;
8909}
8910_ACEOF
8911rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912if { (ac_try="$ac_compile"
8913case "(($ac_try" in
8914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8915 *) ac_try_echo=$ac_try;;
8916esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008920 grep -v '^ *+' conftest.er1 >conftest.err
8921 rm -f conftest.er1
8922 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924 (exit $ac_status); } && {
8925 test -z "$ac_c_werror_flag" ||
8926 test ! -s conftest.err
8927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ac_hi=-1 ac_mid=-1
8929 while :; do
8930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* confdefs.h. */
8932_ACEOF
8933cat confdefs.h >>conftest.$ac_ext
8934cat >>conftest.$ac_ext <<_ACEOF
8935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008936$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008937 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008938int
8939main ()
8940{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008942test_array [0] = 0
8943
8944 ;
8945 return 0;
8946}
8947_ACEOF
8948rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949if { (ac_try="$ac_compile"
8950case "(($ac_try" in
8951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8952 *) ac_try_echo=$ac_try;;
8953esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008957 grep -v '^ *+' conftest.er1 >conftest.err
8958 rm -f conftest.er1
8959 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 (exit $ac_status); } && {
8962 test -z "$ac_c_werror_flag" ||
8963 test ! -s conftest.err
8964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
8971 if test $ac_mid -le $ac_hi; then
8972 ac_lo= ac_hi=
8973 break
8974 fi
8975 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977
8978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 done
8980else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008982sed 's/^/| /' conftest.$ac_ext >&5
8983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986
8987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989
8990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008991# Binary search between lo and hi bounds.
8992while test "x$ac_lo" != "x$ac_hi"; do
8993 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009001 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
9004{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009006test_array [0] = 0
9007
9008 ;
9009 return 0;
9010}
9011_ACEOF
9012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013if { (ac_try="$ac_compile"
9014case "(($ac_try" in
9015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9016 *) ac_try_echo=$ac_try;;
9017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009021 grep -v '^ *+' conftest.er1 >conftest.err
9022 rm -f conftest.er1
9023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025 (exit $ac_status); } && {
9026 test -z "$ac_c_werror_flag" ||
9027 test ! -s conftest.err
9028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_hi=$ac_mid
9030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009032sed 's/^/| /' conftest.$ac_ext >&5
9033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036
9037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009038done
9039case $ac_lo in
9040?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009041'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009042 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009043See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009044echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009045See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009046 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047 else
9048 ac_cv_sizeof_short=0
9049 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009050esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009051else
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* confdefs.h. */
9054_ACEOF
9055cat confdefs.h >>conftest.$ac_ext
9056cat >>conftest.$ac_ext <<_ACEOF
9057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009058$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009059 typedef short ac__type_sizeof_;
9060static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9061static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009062#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009063#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009064int
9065main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009066{
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
9068 FILE *f = fopen ("conftest.val", "w");
9069 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009071 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009073 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009074 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009076 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 }
9078 else
9079 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009083 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009085 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
9087 ;
9088 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009089}
Martin v. Löwis11437992002-04-12 09:54:03 +00009090_ACEOF
9091rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009092if { (ac_try="$ac_link"
9093case "(($ac_try" in
9094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9095 *) ac_try_echo=$ac_try;;
9096esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009098 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009102 { (case "(($ac_try" in
9103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9104 *) ac_try_echo=$ac_try;;
9105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 (exit $ac_status); }; }; then
9111 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009112else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009113 echo "$as_me: program exited with status $ac_status" >&5
9114echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009115sed 's/^/| /' conftest.$ac_ext >&5
9116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009118if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009119 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009120See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009121echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009122See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009123 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009124 else
9125 ac_cv_sizeof_short=0
9126 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128rm -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 +00009129fi
9130rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009131fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009132{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9133echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134
9135
9136
Martin v. Löwis11437992002-04-12 09:54:03 +00009137cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009138#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009139_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009140
9141
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009142{ echo "$as_me:$LINENO: checking for float" >&5
9143echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9144if test "${ac_cv_type_float+set}" = set; then
9145 echo $ECHO_N "(cached) $ECHO_C" >&6
9146else
9147 cat >conftest.$ac_ext <<_ACEOF
9148/* confdefs.h. */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h. */
9153$ac_includes_default
9154typedef float ac__type_new_;
9155int
9156main ()
9157{
9158if ((ac__type_new_ *) 0)
9159 return 0;
9160if (sizeof (ac__type_new_))
9161 return 0;
9162 ;
9163 return 0;
9164}
9165_ACEOF
9166rm -f conftest.$ac_objext
9167if { (ac_try="$ac_compile"
9168case "(($ac_try" in
9169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9170 *) ac_try_echo=$ac_try;;
9171esac
9172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9173 (eval "$ac_compile") 2>conftest.er1
9174 ac_status=$?
9175 grep -v '^ *+' conftest.er1 >conftest.err
9176 rm -f conftest.er1
9177 cat conftest.err >&5
9178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9179 (exit $ac_status); } && {
9180 test -z "$ac_c_werror_flag" ||
9181 test ! -s conftest.err
9182 } && test -s conftest.$ac_objext; then
9183 ac_cv_type_float=yes
9184else
9185 echo "$as_me: failed program was:" >&5
9186sed 's/^/| /' conftest.$ac_ext >&5
9187
9188 ac_cv_type_float=no
9189fi
9190
9191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9192fi
9193{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9194echo "${ECHO_T}$ac_cv_type_float" >&6; }
9195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196# The cast to long int works around a bug in the HP C Compiler
9197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9199# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009200{ echo "$as_me:$LINENO: checking size of float" >&5
9201echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009202if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009204else
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 if test "$cross_compiling" = yes; then
9206 # Depending upon the size, compute the lo and hi bounds.
9207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009208/* confdefs.h. */
9209_ACEOF
9210cat confdefs.h >>conftest.$ac_ext
9211cat >>conftest.$ac_ext <<_ACEOF
9212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009213$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009214 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009215int
9216main ()
9217{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009219test_array [0] = 0
9220
9221 ;
9222 return 0;
9223}
9224_ACEOF
9225rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226if { (ac_try="$ac_compile"
9227case "(($ac_try" in
9228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9229 *) ac_try_echo=$ac_try;;
9230esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009234 grep -v '^ *+' conftest.er1 >conftest.err
9235 rm -f conftest.er1
9236 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238 (exit $ac_status); } && {
9239 test -z "$ac_c_werror_flag" ||
9240 test ! -s conftest.err
9241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009242 ac_lo=0 ac_mid=0
9243 while :; do
9244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009245/* confdefs.h. */
9246_ACEOF
9247cat confdefs.h >>conftest.$ac_ext
9248cat >>conftest.$ac_ext <<_ACEOF
9249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009250$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009251 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009252int
9253main ()
9254{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009256test_array [0] = 0
9257
9258 ;
9259 return 0;
9260}
9261_ACEOF
9262rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263if { (ac_try="$ac_compile"
9264case "(($ac_try" in
9265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9266 *) ac_try_echo=$ac_try;;
9267esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009271 grep -v '^ *+' conftest.er1 >conftest.err
9272 rm -f conftest.er1
9273 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275 (exit $ac_status); } && {
9276 test -z "$ac_c_werror_flag" ||
9277 test ! -s conftest.err
9278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
9285 if test $ac_lo -le $ac_mid; then
9286 ac_lo= ac_hi=
9287 break
9288 fi
9289 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291
9292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 done
9294else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009296sed 's/^/| /' conftest.$ac_ext >&5
9297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009299/* confdefs.h. */
9300_ACEOF
9301cat confdefs.h >>conftest.$ac_ext
9302cat >>conftest.$ac_ext <<_ACEOF
9303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009304$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009305 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009306int
9307main ()
9308{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009310test_array [0] = 0
9311
9312 ;
9313 return 0;
9314}
9315_ACEOF
9316rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317if { (ac_try="$ac_compile"
9318case "(($ac_try" in
9319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9320 *) ac_try_echo=$ac_try;;
9321esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009325 grep -v '^ *+' conftest.er1 >conftest.err
9326 rm -f conftest.er1
9327 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329 (exit $ac_status); } && {
9330 test -z "$ac_c_werror_flag" ||
9331 test ! -s conftest.err
9332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 ac_hi=-1 ac_mid=-1
9334 while :; do
9335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009336/* confdefs.h. */
9337_ACEOF
9338cat confdefs.h >>conftest.$ac_ext
9339cat >>conftest.$ac_ext <<_ACEOF
9340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009341$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009342 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009343int
9344main ()
9345{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009347test_array [0] = 0
9348
9349 ;
9350 return 0;
9351}
9352_ACEOF
9353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354if { (ac_try="$ac_compile"
9355case "(($ac_try" in
9356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9357 *) ac_try_echo=$ac_try;;
9358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009362 grep -v '^ *+' conftest.er1 >conftest.err
9363 rm -f conftest.er1
9364 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 (exit $ac_status); } && {
9367 test -z "$ac_c_werror_flag" ||
9368 test ! -s conftest.err
9369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
9376 if test $ac_mid -le $ac_hi; then
9377 ac_lo= ac_hi=
9378 break
9379 fi
9380 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382
9383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 done
9385else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009387sed 's/^/| /' conftest.$ac_ext >&5
9388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391
9392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394
9395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009396# Binary search between lo and hi bounds.
9397while test "x$ac_lo" != "x$ac_hi"; do
9398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* confdefs.h. */
9401_ACEOF
9402cat confdefs.h >>conftest.$ac_ext
9403cat >>conftest.$ac_ext <<_ACEOF
9404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009406 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009407int
9408main ()
9409{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009411test_array [0] = 0
9412
9413 ;
9414 return 0;
9415}
9416_ACEOF
9417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418if { (ac_try="$ac_compile"
9419case "(($ac_try" in
9420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9421 *) ac_try_echo=$ac_try;;
9422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009426 grep -v '^ *+' conftest.er1 >conftest.err
9427 rm -f conftest.er1
9428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430 (exit $ac_status); } && {
9431 test -z "$ac_c_werror_flag" ||
9432 test ! -s conftest.err
9433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_hi=$ac_mid
9435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009437sed 's/^/| /' conftest.$ac_ext >&5
9438
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441
9442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009443done
9444case $ac_lo in
9445?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009447 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009448See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009449echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009450See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009451 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452 else
9453 ac_cv_sizeof_float=0
9454 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009455esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009456else
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* confdefs.h. */
9459_ACEOF
9460cat confdefs.h >>conftest.$ac_ext
9461cat >>conftest.$ac_ext <<_ACEOF
9462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009464 typedef float ac__type_sizeof_;
9465static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9466static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009467#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009468#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009469int
9470main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009471{
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
9473 FILE *f = fopen ("conftest.val", "w");
9474 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009476 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009479 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009481 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 }
9483 else
9484 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009488 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
9492 ;
9493 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009494}
Martin v. Löwis11437992002-04-12 09:54:03 +00009495_ACEOF
9496rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497if { (ac_try="$ac_link"
9498case "(($ac_try" in
9499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9500 *) ac_try_echo=$ac_try;;
9501esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009507 { (case "(($ac_try" in
9508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9509 *) ac_try_echo=$ac_try;;
9510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 (exit $ac_status); }; }; then
9516 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009518 echo "$as_me: program exited with status $ac_status" >&5
9519echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009520sed 's/^/| /' conftest.$ac_ext >&5
9521
Martin v. Löwis11437992002-04-12 09:54:03 +00009522( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009524 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009525See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009526echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009527See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009528 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529 else
9530 ac_cv_sizeof_float=0
9531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533rm -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 +00009534fi
9535rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009536fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009537{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9538echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539
9540
9541
Martin v. Löwis11437992002-04-12 09:54:03 +00009542cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009543#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009544_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009545
9546
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009547{ echo "$as_me:$LINENO: checking for double" >&5
9548echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9549if test "${ac_cv_type_double+set}" = set; then
9550 echo $ECHO_N "(cached) $ECHO_C" >&6
9551else
9552 cat >conftest.$ac_ext <<_ACEOF
9553/* confdefs.h. */
9554_ACEOF
9555cat confdefs.h >>conftest.$ac_ext
9556cat >>conftest.$ac_ext <<_ACEOF
9557/* end confdefs.h. */
9558$ac_includes_default
9559typedef double ac__type_new_;
9560int
9561main ()
9562{
9563if ((ac__type_new_ *) 0)
9564 return 0;
9565if (sizeof (ac__type_new_))
9566 return 0;
9567 ;
9568 return 0;
9569}
9570_ACEOF
9571rm -f conftest.$ac_objext
9572if { (ac_try="$ac_compile"
9573case "(($ac_try" in
9574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9575 *) ac_try_echo=$ac_try;;
9576esac
9577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9578 (eval "$ac_compile") 2>conftest.er1
9579 ac_status=$?
9580 grep -v '^ *+' conftest.er1 >conftest.err
9581 rm -f conftest.er1
9582 cat conftest.err >&5
9583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9584 (exit $ac_status); } && {
9585 test -z "$ac_c_werror_flag" ||
9586 test ! -s conftest.err
9587 } && test -s conftest.$ac_objext; then
9588 ac_cv_type_double=yes
9589else
9590 echo "$as_me: failed program was:" >&5
9591sed 's/^/| /' conftest.$ac_ext >&5
9592
9593 ac_cv_type_double=no
9594fi
9595
9596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9597fi
9598{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9599echo "${ECHO_T}$ac_cv_type_double" >&6; }
9600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601# The cast to long int works around a bug in the HP C Compiler
9602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9604# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009605{ echo "$as_me:$LINENO: checking size of double" >&5
9606echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009607if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009609else
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 if test "$cross_compiling" = yes; then
9611 # Depending upon the size, compute the lo and hi bounds.
9612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* confdefs.h. */
9614_ACEOF
9615cat confdefs.h >>conftest.$ac_ext
9616cat >>conftest.$ac_ext <<_ACEOF
9617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009618$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009619 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009620int
9621main ()
9622{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009623static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009624test_array [0] = 0
9625
9626 ;
9627 return 0;
9628}
9629_ACEOF
9630rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631if { (ac_try="$ac_compile"
9632case "(($ac_try" in
9633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9634 *) ac_try_echo=$ac_try;;
9635esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009639 grep -v '^ *+' conftest.er1 >conftest.err
9640 rm -f conftest.er1
9641 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643 (exit $ac_status); } && {
9644 test -z "$ac_c_werror_flag" ||
9645 test ! -s conftest.err
9646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_lo=0 ac_mid=0
9648 while :; do
9649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* confdefs.h. */
9651_ACEOF
9652cat confdefs.h >>conftest.$ac_ext
9653cat >>conftest.$ac_ext <<_ACEOF
9654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009656 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009657int
9658main ()
9659{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009661test_array [0] = 0
9662
9663 ;
9664 return 0;
9665}
9666_ACEOF
9667rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668if { (ac_try="$ac_compile"
9669case "(($ac_try" in
9670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9671 *) ac_try_echo=$ac_try;;
9672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009676 grep -v '^ *+' conftest.er1 >conftest.err
9677 rm -f conftest.er1
9678 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680 (exit $ac_status); } && {
9681 test -z "$ac_c_werror_flag" ||
9682 test ! -s conftest.err
9683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
9690 if test $ac_lo -le $ac_mid; then
9691 ac_lo= ac_hi=
9692 break
9693 fi
9694 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009696
9697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 done
9699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009701sed 's/^/| /' conftest.$ac_ext >&5
9702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* confdefs.h. */
9705_ACEOF
9706cat confdefs.h >>conftest.$ac_ext
9707cat >>conftest.$ac_ext <<_ACEOF
9708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009709$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009710 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009715test_array [0] = 0
9716
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722if { (ac_try="$ac_compile"
9723case "(($ac_try" in
9724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9725 *) ac_try_echo=$ac_try;;
9726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009730 grep -v '^ *+' conftest.er1 >conftest.err
9731 rm -f conftest.er1
9732 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734 (exit $ac_status); } && {
9735 test -z "$ac_c_werror_flag" ||
9736 test ! -s conftest.err
9737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_hi=-1 ac_mid=-1
9739 while :; do
9740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009741/* confdefs.h. */
9742_ACEOF
9743cat confdefs.h >>conftest.$ac_ext
9744cat >>conftest.$ac_ext <<_ACEOF
9745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009746$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009747 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009748int
9749main ()
9750{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009752test_array [0] = 0
9753
9754 ;
9755 return 0;
9756}
9757_ACEOF
9758rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759if { (ac_try="$ac_compile"
9760case "(($ac_try" in
9761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9762 *) ac_try_echo=$ac_try;;
9763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009767 grep -v '^ *+' conftest.er1 >conftest.err
9768 rm -f conftest.er1
9769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771 (exit $ac_status); } && {
9772 test -z "$ac_c_werror_flag" ||
9773 test ! -s conftest.err
9774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
9781 if test $ac_mid -le $ac_hi; then
9782 ac_lo= ac_hi=
9783 break
9784 fi
9785 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787
9788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 done
9790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009792sed 's/^/| /' conftest.$ac_ext >&5
9793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796
9797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799
9800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009801# Binary search between lo and hi bounds.
9802while test "x$ac_lo" != "x$ac_hi"; do
9803 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009805/* confdefs.h. */
9806_ACEOF
9807cat confdefs.h >>conftest.$ac_ext
9808cat >>conftest.$ac_ext <<_ACEOF
9809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009811 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
9814{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009816test_array [0] = 0
9817
9818 ;
9819 return 0;
9820}
9821_ACEOF
9822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823if { (ac_try="$ac_compile"
9824case "(($ac_try" in
9825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9826 *) ac_try_echo=$ac_try;;
9827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009831 grep -v '^ *+' conftest.er1 >conftest.err
9832 rm -f conftest.er1
9833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835 (exit $ac_status); } && {
9836 test -z "$ac_c_werror_flag" ||
9837 test ! -s conftest.err
9838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ac_hi=$ac_mid
9840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009842sed 's/^/| /' conftest.$ac_ext >&5
9843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846
9847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009848done
9849case $ac_lo in
9850?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009853See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009854echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009855See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009856 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857 else
9858 ac_cv_sizeof_double=0
9859 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009860esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009861else
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* confdefs.h. */
9864_ACEOF
9865cat confdefs.h >>conftest.$ac_ext
9866cat >>conftest.$ac_ext <<_ACEOF
9867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009868$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009869 typedef double ac__type_sizeof_;
9870static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9871static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009873#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009874int
9875main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009876{
Martin v. Löwis11437992002-04-12 09:54:03 +00009877
9878 FILE *f = fopen ("conftest.val", "w");
9879 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009881 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009886 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 }
9888 else
9889 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009893 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009896
9897 ;
9898 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009899}
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
9901rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902if { (ac_try="$ac_link"
9903case "(($ac_try" in
9904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9905 *) ac_try_echo=$ac_try;;
9906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912 { (case "(($ac_try" in
9913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9914 *) ac_try_echo=$ac_try;;
9915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 (exit $ac_status); }; }; then
9921 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009923 echo "$as_me: program exited with status $ac_status" >&5
9924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009925sed 's/^/| /' conftest.$ac_ext >&5
9926
Martin v. Löwis11437992002-04-12 09:54:03 +00009927( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009930See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009931echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009932See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009933 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934 else
9935 ac_cv_sizeof_double=0
9936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938rm -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 +00009939fi
9940rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009941fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009942{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9943echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944
9945
9946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009948#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009949_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009950
9951
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009952{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9953echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9954if test "${ac_cv_type_fpos_t+set}" = set; then
9955 echo $ECHO_N "(cached) $ECHO_C" >&6
9956else
9957 cat >conftest.$ac_ext <<_ACEOF
9958/* confdefs.h. */
9959_ACEOF
9960cat confdefs.h >>conftest.$ac_ext
9961cat >>conftest.$ac_ext <<_ACEOF
9962/* end confdefs.h. */
9963$ac_includes_default
9964typedef fpos_t ac__type_new_;
9965int
9966main ()
9967{
9968if ((ac__type_new_ *) 0)
9969 return 0;
9970if (sizeof (ac__type_new_))
9971 return 0;
9972 ;
9973 return 0;
9974}
9975_ACEOF
9976rm -f conftest.$ac_objext
9977if { (ac_try="$ac_compile"
9978case "(($ac_try" in
9979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9980 *) ac_try_echo=$ac_try;;
9981esac
9982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9983 (eval "$ac_compile") 2>conftest.er1
9984 ac_status=$?
9985 grep -v '^ *+' conftest.er1 >conftest.err
9986 rm -f conftest.er1
9987 cat conftest.err >&5
9988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9989 (exit $ac_status); } && {
9990 test -z "$ac_c_werror_flag" ||
9991 test ! -s conftest.err
9992 } && test -s conftest.$ac_objext; then
9993 ac_cv_type_fpos_t=yes
9994else
9995 echo "$as_me: failed program was:" >&5
9996sed 's/^/| /' conftest.$ac_ext >&5
9997
9998 ac_cv_type_fpos_t=no
9999fi
10000
10001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10002fi
10003{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10004echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010006# The cast to long int works around a bug in the HP C Compiler
10007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10009# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010010{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10011echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010012if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 if test "$cross_compiling" = yes; then
10016 # Depending upon the size, compute the lo and hi bounds.
10017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010018/* confdefs.h. */
10019_ACEOF
10020cat confdefs.h >>conftest.$ac_ext
10021cat >>conftest.$ac_ext <<_ACEOF
10022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010023$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010024 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010025int
10026main ()
10027{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010028static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010029test_array [0] = 0
10030
10031 ;
10032 return 0;
10033}
10034_ACEOF
10035rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036if { (ac_try="$ac_compile"
10037case "(($ac_try" in
10038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10039 *) ac_try_echo=$ac_try;;
10040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010044 grep -v '^ *+' conftest.er1 >conftest.err
10045 rm -f conftest.er1
10046 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048 (exit $ac_status); } && {
10049 test -z "$ac_c_werror_flag" ||
10050 test ! -s conftest.err
10051 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 ac_lo=0 ac_mid=0
10053 while :; do
10054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010055/* confdefs.h. */
10056_ACEOF
10057cat confdefs.h >>conftest.$ac_ext
10058cat >>conftest.$ac_ext <<_ACEOF
10059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010060$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010061 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010062int
10063main ()
10064{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010065static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010066test_array [0] = 0
10067
10068 ;
10069 return 0;
10070}
10071_ACEOF
10072rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073if { (ac_try="$ac_compile"
10074case "(($ac_try" in
10075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10076 *) ac_try_echo=$ac_try;;
10077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010081 grep -v '^ *+' conftest.er1 >conftest.err
10082 rm -f conftest.er1
10083 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 (exit $ac_status); } && {
10086 test -z "$ac_c_werror_flag" ||
10087 test ! -s conftest.err
10088 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
10095 if test $ac_lo -le $ac_mid; then
10096 ac_lo= ac_hi=
10097 break
10098 fi
10099 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101
10102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 done
10104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010106sed 's/^/| /' conftest.$ac_ext >&5
10107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* confdefs.h. */
10110_ACEOF
10111cat confdefs.h >>conftest.$ac_ext
10112cat >>conftest.$ac_ext <<_ACEOF
10113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010114$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010115 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010116int
10117main ()
10118{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010119static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010120test_array [0] = 0
10121
10122 ;
10123 return 0;
10124}
10125_ACEOF
10126rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127if { (ac_try="$ac_compile"
10128case "(($ac_try" in
10129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10130 *) ac_try_echo=$ac_try;;
10131esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010135 grep -v '^ *+' conftest.er1 >conftest.err
10136 rm -f conftest.er1
10137 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139 (exit $ac_status); } && {
10140 test -z "$ac_c_werror_flag" ||
10141 test ! -s conftest.err
10142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ac_hi=-1 ac_mid=-1
10144 while :; do
10145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010146/* confdefs.h. */
10147_ACEOF
10148cat confdefs.h >>conftest.$ac_ext
10149cat >>conftest.$ac_ext <<_ACEOF
10150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010151$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010152 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010153int
10154main ()
10155{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010156static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010157test_array [0] = 0
10158
10159 ;
10160 return 0;
10161}
10162_ACEOF
10163rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164if { (ac_try="$ac_compile"
10165case "(($ac_try" in
10166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10167 *) ac_try_echo=$ac_try;;
10168esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010172 grep -v '^ *+' conftest.er1 >conftest.err
10173 rm -f conftest.er1
10174 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 (exit $ac_status); } && {
10177 test -z "$ac_c_werror_flag" ||
10178 test ! -s conftest.err
10179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
10186 if test $ac_mid -le $ac_hi; then
10187 ac_lo= ac_hi=
10188 break
10189 fi
10190 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192
10193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 done
10195else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010197sed 's/^/| /' conftest.$ac_ext >&5
10198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201
10202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204
10205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010206# Binary search between lo and hi bounds.
10207while test "x$ac_lo" != "x$ac_hi"; do
10208 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010216 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
10219{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010221test_array [0] = 0
10222
10223 ;
10224 return 0;
10225}
10226_ACEOF
10227rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228if { (ac_try="$ac_compile"
10229case "(($ac_try" in
10230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10231 *) ac_try_echo=$ac_try;;
10232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010236 grep -v '^ *+' conftest.er1 >conftest.err
10237 rm -f conftest.er1
10238 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240 (exit $ac_status); } && {
10241 test -z "$ac_c_werror_flag" ||
10242 test ! -s conftest.err
10243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_hi=$ac_mid
10245else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010247sed 's/^/| /' conftest.$ac_ext >&5
10248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251
10252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010253done
10254case $ac_lo in
10255?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010257 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010258See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010259echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010260See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010261 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262 else
10263 ac_cv_sizeof_fpos_t=0
10264 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010265esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010266else
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010273$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010274 typedef fpos_t ac__type_sizeof_;
10275static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10276static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010277#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010278#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010279int
10280main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010281{
Martin v. Löwis11437992002-04-12 09:54:03 +000010282
10283 FILE *f = fopen ("conftest.val", "w");
10284 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010286 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010289 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010291 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 }
10293 else
10294 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010296 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010298 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
10302 ;
10303 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010304}
Martin v. Löwis11437992002-04-12 09:54:03 +000010305_ACEOF
10306rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307if { (ac_try="$ac_link"
10308case "(($ac_try" in
10309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10310 *) ac_try_echo=$ac_try;;
10311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010313 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317 { (case "(($ac_try" in
10318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10319 *) ac_try_echo=$ac_try;;
10320esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 (exit $ac_status); }; }; then
10326 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010328 echo "$as_me: program exited with status $ac_status" >&5
10329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010330sed 's/^/| /' conftest.$ac_ext >&5
10331
Martin v. Löwis11437992002-04-12 09:54:03 +000010332( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010334 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010335See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010336echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010337See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010338 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010339 else
10340 ac_cv_sizeof_fpos_t=0
10341 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343rm -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 +000010344fi
10345rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010346fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010347{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10348echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349
10350
10351
Martin v. Löwis11437992002-04-12 09:54:03 +000010352cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010353#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010354_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010355
Michael W. Hudson54241132001-12-07 15:38:26 +000010356
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010357{ echo "$as_me:$LINENO: checking for size_t" >&5
10358echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10359if test "${ac_cv_type_size_t+set}" = set; then
10360 echo $ECHO_N "(cached) $ECHO_C" >&6
10361else
10362 cat >conftest.$ac_ext <<_ACEOF
10363/* confdefs.h. */
10364_ACEOF
10365cat confdefs.h >>conftest.$ac_ext
10366cat >>conftest.$ac_ext <<_ACEOF
10367/* end confdefs.h. */
10368$ac_includes_default
10369typedef size_t ac__type_new_;
10370int
10371main ()
10372{
10373if ((ac__type_new_ *) 0)
10374 return 0;
10375if (sizeof (ac__type_new_))
10376 return 0;
10377 ;
10378 return 0;
10379}
10380_ACEOF
10381rm -f conftest.$ac_objext
10382if { (ac_try="$ac_compile"
10383case "(($ac_try" in
10384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10385 *) ac_try_echo=$ac_try;;
10386esac
10387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10388 (eval "$ac_compile") 2>conftest.er1
10389 ac_status=$?
10390 grep -v '^ *+' conftest.er1 >conftest.err
10391 rm -f conftest.er1
10392 cat conftest.err >&5
10393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10394 (exit $ac_status); } && {
10395 test -z "$ac_c_werror_flag" ||
10396 test ! -s conftest.err
10397 } && test -s conftest.$ac_objext; then
10398 ac_cv_type_size_t=yes
10399else
10400 echo "$as_me: failed program was:" >&5
10401sed 's/^/| /' conftest.$ac_ext >&5
10402
10403 ac_cv_type_size_t=no
10404fi
10405
10406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10407fi
10408{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10409echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010411# The cast to long int works around a bug in the HP C Compiler
10412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10414# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010415{ echo "$as_me:$LINENO: checking size of size_t" >&5
10416echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010417if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010420 if test "$cross_compiling" = yes; then
10421 # Depending upon the size, compute the lo and hi bounds.
10422cat >conftest.$ac_ext <<_ACEOF
10423/* confdefs.h. */
10424_ACEOF
10425cat confdefs.h >>conftest.$ac_ext
10426cat >>conftest.$ac_ext <<_ACEOF
10427/* end confdefs.h. */
10428$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010429 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430int
10431main ()
10432{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010433static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434test_array [0] = 0
10435
10436 ;
10437 return 0;
10438}
10439_ACEOF
10440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441if { (ac_try="$ac_compile"
10442case "(($ac_try" in
10443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10444 *) ac_try_echo=$ac_try;;
10445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448 ac_status=$?
10449 grep -v '^ *+' conftest.er1 >conftest.err
10450 rm -f conftest.er1
10451 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453 (exit $ac_status); } && {
10454 test -z "$ac_c_werror_flag" ||
10455 test ! -s conftest.err
10456 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457 ac_lo=0 ac_mid=0
10458 while :; do
10459 cat >conftest.$ac_ext <<_ACEOF
10460/* confdefs.h. */
10461_ACEOF
10462cat confdefs.h >>conftest.$ac_ext
10463cat >>conftest.$ac_ext <<_ACEOF
10464/* end confdefs.h. */
10465$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010466 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467int
10468main ()
10469{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010470static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471test_array [0] = 0
10472
10473 ;
10474 return 0;
10475}
10476_ACEOF
10477rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478if { (ac_try="$ac_compile"
10479case "(($ac_try" in
10480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10481 *) ac_try_echo=$ac_try;;
10482esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485 ac_status=$?
10486 grep -v '^ *+' conftest.er1 >conftest.err
10487 rm -f conftest.er1
10488 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490 (exit $ac_status); } && {
10491 test -z "$ac_c_werror_flag" ||
10492 test ! -s conftest.err
10493 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
10500 if test $ac_lo -le $ac_mid; then
10501 ac_lo= ac_hi=
10502 break
10503 fi
10504 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506
10507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508 done
10509else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010510 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511sed 's/^/| /' conftest.$ac_ext >&5
10512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514/* confdefs.h. */
10515_ACEOF
10516cat confdefs.h >>conftest.$ac_ext
10517cat >>conftest.$ac_ext <<_ACEOF
10518/* end confdefs.h. */
10519$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010520 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521int
10522main ()
10523{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010524static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525test_array [0] = 0
10526
10527 ;
10528 return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010532if { (ac_try="$ac_compile"
10533case "(($ac_try" in
10534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10535 *) ac_try_echo=$ac_try;;
10536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539 ac_status=$?
10540 grep -v '^ *+' conftest.er1 >conftest.err
10541 rm -f conftest.er1
10542 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544 (exit $ac_status); } && {
10545 test -z "$ac_c_werror_flag" ||
10546 test ! -s conftest.err
10547 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548 ac_hi=-1 ac_mid=-1
10549 while :; do
10550 cat >conftest.$ac_ext <<_ACEOF
10551/* confdefs.h. */
10552_ACEOF
10553cat confdefs.h >>conftest.$ac_ext
10554cat >>conftest.$ac_ext <<_ACEOF
10555/* end confdefs.h. */
10556$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010557 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558int
10559main ()
10560{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010561static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562test_array [0] = 0
10563
10564 ;
10565 return 0;
10566}
10567_ACEOF
10568rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569if { (ac_try="$ac_compile"
10570case "(($ac_try" in
10571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10572 *) ac_try_echo=$ac_try;;
10573esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576 ac_status=$?
10577 grep -v '^ *+' conftest.er1 >conftest.err
10578 rm -f conftest.er1
10579 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 (exit $ac_status); } && {
10582 test -z "$ac_c_werror_flag" ||
10583 test ! -s conftest.err
10584 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
10591 if test $ac_mid -le $ac_hi; then
10592 ac_lo= ac_hi=
10593 break
10594 fi
10595 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597
10598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599 done
10600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010601 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602sed 's/^/| /' conftest.$ac_ext >&5
10603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609
10610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611# Binary search between lo and hi bounds.
10612while test "x$ac_lo" != "x$ac_hi"; do
10613 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010621 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622int
10623main ()
10624{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626test_array [0] = 0
10627
10628 ;
10629 return 0;
10630}
10631_ACEOF
10632rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633if { (ac_try="$ac_compile"
10634case "(($ac_try" in
10635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636 *) ac_try_echo=$ac_try;;
10637esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640 ac_status=$?
10641 grep -v '^ *+' conftest.er1 >conftest.err
10642 rm -f conftest.er1
10643 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645 (exit $ac_status); } && {
10646 test -z "$ac_c_werror_flag" ||
10647 test ! -s conftest.err
10648 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 ac_hi=$ac_mid
10650else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010651 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652sed 's/^/| /' conftest.$ac_ext >&5
10653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656
10657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658done
10659case $ac_lo in
10660?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010662 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010664echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010666 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667 else
10668 ac_cv_sizeof_size_t=0
10669 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670esac
10671else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 cat >conftest.$ac_ext <<_ACEOF
10673/* confdefs.h. */
10674_ACEOF
10675cat confdefs.h >>conftest.$ac_ext
10676cat >>conftest.$ac_ext <<_ACEOF
10677/* end confdefs.h. */
10678$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010679 typedef size_t ac__type_sizeof_;
10680static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10681static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682#include <stdio.h>
10683#include <stdlib.h>
10684int
10685main ()
10686{
10687
10688 FILE *f = fopen ("conftest.val", "w");
10689 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010691 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010694 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010696 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697 }
10698 else
10699 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010701 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010703 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712if { (ac_try="$ac_link"
10713case "(($ac_try" in
10714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10715 *) ac_try_echo=$ac_try;;
10716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722 { (case "(($ac_try" in
10723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10724 *) ac_try_echo=$ac_try;;
10725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730 (exit $ac_status); }; }; then
10731 ac_cv_sizeof_size_t=`cat conftest.val`
10732else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010733 echo "$as_me: program exited with status $ac_status" >&5
10734echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735sed 's/^/| /' conftest.$ac_ext >&5
10736
10737( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010739 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010741echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010743 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744 else
10745 ac_cv_sizeof_size_t=0
10746 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748rm -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 +000010749fi
10750rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010752{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10753echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010754
10755
10756
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757cat >>confdefs.h <<_ACEOF
10758#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10759_ACEOF
10760
10761
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010762{ echo "$as_me:$LINENO: checking for pid_t" >&5
10763echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10764if test "${ac_cv_type_pid_t+set}" = set; then
10765 echo $ECHO_N "(cached) $ECHO_C" >&6
10766else
10767 cat >conftest.$ac_ext <<_ACEOF
10768/* confdefs.h. */
10769_ACEOF
10770cat confdefs.h >>conftest.$ac_ext
10771cat >>conftest.$ac_ext <<_ACEOF
10772/* end confdefs.h. */
10773$ac_includes_default
10774typedef pid_t ac__type_new_;
10775int
10776main ()
10777{
10778if ((ac__type_new_ *) 0)
10779 return 0;
10780if (sizeof (ac__type_new_))
10781 return 0;
10782 ;
10783 return 0;
10784}
10785_ACEOF
10786rm -f conftest.$ac_objext
10787if { (ac_try="$ac_compile"
10788case "(($ac_try" in
10789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10790 *) ac_try_echo=$ac_try;;
10791esac
10792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10793 (eval "$ac_compile") 2>conftest.er1
10794 ac_status=$?
10795 grep -v '^ *+' conftest.er1 >conftest.err
10796 rm -f conftest.er1
10797 cat conftest.err >&5
10798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10799 (exit $ac_status); } && {
10800 test -z "$ac_c_werror_flag" ||
10801 test ! -s conftest.err
10802 } && test -s conftest.$ac_objext; then
10803 ac_cv_type_pid_t=yes
10804else
10805 echo "$as_me: failed program was:" >&5
10806sed 's/^/| /' conftest.$ac_ext >&5
10807
10808 ac_cv_type_pid_t=no
10809fi
10810
10811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10812fi
10813{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10814echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10815
Christian Heimes400adb02008-02-01 08:12:03 +000010816# The cast to long int works around a bug in the HP C Compiler
10817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10819# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010820{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10821echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010822if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010823 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010824else
10825 if test "$cross_compiling" = yes; then
10826 # Depending upon the size, compute the lo and hi bounds.
10827cat >conftest.$ac_ext <<_ACEOF
10828/* confdefs.h. */
10829_ACEOF
10830cat confdefs.h >>conftest.$ac_ext
10831cat >>conftest.$ac_ext <<_ACEOF
10832/* end confdefs.h. */
10833$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010834 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010835int
10836main ()
10837{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010838static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010839test_array [0] = 0
10840
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845rm -f conftest.$ac_objext
10846if { (ac_try="$ac_compile"
10847case "(($ac_try" in
10848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10849 *) ac_try_echo=$ac_try;;
10850esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010852 (eval "$ac_compile") 2>conftest.er1
10853 ac_status=$?
10854 grep -v '^ *+' conftest.er1 >conftest.err
10855 rm -f conftest.er1
10856 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010858 (exit $ac_status); } && {
10859 test -z "$ac_c_werror_flag" ||
10860 test ! -s conftest.err
10861 } && test -s conftest.$ac_objext; then
10862 ac_lo=0 ac_mid=0
10863 while :; do
10864 cat >conftest.$ac_ext <<_ACEOF
10865/* confdefs.h. */
10866_ACEOF
10867cat confdefs.h >>conftest.$ac_ext
10868cat >>conftest.$ac_ext <<_ACEOF
10869/* end confdefs.h. */
10870$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010871 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010872int
10873main ()
10874{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010875static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010876test_array [0] = 0
10877
10878 ;
10879 return 0;
10880}
10881_ACEOF
10882rm -f conftest.$ac_objext
10883if { (ac_try="$ac_compile"
10884case "(($ac_try" in
10885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10886 *) ac_try_echo=$ac_try;;
10887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010889 (eval "$ac_compile") 2>conftest.er1
10890 ac_status=$?
10891 grep -v '^ *+' conftest.er1 >conftest.err
10892 rm -f conftest.er1
10893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010895 (exit $ac_status); } && {
10896 test -z "$ac_c_werror_flag" ||
10897 test ! -s conftest.err
10898 } && test -s conftest.$ac_objext; then
10899 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
10905 if test $ac_lo -le $ac_mid; then
10906 ac_lo= ac_hi=
10907 break
10908 fi
10909 ac_mid=`expr 2 '*' $ac_mid + 1`
10910fi
10911
10912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10913 done
10914else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010915 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010916sed 's/^/| /' conftest.$ac_ext >&5
10917
10918 cat >conftest.$ac_ext <<_ACEOF
10919/* confdefs.h. */
10920_ACEOF
10921cat confdefs.h >>conftest.$ac_ext
10922cat >>conftest.$ac_ext <<_ACEOF
10923/* end confdefs.h. */
10924$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010925 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010926int
10927main ()
10928{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010930test_array [0] = 0
10931
10932 ;
10933 return 0;
10934}
10935_ACEOF
10936rm -f conftest.$ac_objext
10937if { (ac_try="$ac_compile"
10938case "(($ac_try" in
10939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10940 *) ac_try_echo=$ac_try;;
10941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010943 (eval "$ac_compile") 2>conftest.er1
10944 ac_status=$?
10945 grep -v '^ *+' conftest.er1 >conftest.err
10946 rm -f conftest.er1
10947 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010949 (exit $ac_status); } && {
10950 test -z "$ac_c_werror_flag" ||
10951 test ! -s conftest.err
10952 } && test -s conftest.$ac_objext; then
10953 ac_hi=-1 ac_mid=-1
10954 while :; do
10955 cat >conftest.$ac_ext <<_ACEOF
10956/* confdefs.h. */
10957_ACEOF
10958cat confdefs.h >>conftest.$ac_ext
10959cat >>conftest.$ac_ext <<_ACEOF
10960/* end confdefs.h. */
10961$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010962 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010963int
10964main ()
10965{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010967test_array [0] = 0
10968
10969 ;
10970 return 0;
10971}
10972_ACEOF
10973rm -f conftest.$ac_objext
10974if { (ac_try="$ac_compile"
10975case "(($ac_try" in
10976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10977 *) ac_try_echo=$ac_try;;
10978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010980 (eval "$ac_compile") 2>conftest.er1
10981 ac_status=$?
10982 grep -v '^ *+' conftest.er1 >conftest.err
10983 rm -f conftest.er1
10984 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010986 (exit $ac_status); } && {
10987 test -z "$ac_c_werror_flag" ||
10988 test ! -s conftest.err
10989 } && test -s conftest.$ac_objext; then
10990 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
10996 if test $ac_mid -le $ac_hi; then
10997 ac_lo= ac_hi=
10998 break
10999 fi
11000 ac_mid=`expr 2 '*' $ac_mid`
11001fi
11002
11003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11004 done
11005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011006 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011007sed 's/^/| /' conftest.$ac_ext >&5
11008
11009 ac_lo= ac_hi=
11010fi
11011
11012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11013fi
11014
11015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11016# Binary search between lo and hi bounds.
11017while test "x$ac_lo" != "x$ac_hi"; do
11018 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11019 cat >conftest.$ac_ext <<_ACEOF
11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
11025$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011026 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011027int
11028main ()
11029{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011031test_array [0] = 0
11032
11033 ;
11034 return 0;
11035}
11036_ACEOF
11037rm -f conftest.$ac_objext
11038if { (ac_try="$ac_compile"
11039case "(($ac_try" in
11040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11041 *) ac_try_echo=$ac_try;;
11042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011044 (eval "$ac_compile") 2>conftest.er1
11045 ac_status=$?
11046 grep -v '^ *+' conftest.er1 >conftest.err
11047 rm -f conftest.er1
11048 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011050 (exit $ac_status); } && {
11051 test -z "$ac_c_werror_flag" ||
11052 test ! -s conftest.err
11053 } && test -s conftest.$ac_objext; then
11054 ac_hi=$ac_mid
11055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011056 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011057sed 's/^/| /' conftest.$ac_ext >&5
11058
11059 ac_lo=`expr '(' $ac_mid ')' + 1`
11060fi
11061
11062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11063done
11064case $ac_lo in
11065?*) ac_cv_sizeof_pid_t=$ac_lo;;
11066'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011068See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011069echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011070See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011071 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011072 else
11073 ac_cv_sizeof_pid_t=0
11074 fi ;;
11075esac
11076else
11077 cat >conftest.$ac_ext <<_ACEOF
11078/* confdefs.h. */
11079_ACEOF
11080cat confdefs.h >>conftest.$ac_ext
11081cat >>conftest.$ac_ext <<_ACEOF
11082/* end confdefs.h. */
11083$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011084 typedef pid_t ac__type_sizeof_;
11085static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11086static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011087#include <stdio.h>
11088#include <stdlib.h>
11089int
11090main ()
11091{
11092
11093 FILE *f = fopen ("conftest.val", "w");
11094 if (! f)
11095 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011096 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011097 {
11098 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011099 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011100 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011101 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011102 }
11103 else
11104 {
11105 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011106 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011107 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011108 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011109 }
11110 return ferror (f) || fclose (f) != 0;
11111
11112 ;
11113 return 0;
11114}
11115_ACEOF
11116rm -f conftest$ac_exeext
11117if { (ac_try="$ac_link"
11118case "(($ac_try" in
11119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11120 *) ac_try_echo=$ac_try;;
11121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011123 (eval "$ac_link") 2>&5
11124 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11127 { (case "(($ac_try" in
11128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11129 *) ac_try_echo=$ac_try;;
11130esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011132 (eval "$ac_try") 2>&5
11133 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011135 (exit $ac_status); }; }; then
11136 ac_cv_sizeof_pid_t=`cat conftest.val`
11137else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011138 echo "$as_me: program exited with status $ac_status" >&5
11139echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011140sed 's/^/| /' conftest.$ac_ext >&5
11141
11142( exit $ac_status )
11143if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011144 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011145See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011146echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011147See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011148 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011149 else
11150 ac_cv_sizeof_pid_t=0
11151 fi
11152fi
11153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11154fi
11155rm -f conftest.val
11156fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011157{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11158echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011159
11160
11161
11162cat >>confdefs.h <<_ACEOF
11163#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11164_ACEOF
11165
11166
Michael W. Hudson54241132001-12-07 15:38:26 +000011167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011168{ echo "$as_me:$LINENO: checking for long long support" >&5
11169echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011170have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* confdefs.h. */
11173_ACEOF
11174cat confdefs.h >>conftest.$ac_ext
11175cat >>conftest.$ac_ext <<_ACEOF
11176/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178int
11179main ()
11180{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 ;
11183 return 0;
11184}
11185_ACEOF
11186rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187if { (ac_try="$ac_compile"
11188case "(($ac_try" in
11189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11190 *) ac_try_echo=$ac_try;;
11191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011195 grep -v '^ *+' conftest.er1 >conftest.err
11196 rm -f conftest.er1
11197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199 (exit $ac_status); } && {
11200 test -z "$ac_c_werror_flag" ||
11201 test ! -s conftest.err
11202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011203
11204
11205cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011206#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011207_ACEOF
11208
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011209 have_long_long=yes
11210
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011213sed 's/^/| /' conftest.$ac_ext >&5
11214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217
11218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011219{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11220echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011221if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011222{ echo "$as_me:$LINENO: checking for long long" >&5
11223echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11224if test "${ac_cv_type_long_long+set}" = set; then
11225 echo $ECHO_N "(cached) $ECHO_C" >&6
11226else
11227 cat >conftest.$ac_ext <<_ACEOF
11228/* confdefs.h. */
11229_ACEOF
11230cat confdefs.h >>conftest.$ac_ext
11231cat >>conftest.$ac_ext <<_ACEOF
11232/* end confdefs.h. */
11233$ac_includes_default
11234typedef long long ac__type_new_;
11235int
11236main ()
11237{
11238if ((ac__type_new_ *) 0)
11239 return 0;
11240if (sizeof (ac__type_new_))
11241 return 0;
11242 ;
11243 return 0;
11244}
11245_ACEOF
11246rm -f conftest.$ac_objext
11247if { (ac_try="$ac_compile"
11248case "(($ac_try" in
11249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11250 *) ac_try_echo=$ac_try;;
11251esac
11252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11253 (eval "$ac_compile") 2>conftest.er1
11254 ac_status=$?
11255 grep -v '^ *+' conftest.er1 >conftest.err
11256 rm -f conftest.er1
11257 cat conftest.err >&5
11258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259 (exit $ac_status); } && {
11260 test -z "$ac_c_werror_flag" ||
11261 test ! -s conftest.err
11262 } && test -s conftest.$ac_objext; then
11263 ac_cv_type_long_long=yes
11264else
11265 echo "$as_me: failed program was:" >&5
11266sed 's/^/| /' conftest.$ac_ext >&5
11267
11268 ac_cv_type_long_long=no
11269fi
11270
11271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11272fi
11273{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11274echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276# The cast to long int works around a bug in the HP C Compiler
11277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11279# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011280{ echo "$as_me:$LINENO: checking size of long long" >&5
11281echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011282if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011284else
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 if test "$cross_compiling" = yes; then
11286 # Depending upon the size, compute the lo and hi bounds.
11287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011288/* confdefs.h. */
11289_ACEOF
11290cat confdefs.h >>conftest.$ac_ext
11291cat >>conftest.$ac_ext <<_ACEOF
11292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011293$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011294 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011295int
11296main ()
11297{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011299test_array [0] = 0
11300
11301 ;
11302 return 0;
11303}
11304_ACEOF
11305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306if { (ac_try="$ac_compile"
11307case "(($ac_try" in
11308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11309 *) ac_try_echo=$ac_try;;
11310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011314 grep -v '^ *+' conftest.er1 >conftest.err
11315 rm -f conftest.er1
11316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318 (exit $ac_status); } && {
11319 test -z "$ac_c_werror_flag" ||
11320 test ! -s conftest.err
11321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ac_lo=0 ac_mid=0
11323 while :; do
11324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* confdefs.h. */
11326_ACEOF
11327cat confdefs.h >>conftest.$ac_ext
11328cat >>conftest.$ac_ext <<_ACEOF
11329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011330$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011331 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011332int
11333main ()
11334{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011336test_array [0] = 0
11337
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011343if { (ac_try="$ac_compile"
11344case "(($ac_try" in
11345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11346 *) ac_try_echo=$ac_try;;
11347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011351 grep -v '^ *+' conftest.er1 >conftest.err
11352 rm -f conftest.er1
11353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355 (exit $ac_status); } && {
11356 test -z "$ac_c_werror_flag" ||
11357 test ! -s conftest.err
11358 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
11365 if test $ac_lo -le $ac_mid; then
11366 ac_lo= ac_hi=
11367 break
11368 fi
11369 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011371
11372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 done
11374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011376sed 's/^/| /' conftest.$ac_ext >&5
11377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* confdefs.h. */
11380_ACEOF
11381cat confdefs.h >>conftest.$ac_ext
11382cat >>conftest.$ac_ext <<_ACEOF
11383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011384$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011385 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011386int
11387main ()
11388{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011389static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011390test_array [0] = 0
11391
11392 ;
11393 return 0;
11394}
11395_ACEOF
11396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397if { (ac_try="$ac_compile"
11398case "(($ac_try" in
11399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11400 *) ac_try_echo=$ac_try;;
11401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011405 grep -v '^ *+' conftest.er1 >conftest.err
11406 rm -f conftest.er1
11407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409 (exit $ac_status); } && {
11410 test -z "$ac_c_werror_flag" ||
11411 test ! -s conftest.err
11412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ac_hi=-1 ac_mid=-1
11414 while :; do
11415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* confdefs.h. */
11417_ACEOF
11418cat confdefs.h >>conftest.$ac_ext
11419cat >>conftest.$ac_ext <<_ACEOF
11420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011421$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011422 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011423int
11424main ()
11425{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011427test_array [0] = 0
11428
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434if { (ac_try="$ac_compile"
11435case "(($ac_try" in
11436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11437 *) ac_try_echo=$ac_try;;
11438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011442 grep -v '^ *+' conftest.er1 >conftest.err
11443 rm -f conftest.er1
11444 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446 (exit $ac_status); } && {
11447 test -z "$ac_c_werror_flag" ||
11448 test ! -s conftest.err
11449 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
11456 if test $ac_mid -le $ac_hi; then
11457 ac_lo= ac_hi=
11458 break
11459 fi
11460 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462
11463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 done
11465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011467sed 's/^/| /' conftest.$ac_ext >&5
11468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471
11472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474
11475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011476# Binary search between lo and hi bounds.
11477while test "x$ac_lo" != "x$ac_hi"; do
11478 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011486 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487int
11488main ()
11489{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011491test_array [0] = 0
11492
11493 ;
11494 return 0;
11495}
11496_ACEOF
11497rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498if { (ac_try="$ac_compile"
11499case "(($ac_try" in
11500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11501 *) ac_try_echo=$ac_try;;
11502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 grep -v '^ *+' conftest.er1 >conftest.err
11507 rm -f conftest.er1
11508 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510 (exit $ac_status); } && {
11511 test -z "$ac_c_werror_flag" ||
11512 test ! -s conftest.err
11513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_hi=$ac_mid
11515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011517sed 's/^/| /' conftest.$ac_ext >&5
11518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521
11522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011523done
11524case $ac_lo in
11525?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011527 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011528See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011529echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011530See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011531 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532 else
11533 ac_cv_sizeof_long_long=0
11534 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011535esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011536else
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011538/* confdefs.h. */
11539_ACEOF
11540cat confdefs.h >>conftest.$ac_ext
11541cat >>conftest.$ac_ext <<_ACEOF
11542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011543$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011544 typedef long long ac__type_sizeof_;
11545static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11546static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011547#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011548#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011549int
11550main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011551{
Martin v. Löwis11437992002-04-12 09:54:03 +000011552
11553 FILE *f = fopen ("conftest.val", "w");
11554 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011555 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011556 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011559 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011561 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 }
11563 else
11564 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011566 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011568 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
11572 ;
11573 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011574}
Martin v. Löwis11437992002-04-12 09:54:03 +000011575_ACEOF
11576rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577if { (ac_try="$ac_link"
11578case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587 { (case "(($ac_try" in
11588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589 *) ac_try_echo=$ac_try;;
11590esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 (exit $ac_status); }; }; then
11596 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011598 echo "$as_me: program exited with status $ac_status" >&5
11599echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011600sed 's/^/| /' conftest.$ac_ext >&5
11601
Martin v. Löwis11437992002-04-12 09:54:03 +000011602( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011604 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011605See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011606echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011607See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011608 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011609 else
11610 ac_cv_sizeof_long_long=0
11611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613rm -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 +000011614fi
11615rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011616fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011617{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11618echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619
11620
11621
Martin v. Löwis11437992002-04-12 09:54:03 +000011622cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011623#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011624_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011625
Michael W. Hudson54241132001-12-07 15:38:26 +000011626
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011627fi
11628
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011629{ echo "$as_me:$LINENO: checking for long double support" >&5
11630echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011631have_long_double=no
11632cat >conftest.$ac_ext <<_ACEOF
11633/* confdefs.h. */
11634_ACEOF
11635cat confdefs.h >>conftest.$ac_ext
11636cat >>conftest.$ac_ext <<_ACEOF
11637/* end confdefs.h. */
11638
11639int
11640main ()
11641{
11642long double x; x = (long double)0;
11643 ;
11644 return 0;
11645}
11646_ACEOF
11647rm -f conftest.$ac_objext
11648if { (ac_try="$ac_compile"
11649case "(($ac_try" in
11650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11651 *) ac_try_echo=$ac_try;;
11652esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011654 (eval "$ac_compile") 2>conftest.er1
11655 ac_status=$?
11656 grep -v '^ *+' conftest.er1 >conftest.err
11657 rm -f conftest.er1
11658 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011660 (exit $ac_status); } && {
11661 test -z "$ac_c_werror_flag" ||
11662 test ! -s conftest.err
11663 } && test -s conftest.$ac_objext; then
11664
11665
11666cat >>confdefs.h <<\_ACEOF
11667#define HAVE_LONG_DOUBLE 1
11668_ACEOF
11669
11670 have_long_double=yes
11671
11672else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011673 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011674sed 's/^/| /' conftest.$ac_ext >&5
11675
11676
11677fi
11678
11679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011680{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11681echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011682if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011683{ echo "$as_me:$LINENO: checking for long double" >&5
11684echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11685if test "${ac_cv_type_long_double+set}" = set; then
11686 echo $ECHO_N "(cached) $ECHO_C" >&6
11687else
11688 cat >conftest.$ac_ext <<_ACEOF
11689/* confdefs.h. */
11690_ACEOF
11691cat confdefs.h >>conftest.$ac_ext
11692cat >>conftest.$ac_ext <<_ACEOF
11693/* end confdefs.h. */
11694$ac_includes_default
11695typedef long double ac__type_new_;
11696int
11697main ()
11698{
11699if ((ac__type_new_ *) 0)
11700 return 0;
11701if (sizeof (ac__type_new_))
11702 return 0;
11703 ;
11704 return 0;
11705}
11706_ACEOF
11707rm -f conftest.$ac_objext
11708if { (ac_try="$ac_compile"
11709case "(($ac_try" in
11710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11711 *) ac_try_echo=$ac_try;;
11712esac
11713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11714 (eval "$ac_compile") 2>conftest.er1
11715 ac_status=$?
11716 grep -v '^ *+' conftest.er1 >conftest.err
11717 rm -f conftest.er1
11718 cat conftest.err >&5
11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720 (exit $ac_status); } && {
11721 test -z "$ac_c_werror_flag" ||
11722 test ! -s conftest.err
11723 } && test -s conftest.$ac_objext; then
11724 ac_cv_type_long_double=yes
11725else
11726 echo "$as_me: failed program was:" >&5
11727sed 's/^/| /' conftest.$ac_ext >&5
11728
11729 ac_cv_type_long_double=no
11730fi
11731
11732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11733fi
11734{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11735echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11736
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011737# The cast to long int works around a bug in the HP C Compiler
11738# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11739# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11740# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011741{ echo "$as_me:$LINENO: checking size of long double" >&5
11742echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011743if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011744 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011745else
11746 if test "$cross_compiling" = yes; then
11747 # Depending upon the size, compute the lo and hi bounds.
11748cat >conftest.$ac_ext <<_ACEOF
11749/* confdefs.h. */
11750_ACEOF
11751cat confdefs.h >>conftest.$ac_ext
11752cat >>conftest.$ac_ext <<_ACEOF
11753/* end confdefs.h. */
11754$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011755 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011756int
11757main ()
11758{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011759static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011760test_array [0] = 0
11761
11762 ;
11763 return 0;
11764}
11765_ACEOF
11766rm -f conftest.$ac_objext
11767if { (ac_try="$ac_compile"
11768case "(($ac_try" in
11769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11770 *) ac_try_echo=$ac_try;;
11771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011773 (eval "$ac_compile") 2>conftest.er1
11774 ac_status=$?
11775 grep -v '^ *+' conftest.er1 >conftest.err
11776 rm -f conftest.er1
11777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011779 (exit $ac_status); } && {
11780 test -z "$ac_c_werror_flag" ||
11781 test ! -s conftest.err
11782 } && test -s conftest.$ac_objext; then
11783 ac_lo=0 ac_mid=0
11784 while :; do
11785 cat >conftest.$ac_ext <<_ACEOF
11786/* confdefs.h. */
11787_ACEOF
11788cat confdefs.h >>conftest.$ac_ext
11789cat >>conftest.$ac_ext <<_ACEOF
11790/* end confdefs.h. */
11791$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011792 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793int
11794main ()
11795{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011797test_array [0] = 0
11798
11799 ;
11800 return 0;
11801}
11802_ACEOF
11803rm -f conftest.$ac_objext
11804if { (ac_try="$ac_compile"
11805case "(($ac_try" in
11806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11807 *) ac_try_echo=$ac_try;;
11808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011810 (eval "$ac_compile") 2>conftest.er1
11811 ac_status=$?
11812 grep -v '^ *+' conftest.er1 >conftest.err
11813 rm -f conftest.er1
11814 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011816 (exit $ac_status); } && {
11817 test -z "$ac_c_werror_flag" ||
11818 test ! -s conftest.err
11819 } && test -s conftest.$ac_objext; then
11820 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
11826 if test $ac_lo -le $ac_mid; then
11827 ac_lo= ac_hi=
11828 break
11829 fi
11830 ac_mid=`expr 2 '*' $ac_mid + 1`
11831fi
11832
11833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11834 done
11835else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011836 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011837sed 's/^/| /' conftest.$ac_ext >&5
11838
11839 cat >conftest.$ac_ext <<_ACEOF
11840/* confdefs.h. */
11841_ACEOF
11842cat confdefs.h >>conftest.$ac_ext
11843cat >>conftest.$ac_ext <<_ACEOF
11844/* end confdefs.h. */
11845$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011846 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011847int
11848main ()
11849{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011851test_array [0] = 0
11852
11853 ;
11854 return 0;
11855}
11856_ACEOF
11857rm -f conftest.$ac_objext
11858if { (ac_try="$ac_compile"
11859case "(($ac_try" in
11860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11861 *) ac_try_echo=$ac_try;;
11862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011864 (eval "$ac_compile") 2>conftest.er1
11865 ac_status=$?
11866 grep -v '^ *+' conftest.er1 >conftest.err
11867 rm -f conftest.er1
11868 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011870 (exit $ac_status); } && {
11871 test -z "$ac_c_werror_flag" ||
11872 test ! -s conftest.err
11873 } && test -s conftest.$ac_objext; then
11874 ac_hi=-1 ac_mid=-1
11875 while :; do
11876 cat >conftest.$ac_ext <<_ACEOF
11877/* confdefs.h. */
11878_ACEOF
11879cat confdefs.h >>conftest.$ac_ext
11880cat >>conftest.$ac_ext <<_ACEOF
11881/* end confdefs.h. */
11882$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011883 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011884int
11885main ()
11886{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011888test_array [0] = 0
11889
11890 ;
11891 return 0;
11892}
11893_ACEOF
11894rm -f conftest.$ac_objext
11895if { (ac_try="$ac_compile"
11896case "(($ac_try" in
11897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11898 *) ac_try_echo=$ac_try;;
11899esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011901 (eval "$ac_compile") 2>conftest.er1
11902 ac_status=$?
11903 grep -v '^ *+' conftest.er1 >conftest.err
11904 rm -f conftest.er1
11905 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011907 (exit $ac_status); } && {
11908 test -z "$ac_c_werror_flag" ||
11909 test ! -s conftest.err
11910 } && test -s conftest.$ac_objext; then
11911 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
11917 if test $ac_mid -le $ac_hi; then
11918 ac_lo= ac_hi=
11919 break
11920 fi
11921 ac_mid=`expr 2 '*' $ac_mid`
11922fi
11923
11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11925 done
11926else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011927 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011928sed 's/^/| /' conftest.$ac_ext >&5
11929
11930 ac_lo= ac_hi=
11931fi
11932
11933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11934fi
11935
11936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11937# Binary search between lo and hi bounds.
11938while test "x$ac_lo" != "x$ac_hi"; do
11939 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11940 cat >conftest.$ac_ext <<_ACEOF
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011947 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948int
11949main ()
11950{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011951static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952test_array [0] = 0
11953
11954 ;
11955 return 0;
11956}
11957_ACEOF
11958rm -f conftest.$ac_objext
11959if { (ac_try="$ac_compile"
11960case "(($ac_try" in
11961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11962 *) ac_try_echo=$ac_try;;
11963esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011965 (eval "$ac_compile") 2>conftest.er1
11966 ac_status=$?
11967 grep -v '^ *+' conftest.er1 >conftest.err
11968 rm -f conftest.er1
11969 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011971 (exit $ac_status); } && {
11972 test -z "$ac_c_werror_flag" ||
11973 test ! -s conftest.err
11974 } && test -s conftest.$ac_objext; then
11975 ac_hi=$ac_mid
11976else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011977 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011978sed 's/^/| /' conftest.$ac_ext >&5
11979
11980 ac_lo=`expr '(' $ac_mid ')' + 1`
11981fi
11982
11983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11984done
11985case $ac_lo in
11986?*) ac_cv_sizeof_long_double=$ac_lo;;
11987'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011988 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011989See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011990echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011992 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993 else
11994 ac_cv_sizeof_long_double=0
11995 fi ;;
11996esac
11997else
11998 cat >conftest.$ac_ext <<_ACEOF
11999/* confdefs.h. */
12000_ACEOF
12001cat confdefs.h >>conftest.$ac_ext
12002cat >>conftest.$ac_ext <<_ACEOF
12003/* end confdefs.h. */
12004$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012005 typedef long double ac__type_sizeof_;
12006static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12007static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008#include <stdio.h>
12009#include <stdlib.h>
12010int
12011main ()
12012{
12013
12014 FILE *f = fopen ("conftest.val", "w");
12015 if (! f)
12016 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012017 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012018 {
12019 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012020 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012021 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012022 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012023 }
12024 else
12025 {
12026 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012027 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012028 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012029 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012030 }
12031 return ferror (f) || fclose (f) != 0;
12032
12033 ;
12034 return 0;
12035}
12036_ACEOF
12037rm -f conftest$ac_exeext
12038if { (ac_try="$ac_link"
12039case "(($ac_try" in
12040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12041 *) ac_try_echo=$ac_try;;
12042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012044 (eval "$ac_link") 2>&5
12045 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12048 { (case "(($ac_try" in
12049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12050 *) ac_try_echo=$ac_try;;
12051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012053 (eval "$ac_try") 2>&5
12054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012056 (exit $ac_status); }; }; then
12057 ac_cv_sizeof_long_double=`cat conftest.val`
12058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012059 echo "$as_me: program exited with status $ac_status" >&5
12060echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012061sed 's/^/| /' conftest.$ac_ext >&5
12062
12063( exit $ac_status )
12064if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012065 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012066See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012067echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012068See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012069 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012070 else
12071 ac_cv_sizeof_long_double=0
12072 fi
12073fi
12074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12075fi
12076rm -f conftest.val
12077fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012078{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12079echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012080
12081
12082
12083cat >>confdefs.h <<_ACEOF
12084#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12085_ACEOF
12086
12087
12088fi
12089
12090
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012091{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12092echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012093have_c99_bool=no
12094cat >conftest.$ac_ext <<_ACEOF
12095/* confdefs.h. */
12096_ACEOF
12097cat confdefs.h >>conftest.$ac_ext
12098cat >>conftest.$ac_ext <<_ACEOF
12099/* end confdefs.h. */
12100
12101int
12102main ()
12103{
12104_Bool x; x = (_Bool)0;
12105 ;
12106 return 0;
12107}
12108_ACEOF
12109rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012110if { (ac_try="$ac_compile"
12111case "(($ac_try" in
12112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12113 *) ac_try_echo=$ac_try;;
12114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012117 ac_status=$?
12118 grep -v '^ *+' conftest.er1 >conftest.err
12119 rm -f conftest.er1
12120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122 (exit $ac_status); } && {
12123 test -z "$ac_c_werror_flag" ||
12124 test ! -s conftest.err
12125 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012126
12127
12128cat >>confdefs.h <<\_ACEOF
12129#define HAVE_C99_BOOL 1
12130_ACEOF
12131
12132 have_c99_bool=yes
12133
12134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012135 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012136sed 's/^/| /' conftest.$ac_ext >&5
12137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138
Thomas Woutersb2137042007-02-01 18:02:27 +000012139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140
12141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012142{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12143echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012144if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012145{ echo "$as_me:$LINENO: checking for _Bool" >&5
12146echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12147if test "${ac_cv_type__Bool+set}" = set; then
12148 echo $ECHO_N "(cached) $ECHO_C" >&6
12149else
12150 cat >conftest.$ac_ext <<_ACEOF
12151/* confdefs.h. */
12152_ACEOF
12153cat confdefs.h >>conftest.$ac_ext
12154cat >>conftest.$ac_ext <<_ACEOF
12155/* end confdefs.h. */
12156$ac_includes_default
12157typedef _Bool ac__type_new_;
12158int
12159main ()
12160{
12161if ((ac__type_new_ *) 0)
12162 return 0;
12163if (sizeof (ac__type_new_))
12164 return 0;
12165 ;
12166 return 0;
12167}
12168_ACEOF
12169rm -f conftest.$ac_objext
12170if { (ac_try="$ac_compile"
12171case "(($ac_try" in
12172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12173 *) ac_try_echo=$ac_try;;
12174esac
12175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12176 (eval "$ac_compile") 2>conftest.er1
12177 ac_status=$?
12178 grep -v '^ *+' conftest.er1 >conftest.err
12179 rm -f conftest.er1
12180 cat conftest.err >&5
12181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182 (exit $ac_status); } && {
12183 test -z "$ac_c_werror_flag" ||
12184 test ! -s conftest.err
12185 } && test -s conftest.$ac_objext; then
12186 ac_cv_type__Bool=yes
12187else
12188 echo "$as_me: failed program was:" >&5
12189sed 's/^/| /' conftest.$ac_ext >&5
12190
12191 ac_cv_type__Bool=no
12192fi
12193
12194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12195fi
12196{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12197echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199# The cast to long int works around a bug in the HP C Compiler
12200# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12201# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12202# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012203{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12204echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012205if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012206 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012207else
12208 if test "$cross_compiling" = yes; then
12209 # Depending upon the size, compute the lo and hi bounds.
12210cat >conftest.$ac_ext <<_ACEOF
12211/* confdefs.h. */
12212_ACEOF
12213cat confdefs.h >>conftest.$ac_ext
12214cat >>conftest.$ac_ext <<_ACEOF
12215/* end confdefs.h. */
12216$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012217 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012218int
12219main ()
12220{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012221static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012222test_array [0] = 0
12223
12224 ;
12225 return 0;
12226}
12227_ACEOF
12228rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229if { (ac_try="$ac_compile"
12230case "(($ac_try" in
12231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12232 *) ac_try_echo=$ac_try;;
12233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012236 ac_status=$?
12237 grep -v '^ *+' conftest.er1 >conftest.err
12238 rm -f conftest.er1
12239 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241 (exit $ac_status); } && {
12242 test -z "$ac_c_werror_flag" ||
12243 test ! -s conftest.err
12244 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012245 ac_lo=0 ac_mid=0
12246 while :; do
12247 cat >conftest.$ac_ext <<_ACEOF
12248/* confdefs.h. */
12249_ACEOF
12250cat confdefs.h >>conftest.$ac_ext
12251cat >>conftest.$ac_ext <<_ACEOF
12252/* end confdefs.h. */
12253$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012254 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012255int
12256main ()
12257{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012258static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012259test_array [0] = 0
12260
12261 ;
12262 return 0;
12263}
12264_ACEOF
12265rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266if { (ac_try="$ac_compile"
12267case "(($ac_try" in
12268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12269 *) ac_try_echo=$ac_try;;
12270esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012273 ac_status=$?
12274 grep -v '^ *+' conftest.er1 >conftest.err
12275 rm -f conftest.er1
12276 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278 (exit $ac_status); } && {
12279 test -z "$ac_c_werror_flag" ||
12280 test ! -s conftest.err
12281 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012282 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
12288 if test $ac_lo -le $ac_mid; then
12289 ac_lo= ac_hi=
12290 break
12291 fi
12292 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012294
12295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012296 done
12297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012298 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012299sed 's/^/| /' conftest.$ac_ext >&5
12300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012302/* confdefs.h. */
12303_ACEOF
12304cat confdefs.h >>conftest.$ac_ext
12305cat >>conftest.$ac_ext <<_ACEOF
12306/* end confdefs.h. */
12307$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012308 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012309int
12310main ()
12311{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012313test_array [0] = 0
12314
12315 ;
12316 return 0;
12317}
12318_ACEOF
12319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320if { (ac_try="$ac_compile"
12321case "(($ac_try" in
12322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12323 *) ac_try_echo=$ac_try;;
12324esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012327 ac_status=$?
12328 grep -v '^ *+' conftest.er1 >conftest.err
12329 rm -f conftest.er1
12330 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012332 (exit $ac_status); } && {
12333 test -z "$ac_c_werror_flag" ||
12334 test ! -s conftest.err
12335 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012336 ac_hi=-1 ac_mid=-1
12337 while :; do
12338 cat >conftest.$ac_ext <<_ACEOF
12339/* confdefs.h. */
12340_ACEOF
12341cat confdefs.h >>conftest.$ac_ext
12342cat >>conftest.$ac_ext <<_ACEOF
12343/* end confdefs.h. */
12344$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012345 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012346int
12347main ()
12348{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012350test_array [0] = 0
12351
12352 ;
12353 return 0;
12354}
12355_ACEOF
12356rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357if { (ac_try="$ac_compile"
12358case "(($ac_try" in
12359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12360 *) ac_try_echo=$ac_try;;
12361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012364 ac_status=$?
12365 grep -v '^ *+' conftest.er1 >conftest.err
12366 rm -f conftest.er1
12367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 (exit $ac_status); } && {
12370 test -z "$ac_c_werror_flag" ||
12371 test ! -s conftest.err
12372 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012373 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
12379 if test $ac_mid -le $ac_hi; then
12380 ac_lo= ac_hi=
12381 break
12382 fi
12383 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385
12386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012387 done
12388else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012389 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012390sed 's/^/| /' conftest.$ac_ext >&5
12391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394
12395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397
12398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012399# Binary search between lo and hi bounds.
12400while test "x$ac_lo" != "x$ac_hi"; do
12401 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12402 cat >conftest.$ac_ext <<_ACEOF
12403/* confdefs.h. */
12404_ACEOF
12405cat confdefs.h >>conftest.$ac_ext
12406cat >>conftest.$ac_ext <<_ACEOF
12407/* end confdefs.h. */
12408$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012409 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012410int
12411main ()
12412{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012413static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012414test_array [0] = 0
12415
12416 ;
12417 return 0;
12418}
12419_ACEOF
12420rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421if { (ac_try="$ac_compile"
12422case "(($ac_try" in
12423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12424 *) ac_try_echo=$ac_try;;
12425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012428 ac_status=$?
12429 grep -v '^ *+' conftest.er1 >conftest.err
12430 rm -f conftest.er1
12431 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 (exit $ac_status); } && {
12434 test -z "$ac_c_werror_flag" ||
12435 test ! -s conftest.err
12436 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012437 ac_hi=$ac_mid
12438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012439 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012440sed 's/^/| /' conftest.$ac_ext >&5
12441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444
12445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012446done
12447case $ac_lo in
12448?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012450 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012451See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012452echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012453See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012454 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455 else
12456 ac_cv_sizeof__Bool=0
12457 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012458esac
12459else
12460 cat >conftest.$ac_ext <<_ACEOF
12461/* confdefs.h. */
12462_ACEOF
12463cat confdefs.h >>conftest.$ac_ext
12464cat >>conftest.$ac_ext <<_ACEOF
12465/* end confdefs.h. */
12466$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012467 typedef _Bool ac__type_sizeof_;
12468static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12469static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012470#include <stdio.h>
12471#include <stdlib.h>
12472int
12473main ()
12474{
12475
12476 FILE *f = fopen ("conftest.val", "w");
12477 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012479 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012480 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012482 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012484 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012485 }
12486 else
12487 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012489 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012491 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012492 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012494
12495 ;
12496 return 0;
12497}
12498_ACEOF
12499rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500if { (ac_try="$ac_link"
12501case "(($ac_try" in
12502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12503 *) ac_try_echo=$ac_try;;
12504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012507 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012509 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510 { (case "(($ac_try" in
12511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12512 *) ac_try_echo=$ac_try;;
12513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012516 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012518 (exit $ac_status); }; }; then
12519 ac_cv_sizeof__Bool=`cat conftest.val`
12520else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012521 echo "$as_me: program exited with status $ac_status" >&5
12522echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012523sed 's/^/| /' conftest.$ac_ext >&5
12524
12525( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012528See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012530See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012531 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532 else
12533 ac_cv_sizeof__Bool=0
12534 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536rm -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 +000012537fi
12538rm -f conftest.val
12539fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012540{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12541echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542
12543
12544
Thomas Woutersb2137042007-02-01 18:02:27 +000012545cat >>confdefs.h <<_ACEOF
12546#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12547_ACEOF
12548
12549
12550fi
12551
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012552{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12553echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012554if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012555 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012556else
12557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012558/* confdefs.h. */
12559_ACEOF
12560cat confdefs.h >>conftest.$ac_ext
12561cat >>conftest.$ac_ext <<_ACEOF
12562/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012563#ifdef HAVE_STDINT_H
12564 #include <stdint.h>
12565 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012566
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012567typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012568int
12569main ()
12570{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012571if ((ac__type_new_ *) 0)
12572 return 0;
12573if (sizeof (ac__type_new_))
12574 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 ;
12576 return 0;
12577}
12578_ACEOF
12579rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580if { (ac_try="$ac_compile"
12581case "(($ac_try" in
12582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12583 *) ac_try_echo=$ac_try;;
12584esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012588 grep -v '^ *+' conftest.er1 >conftest.err
12589 rm -f conftest.er1
12590 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592 (exit $ac_status); } && {
12593 test -z "$ac_c_werror_flag" ||
12594 test ! -s conftest.err
12595 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012596 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012599sed 's/^/| /' conftest.$ac_ext >&5
12600
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012601 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603
12604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012605fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012606{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12607echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12608if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012609
12610cat >>confdefs.h <<_ACEOF
12611#define HAVE_UINTPTR_T 1
12612_ACEOF
12613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012614{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12615echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12616if test "${ac_cv_type_uintptr_t+set}" = set; then
12617 echo $ECHO_N "(cached) $ECHO_C" >&6
12618else
12619 cat >conftest.$ac_ext <<_ACEOF
12620/* confdefs.h. */
12621_ACEOF
12622cat confdefs.h >>conftest.$ac_ext
12623cat >>conftest.$ac_ext <<_ACEOF
12624/* end confdefs.h. */
12625$ac_includes_default
12626typedef uintptr_t ac__type_new_;
12627int
12628main ()
12629{
12630if ((ac__type_new_ *) 0)
12631 return 0;
12632if (sizeof (ac__type_new_))
12633 return 0;
12634 ;
12635 return 0;
12636}
12637_ACEOF
12638rm -f conftest.$ac_objext
12639if { (ac_try="$ac_compile"
12640case "(($ac_try" in
12641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12642 *) ac_try_echo=$ac_try;;
12643esac
12644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12645 (eval "$ac_compile") 2>conftest.er1
12646 ac_status=$?
12647 grep -v '^ *+' conftest.er1 >conftest.err
12648 rm -f conftest.er1
12649 cat conftest.err >&5
12650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12651 (exit $ac_status); } && {
12652 test -z "$ac_c_werror_flag" ||
12653 test ! -s conftest.err
12654 } && test -s conftest.$ac_objext; then
12655 ac_cv_type_uintptr_t=yes
12656else
12657 echo "$as_me: failed program was:" >&5
12658sed 's/^/| /' conftest.$ac_ext >&5
12659
12660 ac_cv_type_uintptr_t=no
12661fi
12662
12663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12664fi
12665{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12666echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668# The cast to long int works around a bug in the HP C Compiler
12669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12671# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012672{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12673echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012674if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012675 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012676else
Martin v. Löwis11437992002-04-12 09:54:03 +000012677 if test "$cross_compiling" = yes; then
12678 # Depending upon the size, compute the lo and hi bounds.
12679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* confdefs.h. */
12681_ACEOF
12682cat confdefs.h >>conftest.$ac_ext
12683cat >>conftest.$ac_ext <<_ACEOF
12684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012685$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012686 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012687int
12688main ()
12689{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012691test_array [0] = 0
12692
12693 ;
12694 return 0;
12695}
12696_ACEOF
12697rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698if { (ac_try="$ac_compile"
12699case "(($ac_try" in
12700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12701 *) ac_try_echo=$ac_try;;
12702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012706 grep -v '^ *+' conftest.er1 >conftest.err
12707 rm -f conftest.er1
12708 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710 (exit $ac_status); } && {
12711 test -z "$ac_c_werror_flag" ||
12712 test ! -s conftest.err
12713 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ac_lo=0 ac_mid=0
12715 while :; do
12716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012717/* confdefs.h. */
12718_ACEOF
12719cat confdefs.h >>conftest.$ac_ext
12720cat >>conftest.$ac_ext <<_ACEOF
12721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012722$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012723 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012724int
12725main ()
12726{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012727static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012728test_array [0] = 0
12729
12730 ;
12731 return 0;
12732}
12733_ACEOF
12734rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735if { (ac_try="$ac_compile"
12736case "(($ac_try" in
12737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12738 *) ac_try_echo=$ac_try;;
12739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012743 grep -v '^ *+' conftest.er1 >conftest.err
12744 rm -f conftest.er1
12745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747 (exit $ac_status); } && {
12748 test -z "$ac_c_werror_flag" ||
12749 test ! -s conftest.err
12750 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
12757 if test $ac_lo -le $ac_mid; then
12758 ac_lo= ac_hi=
12759 break
12760 fi
12761 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763
12764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 done
12766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012768sed 's/^/| /' conftest.$ac_ext >&5
12769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* confdefs.h. */
12772_ACEOF
12773cat confdefs.h >>conftest.$ac_ext
12774cat >>conftest.$ac_ext <<_ACEOF
12775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012776$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012777 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012778int
12779main ()
12780{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012782test_array [0] = 0
12783
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789if { (ac_try="$ac_compile"
12790case "(($ac_try" in
12791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12792 *) ac_try_echo=$ac_try;;
12793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012797 grep -v '^ *+' conftest.er1 >conftest.err
12798 rm -f conftest.er1
12799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801 (exit $ac_status); } && {
12802 test -z "$ac_c_werror_flag" ||
12803 test ! -s conftest.err
12804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_hi=-1 ac_mid=-1
12806 while :; do
12807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012808/* confdefs.h. */
12809_ACEOF
12810cat confdefs.h >>conftest.$ac_ext
12811cat >>conftest.$ac_ext <<_ACEOF
12812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012813$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012814 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012815int
12816main ()
12817{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012819test_array [0] = 0
12820
12821 ;
12822 return 0;
12823}
12824_ACEOF
12825rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826if { (ac_try="$ac_compile"
12827case "(($ac_try" in
12828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12829 *) ac_try_echo=$ac_try;;
12830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012834 grep -v '^ *+' conftest.er1 >conftest.err
12835 rm -f conftest.er1
12836 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838 (exit $ac_status); } && {
12839 test -z "$ac_c_werror_flag" ||
12840 test ! -s conftest.err
12841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
12848 if test $ac_mid -le $ac_hi; then
12849 ac_lo= ac_hi=
12850 break
12851 fi
12852 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854
12855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 done
12857else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012859sed 's/^/| /' conftest.$ac_ext >&5
12860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863
12864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866
12867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012868# Binary search between lo and hi bounds.
12869while test "x$ac_lo" != "x$ac_hi"; do
12870 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012872/* confdefs.h. */
12873_ACEOF
12874cat confdefs.h >>conftest.$ac_ext
12875cat >>conftest.$ac_ext <<_ACEOF
12876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012878 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012879int
12880main ()
12881{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012882static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012883test_array [0] = 0
12884
12885 ;
12886 return 0;
12887}
12888_ACEOF
12889rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890if { (ac_try="$ac_compile"
12891case "(($ac_try" in
12892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12893 *) ac_try_echo=$ac_try;;
12894esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012898 grep -v '^ *+' conftest.er1 >conftest.err
12899 rm -f conftest.er1
12900 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902 (exit $ac_status); } && {
12903 test -z "$ac_c_werror_flag" ||
12904 test ! -s conftest.err
12905 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ac_hi=$ac_mid
12907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012909sed 's/^/| /' conftest.$ac_ext >&5
12910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913
12914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012915done
12916case $ac_lo in
12917?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012920See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012921echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012922See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012923 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924 else
12925 ac_cv_sizeof_uintptr_t=0
12926 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012927esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012928else
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012930/* confdefs.h. */
12931_ACEOF
12932cat confdefs.h >>conftest.$ac_ext
12933cat >>conftest.$ac_ext <<_ACEOF
12934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012935$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012936 typedef uintptr_t ac__type_sizeof_;
12937static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12938static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012939#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012940#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012941int
12942main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012943{
Martin v. Löwis11437992002-04-12 09:54:03 +000012944
12945 FILE *f = fopen ("conftest.val", "w");
12946 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012948 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012951 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012953 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 }
12955 else
12956 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012958 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012960 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012963
12964 ;
12965 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012966}
Martin v. Löwis11437992002-04-12 09:54:03 +000012967_ACEOF
12968rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969if { (ac_try="$ac_link"
12970case "(($ac_try" in
12971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12972 *) ac_try_echo=$ac_try;;
12973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012975 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979 { (case "(($ac_try" in
12980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12981 *) ac_try_echo=$ac_try;;
12982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 (exit $ac_status); }; }; then
12988 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012990 echo "$as_me: program exited with status $ac_status" >&5
12991echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012992sed 's/^/| /' conftest.$ac_ext >&5
12993
Martin v. Löwis11437992002-04-12 09:54:03 +000012994( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012996 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012997See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012998echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012999See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013000 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001 else
13002 ac_cv_sizeof_uintptr_t=0
13003 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005rm -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 +000013006fi
13007rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013008fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013009{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13010echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011
13012
13013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013015#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013016_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013017
Michael W. Hudson54241132001-12-07 15:38:26 +000013018
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013019fi
13020
Thomas Wouters89f507f2006-12-13 04:49:30 +000013021
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013022{ echo "$as_me:$LINENO: checking for off_t" >&5
13023echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13024if test "${ac_cv_type_off_t+set}" = set; then
13025 echo $ECHO_N "(cached) $ECHO_C" >&6
13026else
13027 cat >conftest.$ac_ext <<_ACEOF
13028/* confdefs.h. */
13029_ACEOF
13030cat confdefs.h >>conftest.$ac_ext
13031cat >>conftest.$ac_ext <<_ACEOF
13032/* end confdefs.h. */
13033
13034#ifdef HAVE_SYS_TYPES_H
13035#include <sys/types.h>
13036#endif
13037
13038
13039typedef off_t ac__type_new_;
13040int
13041main ()
13042{
13043if ((ac__type_new_ *) 0)
13044 return 0;
13045if (sizeof (ac__type_new_))
13046 return 0;
13047 ;
13048 return 0;
13049}
13050_ACEOF
13051rm -f conftest.$ac_objext
13052if { (ac_try="$ac_compile"
13053case "(($ac_try" in
13054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13055 *) ac_try_echo=$ac_try;;
13056esac
13057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13058 (eval "$ac_compile") 2>conftest.er1
13059 ac_status=$?
13060 grep -v '^ *+' conftest.er1 >conftest.err
13061 rm -f conftest.er1
13062 cat conftest.err >&5
13063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13064 (exit $ac_status); } && {
13065 test -z "$ac_c_werror_flag" ||
13066 test ! -s conftest.err
13067 } && test -s conftest.$ac_objext; then
13068 ac_cv_type_off_t=yes
13069else
13070 echo "$as_me: failed program was:" >&5
13071sed 's/^/| /' conftest.$ac_ext >&5
13072
13073 ac_cv_type_off_t=no
13074fi
13075
13076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13077fi
13078{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13079echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13080
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013081# The cast to long int works around a bug in the HP C Compiler
13082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13084# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013085{ echo "$as_me:$LINENO: checking size of off_t" >&5
13086echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013087if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013088 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013089else
13090 if test "$cross_compiling" = yes; then
13091 # Depending upon the size, compute the lo and hi bounds.
13092cat >conftest.$ac_ext <<_ACEOF
13093/* confdefs.h. */
13094_ACEOF
13095cat confdefs.h >>conftest.$ac_ext
13096cat >>conftest.$ac_ext <<_ACEOF
13097/* end confdefs.h. */
13098
13099#ifdef HAVE_SYS_TYPES_H
13100#include <sys/types.h>
13101#endif
13102
13103
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013104 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013105int
13106main ()
13107{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109test_array [0] = 0
13110
13111 ;
13112 return 0;
13113}
13114_ACEOF
13115rm -f conftest.$ac_objext
13116if { (ac_try="$ac_compile"
13117case "(($ac_try" in
13118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13119 *) ac_try_echo=$ac_try;;
13120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122 (eval "$ac_compile") 2>conftest.er1
13123 ac_status=$?
13124 grep -v '^ *+' conftest.er1 >conftest.err
13125 rm -f conftest.er1
13126 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128 (exit $ac_status); } && {
13129 test -z "$ac_c_werror_flag" ||
13130 test ! -s conftest.err
13131 } && test -s conftest.$ac_objext; then
13132 ac_lo=0 ac_mid=0
13133 while :; do
13134 cat >conftest.$ac_ext <<_ACEOF
13135/* confdefs.h. */
13136_ACEOF
13137cat confdefs.h >>conftest.$ac_ext
13138cat >>conftest.$ac_ext <<_ACEOF
13139/* end confdefs.h. */
13140
13141#ifdef HAVE_SYS_TYPES_H
13142#include <sys/types.h>
13143#endif
13144
13145
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013146 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147int
13148main ()
13149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013150static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013151test_array [0] = 0
13152
13153 ;
13154 return 0;
13155}
13156_ACEOF
13157rm -f conftest.$ac_objext
13158if { (ac_try="$ac_compile"
13159case "(($ac_try" in
13160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13161 *) ac_try_echo=$ac_try;;
13162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013164 (eval "$ac_compile") 2>conftest.er1
13165 ac_status=$?
13166 grep -v '^ *+' conftest.er1 >conftest.err
13167 rm -f conftest.er1
13168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013170 (exit $ac_status); } && {
13171 test -z "$ac_c_werror_flag" ||
13172 test ! -s conftest.err
13173 } && test -s conftest.$ac_objext; then
13174 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
13180 if test $ac_lo -le $ac_mid; then
13181 ac_lo= ac_hi=
13182 break
13183 fi
13184 ac_mid=`expr 2 '*' $ac_mid + 1`
13185fi
13186
13187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13188 done
13189else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013190 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013191sed 's/^/| /' conftest.$ac_ext >&5
13192
13193 cat >conftest.$ac_ext <<_ACEOF
13194/* confdefs.h. */
13195_ACEOF
13196cat confdefs.h >>conftest.$ac_ext
13197cat >>conftest.$ac_ext <<_ACEOF
13198/* end confdefs.h. */
13199
13200#ifdef HAVE_SYS_TYPES_H
13201#include <sys/types.h>
13202#endif
13203
13204
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013205 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013206int
13207main ()
13208{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013210test_array [0] = 0
13211
13212 ;
13213 return 0;
13214}
13215_ACEOF
13216rm -f conftest.$ac_objext
13217if { (ac_try="$ac_compile"
13218case "(($ac_try" in
13219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13220 *) ac_try_echo=$ac_try;;
13221esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013223 (eval "$ac_compile") 2>conftest.er1
13224 ac_status=$?
13225 grep -v '^ *+' conftest.er1 >conftest.err
13226 rm -f conftest.er1
13227 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013229 (exit $ac_status); } && {
13230 test -z "$ac_c_werror_flag" ||
13231 test ! -s conftest.err
13232 } && test -s conftest.$ac_objext; then
13233 ac_hi=-1 ac_mid=-1
13234 while :; do
13235 cat >conftest.$ac_ext <<_ACEOF
13236/* confdefs.h. */
13237_ACEOF
13238cat confdefs.h >>conftest.$ac_ext
13239cat >>conftest.$ac_ext <<_ACEOF
13240/* end confdefs.h. */
13241
13242#ifdef HAVE_SYS_TYPES_H
13243#include <sys/types.h>
13244#endif
13245
13246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013247 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248int
13249main ()
13250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013252test_array [0] = 0
13253
13254 ;
13255 return 0;
13256}
13257_ACEOF
13258rm -f conftest.$ac_objext
13259if { (ac_try="$ac_compile"
13260case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265 (eval "$ac_compile") 2>conftest.er1
13266 ac_status=$?
13267 grep -v '^ *+' conftest.er1 >conftest.err
13268 rm -f conftest.er1
13269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271 (exit $ac_status); } && {
13272 test -z "$ac_c_werror_flag" ||
13273 test ! -s conftest.err
13274 } && test -s conftest.$ac_objext; then
13275 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
13281 if test $ac_mid -le $ac_hi; then
13282 ac_lo= ac_hi=
13283 break
13284 fi
13285 ac_mid=`expr 2 '*' $ac_mid`
13286fi
13287
13288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13289 done
13290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013291 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013292sed 's/^/| /' conftest.$ac_ext >&5
13293
13294 ac_lo= ac_hi=
13295fi
13296
13297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13298fi
13299
13300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13301# Binary search between lo and hi bounds.
13302while test "x$ac_lo" != "x$ac_hi"; do
13303 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13304 cat >conftest.$ac_ext <<_ACEOF
13305/* confdefs.h. */
13306_ACEOF
13307cat confdefs.h >>conftest.$ac_ext
13308cat >>conftest.$ac_ext <<_ACEOF
13309/* end confdefs.h. */
13310
13311#ifdef HAVE_SYS_TYPES_H
13312#include <sys/types.h>
13313#endif
13314
13315
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013316 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013317int
13318main ()
13319{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013321test_array [0] = 0
13322
13323 ;
13324 return 0;
13325}
13326_ACEOF
13327rm -f conftest.$ac_objext
13328if { (ac_try="$ac_compile"
13329case "(($ac_try" in
13330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13331 *) ac_try_echo=$ac_try;;
13332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334 (eval "$ac_compile") 2>conftest.er1
13335 ac_status=$?
13336 grep -v '^ *+' conftest.er1 >conftest.err
13337 rm -f conftest.er1
13338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013340 (exit $ac_status); } && {
13341 test -z "$ac_c_werror_flag" ||
13342 test ! -s conftest.err
13343 } && test -s conftest.$ac_objext; then
13344 ac_hi=$ac_mid
13345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013346 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013347sed 's/^/| /' conftest.$ac_ext >&5
13348
13349 ac_lo=`expr '(' $ac_mid ')' + 1`
13350fi
13351
13352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13353done
13354case $ac_lo in
13355?*) ac_cv_sizeof_off_t=$ac_lo;;
13356'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013357 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013358See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013359echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013361 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013362 else
13363 ac_cv_sizeof_off_t=0
13364 fi ;;
13365esac
13366else
13367 cat >conftest.$ac_ext <<_ACEOF
13368/* confdefs.h. */
13369_ACEOF
13370cat confdefs.h >>conftest.$ac_ext
13371cat >>conftest.$ac_ext <<_ACEOF
13372/* end confdefs.h. */
13373
13374#ifdef HAVE_SYS_TYPES_H
13375#include <sys/types.h>
13376#endif
13377
13378
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013379 typedef off_t ac__type_sizeof_;
13380static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13381static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013382#include <stdio.h>
13383#include <stdlib.h>
13384int
13385main ()
13386{
13387
13388 FILE *f = fopen ("conftest.val", "w");
13389 if (! f)
13390 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013391 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392 {
13393 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013394 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013395 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013396 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013397 }
13398 else
13399 {
13400 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013401 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013404 }
13405 return ferror (f) || fclose (f) != 0;
13406
13407 ;
13408 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013409}
Martin v. Löwis11437992002-04-12 09:54:03 +000013410_ACEOF
13411rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412if { (ac_try="$ac_link"
13413case "(($ac_try" in
13414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13415 *) ac_try_echo=$ac_try;;
13416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422 { (case "(($ac_try" in
13423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13424 *) ac_try_echo=$ac_try;;
13425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013428 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013431 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013433 echo "$as_me: program exited with status $ac_status" >&5
13434echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013435sed 's/^/| /' conftest.$ac_ext >&5
13436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013438if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013439 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013441echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013442See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013443 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013444 else
13445 ac_cv_sizeof_off_t=0
13446 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013448rm -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 +000013449fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013450rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013451fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013452{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13453echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013455
13456
Martin v. Löwis11437992002-04-12 09:54:03 +000013457cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013458#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013459_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013460
Michael W. Hudson54241132001-12-07 15:38:26 +000013461
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013462
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013463{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13464echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013465if test "$have_long_long" = yes
13466then
13467if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013468 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470cat >>confdefs.h <<\_ACEOF
13471#define HAVE_LARGEFILE_SUPPORT 1
13472_ACEOF
13473
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013474 { echo "$as_me:$LINENO: result: yes" >&5
13475echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013476else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013477 { echo "$as_me:$LINENO: result: no" >&5
13478echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013479fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013480else
13481 { echo "$as_me:$LINENO: result: no" >&5
13482echo "${ECHO_T}no" >&6; }
13483fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013484
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013485{ echo "$as_me:$LINENO: checking for time_t" >&5
13486echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13487if test "${ac_cv_type_time_t+set}" = set; then
13488 echo $ECHO_N "(cached) $ECHO_C" >&6
13489else
13490 cat >conftest.$ac_ext <<_ACEOF
13491/* confdefs.h. */
13492_ACEOF
13493cat confdefs.h >>conftest.$ac_ext
13494cat >>conftest.$ac_ext <<_ACEOF
13495/* end confdefs.h. */
13496
13497#ifdef HAVE_SYS_TYPES_H
13498#include <sys/types.h>
13499#endif
13500#ifdef HAVE_TIME_H
13501#include <time.h>
13502#endif
13503
13504
13505typedef time_t ac__type_new_;
13506int
13507main ()
13508{
13509if ((ac__type_new_ *) 0)
13510 return 0;
13511if (sizeof (ac__type_new_))
13512 return 0;
13513 ;
13514 return 0;
13515}
13516_ACEOF
13517rm -f conftest.$ac_objext
13518if { (ac_try="$ac_compile"
13519case "(($ac_try" in
13520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13521 *) ac_try_echo=$ac_try;;
13522esac
13523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13524 (eval "$ac_compile") 2>conftest.er1
13525 ac_status=$?
13526 grep -v '^ *+' conftest.er1 >conftest.err
13527 rm -f conftest.er1
13528 cat conftest.err >&5
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); } && {
13531 test -z "$ac_c_werror_flag" ||
13532 test ! -s conftest.err
13533 } && test -s conftest.$ac_objext; then
13534 ac_cv_type_time_t=yes
13535else
13536 echo "$as_me: failed program was:" >&5
13537sed 's/^/| /' conftest.$ac_ext >&5
13538
13539 ac_cv_type_time_t=no
13540fi
13541
13542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13543fi
13544{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13545echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13546
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013547# The cast to long int works around a bug in the HP C Compiler
13548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13550# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013551{ echo "$as_me:$LINENO: checking size of time_t" >&5
13552echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013553if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013554 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013555else
13556 if test "$cross_compiling" = yes; then
13557 # Depending upon the size, compute the lo and hi bounds.
13558cat >conftest.$ac_ext <<_ACEOF
13559/* confdefs.h. */
13560_ACEOF
13561cat confdefs.h >>conftest.$ac_ext
13562cat >>conftest.$ac_ext <<_ACEOF
13563/* end confdefs.h. */
13564
13565#ifdef HAVE_SYS_TYPES_H
13566#include <sys/types.h>
13567#endif
13568#ifdef HAVE_TIME_H
13569#include <time.h>
13570#endif
13571
13572
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013573 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013574int
13575main ()
13576{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013578test_array [0] = 0
13579
13580 ;
13581 return 0;
13582}
13583_ACEOF
13584rm -f conftest.$ac_objext
13585if { (ac_try="$ac_compile"
13586case "(($ac_try" in
13587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13588 *) ac_try_echo=$ac_try;;
13589esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013591 (eval "$ac_compile") 2>conftest.er1
13592 ac_status=$?
13593 grep -v '^ *+' conftest.er1 >conftest.err
13594 rm -f conftest.er1
13595 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013597 (exit $ac_status); } && {
13598 test -z "$ac_c_werror_flag" ||
13599 test ! -s conftest.err
13600 } && test -s conftest.$ac_objext; then
13601 ac_lo=0 ac_mid=0
13602 while :; do
13603 cat >conftest.$ac_ext <<_ACEOF
13604/* confdefs.h. */
13605_ACEOF
13606cat confdefs.h >>conftest.$ac_ext
13607cat >>conftest.$ac_ext <<_ACEOF
13608/* end confdefs.h. */
13609
13610#ifdef HAVE_SYS_TYPES_H
13611#include <sys/types.h>
13612#endif
13613#ifdef HAVE_TIME_H
13614#include <time.h>
13615#endif
13616
13617
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013618 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013619int
13620main ()
13621{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013623test_array [0] = 0
13624
13625 ;
13626 return 0;
13627}
13628_ACEOF
13629rm -f conftest.$ac_objext
13630if { (ac_try="$ac_compile"
13631case "(($ac_try" in
13632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13633 *) ac_try_echo=$ac_try;;
13634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013636 (eval "$ac_compile") 2>conftest.er1
13637 ac_status=$?
13638 grep -v '^ *+' conftest.er1 >conftest.err
13639 rm -f conftest.er1
13640 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013642 (exit $ac_status); } && {
13643 test -z "$ac_c_werror_flag" ||
13644 test ! -s conftest.err
13645 } && test -s conftest.$ac_objext; then
13646 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
13652 if test $ac_lo -le $ac_mid; then
13653 ac_lo= ac_hi=
13654 break
13655 fi
13656 ac_mid=`expr 2 '*' $ac_mid + 1`
13657fi
13658
13659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660 done
13661else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013662 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013663sed 's/^/| /' conftest.$ac_ext >&5
13664
13665 cat >conftest.$ac_ext <<_ACEOF
13666/* confdefs.h. */
13667_ACEOF
13668cat confdefs.h >>conftest.$ac_ext
13669cat >>conftest.$ac_ext <<_ACEOF
13670/* end confdefs.h. */
13671
13672#ifdef HAVE_SYS_TYPES_H
13673#include <sys/types.h>
13674#endif
13675#ifdef HAVE_TIME_H
13676#include <time.h>
13677#endif
13678
13679
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013680 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013681int
13682main ()
13683{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013684static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013685test_array [0] = 0
13686
13687 ;
13688 return 0;
13689}
13690_ACEOF
13691rm -f conftest.$ac_objext
13692if { (ac_try="$ac_compile"
13693case "(($ac_try" in
13694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13695 *) ac_try_echo=$ac_try;;
13696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013698 (eval "$ac_compile") 2>conftest.er1
13699 ac_status=$?
13700 grep -v '^ *+' conftest.er1 >conftest.err
13701 rm -f conftest.er1
13702 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013704 (exit $ac_status); } && {
13705 test -z "$ac_c_werror_flag" ||
13706 test ! -s conftest.err
13707 } && test -s conftest.$ac_objext; then
13708 ac_hi=-1 ac_mid=-1
13709 while :; do
13710 cat >conftest.$ac_ext <<_ACEOF
13711/* confdefs.h. */
13712_ACEOF
13713cat confdefs.h >>conftest.$ac_ext
13714cat >>conftest.$ac_ext <<_ACEOF
13715/* end confdefs.h. */
13716
13717#ifdef HAVE_SYS_TYPES_H
13718#include <sys/types.h>
13719#endif
13720#ifdef HAVE_TIME_H
13721#include <time.h>
13722#endif
13723
13724
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013725 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013726int
13727main ()
13728{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013730test_array [0] = 0
13731
13732 ;
13733 return 0;
13734}
13735_ACEOF
13736rm -f conftest.$ac_objext
13737if { (ac_try="$ac_compile"
13738case "(($ac_try" in
13739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13740 *) ac_try_echo=$ac_try;;
13741esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013743 (eval "$ac_compile") 2>conftest.er1
13744 ac_status=$?
13745 grep -v '^ *+' conftest.er1 >conftest.err
13746 rm -f conftest.er1
13747 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013749 (exit $ac_status); } && {
13750 test -z "$ac_c_werror_flag" ||
13751 test ! -s conftest.err
13752 } && test -s conftest.$ac_objext; then
13753 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
13759 if test $ac_mid -le $ac_hi; then
13760 ac_lo= ac_hi=
13761 break
13762 fi
13763 ac_mid=`expr 2 '*' $ac_mid`
13764fi
13765
13766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767 done
13768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013769 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770sed 's/^/| /' conftest.$ac_ext >&5
13771
13772 ac_lo= ac_hi=
13773fi
13774
13775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13776fi
13777
13778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13779# Binary search between lo and hi bounds.
13780while test "x$ac_lo" != "x$ac_hi"; do
13781 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13782 cat >conftest.$ac_ext <<_ACEOF
13783/* confdefs.h. */
13784_ACEOF
13785cat confdefs.h >>conftest.$ac_ext
13786cat >>conftest.$ac_ext <<_ACEOF
13787/* end confdefs.h. */
13788
13789#ifdef HAVE_SYS_TYPES_H
13790#include <sys/types.h>
13791#endif
13792#ifdef HAVE_TIME_H
13793#include <time.h>
13794#endif
13795
13796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013797 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013798int
13799main ()
13800{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013802test_array [0] = 0
13803
13804 ;
13805 return 0;
13806}
13807_ACEOF
13808rm -f conftest.$ac_objext
13809if { (ac_try="$ac_compile"
13810case "(($ac_try" in
13811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13812 *) ac_try_echo=$ac_try;;
13813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013815 (eval "$ac_compile") 2>conftest.er1
13816 ac_status=$?
13817 grep -v '^ *+' conftest.er1 >conftest.err
13818 rm -f conftest.er1
13819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013821 (exit $ac_status); } && {
13822 test -z "$ac_c_werror_flag" ||
13823 test ! -s conftest.err
13824 } && test -s conftest.$ac_objext; then
13825 ac_hi=$ac_mid
13826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013827 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013828sed 's/^/| /' conftest.$ac_ext >&5
13829
13830 ac_lo=`expr '(' $ac_mid ')' + 1`
13831fi
13832
13833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13834done
13835case $ac_lo in
13836?*) ac_cv_sizeof_time_t=$ac_lo;;
13837'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013838 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013839See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013840echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013841See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013842 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013843 else
13844 ac_cv_sizeof_time_t=0
13845 fi ;;
13846esac
13847else
13848 cat >conftest.$ac_ext <<_ACEOF
13849/* confdefs.h. */
13850_ACEOF
13851cat confdefs.h >>conftest.$ac_ext
13852cat >>conftest.$ac_ext <<_ACEOF
13853/* end confdefs.h. */
13854
13855#ifdef HAVE_SYS_TYPES_H
13856#include <sys/types.h>
13857#endif
13858#ifdef HAVE_TIME_H
13859#include <time.h>
13860#endif
13861
13862
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013863 typedef time_t ac__type_sizeof_;
13864static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13865static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013866#include <stdio.h>
13867#include <stdlib.h>
13868int
13869main ()
13870{
13871
13872 FILE *f = fopen ("conftest.val", "w");
13873 if (! f)
13874 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013875 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013876 {
13877 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013878 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013879 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013880 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013881 }
13882 else
13883 {
13884 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013885 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013886 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013887 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013888 }
13889 return ferror (f) || fclose (f) != 0;
13890
13891 ;
13892 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013893}
Martin v. Löwis11437992002-04-12 09:54:03 +000013894_ACEOF
13895rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013896if { (ac_try="$ac_link"
13897case "(($ac_try" in
13898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13899 *) ac_try_echo=$ac_try;;
13900esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906 { (case "(($ac_try" in
13907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13908 *) ac_try_echo=$ac_try;;
13909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013917 echo "$as_me: program exited with status $ac_status" >&5
13918echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013919sed 's/^/| /' conftest.$ac_ext >&5
13920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013922if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013923 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013924See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013926See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013927 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013928 else
13929 ac_cv_sizeof_time_t=0
13930 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932rm -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 +000013933fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013934rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013935fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013936{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13937echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013939
13940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013942#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013943_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013944
Michael W. Hudson54241132001-12-07 15:38:26 +000013945
13946
Trent Mick635f6fb2000-08-23 21:33:05 +000013947# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013948ac_save_cc="$CC"
13949if test "$ac_cv_kpthread" = "yes"
13950then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013951elif test "$ac_cv_kthread" = "yes"
13952then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013953elif test "$ac_cv_pthread" = "yes"
13954then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013955fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013956
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013957{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13958echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013959have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013961/* confdefs.h. */
13962_ACEOF
13963cat confdefs.h >>conftest.$ac_ext
13964cat >>conftest.$ac_ext <<_ACEOF
13965/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013966#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013967int
13968main ()
13969{
Guido van Rossum12580492000-09-24 16:47:19 +000013970pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 ;
13972 return 0;
13973}
13974_ACEOF
13975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976if { (ac_try="$ac_compile"
13977case "(($ac_try" in
13978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13979 *) ac_try_echo=$ac_try;;
13980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013984 grep -v '^ *+' conftest.er1 >conftest.err
13985 rm -f conftest.er1
13986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988 (exit $ac_status); } && {
13989 test -z "$ac_c_werror_flag" ||
13990 test ! -s conftest.err
13991 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013992 have_pthread_t=yes
13993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013995sed 's/^/| /' conftest.$ac_ext >&5
13996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013997
Trent Mick635f6fb2000-08-23 21:33:05 +000013998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999
14000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014001{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14002echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014003if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014004 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14005echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14006if test "${ac_cv_type_pthread_t+set}" = set; then
14007 echo $ECHO_N "(cached) $ECHO_C" >&6
14008else
14009 cat >conftest.$ac_ext <<_ACEOF
14010/* confdefs.h. */
14011_ACEOF
14012cat confdefs.h >>conftest.$ac_ext
14013cat >>conftest.$ac_ext <<_ACEOF
14014/* end confdefs.h. */
14015
14016#ifdef HAVE_PTHREAD_H
14017#include <pthread.h>
14018#endif
14019
14020
14021typedef pthread_t ac__type_new_;
14022int
14023main ()
14024{
14025if ((ac__type_new_ *) 0)
14026 return 0;
14027if (sizeof (ac__type_new_))
14028 return 0;
14029 ;
14030 return 0;
14031}
14032_ACEOF
14033rm -f conftest.$ac_objext
14034if { (ac_try="$ac_compile"
14035case "(($ac_try" in
14036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14037 *) ac_try_echo=$ac_try;;
14038esac
14039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14040 (eval "$ac_compile") 2>conftest.er1
14041 ac_status=$?
14042 grep -v '^ *+' conftest.er1 >conftest.err
14043 rm -f conftest.er1
14044 cat conftest.err >&5
14045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14046 (exit $ac_status); } && {
14047 test -z "$ac_c_werror_flag" ||
14048 test ! -s conftest.err
14049 } && test -s conftest.$ac_objext; then
14050 ac_cv_type_pthread_t=yes
14051else
14052 echo "$as_me: failed program was:" >&5
14053sed 's/^/| /' conftest.$ac_ext >&5
14054
14055 ac_cv_type_pthread_t=no
14056fi
14057
14058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14059fi
14060{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14061echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14062
14063# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14066# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014067{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14068echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014069if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014070 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014071else
14072 if test "$cross_compiling" = yes; then
14073 # Depending upon the size, compute the lo and hi bounds.
14074cat >conftest.$ac_ext <<_ACEOF
14075/* confdefs.h. */
14076_ACEOF
14077cat confdefs.h >>conftest.$ac_ext
14078cat >>conftest.$ac_ext <<_ACEOF
14079/* end confdefs.h. */
14080
14081#ifdef HAVE_PTHREAD_H
14082#include <pthread.h>
14083#endif
14084
14085
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014086 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014087int
14088main ()
14089{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014091test_array [0] = 0
14092
14093 ;
14094 return 0;
14095}
14096_ACEOF
14097rm -f conftest.$ac_objext
14098if { (ac_try="$ac_compile"
14099case "(($ac_try" in
14100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14101 *) ac_try_echo=$ac_try;;
14102esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014104 (eval "$ac_compile") 2>conftest.er1
14105 ac_status=$?
14106 grep -v '^ *+' conftest.er1 >conftest.err
14107 rm -f conftest.er1
14108 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014110 (exit $ac_status); } && {
14111 test -z "$ac_c_werror_flag" ||
14112 test ! -s conftest.err
14113 } && test -s conftest.$ac_objext; then
14114 ac_lo=0 ac_mid=0
14115 while :; do
14116 cat >conftest.$ac_ext <<_ACEOF
14117/* confdefs.h. */
14118_ACEOF
14119cat confdefs.h >>conftest.$ac_ext
14120cat >>conftest.$ac_ext <<_ACEOF
14121/* end confdefs.h. */
14122
14123#ifdef HAVE_PTHREAD_H
14124#include <pthread.h>
14125#endif
14126
14127
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014128 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014129int
14130main ()
14131{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014132static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014133test_array [0] = 0
14134
14135 ;
14136 return 0;
14137}
14138_ACEOF
14139rm -f conftest.$ac_objext
14140if { (ac_try="$ac_compile"
14141case "(($ac_try" in
14142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14143 *) ac_try_echo=$ac_try;;
14144esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014146 (eval "$ac_compile") 2>conftest.er1
14147 ac_status=$?
14148 grep -v '^ *+' conftest.er1 >conftest.err
14149 rm -f conftest.er1
14150 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014152 (exit $ac_status); } && {
14153 test -z "$ac_c_werror_flag" ||
14154 test ! -s conftest.err
14155 } && test -s conftest.$ac_objext; then
14156 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
14162 if test $ac_lo -le $ac_mid; then
14163 ac_lo= ac_hi=
14164 break
14165 fi
14166 ac_mid=`expr 2 '*' $ac_mid + 1`
14167fi
14168
14169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14170 done
14171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014172 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014173sed 's/^/| /' conftest.$ac_ext >&5
14174
14175 cat >conftest.$ac_ext <<_ACEOF
14176/* confdefs.h. */
14177_ACEOF
14178cat confdefs.h >>conftest.$ac_ext
14179cat >>conftest.$ac_ext <<_ACEOF
14180/* end confdefs.h. */
14181
14182#ifdef HAVE_PTHREAD_H
14183#include <pthread.h>
14184#endif
14185
14186
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014187 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188int
14189main ()
14190{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014192test_array [0] = 0
14193
14194 ;
14195 return 0;
14196}
14197_ACEOF
14198rm -f conftest.$ac_objext
14199if { (ac_try="$ac_compile"
14200case "(($ac_try" in
14201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14202 *) ac_try_echo=$ac_try;;
14203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014205 (eval "$ac_compile") 2>conftest.er1
14206 ac_status=$?
14207 grep -v '^ *+' conftest.er1 >conftest.err
14208 rm -f conftest.er1
14209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014211 (exit $ac_status); } && {
14212 test -z "$ac_c_werror_flag" ||
14213 test ! -s conftest.err
14214 } && test -s conftest.$ac_objext; then
14215 ac_hi=-1 ac_mid=-1
14216 while :; do
14217 cat >conftest.$ac_ext <<_ACEOF
14218/* confdefs.h. */
14219_ACEOF
14220cat confdefs.h >>conftest.$ac_ext
14221cat >>conftest.$ac_ext <<_ACEOF
14222/* end confdefs.h. */
14223
14224#ifdef HAVE_PTHREAD_H
14225#include <pthread.h>
14226#endif
14227
14228
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014229 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014230int
14231main ()
14232{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234test_array [0] = 0
14235
14236 ;
14237 return 0;
14238}
14239_ACEOF
14240rm -f conftest.$ac_objext
14241if { (ac_try="$ac_compile"
14242case "(($ac_try" in
14243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14244 *) ac_try_echo=$ac_try;;
14245esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 (eval "$ac_compile") 2>conftest.er1
14248 ac_status=$?
14249 grep -v '^ *+' conftest.er1 >conftest.err
14250 rm -f conftest.er1
14251 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014253 (exit $ac_status); } && {
14254 test -z "$ac_c_werror_flag" ||
14255 test ! -s conftest.err
14256 } && test -s conftest.$ac_objext; then
14257 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
14263 if test $ac_mid -le $ac_hi; then
14264 ac_lo= ac_hi=
14265 break
14266 fi
14267 ac_mid=`expr 2 '*' $ac_mid`
14268fi
14269
14270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14271 done
14272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014273 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014274sed 's/^/| /' conftest.$ac_ext >&5
14275
14276 ac_lo= ac_hi=
14277fi
14278
14279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14280fi
14281
14282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14283# Binary search between lo and hi bounds.
14284while test "x$ac_lo" != "x$ac_hi"; do
14285 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14286 cat >conftest.$ac_ext <<_ACEOF
14287/* confdefs.h. */
14288_ACEOF
14289cat confdefs.h >>conftest.$ac_ext
14290cat >>conftest.$ac_ext <<_ACEOF
14291/* end confdefs.h. */
14292
14293#ifdef HAVE_PTHREAD_H
14294#include <pthread.h>
14295#endif
14296
14297
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014298 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014299int
14300main ()
14301{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014303test_array [0] = 0
14304
14305 ;
14306 return 0;
14307}
14308_ACEOF
14309rm -f conftest.$ac_objext
14310if { (ac_try="$ac_compile"
14311case "(($ac_try" in
14312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14313 *) ac_try_echo=$ac_try;;
14314esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014316 (eval "$ac_compile") 2>conftest.er1
14317 ac_status=$?
14318 grep -v '^ *+' conftest.er1 >conftest.err
14319 rm -f conftest.er1
14320 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014322 (exit $ac_status); } && {
14323 test -z "$ac_c_werror_flag" ||
14324 test ! -s conftest.err
14325 } && test -s conftest.$ac_objext; then
14326 ac_hi=$ac_mid
14327else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014328 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014329sed 's/^/| /' conftest.$ac_ext >&5
14330
14331 ac_lo=`expr '(' $ac_mid ')' + 1`
14332fi
14333
14334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14335done
14336case $ac_lo in
14337?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14338'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014339 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014340See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014341echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014342See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014343 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344 else
14345 ac_cv_sizeof_pthread_t=0
14346 fi ;;
14347esac
14348else
14349 cat >conftest.$ac_ext <<_ACEOF
14350/* confdefs.h. */
14351_ACEOF
14352cat confdefs.h >>conftest.$ac_ext
14353cat >>conftest.$ac_ext <<_ACEOF
14354/* end confdefs.h. */
14355
14356#ifdef HAVE_PTHREAD_H
14357#include <pthread.h>
14358#endif
14359
14360
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014361 typedef pthread_t ac__type_sizeof_;
14362static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14363static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014364#include <stdio.h>
14365#include <stdlib.h>
14366int
14367main ()
14368{
14369
14370 FILE *f = fopen ("conftest.val", "w");
14371 if (! f)
14372 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014373 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014374 {
14375 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014376 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014377 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014378 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014379 }
14380 else
14381 {
14382 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014385 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014386 }
14387 return ferror (f) || fclose (f) != 0;
14388
14389 ;
14390 return 0;
14391}
Martin v. Löwis11437992002-04-12 09:54:03 +000014392_ACEOF
14393rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394if { (ac_try="$ac_link"
14395case "(($ac_try" in
14396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14397 *) ac_try_echo=$ac_try;;
14398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404 { (case "(($ac_try" in
14405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14406 *) ac_try_echo=$ac_try;;
14407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014413 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014415 echo "$as_me: program exited with status $ac_status" >&5
14416echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014417sed 's/^/| /' conftest.$ac_ext >&5
14418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014420if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014421 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014422See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014423echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014424See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014425 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014426 else
14427 ac_cv_sizeof_pthread_t=0
14428 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430rm -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 +000014431fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014432rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014433fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014434{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14435echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014437
14438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014440#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014441_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014442
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014443
Trent Mick635f6fb2000-08-23 21:33:05 +000014444fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014445CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014446
Michael W. Hudson54241132001-12-07 15:38:26 +000014447
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014448case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014449 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014450 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14451 ;;
14452 Darwin/*)
14453 OTHER_LIBTOOL_OPT=""
14454 ;;
14455esac
14456
14457
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014458ARCH_RUN_32BIT=""
14459
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014460case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014461 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014462 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14463 if test "${enable_universalsdk}"; then
14464 :
14465 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014466 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014467 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014468 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014469 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014470 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014471 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014472 if test ${gcc_version} '<' 4.0
14473 then
14474 LIBTOOL_CRUFT="-lcc_dynamic"
14475 else
14476 LIBTOOL_CRUFT=""
14477 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014478 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014479 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014480else
14481 cat >conftest.$ac_ext <<_ACEOF
14482/* confdefs.h. */
14483_ACEOF
14484cat confdefs.h >>conftest.$ac_ext
14485cat >>conftest.$ac_ext <<_ACEOF
14486/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014487
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014488 #include <unistd.h>
14489 int main(int argc, char*argv[])
14490 {
14491 if (sizeof(long) == 4) {
14492 return 0;
14493 } else {
14494 return 1;
14495 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014496 }
14497
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014498_ACEOF
14499rm -f conftest$ac_exeext
14500if { (ac_try="$ac_link"
14501case "(($ac_try" in
14502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14503 *) ac_try_echo=$ac_try;;
14504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014506 (eval "$ac_link") 2>&5
14507 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014509 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14510 { (case "(($ac_try" in
14511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14512 *) ac_try_echo=$ac_try;;
14513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014515 (eval "$ac_try") 2>&5
14516 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014518 (exit $ac_status); }; }; then
14519 ac_osx_32bit=yes
14520else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014521 echo "$as_me: program exited with status $ac_status" >&5
14522echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014523sed 's/^/| /' conftest.$ac_ext >&5
14524
14525( exit $ac_status )
14526ac_osx_32bit=no
14527fi
14528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14529fi
14530
14531
14532
14533 if test "${ac_osx_32bit}" = "yes"; then
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="i386"
14537 ;;
14538 ppc)
14539 MACOSX_DEFAULT_ARCH="ppc"
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 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014548 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014549 i386)
14550 MACOSX_DEFAULT_ARCH="x86_64"
14551 ;;
14552 ppc)
14553 MACOSX_DEFAULT_ARCH="ppc64"
14554 ;;
14555 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014556 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14557echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014558 { (exit 1); exit 1; }; }
14559 ;;
14560 esac
14561
14562 #ARCH_RUN_32BIT="true"
14563 fi
14564
14565 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014566 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014567 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014568esac
14569
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014570{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14571echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014572if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014573then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014574 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014576 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578cat >>confdefs.h <<\_ACEOF
14579#define WITH_NEXT_FRAMEWORK 1
14580_ACEOF
14581
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014582 { echo "$as_me:$LINENO: result: yes" >&5
14583echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014584 if test $enable_shared = "yes"
14585 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014586 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14587echo "$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 +000014588 { (exit 1); exit 1; }; }
14589 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014591 { echo "$as_me:$LINENO: result: no" >&5
14592echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014593fi
14594
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014595{ echo "$as_me:$LINENO: checking for dyld" >&5
14596echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014597case $ac_sys_system/$ac_sys_release in
14598 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600cat >>confdefs.h <<\_ACEOF
14601#define WITH_DYLD 1
14602_ACEOF
14603
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014604 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14605echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014606 ;;
14607 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014608 { echo "$as_me:$LINENO: result: no" >&5
14609echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014610 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014611esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014612
Guido van Rossum0a516c91994-09-12 10:58:40 +000014613# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014614
Michael W. Hudson54241132001-12-07 15:38:26 +000014615
14616
14617
14618
Guido van Rossum0a516c91994-09-12 10:58:40 +000014619# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014620# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014621{ echo "$as_me:$LINENO: checking SO" >&5
14622echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014623if test -z "$SO"
14624then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014625 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014626 hp*|HP*)
14627 case `uname -m` in
14628 ia64) SO=.so;;
14629 *) SO=.sl;;
14630 esac
14631 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014632 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014633 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014634 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014635else
14636 # this might also be a termcap variable, see #610332
14637 echo
14638 echo '====================================================================='
14639 echo '+ +'
14640 echo '+ WARNING: You have set SO in your environment. +'
14641 echo '+ Do you really mean to change the extension for shared libraries? +'
14642 echo '+ Continuing in 10 seconds to let you to ponder. +'
14643 echo '+ +'
14644 echo '====================================================================='
14645 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014646fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014647{ echo "$as_me:$LINENO: result: $SO" >&5
14648echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014649
Georg Brandlb1441c72009-01-03 22:33:39 +000014650
Thomas Wouters477c8d52006-05-27 19:21:47 +000014651cat >>confdefs.h <<_ACEOF
14652#define SHLIB_EXT "$SO"
14653_ACEOF
14654
Guido van Rossum0a516c91994-09-12 10:58:40 +000014655# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014656# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014657# (Shared libraries in this instance are shared modules to be loaded into
14658# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014659{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14660echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014661if test -z "$LDSHARED"
14662then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014663 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014664 AIX*)
14665 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014666 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014667 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014668 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014669 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014671 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014672 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014673 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014674 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014675 hp*|HP*)
14676 if test "$GCC" = "yes"
14677 then LDSHARED='$(CC) -shared'
14678 else LDSHARED='ld -b';
14679 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014680 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014681 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014682 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14683 if test "$enable_framework" ; then
14684 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014685 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14686 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014687 else
14688 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014689 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014690 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014691 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014692 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14693 if test "$enable_framework" ; then
14694 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014695 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14696 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014697 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014698 # No framework, use the Python app as bundle-loader
14699 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014700 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014701 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014702 Darwin/*)
14703 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14704 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014705
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014706 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014707 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014708 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014709 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014710 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014711 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14712 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014713 else
14714 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14715 if test "$enable_framework" ; then
14716 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014717 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14718 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014719 else
14720 # No framework, use the Python app as bundle-loader
14721 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14722 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14723 fi
14724 fi
14725 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014726 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014727 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014728 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014729 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014730 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014731 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014732 else
14733 LDSHARED="ld -Bshareable ${LDFLAGS}"
14734 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014735 OpenBSD*)
14736 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14737 then
14738 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14739 else
14740 case `uname -r` in
14741 [01].* | 2.[0-7] | 2.[0-7].*)
14742 LDSHARED="ld -Bshareable ${LDFLAGS}"
14743 ;;
14744 *)
14745 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14746 ;;
14747 esac
14748 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014749 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014750 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014751 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014752 then LDSHARED='$(CC) -shared'
14753 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014754 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014755 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014756 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014757 *) LDSHARED="ld";;
14758 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014759fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014760{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14761echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014762BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014763# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014764# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014765{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14766echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014767if test -z "$CCSHARED"
14768then
Guido van Rossum07397971997-04-29 21:49:50 +000014769 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014770 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014771 then CCSHARED="-fPIC";
14772 elif test `uname -p` = sparc;
14773 then CCSHARED="-xcode=pic32";
14774 else CCSHARED="-Kpic";
14775 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014776 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014777 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014778 else CCSHARED="+z";
14779 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014780 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014781 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014782 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014783 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014784 if test "$GCC" = "yes"
14785 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014786 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014787 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014788 SCO_SV*)
14789 if test "$GCC" = "yes"
14790 then CCSHARED="-fPIC"
14791 else CCSHARED="-Kpic -belf"
14792 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014793 IRIX*/6*) case $CC in
14794 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014795 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014796 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014798fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014799{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14800echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014801# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014802# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014803{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14804echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014805if test -z "$LINKFORSHARED"
14806then
Guido van Rossum07397971997-04-29 21:49:50 +000014807 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014808 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014809 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014810 LINKFORSHARED="-Wl,-E -Wl,+s";;
14811# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014812 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014813 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014814 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014816 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014817 if test "$enable_framework"
14818 then
Jack Jansenda49e192005-01-07 13:08:22 +000014819 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014820 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014821 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014822 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014823 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014824 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014825 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014826 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14827 then
14828 LINKFORSHARED="-Wl,--export-dynamic"
14829 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014830 SunOS/5*) case $CC in
14831 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014832 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014833 then
14834 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014835 fi;;
14836 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014837 CYGWIN*)
14838 if test $enable_shared = "no"
14839 then
14840 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14841 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014842 QNX*)
14843 # -Wl,-E causes the symbols to be added to the dynamic
14844 # symbol table so that they can be found when a module
14845 # is loaded. -N 2048K causes the stack size to be set
14846 # to 2048 kilobytes so that the stack doesn't overflow
14847 # when running test_compile.py.
14848 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014849 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014850fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014851{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14852echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014853
Michael W. Hudson54241132001-12-07 15:38:26 +000014854
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014855
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014856{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14857echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014858if test ! "$LIBRARY" = "$LDLIBRARY"
14859then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014860 case $ac_sys_system in
14861 CYGWIN*)
14862 # Cygwin needs CCSHARED when building extension DLLs
14863 # but not when building the interpreter DLL.
14864 CFLAGSFORSHARED='';;
14865 *)
14866 CFLAGSFORSHARED='$(CCSHARED)'
14867 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014868fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014869{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14870echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014871
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014872# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14873# library (with --enable-shared).
14874# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014875# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14876# if it is not required, since it creates a dependency of the shared library
14877# to LIBS. This, in turn, means that applications linking the shared libpython
14878# don't need to link LIBS explicitly. The default should be only changed
14879# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014880
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014881{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14882echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014883case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014884 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014885 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014887{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14888echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014889
14890
Guido van Rossum627b2d71993-12-24 10:39:16 +000014891# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014892
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014893{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14894echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014895if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014896 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014897else
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014899LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014900cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014901/* confdefs.h. */
14902_ACEOF
14903cat confdefs.h >>conftest.$ac_ext
14904cat >>conftest.$ac_ext <<_ACEOF
14905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907/* Override any GCC internal prototype to avoid an error.
14908 Use char because int might match the return type of a GCC
14909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014910#ifdef __cplusplus
14911extern "C"
14912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014913char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014914int
14915main ()
14916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 ;
14919 return 0;
14920}
14921_ACEOF
14922rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923if { (ac_try="$ac_link"
14924case "(($ac_try" in
14925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14926 *) ac_try_echo=$ac_try;;
14927esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014931 grep -v '^ *+' conftest.er1 >conftest.err
14932 rm -f conftest.er1
14933 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 (exit $ac_status); } && {
14936 test -z "$ac_c_werror_flag" ||
14937 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014938 } && test -s conftest$ac_exeext &&
14939 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014941else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014943sed 's/^/| /' conftest.$ac_ext >&5
14944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947
14948rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014949 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014950LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014951fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014952{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14953echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14954if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 cat >>confdefs.h <<_ACEOF
14956#define HAVE_LIBDL 1
14957_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014958
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014959 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014960
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014961fi
14962 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014964{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14965echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014966if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014967 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014968else
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014970LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014971cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014972/* confdefs.h. */
14973_ACEOF
14974cat confdefs.h >>conftest.$ac_ext
14975cat >>conftest.$ac_ext <<_ACEOF
14976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978/* Override any GCC internal prototype to avoid an error.
14979 Use char because int might match the return type of a GCC
14980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014981#ifdef __cplusplus
14982extern "C"
14983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014984char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014985int
14986main ()
14987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014989 ;
14990 return 0;
14991}
14992_ACEOF
14993rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994if { (ac_try="$ac_link"
14995case "(($ac_try" in
14996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14997 *) ac_try_echo=$ac_try;;
14998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015002 grep -v '^ *+' conftest.er1 >conftest.err
15003 rm -f conftest.er1
15004 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 (exit $ac_status); } && {
15007 test -z "$ac_c_werror_flag" ||
15008 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009 } && test -s conftest$ac_exeext &&
15010 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015014sed 's/^/| /' conftest.$ac_ext >&5
15015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018
15019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015021LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015022fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015023{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15024echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15025if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 cat >>confdefs.h <<_ACEOF
15027#define HAVE_LIBDLD 1
15028_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015029
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015030 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015031
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015032fi
15033 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015034
Georg Brandlb1441c72009-01-03 22:33:39 +000015035# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015036if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015037 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15038echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015039if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015040 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015041else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015042 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015043cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015044/* confdefs.h. */
15045_ACEOF
15046cat confdefs.h >>conftest.$ac_ext
15047cat >>conftest.$ac_ext <<_ACEOF
15048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050/* Override any GCC internal prototype to avoid an error.
15051 Use char because int might match the return type of a GCC
15052 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015053#ifdef __cplusplus
15054extern "C"
15055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015056char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015057int
15058main ()
15059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015061 ;
15062 return 0;
15063}
15064_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065for ac_lib in '' pthread rt posix4; do
15066 if test -z "$ac_lib"; then
15067 ac_res="none required"
15068 else
15069 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015070 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071 fi
15072 rm -f conftest.$ac_objext conftest$ac_exeext
15073if { (ac_try="$ac_link"
15074case "(($ac_try" in
15075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15076 *) ac_try_echo=$ac_try;;
15077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015079 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015080 ac_status=$?
15081 grep -v '^ *+' conftest.er1 >conftest.err
15082 rm -f conftest.er1
15083 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085 (exit $ac_status); } && {
15086 test -z "$ac_c_werror_flag" ||
15087 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015088 } && test -s conftest$ac_exeext &&
15089 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015092 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015093sed 's/^/| /' conftest.$ac_ext >&5
15094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095
Thomas Wouters477c8d52006-05-27 19:21:47 +000015096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097
15098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15099 conftest$ac_exeext
15100 if test "${ac_cv_search_sem_init+set}" = set; then
15101 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103done
15104if test "${ac_cv_search_sem_init+set}" = set; then
15105 :
15106else
15107 ac_cv_search_sem_init=no
15108fi
15109rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015110LIBS=$ac_func_search_save_LIBS
15111fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015112{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15113echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114ac_res=$ac_cv_search_sem_init
15115if test "$ac_res" != no; then
15116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015117
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015118fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015119 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015120 # posix4 on Solaris 2.6
15121 # pthread (first!) on Linux
15122fi
15123
Martin v. Löwis19d17342003-06-14 21:03:05 +000015124# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015125{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15126echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015127if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015128 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015129else
15130 ac_check_lib_save_LIBS=$LIBS
15131LIBS="-lintl $LIBS"
15132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015133/* confdefs.h. */
15134_ACEOF
15135cat confdefs.h >>conftest.$ac_ext
15136cat >>conftest.$ac_ext <<_ACEOF
15137/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139/* Override any GCC internal prototype to avoid an error.
15140 Use char because int might match the return type of a GCC
15141 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015142#ifdef __cplusplus
15143extern "C"
15144#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015145char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015146int
15147main ()
15148{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015150 ;
15151 return 0;
15152}
15153_ACEOF
15154rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155if { (ac_try="$ac_link"
15156case "(($ac_try" in
15157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15158 *) ac_try_echo=$ac_try;;
15159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015163 grep -v '^ *+' conftest.er1 >conftest.err
15164 rm -f conftest.er1
15165 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015167 (exit $ac_status); } && {
15168 test -z "$ac_c_werror_flag" ||
15169 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015170 } && test -s conftest$ac_exeext &&
15171 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015172 ac_cv_lib_intl_textdomain=yes
15173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015175sed 's/^/| /' conftest.$ac_ext >&5
15176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179
15180rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015182LIBS=$ac_check_lib_save_LIBS
15183fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015184{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15185echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15186if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015187
15188cat >>confdefs.h <<\_ACEOF
15189#define WITH_LIBINTL 1
15190_ACEOF
15191
Brett Cannonc6d936e2009-06-07 20:09:53 +000015192 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193fi
15194
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015195
15196# checks for system dependent C++ extensions support
15197case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015198 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15199echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015201/* confdefs.h. */
15202_ACEOF
15203cat confdefs.h >>conftest.$ac_ext
15204cat >>conftest.$ac_ext <<_ACEOF
15205/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015206#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015207int
15208main ()
15209{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015210loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ;
15212 return 0;
15213}
15214_ACEOF
15215rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216if { (ac_try="$ac_link"
15217case "(($ac_try" in
15218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15219 *) ac_try_echo=$ac_try;;
15220esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015224 grep -v '^ *+' conftest.er1 >conftest.err
15225 rm -f conftest.er1
15226 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228 (exit $ac_status); } && {
15229 test -z "$ac_c_werror_flag" ||
15230 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015231 } && test -s conftest$ac_exeext &&
15232 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015233
Martin v. Löwis11437992002-04-12 09:54:03 +000015234cat >>confdefs.h <<\_ACEOF
15235#define AIX_GENUINE_CPLUSPLUS 1
15236_ACEOF
15237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015238 { echo "$as_me:$LINENO: result: yes" >&5
15239echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015242sed 's/^/| /' conftest.$ac_ext >&5
15243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015244 { echo "$as_me:$LINENO: result: no" >&5
15245echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247
15248rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015249 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015250 *) ;;
15251esac
15252
Guido van Rossum70c7f481998-03-26 18:44:10 +000015253# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015254{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15255echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015256if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015258else
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015260LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015262/* confdefs.h. */
15263_ACEOF
15264cat confdefs.h >>conftest.$ac_ext
15265cat >>conftest.$ac_ext <<_ACEOF
15266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268/* Override any GCC internal prototype to avoid an error.
15269 Use char because int might match the return type of a GCC
15270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015271#ifdef __cplusplus
15272extern "C"
15273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015274char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015275int
15276main ()
15277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 ;
15280 return 0;
15281}
15282_ACEOF
15283rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284if { (ac_try="$ac_link"
15285case "(($ac_try" in
15286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15287 *) ac_try_echo=$ac_try;;
15288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015292 grep -v '^ *+' conftest.er1 >conftest.err
15293 rm -f conftest.er1
15294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 (exit $ac_status); } && {
15297 test -z "$ac_c_werror_flag" ||
15298 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015299 } && test -s conftest$ac_exeext &&
15300 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015304sed 's/^/| /' conftest.$ac_ext >&5
15305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308
15309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015312fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015313{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15314echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15315if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015316 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015317fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015318 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015319{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15320echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015321if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015323else
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015325LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015327/* confdefs.h. */
15328_ACEOF
15329cat confdefs.h >>conftest.$ac_ext
15330cat >>conftest.$ac_ext <<_ACEOF
15331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333/* Override any GCC internal prototype to avoid an error.
15334 Use char because int might match the return type of a GCC
15335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015336#ifdef __cplusplus
15337extern "C"
15338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015339char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015340int
15341main ()
15342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 ;
15345 return 0;
15346}
15347_ACEOF
15348rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349if { (ac_try="$ac_link"
15350case "(($ac_try" in
15351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15352 *) ac_try_echo=$ac_try;;
15353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357 grep -v '^ *+' conftest.er1 >conftest.err
15358 rm -f conftest.er1
15359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361 (exit $ac_status); } && {
15362 test -z "$ac_c_werror_flag" ||
15363 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015364 } && test -s conftest$ac_exeext &&
15365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015369sed 's/^/| /' conftest.$ac_ext >&5
15370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373
15374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015376LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015377fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015378{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15379echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15380if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015381 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015382fi
15383 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015384
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015385{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15386echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015389if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015391{ echo "$as_me:$LINENO: result: $withval" >&5
15392echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015393LIBS="$withval $LIBS"
15394
15395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015396 { echo "$as_me:$LINENO: result: no" >&5
15397echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398fi
15399
Guido van Rossum7f43da71994-08-01 12:15:30 +000015400
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015401# Check for use of the system expat library
15402{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15403echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15404
15405# Check whether --with-system_expat was given.
15406if test "${with_system_expat+set}" = set; then
15407 withval=$with_system_expat;
15408fi
15409
15410
15411{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15412echo "${ECHO_T}$with_system_expat" >&6; }
15413
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015414# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015415{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15416echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015418# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015419if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015420 withval=$with_system_ffi;
15421fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015422
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015423
Benjamin Petersond78735d2010-01-01 16:04:23 +000015424if test "$with_system_ffi" = "yes"; then
15425 if test -n "$ac_tool_prefix"; then
15426 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15427set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15428{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15429echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15430if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15431 echo $ECHO_N "(cached) $ECHO_C" >&6
15432else
15433 case $PKG_CONFIG in
15434 [\\/]* | ?:[\\/]*)
15435 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15436 ;;
15437 *)
15438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15439for as_dir in $PATH
15440do
15441 IFS=$as_save_IFS
15442 test -z "$as_dir" && as_dir=.
15443 for ac_exec_ext in '' $ac_executable_extensions; do
15444 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15445 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15446 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15447 break 2
15448 fi
15449done
15450done
15451IFS=$as_save_IFS
15452
15453 ;;
15454esac
15455fi
15456PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15457if test -n "$PKG_CONFIG"; then
15458 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15459echo "${ECHO_T}$PKG_CONFIG" >&6; }
15460else
15461 { echo "$as_me:$LINENO: result: no" >&5
15462echo "${ECHO_T}no" >&6; }
15463fi
15464
15465
15466fi
15467if test -z "$ac_cv_path_PKG_CONFIG"; then
15468 ac_pt_PKG_CONFIG=$PKG_CONFIG
15469 # Extract the first word of "pkg-config", so it can be a program name with args.
15470set dummy pkg-config; ac_word=$2
15471{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15472echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15473if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15474 echo $ECHO_N "(cached) $ECHO_C" >&6
15475else
15476 case $ac_pt_PKG_CONFIG in
15477 [\\/]* | ?:[\\/]*)
15478 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15479 ;;
15480 *)
15481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15482for as_dir in $PATH
15483do
15484 IFS=$as_save_IFS
15485 test -z "$as_dir" && as_dir=.
15486 for ac_exec_ext in '' $ac_executable_extensions; do
15487 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15488 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15489 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15490 break 2
15491 fi
15492done
15493done
15494IFS=$as_save_IFS
15495
15496 ;;
15497esac
15498fi
15499ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15500if test -n "$ac_pt_PKG_CONFIG"; then
15501 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15502echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15503else
15504 { echo "$as_me:$LINENO: result: no" >&5
15505echo "${ECHO_T}no" >&6; }
15506fi
15507
15508 if test "x$ac_pt_PKG_CONFIG" = x; then
15509 PKG_CONFIG=""
15510 else
15511 case $cross_compiling:$ac_tool_warned in
15512yes:)
15513{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15514whose name does not start with the host triplet. If you think this
15515configuration is useful to you, please write to autoconf@gnu.org." >&5
15516echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15517whose name does not start with the host triplet. If you think this
15518configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15519ac_tool_warned=yes ;;
15520esac
15521 PKG_CONFIG=$ac_pt_PKG_CONFIG
15522 fi
15523else
15524 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15525fi
15526
15527 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15528else
15529 LIBFFI_INCLUDEDIR=""
15530fi
15531
15532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015533{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15534echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015535
Matthias Klose55708cc2009-04-30 08:06:49 +000015536# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015537{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15538echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015539
15540# Check whether --with-dbmliborder was given.
15541if test "${with_dbmliborder+set}" = set; then
15542 withval=$with_dbmliborder;
15543if test x$with_dbmliborder = xyes
15544then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015545{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15546echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015547 { (exit 1); exit 1; }; }
15548else
15549 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15550 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15551 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015552 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15553echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015554 { (exit 1); exit 1; }; }
15555 fi
15556 done
15557fi
15558fi
15559
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015560{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15561echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015562
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015563# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015564
15565
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015566{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15567echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015570if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 withval=$with_signal_module;
15572fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015573
15574
15575if test -z "$with_signal_module"
15576then with_signal_module="yes"
15577fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015578{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15579echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015580
15581if test "${with_signal_module}" = "yes"; then
15582 USE_SIGNAL_MODULE=""
15583 SIGNAL_OBJS=""
15584else
15585 USE_SIGNAL_MODULE="#"
15586 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15587fi
15588
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015589# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015590
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015591USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015592
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015593{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15594echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015595
Guido van Rossumec2f0731997-01-22 20:54:01 +000015596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015597# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015598if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015599 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015600{ echo "$as_me:$LINENO: result: $withval" >&5
15601echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015602LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015603if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015604 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015605fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015606else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015607 { echo "$as_me:$LINENO: result: no" >&5
15608echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609fi
15610
Martin v. Löwis11437992002-04-12 09:54:03 +000015611
15612# Templates for things AC_DEFINEd more than once.
15613# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015614
15615
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
15617
15618
15619
15620
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015621{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15622echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015625if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626 withval=$with_threads;
15627fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015628
15629
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015630# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015633if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015634 withval=$with_thread; with_threads=$with_thread
15635fi
15636
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015637
15638if test -z "$with_threads"
15639then with_threads="yes"
15640fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015641{ echo "$as_me:$LINENO: result: $with_threads" >&5
15642echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015643
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015644
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015645if test "$with_threads" = "no"
15646then
15647 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015648elif test "$ac_cv_pthread_is_default" = yes
15649then
Martin v. Löwis11437992002-04-12 09:54:03 +000015650 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015651#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015652_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015653
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015655 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015656#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015657_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015658
15659 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015661elif test "$ac_cv_kpthread" = "yes"
15662then
15663 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015664 if test "$ac_cv_cxx_thread" = "yes"; then
15665 CXX="$CXX -Kpthread"
15666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015668#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015669_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015670
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015671 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015672 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015673elif test "$ac_cv_kthread" = "yes"
15674then
15675 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015676 if test "$ac_cv_cxx_thread" = "yes"; then
15677 CXX="$CXX -Kthread"
15678 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015679 cat >>confdefs.h <<\_ACEOF
15680#define WITH_THREAD 1
15681_ACEOF
15682
15683 posix_threads=yes
15684 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015685elif test "$ac_cv_pthread" = "yes"
15686then
15687 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015688 if test "$ac_cv_cxx_thread" = "yes"; then
15689 CXX="$CXX -pthread"
15690 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015691 cat >>confdefs.h <<\_ACEOF
15692#define WITH_THREAD 1
15693_ACEOF
15694
15695 posix_threads=yes
15696 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015697else
15698 if test ! -z "$with_threads" -a -d "$with_threads"
15699 then LDFLAGS="$LDFLAGS -L$with_threads"
15700 fi
15701 if test ! -z "$withval" -a -d "$withval"
15702 then LDFLAGS="$LDFLAGS -L$withval"
15703 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015704
15705 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015706 # define _POSIX_THREADS in unistd.h. Some apparently don't
15707 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015708 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15709echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015711/* confdefs.h. */
15712_ACEOF
15713cat confdefs.h >>conftest.$ac_ext
15714cat >>conftest.$ac_ext <<_ACEOF
15715/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015716
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015717#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015718#ifdef _POSIX_THREADS
15719yes
15720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015721
15722_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015724 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015725 unistd_defines_pthreads=yes
15726else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015727 unistd_defines_pthreads=no
15728fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000015729rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015730
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015731 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15732echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015733
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015735#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015736_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015737
Martin v. Löwis11437992002-04-12 09:54:03 +000015738 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015739 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15740echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015741if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015742 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015743fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015744{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15745echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015746else
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015748{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15749echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015751/* confdefs.h. */
15752_ACEOF
15753cat confdefs.h >>conftest.$ac_ext
15754cat >>conftest.$ac_ext <<_ACEOF
15755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015756$ac_includes_default
15757#include <cthreads.h>
15758_ACEOF
15759rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760if { (ac_try="$ac_compile"
15761case "(($ac_try" in
15762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15763 *) ac_try_echo=$ac_try;;
15764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015768 grep -v '^ *+' conftest.er1 >conftest.err
15769 rm -f conftest.er1
15770 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015772 (exit $ac_status); } && {
15773 test -z "$ac_c_werror_flag" ||
15774 test ! -s conftest.err
15775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 ac_header_compiler=yes
15777else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015779sed 's/^/| /' conftest.$ac_ext >&5
15780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783
15784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015785{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15786echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015787
15788# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015789{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15790echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015791cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015792/* confdefs.h. */
15793_ACEOF
15794cat confdefs.h >>conftest.$ac_ext
15795cat >>conftest.$ac_ext <<_ACEOF
15796/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015797#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015798_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799if { (ac_try="$ac_cpp conftest.$ac_ext"
15800case "(($ac_try" in
15801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15802 *) ac_try_echo=$ac_try;;
15803esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015807 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 rm -f conftest.er1
15809 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015811 (exit $ac_status); } >/dev/null && {
15812 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15813 test ! -s conftest.err
15814 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 ac_header_preproc=yes
15816else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015818sed 's/^/| /' conftest.$ac_ext >&5
15819
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822
Martin v. Löwis11437992002-04-12 09:54:03 +000015823rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015824{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15825echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
15827# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015828case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15829 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015830 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15831echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15832 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15833echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015834 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015835 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015836 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015837 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15838echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15839 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15840echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15841 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15842echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15843 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15844echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15845 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15846echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15847 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15848echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015850## -------------------------------------- ##
15851## Report this to http://bugs.python.org/ ##
15852## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015853_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015854 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015855 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015856esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015857{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15858echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015859if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015861else
15862 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015863fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015864{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15865echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015866
15867fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015868if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015870#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015874#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015875_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015876
Martin v. Löwis11437992002-04-12 09:54:03 +000015877
15878cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015879#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015880_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015881
15882 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015883 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015884else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015887 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15888echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015889if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015890 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015891fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015892{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15893echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015894else
Martin v. Löwis11437992002-04-12 09:54:03 +000015895 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015896{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15897echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015899/* confdefs.h. */
15900_ACEOF
15901cat confdefs.h >>conftest.$ac_ext
15902cat >>conftest.$ac_ext <<_ACEOF
15903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015904$ac_includes_default
15905#include <mach/cthreads.h>
15906_ACEOF
15907rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015908if { (ac_try="$ac_compile"
15909case "(($ac_try" in
15910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15911 *) ac_try_echo=$ac_try;;
15912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015916 grep -v '^ *+' conftest.er1 >conftest.err
15917 rm -f conftest.er1
15918 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920 (exit $ac_status); } && {
15921 test -z "$ac_c_werror_flag" ||
15922 test ! -s conftest.err
15923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015924 ac_header_compiler=yes
15925else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015927sed 's/^/| /' conftest.$ac_ext >&5
15928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931
15932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015933{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15934echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
15936# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015937{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15938echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015940/* confdefs.h. */
15941_ACEOF
15942cat confdefs.h >>conftest.$ac_ext
15943cat >>conftest.$ac_ext <<_ACEOF
15944/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015945#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015946_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015947if { (ac_try="$ac_cpp conftest.$ac_ext"
15948case "(($ac_try" in
15949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15950 *) ac_try_echo=$ac_try;;
15951esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015953 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015954 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015955 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015956 rm -f conftest.er1
15957 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015959 (exit $ac_status); } >/dev/null && {
15960 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15961 test ! -s conftest.err
15962 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015963 ac_header_preproc=yes
15964else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015966sed 's/^/| /' conftest.$ac_ext >&5
15967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015970
Martin v. Löwis11437992002-04-12 09:54:03 +000015971rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015972{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15973echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015974
15975# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015976case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15977 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015978 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15979echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15980 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15981echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015982 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015983 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015984 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015985 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15986echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15987 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15988echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15989 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15990echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15991 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15992echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15993 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15994echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15995 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15996echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015998## -------------------------------------- ##
15999## Report this to http://bugs.python.org/ ##
16000## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016001_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016003 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016005{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16006echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016007if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016008 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016009else
16010 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016011fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016012{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16013echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016014
16015fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016016if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016022#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016023_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016024
Martin v. Löwis11437992002-04-12 09:54:03 +000016025
16026cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016027#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016028_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016029
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016030 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016031else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016032
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016033 # Just looking for pthread_create in libpthread is not enough:
16034 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16035 # So we really have to include pthread.h, and then link.
16036 _libs=$LIBS
16037 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016038 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16039echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016041/* confdefs.h. */
16042_ACEOF
16043cat confdefs.h >>conftest.$ac_ext
16044cat >>conftest.$ac_ext <<_ACEOF
16045/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016046#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016047
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016048void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016049int
16050main ()
16051{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016052
16053pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016054 ;
16055 return 0;
16056}
16057_ACEOF
16058rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059if { (ac_try="$ac_link"
16060case "(($ac_try" in
16061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16062 *) ac_try_echo=$ac_try;;
16063esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016065 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016067 grep -v '^ *+' conftest.er1 >conftest.err
16068 rm -f conftest.er1
16069 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071 (exit $ac_status); } && {
16072 test -z "$ac_c_werror_flag" ||
16073 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016074 } && test -s conftest$ac_exeext &&
16075 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016076
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016077 { echo "$as_me:$LINENO: result: yes" >&5
16078echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016080#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016081_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016082
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016083 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016084 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016087sed 's/^/| /' conftest.$ac_ext >&5
16088
Martin v. Löwis11437992002-04-12 09:54:03 +000016089
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016090 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016091 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16092echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016093if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016094 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016095else
Martin v. Löwis11437992002-04-12 09:54:03 +000016096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016097/* confdefs.h. */
16098_ACEOF
16099cat confdefs.h >>conftest.$ac_ext
16100cat >>conftest.$ac_ext <<_ACEOF
16101/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016102/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16103 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16104#define pthread_detach innocuous_pthread_detach
16105
Guido van Rossumad678af1998-10-02 14:42:15 +000016106/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016107 which can conflict with char pthread_detach (); below.
16108 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016109 <limits.h> exists even on freestanding compilers. */
16110
16111#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016112# include <limits.h>
16113#else
16114# include <assert.h>
16115#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016116
16117#undef pthread_detach
16118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119/* Override any GCC internal prototype to avoid an error.
16120 Use char because int might match the return type of a GCC
16121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016122#ifdef __cplusplus
16123extern "C"
16124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016125char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016126/* The GNU C library defines this for functions which it implements
16127 to always fail with ENOSYS. Some functions are actually named
16128 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016130choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016131#endif
16132
Skip Montanaro6dead952003-09-25 14:50:04 +000016133int
16134main ()
16135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 ;
16138 return 0;
16139}
16140_ACEOF
16141rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142if { (ac_try="$ac_link"
16143case "(($ac_try" in
16144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16145 *) ac_try_echo=$ac_try;;
16146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016148 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016150 grep -v '^ *+' conftest.er1 >conftest.err
16151 rm -f conftest.er1
16152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154 (exit $ac_status); } && {
16155 test -z "$ac_c_werror_flag" ||
16156 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016157 } && test -s conftest$ac_exeext &&
16158 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016162sed 's/^/| /' conftest.$ac_ext >&5
16163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166
16167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016168 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016169fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016170{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16171echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16172if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016174#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016175_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016176
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016177 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016178 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016179else
Guido van Rossumad678af1998-10-02 14:42:15 +000016180
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016181 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16182echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016183if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016184 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016185else
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016187LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016189/* confdefs.h. */
16190_ACEOF
16191cat confdefs.h >>conftest.$ac_ext
16192cat >>conftest.$ac_ext <<_ACEOF
16193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195/* Override any GCC internal prototype to avoid an error.
16196 Use char because int might match the return type of a GCC
16197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016198#ifdef __cplusplus
16199extern "C"
16200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016201char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016202int
16203main ()
16204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 ;
16207 return 0;
16208}
16209_ACEOF
16210rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211if { (ac_try="$ac_link"
16212case "(($ac_try" in
16213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16214 *) ac_try_echo=$ac_try;;
16215esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016217 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016219 grep -v '^ *+' conftest.er1 >conftest.err
16220 rm -f conftest.er1
16221 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016223 (exit $ac_status); } && {
16224 test -z "$ac_c_werror_flag" ||
16225 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016226 } && test -s conftest$ac_exeext &&
16227 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016228 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016231sed 's/^/| /' conftest.$ac_ext >&5
16232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235
16236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016237 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016238LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016239fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016240{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16241echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16242if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016243 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016244#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016245_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016246
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016247 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016248 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016249 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016250else
Greg Steinadf63d62000-07-05 10:38:09 +000016251
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016252 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16253echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016254if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016255 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016256else
Martin v. Löwis11437992002-04-12 09:54:03 +000016257 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016258LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016259cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016260/* confdefs.h. */
16261_ACEOF
16262cat confdefs.h >>conftest.$ac_ext
16263cat >>conftest.$ac_ext <<_ACEOF
16264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266/* Override any GCC internal prototype to avoid an error.
16267 Use char because int might match the return type of a GCC
16268 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016269#ifdef __cplusplus
16270extern "C"
16271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016272char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016273int
16274main ()
16275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 ;
16278 return 0;
16279}
16280_ACEOF
16281rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282if { (ac_try="$ac_link"
16283case "(($ac_try" in
16284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16285 *) ac_try_echo=$ac_try;;
16286esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016290 grep -v '^ *+' conftest.er1 >conftest.err
16291 rm -f conftest.er1
16292 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016294 (exit $ac_status); } && {
16295 test -z "$ac_c_werror_flag" ||
16296 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016297 } && test -s conftest$ac_exeext &&
16298 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016300else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016302sed 's/^/| /' conftest.$ac_ext >&5
16303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306
16307rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016308 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016309LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016310fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016311{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16312echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16313if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016315#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016316_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016317
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016318 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016319 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016320 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016321else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016322
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016323 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16324echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016325if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016327else
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016329LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016330cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016331/* confdefs.h. */
16332_ACEOF
16333cat confdefs.h >>conftest.$ac_ext
16334cat >>conftest.$ac_ext <<_ACEOF
16335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337/* Override any GCC internal prototype to avoid an error.
16338 Use char because int might match the return type of a GCC
16339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016340#ifdef __cplusplus
16341extern "C"
16342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016343char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016344int
16345main ()
16346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016347return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 ;
16349 return 0;
16350}
16351_ACEOF
16352rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353if { (ac_try="$ac_link"
16354case "(($ac_try" in
16355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16356 *) ac_try_echo=$ac_try;;
16357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016361 grep -v '^ *+' conftest.er1 >conftest.err
16362 rm -f conftest.er1
16363 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365 (exit $ac_status); } && {
16366 test -z "$ac_c_werror_flag" ||
16367 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016368 } && test -s conftest$ac_exeext &&
16369 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016371else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016373sed 's/^/| /' conftest.$ac_ext >&5
16374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377
16378rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016379 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016380LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016381fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016382{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16383echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16384if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016386#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016387_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016388
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016389 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016390 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016391 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016392else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016394 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16395echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016396if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016398else
Martin v. Löwis11437992002-04-12 09:54:03 +000016399 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016400LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016402/* confdefs.h. */
16403_ACEOF
16404cat confdefs.h >>conftest.$ac_ext
16405cat >>conftest.$ac_ext <<_ACEOF
16406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408/* Override any GCC internal prototype to avoid an error.
16409 Use char because int might match the return type of a GCC
16410 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016411#ifdef __cplusplus
16412extern "C"
16413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016414char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016415int
16416main ()
16417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016419 ;
16420 return 0;
16421}
16422_ACEOF
16423rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016424if { (ac_try="$ac_link"
16425case "(($ac_try" in
16426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16427 *) ac_try_echo=$ac_try;;
16428esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016432 grep -v '^ *+' conftest.er1 >conftest.err
16433 rm -f conftest.er1
16434 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016436 (exit $ac_status); } && {
16437 test -z "$ac_c_werror_flag" ||
16438 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016439 } && test -s conftest$ac_exeext &&
16440 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016441 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016442else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016444sed 's/^/| /' conftest.$ac_ext >&5
16445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016448
16449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016450 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016451LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016452fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016453{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16454echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16455if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016456 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016457#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016458_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016459
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016460 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016461 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016462 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016463else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016464
Martin v. Löwis130fb172001-07-19 11:00:41 +000016465 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016466fi
16467
Guido van Rossum627b2d71993-12-24 10:39:16 +000016468
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016469fi
16470
Guido van Rossum0be3e491997-05-22 20:33:33 +000016471fi
16472
Guido van Rossum49545951997-12-02 19:28:29 +000016473fi
16474
Guido van Rossumb93a8621998-05-07 13:27:32 +000016475fi
16476
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016478
16479rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016480 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481fi
16482
Martin v. Löwis11437992002-04-12 09:54:03 +000016483
16484fi
16485
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016486
Michael W. Hudson54241132001-12-07 15:38:26 +000016487
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016488 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16489echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016490if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016492else
Martin v. Löwis11437992002-04-12 09:54:03 +000016493 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016494LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016496/* confdefs.h. */
16497_ACEOF
16498cat confdefs.h >>conftest.$ac_ext
16499cat >>conftest.$ac_ext <<_ACEOF
16500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016502/* Override any GCC internal prototype to avoid an error.
16503 Use char because int might match the return type of a GCC
16504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016505#ifdef __cplusplus
16506extern "C"
16507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016508char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016509int
16510main ()
16511{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016513 ;
16514 return 0;
16515}
16516_ACEOF
16517rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518if { (ac_try="$ac_link"
16519case "(($ac_try" in
16520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16521 *) ac_try_echo=$ac_try;;
16522esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016526 grep -v '^ *+' conftest.er1 >conftest.err
16527 rm -f conftest.er1
16528 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530 (exit $ac_status); } && {
16531 test -z "$ac_c_werror_flag" ||
16532 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016533 } && test -s conftest$ac_exeext &&
16534 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016538sed 's/^/| /' conftest.$ac_ext >&5
16539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542
16543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016545LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016546fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016547{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16548echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16549if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016550 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016551#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016552_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016553
Martin v. Löwis130fb172001-07-19 11:00:41 +000016554 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016555 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016556 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016557fi
16558
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016559
Neal Norwitza978ab02002-11-02 16:58:05 +000016560 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016561 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16562echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016563if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016565else
Martin v. Löwis11437992002-04-12 09:54:03 +000016566 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016567LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016569/* confdefs.h. */
16570_ACEOF
16571cat confdefs.h >>conftest.$ac_ext
16572cat >>conftest.$ac_ext <<_ACEOF
16573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016575/* Override any GCC internal prototype to avoid an error.
16576 Use char because int might match the return type of a GCC
16577 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016578#ifdef __cplusplus
16579extern "C"
16580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016581char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016582int
16583main ()
16584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016586 ;
16587 return 0;
16588}
16589_ACEOF
16590rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591if { (ac_try="$ac_link"
16592case "(($ac_try" in
16593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16594 *) ac_try_echo=$ac_try;;
16595esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016599 grep -v '^ *+' conftest.er1 >conftest.err
16600 rm -f conftest.er1
16601 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603 (exit $ac_status); } && {
16604 test -z "$ac_c_werror_flag" ||
16605 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016606 } && test -s conftest$ac_exeext &&
16607 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016608 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016609else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016611sed 's/^/| /' conftest.$ac_ext >&5
16612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615
16616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016618LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016619fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016620{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16621echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16622if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016623 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016624#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016625_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016626
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016627 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016628 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016629 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016630fi
16631
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016632 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016633
Martin v. Löwis130fb172001-07-19 11:00:41 +000016634 if test "$USE_THREAD_MODULE" != "#"
16635 then
16636 # If the above checks didn't disable threads, (at least) OSF1
16637 # needs this '-threads' argument during linking.
16638 case $ac_sys_system in
16639 OSF1) LDLAST=-threads;;
16640 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016641 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016642fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016643
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016644if test "$posix_threads" = "yes"; then
16645 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016646
16647cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016648#define _POSIX_THREADS 1
16649_ACEOF
16650
16651 fi
16652
16653 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16654 case $ac_sys_system/$ac_sys_release in
16655 SunOS/5.6)
16656cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016657#define HAVE_PTHREAD_DESTRUCTOR 1
16658_ACEOF
16659
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016660 ;;
16661 SunOS/5.8)
16662cat >>confdefs.h <<\_ACEOF
16663#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16664_ACEOF
16665
16666 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016667 AIX/5)
16668cat >>confdefs.h <<\_ACEOF
16669#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16670_ACEOF
16671
16672 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016673 esac
16674
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016675 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16676echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016677 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016678 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016679else
16680 if test "$cross_compiling" = yes; then
16681 ac_cv_pthread_system_supported=no
16682else
16683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016684/* confdefs.h. */
16685_ACEOF
16686cat confdefs.h >>conftest.$ac_ext
16687cat >>conftest.$ac_ext <<_ACEOF
16688/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016689#include <pthread.h>
16690 void *foo(void *parm) {
16691 return NULL;
16692 }
16693 main() {
16694 pthread_attr_t attr;
16695 pthread_t id;
16696 if (pthread_attr_init(&attr)) exit(-1);
16697 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16698 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16699 exit(0);
16700 }
16701_ACEOF
16702rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703if { (ac_try="$ac_link"
16704case "(($ac_try" in
16705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16706 *) ac_try_echo=$ac_try;;
16707esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016710 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713 { (case "(($ac_try" in
16714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16715 *) ac_try_echo=$ac_try;;
16716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016719 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016721 (exit $ac_status); }; }; then
16722 ac_cv_pthread_system_supported=yes
16723else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016724 echo "$as_me: program exited with status $ac_status" >&5
16725echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016726sed 's/^/| /' conftest.$ac_ext >&5
16727
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016728( exit $ac_status )
16729ac_cv_pthread_system_supported=no
16730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731rm -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 +000016732fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734
16735
Guido van Rossum627b2d71993-12-24 10:39:16 +000016736fi
16737
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016738 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16739echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016740 if test "$ac_cv_pthread_system_supported" = "yes"; then
16741
16742cat >>confdefs.h <<\_ACEOF
16743#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16744_ACEOF
16745
16746 fi
16747
16748for ac_func in pthread_sigmask
16749do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016750as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16751{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16752echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016754 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016755else
16756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016757/* confdefs.h. */
16758_ACEOF
16759cat confdefs.h >>conftest.$ac_ext
16760cat >>conftest.$ac_ext <<_ACEOF
16761/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016762/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16763 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16764#define $ac_func innocuous_$ac_func
16765
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016766/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016767 which can conflict with char $ac_func (); below.
16768 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016769 <limits.h> exists even on freestanding compilers. */
16770
16771#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016772# include <limits.h>
16773#else
16774# include <assert.h>
16775#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016776
16777#undef $ac_func
16778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016779/* Override any GCC internal prototype to avoid an error.
16780 Use char because int might match the return type of a GCC
16781 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016782#ifdef __cplusplus
16783extern "C"
16784#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016785char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016786/* The GNU C library defines this for functions which it implements
16787 to always fail with ENOSYS. Some functions are actually named
16788 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016790choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016791#endif
16792
Skip Montanaro6dead952003-09-25 14:50:04 +000016793int
16794main ()
16795{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016797 ;
16798 return 0;
16799}
16800_ACEOF
16801rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802if { (ac_try="$ac_link"
16803case "(($ac_try" in
16804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16805 *) ac_try_echo=$ac_try;;
16806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016810 grep -v '^ *+' conftest.er1 >conftest.err
16811 rm -f conftest.er1
16812 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814 (exit $ac_status); } && {
16815 test -z "$ac_c_werror_flag" ||
16816 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016817 } && test -s conftest$ac_exeext &&
16818 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016819 eval "$as_ac_var=yes"
16820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016822sed 's/^/| /' conftest.$ac_ext >&5
16823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016826
16827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016829fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016830ac_res=`eval echo '${'$as_ac_var'}'`
16831 { echo "$as_me:$LINENO: result: $ac_res" >&5
16832echo "${ECHO_T}$ac_res" >&6; }
16833if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016834 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016835#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016836_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016837 case $ac_sys_system in
16838 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016839
Jason Tishlerfac083d2003-07-22 15:20:49 +000016840cat >>confdefs.h <<\_ACEOF
16841#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16842_ACEOF
16843
16844 ;;
16845 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016846fi
16847done
16848
16849fi
16850
16851
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016852# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016853
16854
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016855{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16856echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016857# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016858if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016860 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016861 { echo "$as_me:$LINENO: result: no" >&5
16862echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016863 ipv6=no
16864 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016865 *) { echo "$as_me:$LINENO: result: yes" >&5
16866echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016867 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016868#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016869_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016870
16871 ipv6=yes
16872 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016873 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016874else
Martin v. Löwis11437992002-04-12 09:54:03 +000016875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016876 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016877 { echo "$as_me:$LINENO: result: no" >&5
16878echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016879 ipv6=no
16880
16881else
Martin v. Löwis11437992002-04-12 09:54:03 +000016882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016883/* confdefs.h. */
16884_ACEOF
16885cat confdefs.h >>conftest.$ac_ext
16886cat >>conftest.$ac_ext <<_ACEOF
16887/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016888 /* AF_INET6 available check */
16889#include <sys/types.h>
16890#include <sys/socket.h>
16891main()
16892{
16893 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16894 exit(1);
16895 else
16896 exit(0);
16897}
16898
Martin v. Löwis11437992002-04-12 09:54:03 +000016899_ACEOF
16900rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016901if { (ac_try="$ac_link"
16902case "(($ac_try" in
16903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16904 *) ac_try_echo=$ac_try;;
16905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016908 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911 { (case "(($ac_try" in
16912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16913 *) ac_try_echo=$ac_try;;
16914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016919 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016920 { echo "$as_me:$LINENO: result: yes" >&5
16921echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016922 ipv6=yes
16923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016924 echo "$as_me: program exited with status $ac_status" >&5
16925echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016926sed 's/^/| /' conftest.$ac_ext >&5
16927
Martin v. Löwis11437992002-04-12 09:54:03 +000016928( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016929{ echo "$as_me:$LINENO: result: no" >&5
16930echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016931 ipv6=no
16932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016933rm -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 +000016934fi
16935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936
16937
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016938if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016939 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16940echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016942/* confdefs.h. */
16943_ACEOF
16944cat confdefs.h >>conftest.$ac_ext
16945cat >>conftest.$ac_ext <<_ACEOF
16946/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016947#include <sys/types.h>
16948#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016949int
16950main ()
16951{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016952struct sockaddr_in6 x;
16953x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016954 ;
16955 return 0;
16956}
16957_ACEOF
16958rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959if { (ac_try="$ac_compile"
16960case "(($ac_try" in
16961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16962 *) ac_try_echo=$ac_try;;
16963esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016967 grep -v '^ *+' conftest.er1 >conftest.err
16968 rm -f conftest.er1
16969 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016971 (exit $ac_status); } && {
16972 test -z "$ac_c_werror_flag" ||
16973 test ! -s conftest.err
16974 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016975 { echo "$as_me:$LINENO: result: yes" >&5
16976echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016977 ipv6=yes
16978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016980sed 's/^/| /' conftest.$ac_ext >&5
16981
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016982 { echo "$as_me:$LINENO: result: no" >&5
16983echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016984 ipv6=no
16985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016986
16987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016988fi
16989
16990if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016991 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016992#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016993_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016994
16995fi
16996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997fi
16998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016999
17000ipv6type=unknown
17001ipv6lib=none
17002ipv6trylibc=no
17003
17004if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017005 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17006echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017007 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17008 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017009 case $i in
17010 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017012/* confdefs.h. */
17013_ACEOF
17014cat confdefs.h >>conftest.$ac_ext
17015cat >>conftest.$ac_ext <<_ACEOF
17016/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017018#include <netinet/in.h>
17019#ifdef IPV6_INRIA_VERSION
17020yes
17021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017022_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017024 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017025 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017026fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000017027rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017028
17029 ;;
17030 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017032/* confdefs.h. */
17033_ACEOF
17034cat confdefs.h >>conftest.$ac_ext
17035cat >>conftest.$ac_ext <<_ACEOF
17036/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017037
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017038#include <netinet/in.h>
17039#ifdef __KAME__
17040yes
17041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017042_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017044 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017045 ipv6type=$i;
17046 ipv6lib=inet6
17047 ipv6libdir=/usr/local/v6/lib
17048 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017049fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000017050rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017051
17052 ;;
17053 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017055/* confdefs.h. */
17056_ACEOF
17057cat confdefs.h >>conftest.$ac_ext
17058cat >>conftest.$ac_ext <<_ACEOF
17059/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017061#include <features.h>
17062#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17063yes
17064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017065_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017067 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017068 ipv6type=$i;
17069 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017070fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000017071rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017072
17073 ;;
17074 linux-inet6)
17075 if test -d /usr/inet6; then
17076 ipv6type=$i
17077 ipv6lib=inet6
17078 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017079 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017080 fi
17081 ;;
17082 solaris)
17083 if test -f /etc/netconfig; then
17084 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17085 ipv6type=$i
17086 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017087 fi
17088 fi
17089 ;;
17090 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017092/* confdefs.h. */
17093_ACEOF
17094cat confdefs.h >>conftest.$ac_ext
17095cat >>conftest.$ac_ext <<_ACEOF
17096/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017097
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017098#include <sys/param.h>
17099#ifdef _TOSHIBA_INET6
17100yes
17101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017102_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017103if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017104 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017105 ipv6type=$i;
17106 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017107 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017108fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000017109rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017110
17111 ;;
17112 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017114/* confdefs.h. */
17115_ACEOF
17116cat confdefs.h >>conftest.$ac_ext
17117cat >>conftest.$ac_ext <<_ACEOF
17118/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017119
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017120#include </usr/local/v6/include/sys/v6config.h>
17121#ifdef __V6D__
17122yes
17123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017124_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017126 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017127 ipv6type=$i;
17128 ipv6lib=v6;
17129 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017130 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017131fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000017132rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017133
17134 ;;
17135 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017137/* confdefs.h. */
17138_ACEOF
17139cat confdefs.h >>conftest.$ac_ext
17140cat >>conftest.$ac_ext <<_ACEOF
17141/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017142
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017143#include <sys/param.h>
17144#ifdef _ZETA_MINAMI_INET6
17145yes
17146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017147_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017149 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017150 ipv6type=$i;
17151 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017152 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017153fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000017154rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017155
17156 ;;
17157 esac
17158 if test "$ipv6type" != "unknown"; then
17159 break
17160 fi
17161 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017162 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17163echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017164fi
17165
17166if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17167 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17168 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17169 echo "using lib$ipv6lib"
17170 else
17171 if test $ipv6trylibc = "yes"; then
17172 echo "using libc"
17173 else
17174 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17175 echo "You need to fetch lib$ipv6lib.a from appropriate"
17176 echo 'ipv6 kit and compile beforehand.'
17177 exit 1
17178 fi
17179 fi
17180fi
17181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017182{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17183echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017184cat >conftest.$ac_ext <<_ACEOF
17185/* confdefs.h. */
17186_ACEOF
17187cat confdefs.h >>conftest.$ac_ext
17188cat >>conftest.$ac_ext <<_ACEOF
17189/* end confdefs.h. */
17190#include <Carbon/Carbon.h>
17191int
17192main ()
17193{
17194FSIORefNum fRef = 0
17195 ;
17196 return 0;
17197}
17198_ACEOF
17199rm -f conftest.$ac_objext
17200if { (ac_try="$ac_compile"
17201case "(($ac_try" in
17202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17203 *) ac_try_echo=$ac_try;;
17204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017206 (eval "$ac_compile") 2>conftest.er1
17207 ac_status=$?
17208 grep -v '^ *+' conftest.er1 >conftest.err
17209 rm -f conftest.er1
17210 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017212 (exit $ac_status); } && {
17213 test -z "$ac_c_werror_flag" ||
17214 test ! -s conftest.err
17215 } && test -s conftest.$ac_objext; then
17216
17217cat >>confdefs.h <<\_ACEOF
17218#define HAVE_OSX105_SDK 1
17219_ACEOF
17220
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017221 { echo "$as_me:$LINENO: result: yes" >&5
17222echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017223else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017224 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017225sed 's/^/| /' conftest.$ac_ext >&5
17226
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017227 { echo "$as_me:$LINENO: result: no" >&5
17228echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017229
17230fi
17231
17232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17233
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017234# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017235{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17236echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017239if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 withval=$with_doc_strings;
17241fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017242
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017243
17244if test -z "$with_doc_strings"
17245then with_doc_strings="yes"
17246fi
17247if test "$with_doc_strings" != "no"
17248then
17249
17250cat >>confdefs.h <<\_ACEOF
17251#define WITH_DOC_STRINGS 1
17252_ACEOF
17253
17254fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017255{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17256echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017257
Neil Schemenauera35c6882001-02-27 04:45:05 +000017258# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017259{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17260echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017263if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017265if test "$withval" != no
17266then
17267
17268cat >>confdefs.h <<\_ACEOF
17269#define WITH_TSC 1
17270_ACEOF
17271
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017272 { echo "$as_me:$LINENO: result: yes" >&5
17273echo "${ECHO_T}yes" >&6; }
17274else { echo "$as_me:$LINENO: result: no" >&5
17275echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017276fi
17277else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017278 { echo "$as_me:$LINENO: result: no" >&5
17279echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280fi
17281
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017282
17283# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017284{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17285echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017287# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017288if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 withval=$with_pymalloc;
17290fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017291
Neil Schemenauera35c6882001-02-27 04:45:05 +000017292
Neil Schemenauer16c22972002-03-22 15:34:49 +000017293if test -z "$with_pymalloc"
17294then with_pymalloc="yes"
17295fi
17296if test "$with_pymalloc" != "no"
17297then
Martin v. Löwis11437992002-04-12 09:54:03 +000017298
17299cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017300#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017301_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017302
17303fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017304{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17305echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017306
Benjamin Peterson05159c42009-12-03 03:01:27 +000017307# Check for Valgrind support
17308{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17309echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17310
17311# Check whether --with-valgrind was given.
17312if test "${with_valgrind+set}" = set; then
17313 withval=$with_valgrind;
17314else
17315 with_valgrind=no
17316fi
17317
17318{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17319echo "${ECHO_T}$with_valgrind" >&6; }
17320if test "$with_valgrind" != no; then
17321 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17322 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17323echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17324if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17325 echo $ECHO_N "(cached) $ECHO_C" >&6
17326fi
17327{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17328echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17329else
17330 # Is the header compilable?
17331{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17332echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17333cat >conftest.$ac_ext <<_ACEOF
17334/* confdefs.h. */
17335_ACEOF
17336cat confdefs.h >>conftest.$ac_ext
17337cat >>conftest.$ac_ext <<_ACEOF
17338/* end confdefs.h. */
17339$ac_includes_default
17340#include <valgrind/valgrind.h>
17341_ACEOF
17342rm -f conftest.$ac_objext
17343if { (ac_try="$ac_compile"
17344case "(($ac_try" in
17345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17346 *) ac_try_echo=$ac_try;;
17347esac
17348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17349 (eval "$ac_compile") 2>conftest.er1
17350 ac_status=$?
17351 grep -v '^ *+' conftest.er1 >conftest.err
17352 rm -f conftest.er1
17353 cat conftest.err >&5
17354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17355 (exit $ac_status); } && {
17356 test -z "$ac_c_werror_flag" ||
17357 test ! -s conftest.err
17358 } && test -s conftest.$ac_objext; then
17359 ac_header_compiler=yes
17360else
17361 echo "$as_me: failed program was:" >&5
17362sed 's/^/| /' conftest.$ac_ext >&5
17363
17364 ac_header_compiler=no
17365fi
17366
17367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17368{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17369echo "${ECHO_T}$ac_header_compiler" >&6; }
17370
17371# Is the header present?
17372{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17373echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17374cat >conftest.$ac_ext <<_ACEOF
17375/* confdefs.h. */
17376_ACEOF
17377cat confdefs.h >>conftest.$ac_ext
17378cat >>conftest.$ac_ext <<_ACEOF
17379/* end confdefs.h. */
17380#include <valgrind/valgrind.h>
17381_ACEOF
17382if { (ac_try="$ac_cpp conftest.$ac_ext"
17383case "(($ac_try" in
17384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17385 *) ac_try_echo=$ac_try;;
17386esac
17387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17388 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17389 ac_status=$?
17390 grep -v '^ *+' conftest.er1 >conftest.err
17391 rm -f conftest.er1
17392 cat conftest.err >&5
17393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17394 (exit $ac_status); } >/dev/null && {
17395 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17396 test ! -s conftest.err
17397 }; then
17398 ac_header_preproc=yes
17399else
17400 echo "$as_me: failed program was:" >&5
17401sed 's/^/| /' conftest.$ac_ext >&5
17402
17403 ac_header_preproc=no
17404fi
17405
17406rm -f conftest.err conftest.$ac_ext
17407{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17408echo "${ECHO_T}$ac_header_preproc" >&6; }
17409
17410# So? What about this header?
17411case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17412 yes:no: )
17413 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17414echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17415 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17416echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17417 ac_header_preproc=yes
17418 ;;
17419 no:yes:* )
17420 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17421echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17422 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17423echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17424 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17425echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17426 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17427echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17428 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17429echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17430 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17431echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17432 ( cat <<\_ASBOX
17433## -------------------------------------- ##
17434## Report this to http://bugs.python.org/ ##
17435## -------------------------------------- ##
17436_ASBOX
17437 ) | sed "s/^/$as_me: WARNING: /" >&2
17438 ;;
17439esac
17440{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17441echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17442if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17443 echo $ECHO_N "(cached) $ECHO_C" >&6
17444else
17445 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17446fi
17447{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17448echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17449
17450fi
17451if test $ac_cv_header_valgrind_valgrind_h = yes; then
17452
17453cat >>confdefs.h <<\_ACEOF
17454#define WITH_VALGRIND 1
17455_ACEOF
17456
17457else
17458 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17459echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17460 { (exit 1); exit 1; }; }
17461
17462fi
17463
17464
17465fi
17466
Barry Warsawef82cd72000-06-30 16:21:01 +000017467# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017468{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17469echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017472if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017473 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017474if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017475then
17476
17477cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017478#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017479_ACEOF
17480
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017481 { echo "$as_me:$LINENO: result: yes" >&5
17482echo "${ECHO_T}yes" >&6; }
17483else { echo "$as_me:$LINENO: result: no" >&5
17484echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017485fi
17486else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017487 { echo "$as_me:$LINENO: result: no" >&5
17488echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017489fi
17490
Barry Warsawef82cd72000-06-30 16:21:01 +000017491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017492# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017493
Guido van Rossum98935bf2001-09-05 19:13:16 +000017494DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017495
Guido van Rossume97ee181999-12-20 21:27:22 +000017496# the dlopen() function means we might want to use dynload_shlib.o. some
17497# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017498
Thomas Wouters3a584202000-08-05 23:28:51 +000017499for ac_func in dlopen
17500do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17502{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017504if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017506else
Martin v. Löwis11437992002-04-12 09:54:03 +000017507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017508/* confdefs.h. */
17509_ACEOF
17510cat confdefs.h >>conftest.$ac_ext
17511cat >>conftest.$ac_ext <<_ACEOF
17512/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017513/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17515#define $ac_func innocuous_$ac_func
17516
Guido van Rossume97ee181999-12-20 21:27:22 +000017517/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017518 which can conflict with char $ac_func (); below.
17519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017520 <limits.h> exists even on freestanding compilers. */
17521
17522#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017523# include <limits.h>
17524#else
17525# include <assert.h>
17526#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017527
17528#undef $ac_func
17529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530/* Override any GCC internal prototype to avoid an error.
17531 Use char because int might match the return type of a GCC
17532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017533#ifdef __cplusplus
17534extern "C"
17535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017536char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017537/* The GNU C library defines this for functions which it implements
17538 to always fail with ENOSYS. Some functions are actually named
17539 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017541choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017542#endif
17543
Skip Montanaro6dead952003-09-25 14:50:04 +000017544int
17545main ()
17546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017548 ;
17549 return 0;
17550}
17551_ACEOF
17552rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553if { (ac_try="$ac_link"
17554case "(($ac_try" in
17555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17556 *) ac_try_echo=$ac_try;;
17557esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017561 grep -v '^ *+' conftest.er1 >conftest.err
17562 rm -f conftest.er1
17563 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565 (exit $ac_status); } && {
17566 test -z "$ac_c_werror_flag" ||
17567 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017568 } && test -s conftest$ac_exeext &&
17569 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017570 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017571else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017573sed 's/^/| /' conftest.$ac_ext >&5
17574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577
17578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017579 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017580fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017581ac_res=`eval echo '${'$as_ac_var'}'`
17582 { echo "$as_me:$LINENO: result: $ac_res" >&5
17583echo "${ECHO_T}$ac_res" >&6; }
17584if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017586#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017587_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017588
Guido van Rossume97ee181999-12-20 21:27:22 +000017589fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017590done
Guido van Rossume97ee181999-12-20 21:27:22 +000017591
Michael W. Hudson54241132001-12-07 15:38:26 +000017592
Guido van Rossume97ee181999-12-20 21:27:22 +000017593# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17594# loading of modules.
17595
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017596{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17597echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017598if test -z "$DYNLOADFILE"
17599then
17600 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017601 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17602 if test "$ac_cv_func_dlopen" = yes
17603 then DYNLOADFILE="dynload_shlib.o"
17604 else DYNLOADFILE="dynload_aix.o"
17605 fi
17606 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017607 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017608 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17609 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017610 *)
17611 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17612 # out any dynamic loading
17613 if test "$ac_cv_func_dlopen" = yes
17614 then DYNLOADFILE="dynload_shlib.o"
17615 else DYNLOADFILE="dynload_stub.o"
17616 fi
17617 ;;
17618 esac
17619fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017620{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17621echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017622if test "$DYNLOADFILE" != "dynload_stub.o"
17623then
Martin v. Löwis11437992002-04-12 09:54:03 +000017624
17625cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017626#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017627_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017628
17629fi
17630
Neil Schemenauer4e425612001-06-19 15:44:15 +000017631# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17632
Michael W. Hudson54241132001-12-07 15:38:26 +000017633
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017634{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17635echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017636if test -z "$MACHDEP_OBJS"
17637then
Jack Jansene578a632001-08-15 01:27:14 +000017638 MACHDEP_OBJS=$extra_machdep_objs
17639else
17640 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017641fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017642{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17643echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017644
Guido van Rossum627b2d71993-12-24 10:39:16 +000017645# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017646
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
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
Martin v. Löwisd6320502004-08-12 13:45:08 +000017717
Martin v. Löwisc3001752005-01-23 09:27:24 +000017718
17719
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017720
17721
Thomas Wouterscf297e42007-02-23 15:07:44 +000017722
17723
Gregory P. Smith25523d22007-09-03 16:44:55 +000017724
Christian Heimes4e30a842007-11-30 22:12:06 +000017725
Martin v. Löwis92fab752008-03-08 10:40:41 +000017726
Martin v. Löwis823725e2008-03-24 13:39:54 +000017727
17728
Benjamin Peterson965ce872009-04-05 21:24:58 +000017729
17730
17731
17732
Martin v. Löwis011e8422009-05-05 04:43:17 +000017733
Martin v. Löwis113a0852009-05-29 17:25:39 +000017734
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017735
17736
17737
17738
Antoine Pitroub7572f02009-12-02 20:46:48 +000017739
Martin v. Löwis823725e2008-03-24 13:39:54 +000017740for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17741 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017742 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017743 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017744 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017745 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017746 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017747 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17748 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017749 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17750 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017751 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017752 truncate uname unsetenv utimes waitpid wait3 wait4 \
17753 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017754do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017755as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17756{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17757echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017759 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017760else
Martin v. Löwis11437992002-04-12 09:54:03 +000017761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017762/* confdefs.h. */
17763_ACEOF
17764cat confdefs.h >>conftest.$ac_ext
17765cat >>conftest.$ac_ext <<_ACEOF
17766/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017767/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17768 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17769#define $ac_func innocuous_$ac_func
17770
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017771/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017772 which can conflict with char $ac_func (); below.
17773 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017774 <limits.h> exists even on freestanding compilers. */
17775
17776#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017777# include <limits.h>
17778#else
17779# include <assert.h>
17780#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017781
17782#undef $ac_func
17783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784/* Override any GCC internal prototype to avoid an error.
17785 Use char because int might match the return type of a GCC
17786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017787#ifdef __cplusplus
17788extern "C"
17789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017790char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017791/* The GNU C library defines this for functions which it implements
17792 to always fail with ENOSYS. Some functions are actually named
17793 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017795choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017796#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017797
Skip Montanaro6dead952003-09-25 14:50:04 +000017798int
17799main ()
17800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017802 ;
17803 return 0;
17804}
17805_ACEOF
17806rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807if { (ac_try="$ac_link"
17808case "(($ac_try" in
17809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17810 *) ac_try_echo=$ac_try;;
17811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017815 grep -v '^ *+' conftest.er1 >conftest.err
17816 rm -f conftest.er1
17817 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819 (exit $ac_status); } && {
17820 test -z "$ac_c_werror_flag" ||
17821 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017822 } && test -s conftest$ac_exeext &&
17823 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017825else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017827sed 's/^/| /' conftest.$ac_ext >&5
17828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831
17832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017833 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017834fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017835ac_res=`eval echo '${'$as_ac_var'}'`
17836 { echo "$as_me:$LINENO: result: $ac_res" >&5
17837echo "${ECHO_T}$ac_res" >&6; }
17838if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017839 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017840#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017841_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017842
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017843fi
17844done
17845
Michael W. Hudson54241132001-12-07 15:38:26 +000017846
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017847# For some functions, having a definition is not sufficient, since
17848# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017849{ echo "$as_me:$LINENO: checking for chroot" >&5
17850echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017852/* confdefs.h. */
17853_ACEOF
17854cat confdefs.h >>conftest.$ac_ext
17855cat >>conftest.$ac_ext <<_ACEOF
17856/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017857#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017858int
17859main ()
17860{
17861void *x=chroot
17862 ;
17863 return 0;
17864}
17865_ACEOF
17866rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867if { (ac_try="$ac_compile"
17868case "(($ac_try" in
17869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17870 *) ac_try_echo=$ac_try;;
17871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017875 grep -v '^ *+' conftest.er1 >conftest.err
17876 rm -f conftest.er1
17877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879 (exit $ac_status); } && {
17880 test -z "$ac_c_werror_flag" ||
17881 test ! -s conftest.err
17882 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017883
17884cat >>confdefs.h <<\_ACEOF
17885#define HAVE_CHROOT 1
17886_ACEOF
17887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017888 { echo "$as_me:$LINENO: result: yes" >&5
17889echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017892sed 's/^/| /' conftest.$ac_ext >&5
17893
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017894 { echo "$as_me:$LINENO: result: no" >&5
17895echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017896
17897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017898
17899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017900{ echo "$as_me:$LINENO: checking for link" >&5
17901echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017903/* confdefs.h. */
17904_ACEOF
17905cat confdefs.h >>conftest.$ac_ext
17906cat >>conftest.$ac_ext <<_ACEOF
17907/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017908#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017909int
17910main ()
17911{
17912void *x=link
17913 ;
17914 return 0;
17915}
17916_ACEOF
17917rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017918if { (ac_try="$ac_compile"
17919case "(($ac_try" in
17920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17921 *) ac_try_echo=$ac_try;;
17922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017926 grep -v '^ *+' conftest.er1 >conftest.err
17927 rm -f conftest.er1
17928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930 (exit $ac_status); } && {
17931 test -z "$ac_c_werror_flag" ||
17932 test ! -s conftest.err
17933 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017934
17935cat >>confdefs.h <<\_ACEOF
17936#define HAVE_LINK 1
17937_ACEOF
17938
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017939 { echo "$as_me:$LINENO: result: yes" >&5
17940echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017941else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017943sed 's/^/| /' conftest.$ac_ext >&5
17944
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017945 { echo "$as_me:$LINENO: result: no" >&5
17946echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017947
17948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949
17950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017951{ echo "$as_me:$LINENO: checking for symlink" >&5
17952echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017954/* confdefs.h. */
17955_ACEOF
17956cat confdefs.h >>conftest.$ac_ext
17957cat >>conftest.$ac_ext <<_ACEOF
17958/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017959#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017960int
17961main ()
17962{
17963void *x=symlink
17964 ;
17965 return 0;
17966}
17967_ACEOF
17968rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969if { (ac_try="$ac_compile"
17970case "(($ac_try" in
17971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17972 *) ac_try_echo=$ac_try;;
17973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017977 grep -v '^ *+' conftest.er1 >conftest.err
17978 rm -f conftest.er1
17979 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981 (exit $ac_status); } && {
17982 test -z "$ac_c_werror_flag" ||
17983 test ! -s conftest.err
17984 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017985
17986cat >>confdefs.h <<\_ACEOF
17987#define HAVE_SYMLINK 1
17988_ACEOF
17989
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017990 { echo "$as_me:$LINENO: result: yes" >&5
17991echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017994sed 's/^/| /' conftest.$ac_ext >&5
17995
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017996 { echo "$as_me:$LINENO: result: no" >&5
17997echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017998
17999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000
18001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018002{ echo "$as_me:$LINENO: checking for fchdir" >&5
18003echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018005/* confdefs.h. */
18006_ACEOF
18007cat confdefs.h >>conftest.$ac_ext
18008cat >>conftest.$ac_ext <<_ACEOF
18009/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018010#include <unistd.h>
18011int
18012main ()
18013{
18014void *x=fchdir
18015 ;
18016 return 0;
18017}
18018_ACEOF
18019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018020if { (ac_try="$ac_compile"
18021case "(($ac_try" in
18022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18023 *) ac_try_echo=$ac_try;;
18024esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018028 grep -v '^ *+' conftest.er1 >conftest.err
18029 rm -f conftest.er1
18030 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032 (exit $ac_status); } && {
18033 test -z "$ac_c_werror_flag" ||
18034 test ! -s conftest.err
18035 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018036
18037cat >>confdefs.h <<\_ACEOF
18038#define HAVE_FCHDIR 1
18039_ACEOF
18040
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018041 { echo "$as_me:$LINENO: result: yes" >&5
18042echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018045sed 's/^/| /' conftest.$ac_ext >&5
18046
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018047 { echo "$as_me:$LINENO: result: no" >&5
18048echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018049
18050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051
18052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018053{ echo "$as_me:$LINENO: checking for fsync" >&5
18054echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018055cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018056/* confdefs.h. */
18057_ACEOF
18058cat confdefs.h >>conftest.$ac_ext
18059cat >>conftest.$ac_ext <<_ACEOF
18060/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018061#include <unistd.h>
18062int
18063main ()
18064{
18065void *x=fsync
18066 ;
18067 return 0;
18068}
18069_ACEOF
18070rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071if { (ac_try="$ac_compile"
18072case "(($ac_try" in
18073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18074 *) ac_try_echo=$ac_try;;
18075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018079 grep -v '^ *+' conftest.er1 >conftest.err
18080 rm -f conftest.er1
18081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018083 (exit $ac_status); } && {
18084 test -z "$ac_c_werror_flag" ||
18085 test ! -s conftest.err
18086 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018087
18088cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018089#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018090_ACEOF
18091
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018092 { echo "$as_me:$LINENO: result: yes" >&5
18093echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018094else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018096sed 's/^/| /' conftest.$ac_ext >&5
18097
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018098 { echo "$as_me:$LINENO: result: no" >&5
18099echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018100
18101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018102
18103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018104{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18105echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018107/* confdefs.h. */
18108_ACEOF
18109cat confdefs.h >>conftest.$ac_ext
18110cat >>conftest.$ac_ext <<_ACEOF
18111/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018112#include <unistd.h>
18113int
18114main ()
18115{
18116void *x=fdatasync
18117 ;
18118 return 0;
18119}
18120_ACEOF
18121rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122if { (ac_try="$ac_compile"
18123case "(($ac_try" in
18124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18125 *) ac_try_echo=$ac_try;;
18126esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018130 grep -v '^ *+' conftest.er1 >conftest.err
18131 rm -f conftest.er1
18132 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018134 (exit $ac_status); } && {
18135 test -z "$ac_c_werror_flag" ||
18136 test ! -s conftest.err
18137 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018138
18139cat >>confdefs.h <<\_ACEOF
18140#define HAVE_FDATASYNC 1
18141_ACEOF
18142
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018143 { echo "$as_me:$LINENO: result: yes" >&5
18144echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018145else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018147sed 's/^/| /' conftest.$ac_ext >&5
18148
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018149 { echo "$as_me:$LINENO: result: no" >&5
18150echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018151
18152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153
18154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018155{ echo "$as_me:$LINENO: checking for epoll" >&5
18156echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018157cat >conftest.$ac_ext <<_ACEOF
18158/* confdefs.h. */
18159_ACEOF
18160cat confdefs.h >>conftest.$ac_ext
18161cat >>conftest.$ac_ext <<_ACEOF
18162/* end confdefs.h. */
18163#include <sys/epoll.h>
18164int
18165main ()
18166{
18167void *x=epoll_create
18168 ;
18169 return 0;
18170}
18171_ACEOF
18172rm -f conftest.$ac_objext
18173if { (ac_try="$ac_compile"
18174case "(($ac_try" in
18175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18176 *) ac_try_echo=$ac_try;;
18177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018179 (eval "$ac_compile") 2>conftest.er1
18180 ac_status=$?
18181 grep -v '^ *+' conftest.er1 >conftest.err
18182 rm -f conftest.er1
18183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018185 (exit $ac_status); } && {
18186 test -z "$ac_c_werror_flag" ||
18187 test ! -s conftest.err
18188 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018189
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018190cat >>confdefs.h <<\_ACEOF
18191#define HAVE_EPOLL 1
18192_ACEOF
18193
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018194 { echo "$as_me:$LINENO: result: yes" >&5
18195echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018196else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018197 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018198sed 's/^/| /' conftest.$ac_ext >&5
18199
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018200 { echo "$as_me:$LINENO: result: no" >&5
18201echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018202
18203fi
18204
18205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018206{ echo "$as_me:$LINENO: checking for kqueue" >&5
18207echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018208cat >conftest.$ac_ext <<_ACEOF
18209/* confdefs.h. */
18210_ACEOF
18211cat confdefs.h >>conftest.$ac_ext
18212cat >>conftest.$ac_ext <<_ACEOF
18213/* end confdefs.h. */
18214
18215#include <sys/types.h>
18216#include <sys/event.h>
18217
18218int
18219main ()
18220{
18221int x=kqueue()
18222 ;
18223 return 0;
18224}
18225_ACEOF
18226rm -f conftest.$ac_objext
18227if { (ac_try="$ac_compile"
18228case "(($ac_try" in
18229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18230 *) ac_try_echo=$ac_try;;
18231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018233 (eval "$ac_compile") 2>conftest.er1
18234 ac_status=$?
18235 grep -v '^ *+' conftest.er1 >conftest.err
18236 rm -f conftest.er1
18237 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018239 (exit $ac_status); } && {
18240 test -z "$ac_c_werror_flag" ||
18241 test ! -s conftest.err
18242 } && test -s conftest.$ac_objext; then
18243
18244cat >>confdefs.h <<\_ACEOF
18245#define HAVE_KQUEUE 1
18246_ACEOF
18247
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018248 { echo "$as_me:$LINENO: result: yes" >&5
18249echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018251 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018252sed 's/^/| /' conftest.$ac_ext >&5
18253
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018254 { echo "$as_me:$LINENO: result: no" >&5
18255echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018256
18257fi
18258
18259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018260# On some systems (eg. FreeBSD 5), we would find a definition of the
18261# functions ctermid_r, setgroups in the library, but no prototype
18262# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18263# address to avoid compiler warnings and potential miscompilations
18264# because of the missing prototypes.
18265
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018266{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18267echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018268cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018269/* confdefs.h. */
18270_ACEOF
18271cat confdefs.h >>conftest.$ac_ext
18272cat >>conftest.$ac_ext <<_ACEOF
18273/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018274
18275#include "confdefs.h"
18276#include <stdio.h>
18277
Martin v. Löwisd5843682002-11-21 20:41:28 +000018278int
18279main ()
18280{
18281void* p = ctermid_r
18282 ;
18283 return 0;
18284}
18285_ACEOF
18286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287if { (ac_try="$ac_compile"
18288case "(($ac_try" in
18289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18290 *) ac_try_echo=$ac_try;;
18291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018295 grep -v '^ *+' conftest.er1 >conftest.err
18296 rm -f conftest.er1
18297 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299 (exit $ac_status); } && {
18300 test -z "$ac_c_werror_flag" ||
18301 test ! -s conftest.err
18302 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018303
18304cat >>confdefs.h <<\_ACEOF
18305#define HAVE_CTERMID_R 1
18306_ACEOF
18307
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018308 { echo "$as_me:$LINENO: result: yes" >&5
18309echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018310else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018312sed 's/^/| /' conftest.$ac_ext >&5
18313
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018314 { echo "$as_me:$LINENO: result: no" >&5
18315echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018316
18317fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18320
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018321{ echo "$as_me:$LINENO: checking for flock" >&5
18322echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018323cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018324/* confdefs.h. */
18325_ACEOF
18326cat confdefs.h >>conftest.$ac_ext
18327cat >>conftest.$ac_ext <<_ACEOF
18328/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018329
18330#include "confdefs.h"
18331#include <sys/file.h>
18332
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018333int
18334main ()
18335{
18336void* p = flock
18337 ;
18338 return 0;
18339}
18340_ACEOF
18341rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018342if { (ac_try="$ac_compile"
18343case "(($ac_try" in
18344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18345 *) ac_try_echo=$ac_try;;
18346esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018348 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018350 grep -v '^ *+' conftest.er1 >conftest.err
18351 rm -f conftest.er1
18352 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354 (exit $ac_status); } && {
18355 test -z "$ac_c_werror_flag" ||
18356 test ! -s conftest.err
18357 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018358
18359cat >>confdefs.h <<\_ACEOF
18360#define HAVE_FLOCK 1
18361_ACEOF
18362
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018363 { echo "$as_me:$LINENO: result: yes" >&5
18364echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018367sed 's/^/| /' conftest.$ac_ext >&5
18368
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018369 { echo "$as_me:$LINENO: result: no" >&5
18370echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018371
18372fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18375
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018376{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18377echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018379/* confdefs.h. */
18380_ACEOF
18381cat confdefs.h >>conftest.$ac_ext
18382cat >>conftest.$ac_ext <<_ACEOF
18383/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018384
18385#include "confdefs.h"
18386#include <unistd.h>
18387
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018388int
18389main ()
18390{
18391void* p = getpagesize
18392 ;
18393 return 0;
18394}
18395_ACEOF
18396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018397if { (ac_try="$ac_compile"
18398case "(($ac_try" in
18399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18400 *) ac_try_echo=$ac_try;;
18401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018405 grep -v '^ *+' conftest.er1 >conftest.err
18406 rm -f conftest.er1
18407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409 (exit $ac_status); } && {
18410 test -z "$ac_c_werror_flag" ||
18411 test ! -s conftest.err
18412 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018413
18414cat >>confdefs.h <<\_ACEOF
18415#define HAVE_GETPAGESIZE 1
18416_ACEOF
18417
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018418 { echo "$as_me:$LINENO: result: yes" >&5
18419echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018420else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018422sed 's/^/| /' conftest.$ac_ext >&5
18423
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018424 { echo "$as_me:$LINENO: result: no" >&5
18425echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018426
18427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428
18429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018430
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018431for ac_prog in true
18432do
18433 # Extract the first word of "$ac_prog", so it can be a program name with args.
18434set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018435{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18436echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018437if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018438 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018439else
18440 if test -n "$TRUE"; then
18441 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18442else
18443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18444for as_dir in $PATH
18445do
18446 IFS=$as_save_IFS
18447 test -z "$as_dir" && as_dir=.
18448 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018449 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 +000018450 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018451 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018452 break 2
18453 fi
18454done
18455done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018456IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018457
18458fi
18459fi
18460TRUE=$ac_cv_prog_TRUE
18461if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018462 { echo "$as_me:$LINENO: result: $TRUE" >&5
18463echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018464else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018465 { echo "$as_me:$LINENO: result: no" >&5
18466echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018467fi
18468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018470 test -n "$TRUE" && break
18471done
18472test -n "$TRUE" || TRUE="/bin/true"
18473
18474
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018475{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18476echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018477if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018478 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018479else
18480 ac_check_lib_save_LIBS=$LIBS
18481LIBS="-lc $LIBS"
18482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018483/* confdefs.h. */
18484_ACEOF
18485cat confdefs.h >>conftest.$ac_ext
18486cat >>conftest.$ac_ext <<_ACEOF
18487/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489/* Override any GCC internal prototype to avoid an error.
18490 Use char because int might match the return type of a GCC
18491 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018492#ifdef __cplusplus
18493extern "C"
18494#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018495char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018496int
18497main ()
18498{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018499return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018500 ;
18501 return 0;
18502}
18503_ACEOF
18504rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505if { (ac_try="$ac_link"
18506case "(($ac_try" in
18507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18508 *) ac_try_echo=$ac_try;;
18509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018511 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018513 grep -v '^ *+' conftest.er1 >conftest.err
18514 rm -f conftest.er1
18515 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018517 (exit $ac_status); } && {
18518 test -z "$ac_c_werror_flag" ||
18519 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018520 } && test -s conftest$ac_exeext &&
18521 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018522 ac_cv_lib_c_inet_aton=yes
18523else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018525sed 's/^/| /' conftest.$ac_ext >&5
18526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529
18530rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018532LIBS=$ac_check_lib_save_LIBS
18533fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018534{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18535echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18536if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018537 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018538else
18539
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018540{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18541echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018542if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018543 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018544else
18545 ac_check_lib_save_LIBS=$LIBS
18546LIBS="-lresolv $LIBS"
18547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018548/* confdefs.h. */
18549_ACEOF
18550cat confdefs.h >>conftest.$ac_ext
18551cat >>conftest.$ac_ext <<_ACEOF
18552/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018554/* Override any GCC internal prototype to avoid an error.
18555 Use char because int might match the return type of a GCC
18556 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018557#ifdef __cplusplus
18558extern "C"
18559#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018560char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018561int
18562main ()
18563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018564return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018565 ;
18566 return 0;
18567}
18568_ACEOF
18569rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018570if { (ac_try="$ac_link"
18571case "(($ac_try" in
18572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18573 *) ac_try_echo=$ac_try;;
18574esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018576 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018578 grep -v '^ *+' conftest.er1 >conftest.err
18579 rm -f conftest.er1
18580 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018582 (exit $ac_status); } && {
18583 test -z "$ac_c_werror_flag" ||
18584 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018585 } && test -s conftest$ac_exeext &&
18586 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018587 ac_cv_lib_resolv_inet_aton=yes
18588else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018590sed 's/^/| /' conftest.$ac_ext >&5
18591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594
18595rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018597LIBS=$ac_check_lib_save_LIBS
18598fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018599{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18600echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18601if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018602 cat >>confdefs.h <<_ACEOF
18603#define HAVE_LIBRESOLV 1
18604_ACEOF
18605
18606 LIBS="-lresolv $LIBS"
18607
18608fi
18609
18610
18611fi
18612
18613
Christian Heimesd0764e22007-12-04 15:00:33 +000018614# On Tru64, chflags seems to be present, but calling it will
18615# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018616{ echo "$as_me:$LINENO: checking for chflags" >&5
18617echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018618if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018619 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018620else
18621 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018622 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018623else
18624 cat >conftest.$ac_ext <<_ACEOF
18625/* confdefs.h. */
18626_ACEOF
18627cat confdefs.h >>conftest.$ac_ext
18628cat >>conftest.$ac_ext <<_ACEOF
18629/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018630[
Christian Heimesd0764e22007-12-04 15:00:33 +000018631#include <sys/stat.h>
18632#include <unistd.h>
18633int main(int argc, char*argv[])
18634{
18635 if(chflags(argv[0], 0) != 0)
18636 return 1;
18637 return 0;
18638}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018639]
Christian Heimesd0764e22007-12-04 15:00:33 +000018640_ACEOF
18641rm -f conftest$ac_exeext
18642if { (ac_try="$ac_link"
18643case "(($ac_try" in
18644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18645 *) ac_try_echo=$ac_try;;
18646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018648 (eval "$ac_link") 2>&5
18649 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018651 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18652 { (case "(($ac_try" in
18653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18654 *) ac_try_echo=$ac_try;;
18655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018657 (eval "$ac_try") 2>&5
18658 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018660 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018661 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018663 echo "$as_me: program exited with status $ac_status" >&5
18664echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018665sed 's/^/| /' conftest.$ac_ext >&5
18666
18667( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018668ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018669fi
18670rm -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 +000018671fi
18672
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018673
18674
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018675fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018676{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18677echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018678if test "$ac_cv_have_chflags" = cross ; then
18679 { echo "$as_me:$LINENO: checking for chflags" >&5
18680echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18681if test "${ac_cv_func_chflags+set}" = set; then
18682 echo $ECHO_N "(cached) $ECHO_C" >&6
18683else
18684 cat >conftest.$ac_ext <<_ACEOF
18685/* confdefs.h. */
18686_ACEOF
18687cat confdefs.h >>conftest.$ac_ext
18688cat >>conftest.$ac_ext <<_ACEOF
18689/* end confdefs.h. */
18690/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18691 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18692#define chflags innocuous_chflags
18693
18694/* System header to define __stub macros and hopefully few prototypes,
18695 which can conflict with char chflags (); below.
18696 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18697 <limits.h> exists even on freestanding compilers. */
18698
18699#ifdef __STDC__
18700# include <limits.h>
18701#else
18702# include <assert.h>
18703#endif
18704
18705#undef chflags
18706
18707/* Override any GCC internal prototype to avoid an error.
18708 Use char because int might match the return type of a GCC
18709 builtin and then its argument prototype would still apply. */
18710#ifdef __cplusplus
18711extern "C"
18712#endif
18713char chflags ();
18714/* The GNU C library defines this for functions which it implements
18715 to always fail with ENOSYS. Some functions are actually named
18716 something starting with __ and the normal name is an alias. */
18717#if defined __stub_chflags || defined __stub___chflags
18718choke me
18719#endif
18720
18721int
18722main ()
18723{
18724return chflags ();
18725 ;
18726 return 0;
18727}
18728_ACEOF
18729rm -f conftest.$ac_objext conftest$ac_exeext
18730if { (ac_try="$ac_link"
18731case "(($ac_try" in
18732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733 *) ac_try_echo=$ac_try;;
18734esac
18735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18736 (eval "$ac_link") 2>conftest.er1
18737 ac_status=$?
18738 grep -v '^ *+' conftest.er1 >conftest.err
18739 rm -f conftest.er1
18740 cat conftest.err >&5
18741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18742 (exit $ac_status); } && {
18743 test -z "$ac_c_werror_flag" ||
18744 test ! -s conftest.err
18745 } && test -s conftest$ac_exeext &&
18746 $as_test_x conftest$ac_exeext; then
18747 ac_cv_func_chflags=yes
18748else
18749 echo "$as_me: failed program was:" >&5
18750sed 's/^/| /' conftest.$ac_ext >&5
18751
18752 ac_cv_func_chflags=no
18753fi
18754
18755rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18756 conftest$ac_exeext conftest.$ac_ext
18757fi
18758{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18759echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18760if test $ac_cv_func_chflags = yes; then
18761 ac_cv_have_chflags="yes"
18762else
18763 ac_cv_have_chflags="no"
18764fi
18765
18766fi
18767if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018768
18769cat >>confdefs.h <<\_ACEOF
18770#define HAVE_CHFLAGS 1
18771_ACEOF
18772
18773fi
18774
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018775{ echo "$as_me:$LINENO: checking for lchflags" >&5
18776echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018777if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018778 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018779else
18780 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018781 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018782else
18783 cat >conftest.$ac_ext <<_ACEOF
18784/* confdefs.h. */
18785_ACEOF
18786cat confdefs.h >>conftest.$ac_ext
18787cat >>conftest.$ac_ext <<_ACEOF
18788/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018789[
Christian Heimesd0764e22007-12-04 15:00:33 +000018790#include <sys/stat.h>
18791#include <unistd.h>
18792int main(int argc, char*argv[])
18793{
18794 if(lchflags(argv[0], 0) != 0)
18795 return 1;
18796 return 0;
18797}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018798]
Christian Heimesd0764e22007-12-04 15:00:33 +000018799_ACEOF
18800rm -f conftest$ac_exeext
18801if { (ac_try="$ac_link"
18802case "(($ac_try" in
18803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18804 *) ac_try_echo=$ac_try;;
18805esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018807 (eval "$ac_link") 2>&5
18808 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18811 { (case "(($ac_try" in
18812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18813 *) ac_try_echo=$ac_try;;
18814esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018816 (eval "$ac_try") 2>&5
18817 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018819 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018820 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018822 echo "$as_me: program exited with status $ac_status" >&5
18823echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018824sed 's/^/| /' conftest.$ac_ext >&5
18825
18826( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018827ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018828fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18830fi
18831
18832
Christian Heimesd0764e22007-12-04 15:00:33 +000018833
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018834fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018835{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18836echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018837if test "$ac_cv_have_lchflags" = cross ; then
18838 { echo "$as_me:$LINENO: checking for lchflags" >&5
18839echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18840if test "${ac_cv_func_lchflags+set}" = set; then
18841 echo $ECHO_N "(cached) $ECHO_C" >&6
18842else
18843 cat >conftest.$ac_ext <<_ACEOF
18844/* confdefs.h. */
18845_ACEOF
18846cat confdefs.h >>conftest.$ac_ext
18847cat >>conftest.$ac_ext <<_ACEOF
18848/* end confdefs.h. */
18849/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18850 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18851#define lchflags innocuous_lchflags
18852
18853/* System header to define __stub macros and hopefully few prototypes,
18854 which can conflict with char lchflags (); below.
18855 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18856 <limits.h> exists even on freestanding compilers. */
18857
18858#ifdef __STDC__
18859# include <limits.h>
18860#else
18861# include <assert.h>
18862#endif
18863
18864#undef lchflags
18865
18866/* Override any GCC internal prototype to avoid an error.
18867 Use char because int might match the return type of a GCC
18868 builtin and then its argument prototype would still apply. */
18869#ifdef __cplusplus
18870extern "C"
18871#endif
18872char lchflags ();
18873/* The GNU C library defines this for functions which it implements
18874 to always fail with ENOSYS. Some functions are actually named
18875 something starting with __ and the normal name is an alias. */
18876#if defined __stub_lchflags || defined __stub___lchflags
18877choke me
18878#endif
18879
18880int
18881main ()
18882{
18883return lchflags ();
18884 ;
18885 return 0;
18886}
18887_ACEOF
18888rm -f conftest.$ac_objext conftest$ac_exeext
18889if { (ac_try="$ac_link"
18890case "(($ac_try" in
18891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18892 *) ac_try_echo=$ac_try;;
18893esac
18894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18895 (eval "$ac_link") 2>conftest.er1
18896 ac_status=$?
18897 grep -v '^ *+' conftest.er1 >conftest.err
18898 rm -f conftest.er1
18899 cat conftest.err >&5
18900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18901 (exit $ac_status); } && {
18902 test -z "$ac_c_werror_flag" ||
18903 test ! -s conftest.err
18904 } && test -s conftest$ac_exeext &&
18905 $as_test_x conftest$ac_exeext; then
18906 ac_cv_func_lchflags=yes
18907else
18908 echo "$as_me: failed program was:" >&5
18909sed 's/^/| /' conftest.$ac_ext >&5
18910
18911 ac_cv_func_lchflags=no
18912fi
18913
18914rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18915 conftest$ac_exeext conftest.$ac_ext
18916fi
18917{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18918echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18919if test $ac_cv_func_lchflags = yes; then
18920 ac_cv_have_lchflags="yes"
18921else
18922 ac_cv_have_lchflags="no"
18923fi
18924
18925fi
18926if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018927
18928cat >>confdefs.h <<\_ACEOF
18929#define HAVE_LCHFLAGS 1
18930_ACEOF
18931
18932fi
18933
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018934case $ac_sys_system/$ac_sys_release in
18935Darwin/*)
18936 _CUR_CFLAGS="${CFLAGS}"
18937 _CUR_LDFLAGS="${LDFLAGS}"
18938 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18939 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18940 ;;
18941esac
18942
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018943{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18944echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018945if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018946 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018947else
18948 ac_check_lib_save_LIBS=$LIBS
18949LIBS="-lz $LIBS"
18950cat >conftest.$ac_ext <<_ACEOF
18951/* confdefs.h. */
18952_ACEOF
18953cat confdefs.h >>conftest.$ac_ext
18954cat >>conftest.$ac_ext <<_ACEOF
18955/* end confdefs.h. */
18956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018957/* Override any GCC internal prototype to avoid an error.
18958 Use char because int might match the return type of a GCC
18959 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018960#ifdef __cplusplus
18961extern "C"
18962#endif
18963char inflateCopy ();
18964int
18965main ()
18966{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018967return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018968 ;
18969 return 0;
18970}
18971_ACEOF
18972rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018973if { (ac_try="$ac_link"
18974case "(($ac_try" in
18975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18976 *) ac_try_echo=$ac_try;;
18977esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018979 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018980 ac_status=$?
18981 grep -v '^ *+' conftest.er1 >conftest.err
18982 rm -f conftest.er1
18983 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018985 (exit $ac_status); } && {
18986 test -z "$ac_c_werror_flag" ||
18987 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018988 } && test -s conftest$ac_exeext &&
18989 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018990 ac_cv_lib_z_inflateCopy=yes
18991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018992 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018993sed 's/^/| /' conftest.$ac_ext >&5
18994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018995 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018997
18998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018999 conftest$ac_exeext conftest.$ac_ext
19000LIBS=$ac_check_lib_save_LIBS
19001fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019002{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19003echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19004if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019005
19006cat >>confdefs.h <<\_ACEOF
19007#define HAVE_ZLIB_COPY 1
19008_ACEOF
19009
19010fi
19011
19012
19013case $ac_sys_system/$ac_sys_release in
19014Darwin/*)
19015 CFLAGS="${_CUR_CFLAGS}"
19016 LDFLAGS="${_CUR_LDFLAGS}"
19017 ;;
19018esac
19019
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019020{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19021echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019023/* confdefs.h. */
19024_ACEOF
19025cat confdefs.h >>conftest.$ac_ext
19026cat >>conftest.$ac_ext <<_ACEOF
19027/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019028
19029#include "confdefs.h"
19030#include <netdb.h>
19031
Martin v. Löwise9416172003-05-03 10:12:45 +000019032int
19033main ()
19034{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019035void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019036 ;
19037 return 0;
19038}
19039_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019040rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019041if { (ac_try="$ac_link"
19042case "(($ac_try" in
19043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19044 *) ac_try_echo=$ac_try;;
19045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019047 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019049 grep -v '^ *+' conftest.er1 >conftest.err
19050 rm -f conftest.er1
19051 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019053 (exit $ac_status); } && {
19054 test -z "$ac_c_werror_flag" ||
19055 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019056 } && test -s conftest$ac_exeext &&
19057 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019058
19059cat >>confdefs.h <<\_ACEOF
19060#define HAVE_HSTRERROR 1
19061_ACEOF
19062
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019063 { echo "$as_me:$LINENO: result: yes" >&5
19064echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019065else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019067sed 's/^/| /' conftest.$ac_ext >&5
19068
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019069 { echo "$as_me:$LINENO: result: no" >&5
19070echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019071
19072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019073
19074rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019075 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019076
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019077{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19078echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019080/* confdefs.h. */
19081_ACEOF
19082cat confdefs.h >>conftest.$ac_ext
19083cat >>conftest.$ac_ext <<_ACEOF
19084/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019085
19086#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019087#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019088#include <sys/socket.h>
19089#include <netinet/in.h>
19090#include <arpa/inet.h>
19091
Martin v. Löwise9416172003-05-03 10:12:45 +000019092int
19093main ()
19094{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019095void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019096 ;
19097 return 0;
19098}
19099_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019100rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019101if { (ac_try="$ac_link"
19102case "(($ac_try" in
19103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19104 *) ac_try_echo=$ac_try;;
19105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019107 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019109 grep -v '^ *+' conftest.er1 >conftest.err
19110 rm -f conftest.er1
19111 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019113 (exit $ac_status); } && {
19114 test -z "$ac_c_werror_flag" ||
19115 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019116 } && test -s conftest$ac_exeext &&
19117 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019118
19119cat >>confdefs.h <<\_ACEOF
19120#define HAVE_INET_ATON 1
19121_ACEOF
19122
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019123 { echo "$as_me:$LINENO: result: yes" >&5
19124echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019127sed 's/^/| /' conftest.$ac_ext >&5
19128
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019129 { echo "$as_me:$LINENO: result: no" >&5
19130echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019131
19132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019133
19134rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019136
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019137{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19138echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019139cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019140/* confdefs.h. */
19141_ACEOF
19142cat confdefs.h >>conftest.$ac_ext
19143cat >>conftest.$ac_ext <<_ACEOF
19144/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019145
19146#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019147#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019148#include <sys/socket.h>
19149#include <netinet/in.h>
19150#include <arpa/inet.h>
19151
Martin v. Löwise9416172003-05-03 10:12:45 +000019152int
19153main ()
19154{
19155void* p = inet_pton
19156 ;
19157 return 0;
19158}
19159_ACEOF
19160rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019161if { (ac_try="$ac_compile"
19162case "(($ac_try" in
19163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19164 *) ac_try_echo=$ac_try;;
19165esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019169 grep -v '^ *+' conftest.er1 >conftest.err
19170 rm -f conftest.er1
19171 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019173 (exit $ac_status); } && {
19174 test -z "$ac_c_werror_flag" ||
19175 test ! -s conftest.err
19176 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019177
19178cat >>confdefs.h <<\_ACEOF
19179#define HAVE_INET_PTON 1
19180_ACEOF
19181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019182 { echo "$as_me:$LINENO: result: yes" >&5
19183echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019184else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019186sed 's/^/| /' conftest.$ac_ext >&5
19187
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019188 { echo "$as_me:$LINENO: result: no" >&5
19189echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019190
19191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019192
19193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019194
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019195# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019196{ echo "$as_me:$LINENO: checking for setgroups" >&5
19197echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019199/* confdefs.h. */
19200_ACEOF
19201cat confdefs.h >>conftest.$ac_ext
19202cat >>conftest.$ac_ext <<_ACEOF
19203/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019204
19205#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019206#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019207#ifdef HAVE_GRP_H
19208#include <grp.h>
19209#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019210
Martin v. Löwisd5843682002-11-21 20:41:28 +000019211int
19212main ()
19213{
19214void* p = setgroups
19215 ;
19216 return 0;
19217}
19218_ACEOF
19219rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019220if { (ac_try="$ac_compile"
19221case "(($ac_try" in
19222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19223 *) ac_try_echo=$ac_try;;
19224esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019228 grep -v '^ *+' conftest.er1 >conftest.err
19229 rm -f conftest.er1
19230 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019232 (exit $ac_status); } && {
19233 test -z "$ac_c_werror_flag" ||
19234 test ! -s conftest.err
19235 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019236
19237cat >>confdefs.h <<\_ACEOF
19238#define HAVE_SETGROUPS 1
19239_ACEOF
19240
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019241 { echo "$as_me:$LINENO: result: yes" >&5
19242echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019243else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019245sed 's/^/| /' conftest.$ac_ext >&5
19246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019247 { echo "$as_me:$LINENO: result: no" >&5
19248echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019249
19250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019251
19252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019253
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019254# check for openpty and forkpty
19255
Martin v. Löwis11437992002-04-12 09:54:03 +000019256
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019257for ac_func in openpty
19258do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019259as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19260{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19261echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019262if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019264else
Martin v. Löwis11437992002-04-12 09:54:03 +000019265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019266/* confdefs.h. */
19267_ACEOF
19268cat confdefs.h >>conftest.$ac_ext
19269cat >>conftest.$ac_ext <<_ACEOF
19270/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019271/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19272 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19273#define $ac_func innocuous_$ac_func
19274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019275/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019276 which can conflict with char $ac_func (); below.
19277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019278 <limits.h> exists even on freestanding compilers. */
19279
19280#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019281# include <limits.h>
19282#else
19283# include <assert.h>
19284#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019285
19286#undef $ac_func
19287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019288/* Override any GCC internal prototype to avoid an error.
19289 Use char because int might match the return type of a GCC
19290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019291#ifdef __cplusplus
19292extern "C"
19293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019294char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019295/* The GNU C library defines this for functions which it implements
19296 to always fail with ENOSYS. Some functions are actually named
19297 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019298#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019299choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019300#endif
19301
Skip Montanaro6dead952003-09-25 14:50:04 +000019302int
19303main ()
19304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019305return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019306 ;
19307 return 0;
19308}
19309_ACEOF
19310rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019311if { (ac_try="$ac_link"
19312case "(($ac_try" in
19313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19314 *) ac_try_echo=$ac_try;;
19315esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019317 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019319 grep -v '^ *+' conftest.er1 >conftest.err
19320 rm -f conftest.er1
19321 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019323 (exit $ac_status); } && {
19324 test -z "$ac_c_werror_flag" ||
19325 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019326 } && test -s conftest$ac_exeext &&
19327 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019329else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019331sed 's/^/| /' conftest.$ac_ext >&5
19332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019333 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019335
19336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019337 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019338fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019339ac_res=`eval echo '${'$as_ac_var'}'`
19340 { echo "$as_me:$LINENO: result: $ac_res" >&5
19341echo "${ECHO_T}$ac_res" >&6; }
19342if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019343 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019344#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019345_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019346
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019348 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19349echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019350if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019351 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019352else
Martin v. Löwis11437992002-04-12 09:54:03 +000019353 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019354LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019355cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019356/* confdefs.h. */
19357_ACEOF
19358cat confdefs.h >>conftest.$ac_ext
19359cat >>conftest.$ac_ext <<_ACEOF
19360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019362/* Override any GCC internal prototype to avoid an error.
19363 Use char because int might match the return type of a GCC
19364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019365#ifdef __cplusplus
19366extern "C"
19367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019368char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019369int
19370main ()
19371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019372return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019373 ;
19374 return 0;
19375}
19376_ACEOF
19377rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019378if { (ac_try="$ac_link"
19379case "(($ac_try" in
19380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19381 *) ac_try_echo=$ac_try;;
19382esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019384 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019386 grep -v '^ *+' conftest.er1 >conftest.err
19387 rm -f conftest.er1
19388 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019390 (exit $ac_status); } && {
19391 test -z "$ac_c_werror_flag" ||
19392 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019393 } && test -s conftest$ac_exeext &&
19394 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019396else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019398sed 's/^/| /' conftest.$ac_ext >&5
19399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019400 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019402
19403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019405LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019406fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019407{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19408echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19409if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019410 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019411#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019412_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019413 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019415 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19416echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019417if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019419else
19420 ac_check_lib_save_LIBS=$LIBS
19421LIBS="-lbsd $LIBS"
19422cat >conftest.$ac_ext <<_ACEOF
19423/* confdefs.h. */
19424_ACEOF
19425cat confdefs.h >>conftest.$ac_ext
19426cat >>conftest.$ac_ext <<_ACEOF
19427/* end confdefs.h. */
19428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019429/* Override any GCC internal prototype to avoid an error.
19430 Use char because int might match the return type of a GCC
19431 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019432#ifdef __cplusplus
19433extern "C"
19434#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019435char openpty ();
19436int
19437main ()
19438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019439return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019440 ;
19441 return 0;
19442}
19443_ACEOF
19444rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019445if { (ac_try="$ac_link"
19446case "(($ac_try" in
19447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19448 *) ac_try_echo=$ac_try;;
19449esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019452 ac_status=$?
19453 grep -v '^ *+' conftest.er1 >conftest.err
19454 rm -f conftest.er1
19455 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019457 (exit $ac_status); } && {
19458 test -z "$ac_c_werror_flag" ||
19459 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019460 } && test -s conftest$ac_exeext &&
19461 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019462 ac_cv_lib_bsd_openpty=yes
19463else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019464 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019465sed 's/^/| /' conftest.$ac_ext >&5
19466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019467 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019469
19470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019471 conftest$ac_exeext conftest.$ac_ext
19472LIBS=$ac_check_lib_save_LIBS
19473fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019474{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19475echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19476if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019477 cat >>confdefs.h <<\_ACEOF
19478#define HAVE_OPENPTY 1
19479_ACEOF
19480 LIBS="$LIBS -lbsd"
19481fi
19482
19483
19484fi
19485
Fred Drake8cef4cf2000-06-28 16:40:38 +000019486
19487fi
19488done
19489
Martin v. Löwis11437992002-04-12 09:54:03 +000019490
Fred Drake8cef4cf2000-06-28 16:40:38 +000019491for ac_func in forkpty
19492do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019493as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19494{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19495echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019496if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019497 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019498else
Martin v. Löwis11437992002-04-12 09:54:03 +000019499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019500/* confdefs.h. */
19501_ACEOF
19502cat confdefs.h >>conftest.$ac_ext
19503cat >>conftest.$ac_ext <<_ACEOF
19504/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019505/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19506 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19507#define $ac_func innocuous_$ac_func
19508
Fred Drake8cef4cf2000-06-28 16:40:38 +000019509/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019510 which can conflict with char $ac_func (); below.
19511 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019512 <limits.h> exists even on freestanding compilers. */
19513
19514#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019515# include <limits.h>
19516#else
19517# include <assert.h>
19518#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019519
19520#undef $ac_func
19521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019522/* Override any GCC internal prototype to avoid an error.
19523 Use char because int might match the return type of a GCC
19524 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019525#ifdef __cplusplus
19526extern "C"
19527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019528char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019529/* The GNU C library defines this for functions which it implements
19530 to always fail with ENOSYS. Some functions are actually named
19531 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019532#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019533choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019534#endif
19535
Skip Montanaro6dead952003-09-25 14:50:04 +000019536int
19537main ()
19538{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019539return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019540 ;
19541 return 0;
19542}
19543_ACEOF
19544rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019545if { (ac_try="$ac_link"
19546case "(($ac_try" in
19547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19548 *) ac_try_echo=$ac_try;;
19549esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019551 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019553 grep -v '^ *+' conftest.er1 >conftest.err
19554 rm -f conftest.er1
19555 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019557 (exit $ac_status); } && {
19558 test -z "$ac_c_werror_flag" ||
19559 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019560 } && test -s conftest$ac_exeext &&
19561 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019562 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019565sed 's/^/| /' conftest.$ac_ext >&5
19566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019567 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019569
19570rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019571 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019572fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019573ac_res=`eval echo '${'$as_ac_var'}'`
19574 { echo "$as_me:$LINENO: result: $ac_res" >&5
19575echo "${ECHO_T}$ac_res" >&6; }
19576if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019577 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019578#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019579_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019580
Fred Drake8cef4cf2000-06-28 16:40:38 +000019581else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019582 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19583echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019584if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019585 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019586else
Martin v. Löwis11437992002-04-12 09:54:03 +000019587 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019588LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019590/* confdefs.h. */
19591_ACEOF
19592cat confdefs.h >>conftest.$ac_ext
19593cat >>conftest.$ac_ext <<_ACEOF
19594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019596/* Override any GCC internal prototype to avoid an error.
19597 Use char because int might match the return type of a GCC
19598 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019599#ifdef __cplusplus
19600extern "C"
19601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019602char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019603int
19604main ()
19605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019606return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019607 ;
19608 return 0;
19609}
19610_ACEOF
19611rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019612if { (ac_try="$ac_link"
19613case "(($ac_try" in
19614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19615 *) ac_try_echo=$ac_try;;
19616esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019618 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019620 grep -v '^ *+' conftest.er1 >conftest.err
19621 rm -f conftest.er1
19622 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019624 (exit $ac_status); } && {
19625 test -z "$ac_c_werror_flag" ||
19626 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019627 } && test -s conftest$ac_exeext &&
19628 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019629 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019632sed 's/^/| /' conftest.$ac_ext >&5
19633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019634 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019636
19637rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019638 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019639LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019640fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019641{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19642echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19643if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019644 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019645#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019646_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019647 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019648else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019649 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19650echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019651if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019652 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019653else
19654 ac_check_lib_save_LIBS=$LIBS
19655LIBS="-lbsd $LIBS"
19656cat >conftest.$ac_ext <<_ACEOF
19657/* confdefs.h. */
19658_ACEOF
19659cat confdefs.h >>conftest.$ac_ext
19660cat >>conftest.$ac_ext <<_ACEOF
19661/* end confdefs.h. */
19662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019663/* Override any GCC internal prototype to avoid an error.
19664 Use char because int might match the return type of a GCC
19665 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019666#ifdef __cplusplus
19667extern "C"
19668#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019669char forkpty ();
19670int
19671main ()
19672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019673return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019674 ;
19675 return 0;
19676}
19677_ACEOF
19678rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019679if { (ac_try="$ac_link"
19680case "(($ac_try" in
19681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19682 *) ac_try_echo=$ac_try;;
19683esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019685 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019686 ac_status=$?
19687 grep -v '^ *+' conftest.er1 >conftest.err
19688 rm -f conftest.er1
19689 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019691 (exit $ac_status); } && {
19692 test -z "$ac_c_werror_flag" ||
19693 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019694 } && test -s conftest$ac_exeext &&
19695 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019696 ac_cv_lib_bsd_forkpty=yes
19697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019698 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019699sed 's/^/| /' conftest.$ac_ext >&5
19700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019701 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019703
19704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019705 conftest$ac_exeext conftest.$ac_ext
19706LIBS=$ac_check_lib_save_LIBS
19707fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019708{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19709echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19710if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019711 cat >>confdefs.h <<\_ACEOF
19712#define HAVE_FORKPTY 1
19713_ACEOF
19714 LIBS="$LIBS -lbsd"
19715fi
19716
19717
19718fi
19719
Fred Drake8cef4cf2000-06-28 16:40:38 +000019720
19721fi
19722done
19723
Jack Jansendd19cf82001-12-06 22:36:17 +000019724
Christian Heimesb186d002008-03-18 15:15:01 +000019725# Stuff for expat.
19726
19727for ac_func in memmove
19728do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019729as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19730{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19731echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019732if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019733 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019734else
19735 cat >conftest.$ac_ext <<_ACEOF
19736/* confdefs.h. */
19737_ACEOF
19738cat confdefs.h >>conftest.$ac_ext
19739cat >>conftest.$ac_ext <<_ACEOF
19740/* end confdefs.h. */
19741/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19742 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19743#define $ac_func innocuous_$ac_func
19744
19745/* System header to define __stub macros and hopefully few prototypes,
19746 which can conflict with char $ac_func (); below.
19747 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19748 <limits.h> exists even on freestanding compilers. */
19749
19750#ifdef __STDC__
19751# include <limits.h>
19752#else
19753# include <assert.h>
19754#endif
19755
19756#undef $ac_func
19757
19758/* Override any GCC internal prototype to avoid an error.
19759 Use char because int might match the return type of a GCC
19760 builtin and then its argument prototype would still apply. */
19761#ifdef __cplusplus
19762extern "C"
19763#endif
19764char $ac_func ();
19765/* The GNU C library defines this for functions which it implements
19766 to always fail with ENOSYS. Some functions are actually named
19767 something starting with __ and the normal name is an alias. */
19768#if defined __stub_$ac_func || defined __stub___$ac_func
19769choke me
19770#endif
19771
19772int
19773main ()
19774{
19775return $ac_func ();
19776 ;
19777 return 0;
19778}
19779_ACEOF
19780rm -f conftest.$ac_objext conftest$ac_exeext
19781if { (ac_try="$ac_link"
19782case "(($ac_try" in
19783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19784 *) ac_try_echo=$ac_try;;
19785esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019787 (eval "$ac_link") 2>conftest.er1
19788 ac_status=$?
19789 grep -v '^ *+' conftest.er1 >conftest.err
19790 rm -f conftest.er1
19791 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019793 (exit $ac_status); } && {
19794 test -z "$ac_c_werror_flag" ||
19795 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019796 } && test -s conftest$ac_exeext &&
19797 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019798 eval "$as_ac_var=yes"
19799else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019800 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019801sed 's/^/| /' conftest.$ac_ext >&5
19802
19803 eval "$as_ac_var=no"
19804fi
19805
19806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19807 conftest$ac_exeext conftest.$ac_ext
19808fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019809ac_res=`eval echo '${'$as_ac_var'}'`
19810 { echo "$as_me:$LINENO: result: $ac_res" >&5
19811echo "${ECHO_T}$ac_res" >&6; }
19812if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019813 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019814#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019815_ACEOF
19816
19817fi
19818done
19819
19820
Michael W. Hudson54241132001-12-07 15:38:26 +000019821# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019822
19823
19824
19825
19826
19827
Fred Drake8cef4cf2000-06-28 16:40:38 +000019828for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19829do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019830as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19831{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19832echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019833if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019834 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019835else
Martin v. Löwis11437992002-04-12 09:54:03 +000019836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019837/* confdefs.h. */
19838_ACEOF
19839cat confdefs.h >>conftest.$ac_ext
19840cat >>conftest.$ac_ext <<_ACEOF
19841/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019842/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19843 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19844#define $ac_func innocuous_$ac_func
19845
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019846/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019847 which can conflict with char $ac_func (); below.
19848 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019849 <limits.h> exists even on freestanding compilers. */
19850
19851#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019852# include <limits.h>
19853#else
19854# include <assert.h>
19855#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019856
19857#undef $ac_func
19858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019859/* Override any GCC internal prototype to avoid an error.
19860 Use char because int might match the return type of a GCC
19861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019862#ifdef __cplusplus
19863extern "C"
19864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019865char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019866/* The GNU C library defines this for functions which it implements
19867 to always fail with ENOSYS. Some functions are actually named
19868 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019870choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019871#endif
19872
Skip Montanaro6dead952003-09-25 14:50:04 +000019873int
19874main ()
19875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019876return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019877 ;
19878 return 0;
19879}
19880_ACEOF
19881rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019882if { (ac_try="$ac_link"
19883case "(($ac_try" in
19884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19885 *) ac_try_echo=$ac_try;;
19886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019888 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019890 grep -v '^ *+' conftest.er1 >conftest.err
19891 rm -f conftest.er1
19892 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019894 (exit $ac_status); } && {
19895 test -z "$ac_c_werror_flag" ||
19896 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019897 } && test -s conftest$ac_exeext &&
19898 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019899 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019902sed 's/^/| /' conftest.$ac_ext >&5
19903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019904 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019906
19907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019908 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019909fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019910ac_res=`eval echo '${'$as_ac_var'}'`
19911 { echo "$as_me:$LINENO: result: $ac_res" >&5
19912echo "${ECHO_T}$ac_res" >&6; }
19913if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019914 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019915#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019916_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019917
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019918fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019919done
19920
Michael W. Hudson54241132001-12-07 15:38:26 +000019921
Martin v. Löwis11437992002-04-12 09:54:03 +000019922
19923
19924
Christian Heimesb186d002008-03-18 15:15:01 +000019925for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019926do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019927as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19928{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19929echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019930if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019932else
Martin v. Löwis11437992002-04-12 09:54:03 +000019933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019934/* confdefs.h. */
19935_ACEOF
19936cat confdefs.h >>conftest.$ac_ext
19937cat >>conftest.$ac_ext <<_ACEOF
19938/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019939/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19940 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19941#define $ac_func innocuous_$ac_func
19942
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019943/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019944 which can conflict with char $ac_func (); below.
19945 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019946 <limits.h> exists even on freestanding compilers. */
19947
19948#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019949# include <limits.h>
19950#else
19951# include <assert.h>
19952#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019953
19954#undef $ac_func
19955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019956/* Override any GCC internal prototype to avoid an error.
19957 Use char because int might match the return type of a GCC
19958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019959#ifdef __cplusplus
19960extern "C"
19961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019962char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019963/* The GNU C library defines this for functions which it implements
19964 to always fail with ENOSYS. Some functions are actually named
19965 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019966#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019967choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019968#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019969
Skip Montanaro6dead952003-09-25 14:50:04 +000019970int
19971main ()
19972{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019973return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019974 ;
19975 return 0;
19976}
19977_ACEOF
19978rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019979if { (ac_try="$ac_link"
19980case "(($ac_try" in
19981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19982 *) ac_try_echo=$ac_try;;
19983esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019985 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019987 grep -v '^ *+' conftest.er1 >conftest.err
19988 rm -f conftest.er1
19989 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019991 (exit $ac_status); } && {
19992 test -z "$ac_c_werror_flag" ||
19993 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019994 } && test -s conftest$ac_exeext &&
19995 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019996 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019997else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019999sed 's/^/| /' conftest.$ac_ext >&5
20000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020001 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020003
20004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020005 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020006fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020007ac_res=`eval echo '${'$as_ac_var'}'`
20008 { echo "$as_me:$LINENO: result: $ac_res" >&5
20009echo "${ECHO_T}$ac_res" >&6; }
20010if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020011 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020012#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020013_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020014
Martin v. Löwis1142de32002-03-29 16:28:31 +000020015else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020016 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020017 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020018 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20019 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020020esac
20021
Martin v. Löwis1142de32002-03-29 16:28:31 +000020022fi
20023done
20024
20025
Martin v. Löwis11437992002-04-12 09:54:03 +000020026
Martin v. Löwis1142de32002-03-29 16:28:31 +000020027for ac_func in getpgrp
20028do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020029as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20030{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20031echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020032if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020033 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020034else
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020036/* confdefs.h. */
20037_ACEOF
20038cat confdefs.h >>conftest.$ac_ext
20039cat >>conftest.$ac_ext <<_ACEOF
20040/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020041/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20042 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20043#define $ac_func innocuous_$ac_func
20044
Martin v. Löwis1142de32002-03-29 16:28:31 +000020045/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020046 which can conflict with char $ac_func (); below.
20047 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020048 <limits.h> exists even on freestanding compilers. */
20049
20050#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020051# include <limits.h>
20052#else
20053# include <assert.h>
20054#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020055
20056#undef $ac_func
20057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020058/* Override any GCC internal prototype to avoid an error.
20059 Use char because int might match the return type of a GCC
20060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020061#ifdef __cplusplus
20062extern "C"
20063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020064char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020065/* The GNU C library defines this for functions which it implements
20066 to always fail with ENOSYS. Some functions are actually named
20067 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020068#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020069choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020070#endif
20071
Skip Montanaro6dead952003-09-25 14:50:04 +000020072int
20073main ()
20074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020075return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020076 ;
20077 return 0;
20078}
20079_ACEOF
20080rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020081if { (ac_try="$ac_link"
20082case "(($ac_try" in
20083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20084 *) ac_try_echo=$ac_try;;
20085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020087 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020089 grep -v '^ *+' conftest.er1 >conftest.err
20090 rm -f conftest.er1
20091 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020093 (exit $ac_status); } && {
20094 test -z "$ac_c_werror_flag" ||
20095 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020096 } && test -s conftest$ac_exeext &&
20097 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020098 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020101sed 's/^/| /' conftest.$ac_ext >&5
20102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020103 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020105
20106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020107 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020108fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020109ac_res=`eval echo '${'$as_ac_var'}'`
20110 { echo "$as_me:$LINENO: result: $ac_res" >&5
20111echo "${ECHO_T}$ac_res" >&6; }
20112if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020114#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020115_ACEOF
20116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020117/* confdefs.h. */
20118_ACEOF
20119cat confdefs.h >>conftest.$ac_ext
20120cat >>conftest.$ac_ext <<_ACEOF
20121/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020122#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020123int
20124main ()
20125{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020126getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020127 ;
20128 return 0;
20129}
20130_ACEOF
20131rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020132if { (ac_try="$ac_compile"
20133case "(($ac_try" in
20134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20135 *) ac_try_echo=$ac_try;;
20136esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020140 grep -v '^ *+' conftest.er1 >conftest.err
20141 rm -f conftest.er1
20142 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020144 (exit $ac_status); } && {
20145 test -z "$ac_c_werror_flag" ||
20146 test ! -s conftest.err
20147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020148
20149cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020150#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020151_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020152
Martin v. Löwis11437992002-04-12 09:54:03 +000020153
Guido van Rossumf78abae1997-01-21 22:02:36 +000020154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020156sed 's/^/| /' conftest.$ac_ext >&5
20157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020158
Guido van Rossum627b2d71993-12-24 10:39:16 +000020159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020160
20161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020162
Guido van Rossum627b2d71993-12-24 10:39:16 +000020163fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020164done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020165
Jack Jansen150753c2003-03-29 22:07:47 +000020166
20167for ac_func in setpgrp
20168do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020169as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20170{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20171echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020172if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020174else
Martin v. Löwis11437992002-04-12 09:54:03 +000020175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020176/* confdefs.h. */
20177_ACEOF
20178cat confdefs.h >>conftest.$ac_ext
20179cat >>conftest.$ac_ext <<_ACEOF
20180/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020181/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20183#define $ac_func innocuous_$ac_func
20184
Jack Jansen150753c2003-03-29 22:07:47 +000020185/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020186 which can conflict with char $ac_func (); below.
20187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020188 <limits.h> exists even on freestanding compilers. */
20189
20190#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020191# include <limits.h>
20192#else
20193# include <assert.h>
20194#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020195
20196#undef $ac_func
20197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020198/* Override any GCC internal prototype to avoid an error.
20199 Use char because int might match the return type of a GCC
20200 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020201#ifdef __cplusplus
20202extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020203#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020204char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020205/* The GNU C library defines this for functions which it implements
20206 to always fail with ENOSYS. Some functions are actually named
20207 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020208#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020209choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020210#endif
20211
Skip Montanaro6dead952003-09-25 14:50:04 +000020212int
20213main ()
20214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020215return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020216 ;
20217 return 0;
20218}
20219_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020220rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020221if { (ac_try="$ac_link"
20222case "(($ac_try" in
20223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20224 *) ac_try_echo=$ac_try;;
20225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020227 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020229 grep -v '^ *+' conftest.er1 >conftest.err
20230 rm -f conftest.er1
20231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020233 (exit $ac_status); } && {
20234 test -z "$ac_c_werror_flag" ||
20235 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020236 } && test -s conftest$ac_exeext &&
20237 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020238 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020241sed 's/^/| /' conftest.$ac_ext >&5
20242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020243 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020245
20246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020247 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020248fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020249ac_res=`eval echo '${'$as_ac_var'}'`
20250 { echo "$as_me:$LINENO: result: $ac_res" >&5
20251echo "${ECHO_T}$ac_res" >&6; }
20252if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020253 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020254#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020255_ACEOF
20256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020257/* confdefs.h. */
20258_ACEOF
20259cat confdefs.h >>conftest.$ac_ext
20260cat >>conftest.$ac_ext <<_ACEOF
20261/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020262#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020263int
20264main ()
20265{
20266setpgrp(0,0);
20267 ;
20268 return 0;
20269}
20270_ACEOF
20271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020272if { (ac_try="$ac_compile"
20273case "(($ac_try" in
20274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20275 *) ac_try_echo=$ac_try;;
20276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020278 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020280 grep -v '^ *+' conftest.er1 >conftest.err
20281 rm -f conftest.er1
20282 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020284 (exit $ac_status); } && {
20285 test -z "$ac_c_werror_flag" ||
20286 test ! -s conftest.err
20287 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020288
20289cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020290#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020291_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020292
Jack Jansen150753c2003-03-29 22:07:47 +000020293
20294else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020296sed 's/^/| /' conftest.$ac_ext >&5
20297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020298
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020300
20301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020302
20303fi
20304done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020305
Martin v. Löwis11437992002-04-12 09:54:03 +000020306
Thomas Wouters3a584202000-08-05 23:28:51 +000020307for ac_func in gettimeofday
20308do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020309as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20310{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20311echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020312if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020314else
Martin v. Löwis11437992002-04-12 09:54:03 +000020315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020316/* confdefs.h. */
20317_ACEOF
20318cat confdefs.h >>conftest.$ac_ext
20319cat >>conftest.$ac_ext <<_ACEOF
20320/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020321/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20322 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20323#define $ac_func innocuous_$ac_func
20324
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020325/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020326 which can conflict with char $ac_func (); below.
20327 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020328 <limits.h> exists even on freestanding compilers. */
20329
20330#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020331# include <limits.h>
20332#else
20333# include <assert.h>
20334#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020335
20336#undef $ac_func
20337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020338/* Override any GCC internal prototype to avoid an error.
20339 Use char because int might match the return type of a GCC
20340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020341#ifdef __cplusplus
20342extern "C"
20343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020344char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020345/* The GNU C library defines this for functions which it implements
20346 to always fail with ENOSYS. Some functions are actually named
20347 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020348#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020349choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020350#endif
20351
Skip Montanaro6dead952003-09-25 14:50:04 +000020352int
20353main ()
20354{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020355return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020356 ;
20357 return 0;
20358}
20359_ACEOF
20360rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020361if { (ac_try="$ac_link"
20362case "(($ac_try" in
20363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20364 *) ac_try_echo=$ac_try;;
20365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020367 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020369 grep -v '^ *+' conftest.er1 >conftest.err
20370 rm -f conftest.er1
20371 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020373 (exit $ac_status); } && {
20374 test -z "$ac_c_werror_flag" ||
20375 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020376 } && test -s conftest$ac_exeext &&
20377 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020378 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020379else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020381sed 's/^/| /' conftest.$ac_ext >&5
20382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020383 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020385
20386rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020387 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020388fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020389ac_res=`eval echo '${'$as_ac_var'}'`
20390 { echo "$as_me:$LINENO: result: $ac_res" >&5
20391echo "${ECHO_T}$ac_res" >&6; }
20392if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020393 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020394#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020395_ACEOF
20396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020397/* confdefs.h. */
20398_ACEOF
20399cat confdefs.h >>conftest.$ac_ext
20400cat >>conftest.$ac_ext <<_ACEOF
20401/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020402#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020403int
20404main ()
20405{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020406gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020407 ;
20408 return 0;
20409}
20410_ACEOF
20411rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020412if { (ac_try="$ac_compile"
20413case "(($ac_try" in
20414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20415 *) ac_try_echo=$ac_try;;
20416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020420 grep -v '^ *+' conftest.er1 >conftest.err
20421 rm -f conftest.er1
20422 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020424 (exit $ac_status); } && {
20425 test -z "$ac_c_werror_flag" ||
20426 test ! -s conftest.err
20427 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020428 :
20429else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020431sed 's/^/| /' conftest.$ac_ext >&5
20432
Martin v. Löwis11437992002-04-12 09:54:03 +000020433
20434cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020435#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020436_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020437
Martin v. Löwis11437992002-04-12 09:54:03 +000020438
Guido van Rossum627b2d71993-12-24 10:39:16 +000020439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020440
20441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020442
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020443fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020444done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020445
Michael W. Hudson54241132001-12-07 15:38:26 +000020446
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020447{ echo "$as_me:$LINENO: checking for major" >&5
20448echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020450/* confdefs.h. */
20451_ACEOF
20452cat confdefs.h >>conftest.$ac_ext
20453cat >>conftest.$ac_ext <<_ACEOF
20454/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020455
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020456#if defined(MAJOR_IN_MKDEV)
20457#include <sys/mkdev.h>
20458#elif defined(MAJOR_IN_SYSMACROS)
20459#include <sys/sysmacros.h>
20460#else
20461#include <sys/types.h>
20462#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020463
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020464int
20465main ()
20466{
20467
20468 makedev(major(0),minor(0));
20469
20470 ;
20471 return 0;
20472}
20473_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020474rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020475if { (ac_try="$ac_link"
20476case "(($ac_try" in
20477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20478 *) ac_try_echo=$ac_try;;
20479esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020481 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020483 grep -v '^ *+' conftest.er1 >conftest.err
20484 rm -f conftest.er1
20485 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020487 (exit $ac_status); } && {
20488 test -z "$ac_c_werror_flag" ||
20489 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020490 } && test -s conftest$ac_exeext &&
20491 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020492
20493
20494cat >>confdefs.h <<\_ACEOF
20495#define HAVE_DEVICE_MACROS 1
20496_ACEOF
20497
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020498 { echo "$as_me:$LINENO: result: yes" >&5
20499echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020500
20501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020503sed 's/^/| /' conftest.$ac_ext >&5
20504
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020505
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020506 { echo "$as_me:$LINENO: result: no" >&5
20507echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020508
20509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020510
20511rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020512 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020513
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020514# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020515# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020516{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20517echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020519/* confdefs.h. */
20520_ACEOF
20521cat confdefs.h >>conftest.$ac_ext
20522cat >>conftest.$ac_ext <<_ACEOF
20523/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020524
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020525#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020526#include <sys/socket.h>
20527#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020528#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020529
Martin v. Löwis11437992002-04-12 09:54:03 +000020530int
20531main ()
20532{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020533getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020534 ;
20535 return 0;
20536}
20537_ACEOF
20538rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020539if { (ac_try="$ac_link"
20540case "(($ac_try" in
20541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20542 *) ac_try_echo=$ac_try;;
20543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020545 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020547 grep -v '^ *+' conftest.er1 >conftest.err
20548 rm -f conftest.er1
20549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020551 (exit $ac_status); } && {
20552 test -z "$ac_c_werror_flag" ||
20553 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020554 } && test -s conftest$ac_exeext &&
20555 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020556 have_getaddrinfo=yes
20557else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020558 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020559sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020560
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020561 have_getaddrinfo=no
20562fi
20563
20564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20565 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020566{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20567echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020568if test $have_getaddrinfo = yes
20569then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020570 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20571echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020572 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020573 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020574else
20575 if test "$cross_compiling" = yes; then
20576 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020577else
Martin v. Löwis11437992002-04-12 09:54:03 +000020578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020579/* confdefs.h. */
20580_ACEOF
20581cat confdefs.h >>conftest.$ac_ext
20582cat >>conftest.$ac_ext <<_ACEOF
20583/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020584
20585#include <sys/types.h>
20586#include <netdb.h>
20587#include <string.h>
20588#include <sys/socket.h>
20589#include <netinet/in.h>
20590
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020591int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020592{
20593 int passive, gaierr, inet4 = 0, inet6 = 0;
20594 struct addrinfo hints, *ai, *aitop;
20595 char straddr[INET6_ADDRSTRLEN], strport[16];
20596
20597 for (passive = 0; passive <= 1; passive++) {
20598 memset(&hints, 0, sizeof(hints));
20599 hints.ai_family = AF_UNSPEC;
20600 hints.ai_flags = passive ? AI_PASSIVE : 0;
20601 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020602 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020603 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20604 (void)gai_strerror(gaierr);
20605 goto bad;
20606 }
20607 for (ai = aitop; ai; ai = ai->ai_next) {
20608 if (ai->ai_addr == NULL ||
20609 ai->ai_addrlen == 0 ||
20610 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20611 straddr, sizeof(straddr), strport, sizeof(strport),
20612 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20613 goto bad;
20614 }
20615 switch (ai->ai_family) {
20616 case AF_INET:
20617 if (strcmp(strport, "54321") != 0) {
20618 goto bad;
20619 }
20620 if (passive) {
20621 if (strcmp(straddr, "0.0.0.0") != 0) {
20622 goto bad;
20623 }
20624 } else {
20625 if (strcmp(straddr, "127.0.0.1") != 0) {
20626 goto bad;
20627 }
20628 }
20629 inet4++;
20630 break;
20631 case AF_INET6:
20632 if (strcmp(strport, "54321") != 0) {
20633 goto bad;
20634 }
20635 if (passive) {
20636 if (strcmp(straddr, "::") != 0) {
20637 goto bad;
20638 }
20639 } else {
20640 if (strcmp(straddr, "::1") != 0) {
20641 goto bad;
20642 }
20643 }
20644 inet6++;
20645 break;
20646 case AF_UNSPEC:
20647 goto bad;
20648 break;
20649 default:
20650 /* another family support? */
20651 break;
20652 }
20653 }
20654 }
20655
20656 if (!(inet4 == 0 || inet4 == 2))
20657 goto bad;
20658 if (!(inet6 == 0 || inet6 == 2))
20659 goto bad;
20660
20661 if (aitop)
20662 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020663 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020664
20665 bad:
20666 if (aitop)
20667 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020668 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020669}
20670
Martin v. Löwis11437992002-04-12 09:54:03 +000020671_ACEOF
20672rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020673if { (ac_try="$ac_link"
20674case "(($ac_try" in
20675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20676 *) ac_try_echo=$ac_try;;
20677esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020680 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020683 { (case "(($ac_try" in
20684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20685 *) ac_try_echo=$ac_try;;
20686esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020688 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020691 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020692 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020694 echo "$as_me: program exited with status $ac_status" >&5
20695echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020696sed 's/^/| /' conftest.$ac_ext >&5
20697
Martin v. Löwis11437992002-04-12 09:54:03 +000020698( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020699ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020701rm -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 +000020702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020703
20704
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020705fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020706
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020708
Mark Dickinson2df5d282009-12-31 21:22:50 +000020709if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020710then
20711 if test $ipv6 = yes
20712 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020713 echo 'Fatal: You must get working getaddrinfo() function.'
20714 echo ' or you can specify "--disable-ipv6"'.
20715 exit 1
20716 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020717else
Martin v. Löwis11437992002-04-12 09:54:03 +000020718
20719cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020720#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020721_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020722
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020724
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020725for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020726do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20728{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020730if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020731 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020732else
Martin v. Löwis11437992002-04-12 09:54:03 +000020733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020734/* confdefs.h. */
20735_ACEOF
20736cat confdefs.h >>conftest.$ac_ext
20737cat >>conftest.$ac_ext <<_ACEOF
20738/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020739/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20740 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20741#define $ac_func innocuous_$ac_func
20742
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020743/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020744 which can conflict with char $ac_func (); below.
20745 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020746 <limits.h> exists even on freestanding compilers. */
20747
20748#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020749# include <limits.h>
20750#else
20751# include <assert.h>
20752#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020753
20754#undef $ac_func
20755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020756/* Override any GCC internal prototype to avoid an error.
20757 Use char because int might match the return type of a GCC
20758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020759#ifdef __cplusplus
20760extern "C"
20761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020762char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020763/* The GNU C library defines this for functions which it implements
20764 to always fail with ENOSYS. Some functions are actually named
20765 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020766#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020767choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020768#endif
20769
Skip Montanaro6dead952003-09-25 14:50:04 +000020770int
20771main ()
20772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020773return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020774 ;
20775 return 0;
20776}
20777_ACEOF
20778rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020779if { (ac_try="$ac_link"
20780case "(($ac_try" in
20781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20782 *) ac_try_echo=$ac_try;;
20783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020785 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020787 grep -v '^ *+' conftest.er1 >conftest.err
20788 rm -f conftest.er1
20789 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020791 (exit $ac_status); } && {
20792 test -z "$ac_c_werror_flag" ||
20793 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020794 } && test -s conftest$ac_exeext &&
20795 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020796 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020797else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020799sed 's/^/| /' conftest.$ac_ext >&5
20800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020801 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020803
20804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020805 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020806fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020807ac_res=`eval echo '${'$as_ac_var'}'`
20808 { echo "$as_me:$LINENO: result: $ac_res" >&5
20809echo "${ECHO_T}$ac_res" >&6; }
20810if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020811 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020813_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020814
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020815fi
20816done
20817
Michael W. Hudson54241132001-12-07 15:38:26 +000020818
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020819# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020820{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20821echo $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 +000020822if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020824else
Martin v. Löwis11437992002-04-12 09:54:03 +000020825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020826/* confdefs.h. */
20827_ACEOF
20828cat confdefs.h >>conftest.$ac_ext
20829cat >>conftest.$ac_ext <<_ACEOF
20830/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020831#include <sys/types.h>
20832#include <sys/time.h>
20833#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020834
Martin v. Löwis11437992002-04-12 09:54:03 +000020835int
20836main ()
20837{
20838if ((struct tm *) 0)
20839return 0;
20840 ;
20841 return 0;
20842}
20843_ACEOF
20844rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020845if { (ac_try="$ac_compile"
20846case "(($ac_try" in
20847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20848 *) ac_try_echo=$ac_try;;
20849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020853 grep -v '^ *+' conftest.er1 >conftest.err
20854 rm -f conftest.er1
20855 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020857 (exit $ac_status); } && {
20858 test -z "$ac_c_werror_flag" ||
20859 test ! -s conftest.err
20860 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020861 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020862else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020864sed 's/^/| /' conftest.$ac_ext >&5
20865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020866 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020868
20869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020871{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20872echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020873if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020874
20875cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020876#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020877_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020878
20879fi
20880
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020881{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20882echo $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 +000020883if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020885else
Martin v. Löwis11437992002-04-12 09:54:03 +000020886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020887/* confdefs.h. */
20888_ACEOF
20889cat confdefs.h >>conftest.$ac_ext
20890cat >>conftest.$ac_ext <<_ACEOF
20891/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020892#include <sys/types.h>
20893#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020894
Martin v. Löwis11437992002-04-12 09:54:03 +000020895int
20896main ()
20897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898struct tm tm;
20899 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020900 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020901 ;
20902 return 0;
20903}
20904_ACEOF
20905rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020906if { (ac_try="$ac_compile"
20907case "(($ac_try" in
20908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20909 *) ac_try_echo=$ac_try;;
20910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020914 grep -v '^ *+' conftest.er1 >conftest.err
20915 rm -f conftest.er1
20916 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020918 (exit $ac_status); } && {
20919 test -z "$ac_c_werror_flag" ||
20920 test ! -s conftest.err
20921 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020922 ac_cv_struct_tm=time.h
20923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020925sed 's/^/| /' conftest.$ac_ext >&5
20926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020927 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020929
20930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020931fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020932{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20933echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020934if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020935
20936cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020937#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020938_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020939
20940fi
20941
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020942{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20943echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020944if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020946else
Martin v. Löwis11437992002-04-12 09:54:03 +000020947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020948/* confdefs.h. */
20949_ACEOF
20950cat confdefs.h >>conftest.$ac_ext
20951cat >>conftest.$ac_ext <<_ACEOF
20952/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020953#include <sys/types.h>
20954#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020955
20956
Martin v. Löwis11437992002-04-12 09:54:03 +000020957int
20958main ()
20959{
20960static struct tm ac_aggr;
20961if (ac_aggr.tm_zone)
20962return 0;
20963 ;
20964 return 0;
20965}
20966_ACEOF
20967rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020968if { (ac_try="$ac_compile"
20969case "(($ac_try" in
20970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20971 *) ac_try_echo=$ac_try;;
20972esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020974 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020976 grep -v '^ *+' conftest.er1 >conftest.err
20977 rm -f conftest.er1
20978 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020980 (exit $ac_status); } && {
20981 test -z "$ac_c_werror_flag" ||
20982 test ! -s conftest.err
20983 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020984 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020985else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020987sed 's/^/| /' conftest.$ac_ext >&5
20988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020990/* confdefs.h. */
20991_ACEOF
20992cat confdefs.h >>conftest.$ac_ext
20993cat >>conftest.$ac_ext <<_ACEOF
20994/* end confdefs.h. */
20995#include <sys/types.h>
20996#include <$ac_cv_struct_tm>
20997
20998
20999int
21000main ()
21001{
21002static struct tm ac_aggr;
21003if (sizeof ac_aggr.tm_zone)
21004return 0;
21005 ;
21006 return 0;
21007}
21008_ACEOF
21009rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021010if { (ac_try="$ac_compile"
21011case "(($ac_try" in
21012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21013 *) ac_try_echo=$ac_try;;
21014esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021016 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021018 grep -v '^ *+' conftest.er1 >conftest.err
21019 rm -f conftest.er1
21020 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021022 (exit $ac_status); } && {
21023 test -z "$ac_c_werror_flag" ||
21024 test ! -s conftest.err
21025 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021026 ac_cv_member_struct_tm_tm_zone=yes
21027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021029sed 's/^/| /' conftest.$ac_ext >&5
21030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021031 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021033
21034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021036
21037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021038fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021039{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21040echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21041if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021042
21043cat >>confdefs.h <<_ACEOF
21044#define HAVE_STRUCT_TM_TM_ZONE 1
21045_ACEOF
21046
21047
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021048fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021049
Martin v. Löwis11437992002-04-12 09:54:03 +000021050if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21051
21052cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021053#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021054_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021055
21056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021057 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21058echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021059if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021060 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021061else
21062 cat >conftest.$ac_ext <<_ACEOF
21063/* confdefs.h. */
21064_ACEOF
21065cat confdefs.h >>conftest.$ac_ext
21066cat >>conftest.$ac_ext <<_ACEOF
21067/* end confdefs.h. */
21068#include <time.h>
21069
21070int
21071main ()
21072{
21073#ifndef tzname
21074 (void) tzname;
21075#endif
21076
21077 ;
21078 return 0;
21079}
21080_ACEOF
21081rm -f conftest.$ac_objext
21082if { (ac_try="$ac_compile"
21083case "(($ac_try" in
21084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21085 *) ac_try_echo=$ac_try;;
21086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021088 (eval "$ac_compile") 2>conftest.er1
21089 ac_status=$?
21090 grep -v '^ *+' conftest.er1 >conftest.err
21091 rm -f conftest.er1
21092 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021094 (exit $ac_status); } && {
21095 test -z "$ac_c_werror_flag" ||
21096 test ! -s conftest.err
21097 } && test -s conftest.$ac_objext; then
21098 ac_cv_have_decl_tzname=yes
21099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021100 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021101sed 's/^/| /' conftest.$ac_ext >&5
21102
21103 ac_cv_have_decl_tzname=no
21104fi
21105
21106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21107fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021108{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21109echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21110if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021111
21112cat >>confdefs.h <<_ACEOF
21113#define HAVE_DECL_TZNAME 1
21114_ACEOF
21115
21116
21117else
21118 cat >>confdefs.h <<_ACEOF
21119#define HAVE_DECL_TZNAME 0
21120_ACEOF
21121
21122
21123fi
21124
21125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021126 { echo "$as_me:$LINENO: checking for tzname" >&5
21127echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021128if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021130else
Martin v. Löwis11437992002-04-12 09:54:03 +000021131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021132/* confdefs.h. */
21133_ACEOF
21134cat confdefs.h >>conftest.$ac_ext
21135cat >>conftest.$ac_ext <<_ACEOF
21136/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021137#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021138#if !HAVE_DECL_TZNAME
21139extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021141
Martin v. Löwis11437992002-04-12 09:54:03 +000021142int
21143main ()
21144{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021145return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021146 ;
21147 return 0;
21148}
21149_ACEOF
21150rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021151if { (ac_try="$ac_link"
21152case "(($ac_try" in
21153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21154 *) ac_try_echo=$ac_try;;
21155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021157 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021159 grep -v '^ *+' conftest.er1 >conftest.err
21160 rm -f conftest.er1
21161 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021163 (exit $ac_status); } && {
21164 test -z "$ac_c_werror_flag" ||
21165 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021166 } && test -s conftest$ac_exeext &&
21167 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021168 ac_cv_var_tzname=yes
21169else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021171sed 's/^/| /' conftest.$ac_ext >&5
21172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021173 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021175
21176rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021177 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021178fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021179{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21180echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021181 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021182
21183cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021184#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021185_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021186
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021187 fi
21188fi
21189
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021190{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21191echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021192if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021193 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021194else
21195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021196/* confdefs.h. */
21197_ACEOF
21198cat confdefs.h >>conftest.$ac_ext
21199cat >>conftest.$ac_ext <<_ACEOF
21200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021201$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021202int
21203main ()
21204{
21205static struct stat ac_aggr;
21206if (ac_aggr.st_rdev)
21207return 0;
21208 ;
21209 return 0;
21210}
21211_ACEOF
21212rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021213if { (ac_try="$ac_compile"
21214case "(($ac_try" in
21215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21216 *) ac_try_echo=$ac_try;;
21217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021219 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021221 grep -v '^ *+' conftest.er1 >conftest.err
21222 rm -f conftest.er1
21223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021225 (exit $ac_status); } && {
21226 test -z "$ac_c_werror_flag" ||
21227 test ! -s conftest.err
21228 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021229 ac_cv_member_struct_stat_st_rdev=yes
21230else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021232sed 's/^/| /' conftest.$ac_ext >&5
21233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021234 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021235/* confdefs.h. */
21236_ACEOF
21237cat confdefs.h >>conftest.$ac_ext
21238cat >>conftest.$ac_ext <<_ACEOF
21239/* end confdefs.h. */
21240$ac_includes_default
21241int
21242main ()
21243{
21244static struct stat ac_aggr;
21245if (sizeof ac_aggr.st_rdev)
21246return 0;
21247 ;
21248 return 0;
21249}
21250_ACEOF
21251rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021252if { (ac_try="$ac_compile"
21253case "(($ac_try" in
21254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21255 *) ac_try_echo=$ac_try;;
21256esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021258 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021260 grep -v '^ *+' conftest.er1 >conftest.err
21261 rm -f conftest.er1
21262 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021264 (exit $ac_status); } && {
21265 test -z "$ac_c_werror_flag" ||
21266 test ! -s conftest.err
21267 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021268 ac_cv_member_struct_stat_st_rdev=yes
21269else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021271sed 's/^/| /' conftest.$ac_ext >&5
21272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021275
21276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021278
21279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021280fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021281{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21282echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21283if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021284
21285cat >>confdefs.h <<_ACEOF
21286#define HAVE_STRUCT_STAT_ST_RDEV 1
21287_ACEOF
21288
21289
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021290fi
21291
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021292{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21293echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021294if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021295 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021296else
Martin v. Löwis11437992002-04-12 09:54:03 +000021297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021298/* confdefs.h. */
21299_ACEOF
21300cat confdefs.h >>conftest.$ac_ext
21301cat >>conftest.$ac_ext <<_ACEOF
21302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021303$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021304int
21305main ()
21306{
21307static struct stat ac_aggr;
21308if (ac_aggr.st_blksize)
21309return 0;
21310 ;
21311 return 0;
21312}
21313_ACEOF
21314rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021315if { (ac_try="$ac_compile"
21316case "(($ac_try" in
21317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21318 *) ac_try_echo=$ac_try;;
21319esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021323 grep -v '^ *+' conftest.er1 >conftest.err
21324 rm -f conftest.er1
21325 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021327 (exit $ac_status); } && {
21328 test -z "$ac_c_werror_flag" ||
21329 test ! -s conftest.err
21330 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021331 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021332else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021334sed 's/^/| /' conftest.$ac_ext >&5
21335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021337/* confdefs.h. */
21338_ACEOF
21339cat confdefs.h >>conftest.$ac_ext
21340cat >>conftest.$ac_ext <<_ACEOF
21341/* end confdefs.h. */
21342$ac_includes_default
21343int
21344main ()
21345{
21346static struct stat ac_aggr;
21347if (sizeof ac_aggr.st_blksize)
21348return 0;
21349 ;
21350 return 0;
21351}
21352_ACEOF
21353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021354if { (ac_try="$ac_compile"
21355case "(($ac_try" in
21356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21357 *) ac_try_echo=$ac_try;;
21358esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021360 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021362 grep -v '^ *+' conftest.er1 >conftest.err
21363 rm -f conftest.er1
21364 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021366 (exit $ac_status); } && {
21367 test -z "$ac_c_werror_flag" ||
21368 test ! -s conftest.err
21369 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021370 ac_cv_member_struct_stat_st_blksize=yes
21371else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021373sed 's/^/| /' conftest.$ac_ext >&5
21374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021375 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021377
21378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021380
21381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021382fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021383{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21384echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21385if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021386
Martin v. Löwis11437992002-04-12 09:54:03 +000021387cat >>confdefs.h <<_ACEOF
21388#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21389_ACEOF
21390
21391
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021392fi
21393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021394{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21395echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021396if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021397 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021398else
21399 cat >conftest.$ac_ext <<_ACEOF
21400/* confdefs.h. */
21401_ACEOF
21402cat confdefs.h >>conftest.$ac_ext
21403cat >>conftest.$ac_ext <<_ACEOF
21404/* end confdefs.h. */
21405$ac_includes_default
21406int
21407main ()
21408{
21409static struct stat ac_aggr;
21410if (ac_aggr.st_flags)
21411return 0;
21412 ;
21413 return 0;
21414}
21415_ACEOF
21416rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021417if { (ac_try="$ac_compile"
21418case "(($ac_try" in
21419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21420 *) ac_try_echo=$ac_try;;
21421esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021423 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021424 ac_status=$?
21425 grep -v '^ *+' conftest.er1 >conftest.err
21426 rm -f conftest.er1
21427 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429 (exit $ac_status); } && {
21430 test -z "$ac_c_werror_flag" ||
21431 test ! -s conftest.err
21432 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021433 ac_cv_member_struct_stat_st_flags=yes
21434else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021435 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021436sed 's/^/| /' conftest.$ac_ext >&5
21437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021438 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021439/* confdefs.h. */
21440_ACEOF
21441cat confdefs.h >>conftest.$ac_ext
21442cat >>conftest.$ac_ext <<_ACEOF
21443/* end confdefs.h. */
21444$ac_includes_default
21445int
21446main ()
21447{
21448static struct stat ac_aggr;
21449if (sizeof ac_aggr.st_flags)
21450return 0;
21451 ;
21452 return 0;
21453}
21454_ACEOF
21455rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021456if { (ac_try="$ac_compile"
21457case "(($ac_try" in
21458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21459 *) ac_try_echo=$ac_try;;
21460esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021462 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021463 ac_status=$?
21464 grep -v '^ *+' conftest.er1 >conftest.err
21465 rm -f conftest.er1
21466 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021468 (exit $ac_status); } && {
21469 test -z "$ac_c_werror_flag" ||
21470 test ! -s conftest.err
21471 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021472 ac_cv_member_struct_stat_st_flags=yes
21473else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021474 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021475sed 's/^/| /' conftest.$ac_ext >&5
21476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021477 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021479
21480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021482
21483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021484fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021485{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21486echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21487if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021488
21489cat >>confdefs.h <<_ACEOF
21490#define HAVE_STRUCT_STAT_ST_FLAGS 1
21491_ACEOF
21492
21493
21494fi
21495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021496{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21497echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021498if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021499 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021500else
21501 cat >conftest.$ac_ext <<_ACEOF
21502/* confdefs.h. */
21503_ACEOF
21504cat confdefs.h >>conftest.$ac_ext
21505cat >>conftest.$ac_ext <<_ACEOF
21506/* end confdefs.h. */
21507$ac_includes_default
21508int
21509main ()
21510{
21511static struct stat ac_aggr;
21512if (ac_aggr.st_gen)
21513return 0;
21514 ;
21515 return 0;
21516}
21517_ACEOF
21518rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021519if { (ac_try="$ac_compile"
21520case "(($ac_try" in
21521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21522 *) ac_try_echo=$ac_try;;
21523esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021526 ac_status=$?
21527 grep -v '^ *+' conftest.er1 >conftest.err
21528 rm -f conftest.er1
21529 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021531 (exit $ac_status); } && {
21532 test -z "$ac_c_werror_flag" ||
21533 test ! -s conftest.err
21534 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021535 ac_cv_member_struct_stat_st_gen=yes
21536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021537 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021538sed 's/^/| /' conftest.$ac_ext >&5
21539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021540 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021541/* confdefs.h. */
21542_ACEOF
21543cat confdefs.h >>conftest.$ac_ext
21544cat >>conftest.$ac_ext <<_ACEOF
21545/* end confdefs.h. */
21546$ac_includes_default
21547int
21548main ()
21549{
21550static struct stat ac_aggr;
21551if (sizeof ac_aggr.st_gen)
21552return 0;
21553 ;
21554 return 0;
21555}
21556_ACEOF
21557rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021558if { (ac_try="$ac_compile"
21559case "(($ac_try" in
21560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21561 *) ac_try_echo=$ac_try;;
21562esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021565 ac_status=$?
21566 grep -v '^ *+' conftest.er1 >conftest.err
21567 rm -f conftest.er1
21568 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021570 (exit $ac_status); } && {
21571 test -z "$ac_c_werror_flag" ||
21572 test ! -s conftest.err
21573 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021574 ac_cv_member_struct_stat_st_gen=yes
21575else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021576 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021577sed 's/^/| /' conftest.$ac_ext >&5
21578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021579 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021581
21582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021584
21585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021586fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021587{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21588echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21589if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021590
21591cat >>confdefs.h <<_ACEOF
21592#define HAVE_STRUCT_STAT_ST_GEN 1
21593_ACEOF
21594
21595
21596fi
21597
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021598{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21599echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021600if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021601 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021602else
21603 cat >conftest.$ac_ext <<_ACEOF
21604/* confdefs.h. */
21605_ACEOF
21606cat confdefs.h >>conftest.$ac_ext
21607cat >>conftest.$ac_ext <<_ACEOF
21608/* end confdefs.h. */
21609$ac_includes_default
21610int
21611main ()
21612{
21613static struct stat ac_aggr;
21614if (ac_aggr.st_birthtime)
21615return 0;
21616 ;
21617 return 0;
21618}
21619_ACEOF
21620rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021621if { (ac_try="$ac_compile"
21622case "(($ac_try" in
21623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21624 *) ac_try_echo=$ac_try;;
21625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021628 ac_status=$?
21629 grep -v '^ *+' conftest.er1 >conftest.err
21630 rm -f conftest.er1
21631 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021633 (exit $ac_status); } && {
21634 test -z "$ac_c_werror_flag" ||
21635 test ! -s conftest.err
21636 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021637 ac_cv_member_struct_stat_st_birthtime=yes
21638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021639 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021640sed 's/^/| /' conftest.$ac_ext >&5
21641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021642 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021643/* confdefs.h. */
21644_ACEOF
21645cat confdefs.h >>conftest.$ac_ext
21646cat >>conftest.$ac_ext <<_ACEOF
21647/* end confdefs.h. */
21648$ac_includes_default
21649int
21650main ()
21651{
21652static struct stat ac_aggr;
21653if (sizeof ac_aggr.st_birthtime)
21654return 0;
21655 ;
21656 return 0;
21657}
21658_ACEOF
21659rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021660if { (ac_try="$ac_compile"
21661case "(($ac_try" in
21662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21663 *) ac_try_echo=$ac_try;;
21664esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021667 ac_status=$?
21668 grep -v '^ *+' conftest.er1 >conftest.err
21669 rm -f conftest.er1
21670 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021672 (exit $ac_status); } && {
21673 test -z "$ac_c_werror_flag" ||
21674 test ! -s conftest.err
21675 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021676 ac_cv_member_struct_stat_st_birthtime=yes
21677else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021678 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021679sed 's/^/| /' conftest.$ac_ext >&5
21680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021681 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021683
21684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021686
21687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021689{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21690echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21691if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021692
21693cat >>confdefs.h <<_ACEOF
21694#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21695_ACEOF
21696
21697
21698fi
21699
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021700{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21701echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021702if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021703 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021704else
Martin v. Löwis11437992002-04-12 09:54:03 +000021705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021706/* confdefs.h. */
21707_ACEOF
21708cat confdefs.h >>conftest.$ac_ext
21709cat >>conftest.$ac_ext <<_ACEOF
21710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021711$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021712int
21713main ()
21714{
21715static struct stat ac_aggr;
21716if (ac_aggr.st_blocks)
21717return 0;
21718 ;
21719 return 0;
21720}
21721_ACEOF
21722rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021723if { (ac_try="$ac_compile"
21724case "(($ac_try" in
21725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21726 *) ac_try_echo=$ac_try;;
21727esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021731 grep -v '^ *+' conftest.er1 >conftest.err
21732 rm -f conftest.er1
21733 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021735 (exit $ac_status); } && {
21736 test -z "$ac_c_werror_flag" ||
21737 test ! -s conftest.err
21738 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021739 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021742sed 's/^/| /' conftest.$ac_ext >&5
21743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021745/* confdefs.h. */
21746_ACEOF
21747cat confdefs.h >>conftest.$ac_ext
21748cat >>conftest.$ac_ext <<_ACEOF
21749/* end confdefs.h. */
21750$ac_includes_default
21751int
21752main ()
21753{
21754static struct stat ac_aggr;
21755if (sizeof ac_aggr.st_blocks)
21756return 0;
21757 ;
21758 return 0;
21759}
21760_ACEOF
21761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021762if { (ac_try="$ac_compile"
21763case "(($ac_try" in
21764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21765 *) ac_try_echo=$ac_try;;
21766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021768 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021770 grep -v '^ *+' conftest.er1 >conftest.err
21771 rm -f conftest.er1
21772 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021774 (exit $ac_status); } && {
21775 test -z "$ac_c_werror_flag" ||
21776 test ! -s conftest.err
21777 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021778 ac_cv_member_struct_stat_st_blocks=yes
21779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021781sed 's/^/| /' conftest.$ac_ext >&5
21782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021783 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021785
21786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021788
21789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021790fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021791{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21792echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21793if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021794
Martin v. Löwis11437992002-04-12 09:54:03 +000021795cat >>confdefs.h <<_ACEOF
21796#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21797_ACEOF
21798
21799
21800cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021801#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021802_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021803
21804else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021805 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021806 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021807 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21808 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021809esac
21810
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021811fi
21812
Michael W. Hudson54241132001-12-07 15:38:26 +000021813
Martin v. Löwis11437992002-04-12 09:54:03 +000021814
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021815{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21816echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021817if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021818 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021819else
Martin v. Löwis11437992002-04-12 09:54:03 +000021820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021821/* confdefs.h. */
21822_ACEOF
21823cat confdefs.h >>conftest.$ac_ext
21824cat >>conftest.$ac_ext <<_ACEOF
21825/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021826#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021827int
21828main ()
21829{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021830return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021831 ;
21832 return 0;
21833}
21834_ACEOF
21835rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021836if { (ac_try="$ac_compile"
21837case "(($ac_try" in
21838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21839 *) ac_try_echo=$ac_try;;
21840esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021844 grep -v '^ *+' conftest.er1 >conftest.err
21845 rm -f conftest.er1
21846 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021848 (exit $ac_status); } && {
21849 test -z "$ac_c_werror_flag" ||
21850 test ! -s conftest.err
21851 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021852 ac_cv_header_time_altzone=yes
21853else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021855sed 's/^/| /' conftest.$ac_ext >&5
21856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021857 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021858fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21861fi
21862
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021863{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21864echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021865if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021866
21867cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021868#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021869_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021870
21871fi
21872
Guido van Rossumda88dad1995-01-26 00:46:29 +000021873was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021874{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21875echo $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 +000021876cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021877/* confdefs.h. */
21878_ACEOF
21879cat confdefs.h >>conftest.$ac_ext
21880cat >>conftest.$ac_ext <<_ACEOF
21881/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021882
21883#include <sys/types.h>
21884#include <sys/select.h>
21885#include <sys/time.h>
21886
Martin v. Löwis11437992002-04-12 09:54:03 +000021887int
21888main ()
21889{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021890;
Martin v. Löwis11437992002-04-12 09:54:03 +000021891 ;
21892 return 0;
21893}
21894_ACEOF
21895rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021896if { (ac_try="$ac_compile"
21897case "(($ac_try" in
21898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21899 *) ac_try_echo=$ac_try;;
21900esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021904 grep -v '^ *+' conftest.er1 >conftest.err
21905 rm -f conftest.er1
21906 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021908 (exit $ac_status); } && {
21909 test -z "$ac_c_werror_flag" ||
21910 test ! -s conftest.err
21911 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021912
21913
21914cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021915#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021916_ACEOF
21917
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021918 was_it_defined=yes
21919
Guido van Rossumf78abae1997-01-21 22:02:36 +000021920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021922sed 's/^/| /' conftest.$ac_ext >&5
21923
Thomas Wouters477c8d52006-05-27 19:21:47 +000021924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021925fi
21926
21927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021928{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21929echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021930
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021931{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21932echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021933if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021934 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021935else
Martin v. Löwis11437992002-04-12 09:54:03 +000021936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021937/* confdefs.h. */
21938_ACEOF
21939cat confdefs.h >>conftest.$ac_ext
21940cat >>conftest.$ac_ext <<_ACEOF
21941/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021942
21943# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021944int
21945main ()
21946{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021947struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021948 ;
21949 return 0;
21950}
21951_ACEOF
21952rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021953if { (ac_try="$ac_compile"
21954case "(($ac_try" in
21955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21956 *) ac_try_echo=$ac_try;;
21957esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021961 grep -v '^ *+' conftest.er1 >conftest.err
21962 rm -f conftest.er1
21963 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021965 (exit $ac_status); } && {
21966 test -z "$ac_c_werror_flag" ||
21967 test ! -s conftest.err
21968 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021969 ac_cv_struct_addrinfo=yes
21970else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021972sed 's/^/| /' conftest.$ac_ext >&5
21973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021974 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021975fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21978fi
21979
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021980{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21981echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021982if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021983
21984cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021985#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021986_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021987
21988fi
21989
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021990{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21991echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021992if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021993 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021994else
Martin v. Löwis11437992002-04-12 09:54:03 +000021995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021996/* confdefs.h. */
21997_ACEOF
21998cat confdefs.h >>conftest.$ac_ext
21999cat >>conftest.$ac_ext <<_ACEOF
22000/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022001
22002# include <sys/types.h>
22003# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022004int
22005main ()
22006{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022007struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022008 ;
22009 return 0;
22010}
22011_ACEOF
22012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022013if { (ac_try="$ac_compile"
22014case "(($ac_try" in
22015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22016 *) ac_try_echo=$ac_try;;
22017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022021 grep -v '^ *+' conftest.er1 >conftest.err
22022 rm -f conftest.er1
22023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022025 (exit $ac_status); } && {
22026 test -z "$ac_c_werror_flag" ||
22027 test ! -s conftest.err
22028 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022029 ac_cv_struct_sockaddr_storage=yes
22030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022032sed 's/^/| /' conftest.$ac_ext >&5
22033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022034 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022035fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22038fi
22039
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022040{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22041echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022042if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022043
22044cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022045#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022046_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022047
22048fi
22049
Guido van Rossum627b2d71993-12-24 10:39:16 +000022050# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022051
Michael W. Hudson54241132001-12-07 15:38:26 +000022052
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022053{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22054echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022055if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022056 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022057else
Martin v. Löwis11437992002-04-12 09:54:03 +000022058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022059/* confdefs.h. */
22060_ACEOF
22061cat confdefs.h >>conftest.$ac_ext
22062cat >>conftest.$ac_ext <<_ACEOF
22063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022064$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022065int
22066main ()
22067{
22068static int test_array [1 - 2 * !(((char) -1) < 0)];
22069test_array [0] = 0
22070
22071 ;
22072 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022073}
Martin v. Löwis11437992002-04-12 09:54:03 +000022074_ACEOF
22075rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022076if { (ac_try="$ac_compile"
22077case "(($ac_try" in
22078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22079 *) ac_try_echo=$ac_try;;
22080esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022082 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022084 grep -v '^ *+' conftest.er1 >conftest.err
22085 rm -f conftest.er1
22086 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022088 (exit $ac_status); } && {
22089 test -z "$ac_c_werror_flag" ||
22090 test ! -s conftest.err
22091 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022092 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022093else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022095sed 's/^/| /' conftest.$ac_ext >&5
22096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022097 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022099
22100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022101fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022102{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22103echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022104if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022105 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022106#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022107_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022108
22109fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022110
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022111{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22112echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022113if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022114 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022115else
22116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022117/* confdefs.h. */
22118_ACEOF
22119cat confdefs.h >>conftest.$ac_ext
22120cat >>conftest.$ac_ext <<_ACEOF
22121/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022122
Martin v. Löwis11437992002-04-12 09:54:03 +000022123int
22124main ()
22125{
22126/* FIXME: Include the comments suggested by Paul. */
22127#ifndef __cplusplus
22128 /* Ultrix mips cc rejects this. */
22129 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022130 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022131 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022132 char const *const *pcpcc;
22133 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022134 /* NEC SVR4.0.2 mips cc rejects this. */
22135 struct point {int x, y;};
22136 static struct point const zero = {0,0};
22137 /* AIX XL C 1.02.0.0 rejects this.
22138 It does not let you subtract one const X* pointer from another in
22139 an arm of an if-expression whose if-part is not a constant
22140 expression */
22141 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022142 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022143 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022144 ++pcpcc;
22145 ppc = (char**) pcpcc;
22146 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022147 { /* SCO 3.2v4 cc rejects this. */
22148 char *t;
22149 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022150
Martin v. Löwis11437992002-04-12 09:54:03 +000022151 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022152 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022153 }
22154 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22155 int x[] = {25, 17};
22156 const int *foo = &x[0];
22157 ++foo;
22158 }
22159 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22160 typedef const int *iptr;
22161 iptr p = 0;
22162 ++p;
22163 }
22164 { /* AIX XL C 1.02.0.0 rejects this saying
22165 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22166 struct s { int j; const int *ap[3]; };
22167 struct s *b; b->j = 5;
22168 }
22169 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22170 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022171 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022172 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022173 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022174#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022175
Martin v. Löwis11437992002-04-12 09:54:03 +000022176 ;
22177 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022178}
Martin v. Löwis11437992002-04-12 09:54:03 +000022179_ACEOF
22180rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022181if { (ac_try="$ac_compile"
22182case "(($ac_try" in
22183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22184 *) ac_try_echo=$ac_try;;
22185esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022187 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022189 grep -v '^ *+' conftest.er1 >conftest.err
22190 rm -f conftest.er1
22191 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022193 (exit $ac_status); } && {
22194 test -z "$ac_c_werror_flag" ||
22195 test ! -s conftest.err
22196 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022197 ac_cv_c_const=yes
22198else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022200sed 's/^/| /' conftest.$ac_ext >&5
22201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022202 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022204
22205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022206fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022207{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22208echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022209if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022210
22211cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022212#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022213_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022214
22215fi
22216
Michael W. Hudson54241132001-12-07 15:38:26 +000022217
Guido van Rossumda88dad1995-01-26 00:46:29 +000022218works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022219{ echo "$as_me:$LINENO: checking for working volatile" >&5
22220echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022221cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022222/* confdefs.h. */
22223_ACEOF
22224cat confdefs.h >>conftest.$ac_ext
22225cat >>conftest.$ac_ext <<_ACEOF
22226/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022227
Martin v. Löwis11437992002-04-12 09:54:03 +000022228int
22229main ()
22230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022231volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022232 ;
22233 return 0;
22234}
22235_ACEOF
22236rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022237if { (ac_try="$ac_compile"
22238case "(($ac_try" in
22239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22240 *) ac_try_echo=$ac_try;;
22241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022245 grep -v '^ *+' conftest.er1 >conftest.err
22246 rm -f conftest.er1
22247 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022249 (exit $ac_status); } && {
22250 test -z "$ac_c_werror_flag" ||
22251 test ! -s conftest.err
22252 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022253 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022256sed 's/^/| /' conftest.$ac_ext >&5
22257
Martin v. Löwis11437992002-04-12 09:54:03 +000022258
22259cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022260#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022261_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022262
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022263
Guido van Rossum627b2d71993-12-24 10:39:16 +000022264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022265
22266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022267{ echo "$as_me:$LINENO: result: $works" >&5
22268echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022269
Guido van Rossumda88dad1995-01-26 00:46:29 +000022270works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022271{ echo "$as_me:$LINENO: checking for working signed char" >&5
22272echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022274/* confdefs.h. */
22275_ACEOF
22276cat confdefs.h >>conftest.$ac_ext
22277cat >>conftest.$ac_ext <<_ACEOF
22278/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022279
Martin v. Löwis11437992002-04-12 09:54:03 +000022280int
22281main ()
22282{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022283signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022284 ;
22285 return 0;
22286}
22287_ACEOF
22288rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022289if { (ac_try="$ac_compile"
22290case "(($ac_try" in
22291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22292 *) ac_try_echo=$ac_try;;
22293esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022297 grep -v '^ *+' conftest.er1 >conftest.err
22298 rm -f conftest.er1
22299 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022301 (exit $ac_status); } && {
22302 test -z "$ac_c_werror_flag" ||
22303 test ! -s conftest.err
22304 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022305 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022306else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022308sed 's/^/| /' conftest.$ac_ext >&5
22309
Martin v. Löwis11437992002-04-12 09:54:03 +000022310
22311cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022312#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022313_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022314
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022315
Guido van Rossum7f43da71994-08-01 12:15:30 +000022316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022317
22318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022319{ echo "$as_me:$LINENO: result: $works" >&5
22320echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022321
Guido van Rossumda88dad1995-01-26 00:46:29 +000022322have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022323{ echo "$as_me:$LINENO: checking for prototypes" >&5
22324echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022325cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022326/* confdefs.h. */
22327_ACEOF
22328cat confdefs.h >>conftest.$ac_ext
22329cat >>conftest.$ac_ext <<_ACEOF
22330/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022331int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022332int
22333main ()
22334{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022335return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022336 ;
22337 return 0;
22338}
22339_ACEOF
22340rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022341if { (ac_try="$ac_compile"
22342case "(($ac_try" in
22343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22344 *) ac_try_echo=$ac_try;;
22345esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022349 grep -v '^ *+' conftest.er1 >conftest.err
22350 rm -f conftest.er1
22351 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022353 (exit $ac_status); } && {
22354 test -z "$ac_c_werror_flag" ||
22355 test ! -s conftest.err
22356 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022357
22358
22359cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022360#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022361_ACEOF
22362
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022363 have_prototypes=yes
22364
Guido van Rossumf78abae1997-01-21 22:02:36 +000022365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022367sed 's/^/| /' conftest.$ac_ext >&5
22368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022369
Guido van Rossum7f43da71994-08-01 12:15:30 +000022370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022371
22372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022373{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22374echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022375
Guido van Rossumda88dad1995-01-26 00:46:29 +000022376works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022377{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22378echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022379cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022380/* confdefs.h. */
22381_ACEOF
22382cat confdefs.h >>conftest.$ac_ext
22383cat >>conftest.$ac_ext <<_ACEOF
22384/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022385
22386#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022387int foo(int x, ...) {
22388 va_list va;
22389 va_start(va, x);
22390 va_arg(va, int);
22391 va_arg(va, char *);
22392 va_arg(va, double);
22393 return 0;
22394}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022395
Martin v. Löwis11437992002-04-12 09:54:03 +000022396int
22397main ()
22398{
Guido van Rossum90eea071996-08-30 20:58:57 +000022399return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022400 ;
22401 return 0;
22402}
22403_ACEOF
22404rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022405if { (ac_try="$ac_compile"
22406case "(($ac_try" in
22407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22408 *) ac_try_echo=$ac_try;;
22409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022413 grep -v '^ *+' conftest.er1 >conftest.err
22414 rm -f conftest.er1
22415 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022417 (exit $ac_status); } && {
22418 test -z "$ac_c_werror_flag" ||
22419 test ! -s conftest.err
22420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022421
22422
22423cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022424#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022425_ACEOF
22426
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022427 works=yes
22428
Guido van Rossumf78abae1997-01-21 22:02:36 +000022429else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022431sed 's/^/| /' conftest.$ac_ext >&5
22432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022433
Guido van Rossum627b2d71993-12-24 10:39:16 +000022434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022435
22436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022437{ echo "$as_me:$LINENO: result: $works" >&5
22438echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022439
Martin v. Löwisd6320502004-08-12 13:45:08 +000022440# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022441{ echo "$as_me:$LINENO: checking for socketpair" >&5
22442echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022443cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022444/* confdefs.h. */
22445_ACEOF
22446cat confdefs.h >>conftest.$ac_ext
22447cat >>conftest.$ac_ext <<_ACEOF
22448/* end confdefs.h. */
22449
22450#include <sys/types.h>
22451#include <sys/socket.h>
22452
22453int
22454main ()
22455{
22456void *x=socketpair
22457 ;
22458 return 0;
22459}
22460_ACEOF
22461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022462if { (ac_try="$ac_compile"
22463case "(($ac_try" in
22464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22465 *) ac_try_echo=$ac_try;;
22466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022470 grep -v '^ *+' conftest.er1 >conftest.err
22471 rm -f conftest.er1
22472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022474 (exit $ac_status); } && {
22475 test -z "$ac_c_werror_flag" ||
22476 test ! -s conftest.err
22477 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022478
22479cat >>confdefs.h <<\_ACEOF
22480#define HAVE_SOCKETPAIR 1
22481_ACEOF
22482
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022483 { echo "$as_me:$LINENO: result: yes" >&5
22484echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022485else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022486 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022487sed 's/^/| /' conftest.$ac_ext >&5
22488
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022489 { echo "$as_me:$LINENO: result: no" >&5
22490echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022491
22492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022493
22494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022495
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022496# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022497{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22498echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022500/* confdefs.h. */
22501_ACEOF
22502cat confdefs.h >>conftest.$ac_ext
22503cat >>conftest.$ac_ext <<_ACEOF
22504/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022505#include <sys/types.h>
22506#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022507int
22508main ()
22509{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022510struct sockaddr x;
22511x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022512 ;
22513 return 0;
22514}
22515_ACEOF
22516rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022517if { (ac_try="$ac_compile"
22518case "(($ac_try" in
22519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22520 *) ac_try_echo=$ac_try;;
22521esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022525 grep -v '^ *+' conftest.er1 >conftest.err
22526 rm -f conftest.er1
22527 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022529 (exit $ac_status); } && {
22530 test -z "$ac_c_werror_flag" ||
22531 test ! -s conftest.err
22532 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022533 { echo "$as_me:$LINENO: result: yes" >&5
22534echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022535
22536cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022537#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022538_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022539
22540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022542sed 's/^/| /' conftest.$ac_ext >&5
22543
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022544 { echo "$as_me:$LINENO: result: no" >&5
22545echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022547
22548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022549
Guido van Rossumda88dad1995-01-26 00:46:29 +000022550va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022551{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22552echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022553cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022559
22560#ifdef HAVE_STDARG_PROTOTYPES
22561#include <stdarg.h>
22562#else
22563#include <varargs.h>
22564#endif
22565
Martin v. Löwis11437992002-04-12 09:54:03 +000022566int
22567main ()
22568{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022569va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022570 ;
22571 return 0;
22572}
22573_ACEOF
22574rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022575if { (ac_try="$ac_compile"
22576case "(($ac_try" in
22577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22578 *) ac_try_echo=$ac_try;;
22579esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022583 grep -v '^ *+' conftest.er1 >conftest.err
22584 rm -f conftest.er1
22585 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022587 (exit $ac_status); } && {
22588 test -z "$ac_c_werror_flag" ||
22589 test ! -s conftest.err
22590 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022591 :
22592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022594sed 's/^/| /' conftest.$ac_ext >&5
22595
Martin v. Löwis11437992002-04-12 09:54:03 +000022596
22597
22598cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022599#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022600_ACEOF
22601
Guido van Rossumda88dad1995-01-26 00:46:29 +000022602 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022605
22606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022607{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22608echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022610# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022611
22612
22613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022614{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22615echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022616if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022617 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022618else
Martin v. Löwis11437992002-04-12 09:54:03 +000022619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022620/* confdefs.h. */
22621_ACEOF
22622cat confdefs.h >>conftest.$ac_ext
22623cat >>conftest.$ac_ext <<_ACEOF
22624/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022625/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22626 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22627#define gethostbyname_r innocuous_gethostbyname_r
22628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022629/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022630 which can conflict with char gethostbyname_r (); below.
22631 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022632 <limits.h> exists even on freestanding compilers. */
22633
22634#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022635# include <limits.h>
22636#else
22637# include <assert.h>
22638#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022639
22640#undef gethostbyname_r
22641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022642/* Override any GCC internal prototype to avoid an error.
22643 Use char because int might match the return type of a GCC
22644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022645#ifdef __cplusplus
22646extern "C"
22647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022648char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022649/* The GNU C library defines this for functions which it implements
22650 to always fail with ENOSYS. Some functions are actually named
22651 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022652#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022653choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022654#endif
22655
Skip Montanaro6dead952003-09-25 14:50:04 +000022656int
22657main ()
22658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022659return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022660 ;
22661 return 0;
22662}
22663_ACEOF
22664rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022665if { (ac_try="$ac_link"
22666case "(($ac_try" in
22667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22668 *) ac_try_echo=$ac_try;;
22669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022671 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022673 grep -v '^ *+' conftest.er1 >conftest.err
22674 rm -f conftest.er1
22675 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022677 (exit $ac_status); } && {
22678 test -z "$ac_c_werror_flag" ||
22679 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022680 } && test -s conftest$ac_exeext &&
22681 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022682 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022683else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022685sed 's/^/| /' conftest.$ac_ext >&5
22686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022687 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022689
22690rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022691 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022692fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022693{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22694echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22695if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022696
Martin v. Löwis11437992002-04-12 09:54:03 +000022697 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022698#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022699_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022700
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022701 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22702echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022703 OLD_CFLAGS=$CFLAGS
22704 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022706/* confdefs.h. */
22707_ACEOF
22708cat confdefs.h >>conftest.$ac_ext
22709cat >>conftest.$ac_ext <<_ACEOF
22710/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022711
22712# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022713
Martin v. Löwis11437992002-04-12 09:54:03 +000022714int
22715main ()
22716{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022717
22718 char *name;
22719 struct hostent *he, *res;
22720 char buffer[2048];
22721 int buflen = 2048;
22722 int h_errnop;
22723
22724 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022725
22726 ;
22727 return 0;
22728}
22729_ACEOF
22730rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022731if { (ac_try="$ac_compile"
22732case "(($ac_try" in
22733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22734 *) ac_try_echo=$ac_try;;
22735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022739 grep -v '^ *+' conftest.er1 >conftest.err
22740 rm -f conftest.er1
22741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022743 (exit $ac_status); } && {
22744 test -z "$ac_c_werror_flag" ||
22745 test ! -s conftest.err
22746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022747
22748 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022749#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022750_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022751
Martin v. Löwis11437992002-04-12 09:54:03 +000022752
22753cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022754#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022755_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022756
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022757 { echo "$as_me:$LINENO: result: yes" >&5
22758echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022760else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022762sed 's/^/| /' conftest.$ac_ext >&5
22763
Martin v. Löwis11437992002-04-12 09:54:03 +000022764
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022765 { echo "$as_me:$LINENO: result: no" >&5
22766echo "${ECHO_T}no" >&6; }
22767 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22768echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022770/* confdefs.h. */
22771_ACEOF
22772cat confdefs.h >>conftest.$ac_ext
22773cat >>conftest.$ac_ext <<_ACEOF
22774/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022775
22776# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022777
Martin v. Löwis11437992002-04-12 09:54:03 +000022778int
22779main ()
22780{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022781
22782 char *name;
22783 struct hostent *he;
22784 char buffer[2048];
22785 int buflen = 2048;
22786 int h_errnop;
22787
22788 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022789
22790 ;
22791 return 0;
22792}
22793_ACEOF
22794rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022795if { (ac_try="$ac_compile"
22796case "(($ac_try" in
22797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22798 *) ac_try_echo=$ac_try;;
22799esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022803 grep -v '^ *+' conftest.er1 >conftest.err
22804 rm -f conftest.er1
22805 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022807 (exit $ac_status); } && {
22808 test -z "$ac_c_werror_flag" ||
22809 test ! -s conftest.err
22810 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022811
22812 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022813#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022814_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022815
Martin v. Löwis11437992002-04-12 09:54:03 +000022816
22817cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022818#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022819_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022820
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022821 { echo "$as_me:$LINENO: result: yes" >&5
22822echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022823
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022824else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022826sed 's/^/| /' conftest.$ac_ext >&5
22827
Martin v. Löwis11437992002-04-12 09:54:03 +000022828
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022829 { echo "$as_me:$LINENO: result: no" >&5
22830echo "${ECHO_T}no" >&6; }
22831 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22832echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022834/* confdefs.h. */
22835_ACEOF
22836cat confdefs.h >>conftest.$ac_ext
22837cat >>conftest.$ac_ext <<_ACEOF
22838/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022839
22840# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022841
Martin v. Löwis11437992002-04-12 09:54:03 +000022842int
22843main ()
22844{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022845
22846 char *name;
22847 struct hostent *he;
22848 struct hostent_data data;
22849
22850 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022851
22852 ;
22853 return 0;
22854}
22855_ACEOF
22856rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022857if { (ac_try="$ac_compile"
22858case "(($ac_try" in
22859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22860 *) ac_try_echo=$ac_try;;
22861esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022865 grep -v '^ *+' conftest.er1 >conftest.err
22866 rm -f conftest.er1
22867 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022869 (exit $ac_status); } && {
22870 test -z "$ac_c_werror_flag" ||
22871 test ! -s conftest.err
22872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022873
22874 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022875#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022876_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022877
Martin v. Löwis11437992002-04-12 09:54:03 +000022878
22879cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022880#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022881_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022882
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022883 { echo "$as_me:$LINENO: result: yes" >&5
22884echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022885
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022886else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022888sed 's/^/| /' conftest.$ac_ext >&5
22889
Martin v. Löwis11437992002-04-12 09:54:03 +000022890
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022891 { echo "$as_me:$LINENO: result: no" >&5
22892echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022893
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022895
22896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022897
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022899
22900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022901
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022903
22904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022905 CFLAGS=$OLD_CFLAGS
22906
22907else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022908
Martin v. Löwis11437992002-04-12 09:54:03 +000022909
22910for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022911do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022912as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22913{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22914echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022915if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022916 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022917else
Martin v. Löwis11437992002-04-12 09:54:03 +000022918 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022919/* confdefs.h. */
22920_ACEOF
22921cat confdefs.h >>conftest.$ac_ext
22922cat >>conftest.$ac_ext <<_ACEOF
22923/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022924/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22925 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22926#define $ac_func innocuous_$ac_func
22927
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022928/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022929 which can conflict with char $ac_func (); below.
22930 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022931 <limits.h> exists even on freestanding compilers. */
22932
22933#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022934# include <limits.h>
22935#else
22936# include <assert.h>
22937#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022938
22939#undef $ac_func
22940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022941/* Override any GCC internal prototype to avoid an error.
22942 Use char because int might match the return type of a GCC
22943 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022944#ifdef __cplusplus
22945extern "C"
22946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022947char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022948/* The GNU C library defines this for functions which it implements
22949 to always fail with ENOSYS. Some functions are actually named
22950 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022951#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022952choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022953#endif
22954
Skip Montanaro6dead952003-09-25 14:50:04 +000022955int
22956main ()
22957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022958return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022959 ;
22960 return 0;
22961}
22962_ACEOF
22963rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022964if { (ac_try="$ac_link"
22965case "(($ac_try" in
22966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22967 *) ac_try_echo=$ac_try;;
22968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022970 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022972 grep -v '^ *+' conftest.er1 >conftest.err
22973 rm -f conftest.er1
22974 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022976 (exit $ac_status); } && {
22977 test -z "$ac_c_werror_flag" ||
22978 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022979 } && test -s conftest$ac_exeext &&
22980 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022981 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022984sed 's/^/| /' conftest.$ac_ext >&5
22985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022986 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022988
22989rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022990 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022991fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022992ac_res=`eval echo '${'$as_ac_var'}'`
22993 { echo "$as_me:$LINENO: result: $ac_res" >&5
22994echo "${ECHO_T}$ac_res" >&6; }
22995if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022996 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022997#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022998_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022999
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023000fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023001done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023002
Michael W. Hudson54241132001-12-07 15:38:26 +000023003
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023004fi
23005
Michael W. Hudson54241132001-12-07 15:38:26 +000023006
23007
23008
23009
23010
23011
Guido van Rossum627b2d71993-12-24 10:39:16 +000023012# checks for system services
23013# (none yet)
23014
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023015# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023016{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23017echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023018if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023019 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023020else
Martin v. Löwis11437992002-04-12 09:54:03 +000023021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023022/* confdefs.h. */
23023_ACEOF
23024cat confdefs.h >>conftest.$ac_ext
23025cat >>conftest.$ac_ext <<_ACEOF
23026/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023027/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23028 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23029#define __fpu_control innocuous___fpu_control
23030
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023031/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023032 which can conflict with char __fpu_control (); below.
23033 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023034 <limits.h> exists even on freestanding compilers. */
23035
23036#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023037# include <limits.h>
23038#else
23039# include <assert.h>
23040#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023041
23042#undef __fpu_control
23043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023044/* Override any GCC internal prototype to avoid an error.
23045 Use char because int might match the return type of a GCC
23046 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023047#ifdef __cplusplus
23048extern "C"
23049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023050char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023051/* The GNU C library defines this for functions which it implements
23052 to always fail with ENOSYS. Some functions are actually named
23053 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023054#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023055choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023056#endif
23057
Skip Montanaro6dead952003-09-25 14:50:04 +000023058int
23059main ()
23060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023061return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023062 ;
23063 return 0;
23064}
23065_ACEOF
23066rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023067if { (ac_try="$ac_link"
23068case "(($ac_try" in
23069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23070 *) ac_try_echo=$ac_try;;
23071esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023073 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023075 grep -v '^ *+' conftest.er1 >conftest.err
23076 rm -f conftest.er1
23077 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023079 (exit $ac_status); } && {
23080 test -z "$ac_c_werror_flag" ||
23081 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023082 } && test -s conftest$ac_exeext &&
23083 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023084 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023087sed 's/^/| /' conftest.$ac_ext >&5
23088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023089 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023091
23092rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023093 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023094fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023095{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23096echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23097if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023098 :
23099else
Martin v. Löwis11437992002-04-12 09:54:03 +000023100
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023101{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23102echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023103if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023104 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023105else
Martin v. Löwis11437992002-04-12 09:54:03 +000023106 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023107LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023109/* confdefs.h. */
23110_ACEOF
23111cat confdefs.h >>conftest.$ac_ext
23112cat >>conftest.$ac_ext <<_ACEOF
23113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023115/* Override any GCC internal prototype to avoid an error.
23116 Use char because int might match the return type of a GCC
23117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023118#ifdef __cplusplus
23119extern "C"
23120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023121char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023122int
23123main ()
23124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023125return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023126 ;
23127 return 0;
23128}
23129_ACEOF
23130rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023131if { (ac_try="$ac_link"
23132case "(($ac_try" in
23133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23134 *) ac_try_echo=$ac_try;;
23135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023137 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023139 grep -v '^ *+' conftest.er1 >conftest.err
23140 rm -f conftest.er1
23141 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023143 (exit $ac_status); } && {
23144 test -z "$ac_c_werror_flag" ||
23145 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023146 } && test -s conftest$ac_exeext &&
23147 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023148 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023149else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023151sed 's/^/| /' conftest.$ac_ext >&5
23152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023153 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023155
23156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023158LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023159fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023160{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23161echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23162if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023163 cat >>confdefs.h <<_ACEOF
23164#define HAVE_LIBIEEE 1
23165_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023166
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023167 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023168
Guido van Rossum627b2d71993-12-24 10:39:16 +000023169fi
23170
Michael W. Hudson54241132001-12-07 15:38:26 +000023171
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023172fi
23173
Michael W. Hudson54241132001-12-07 15:38:26 +000023174
Guido van Rossum7f253911997-05-09 02:42:48 +000023175# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023176{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23177echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023179# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023180if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023181 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023182if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023183then
23184
23185cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023186#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023187_ACEOF
23188
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023189 { echo "$as_me:$LINENO: result: yes" >&5
23190echo "${ECHO_T}yes" >&6; }
23191else { echo "$as_me:$LINENO: result: no" >&5
23192echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023193fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023195 { echo "$as_me:$LINENO: result: no" >&5
23196echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023197fi
23198
Guido van Rossum7f253911997-05-09 02:42:48 +000023199
Guido van Rossum7f43da71994-08-01 12:15:30 +000023200# check for --with-libm=...
23201
Guido van Rossum563e7081996-09-10 18:20:48 +000023202case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023203Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023204*) LIBM=-lm
23205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023206{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23207echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023209# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023210if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023211 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023212if test "$withval" = no
23213then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023214 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23215echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023216elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023217then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023218 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23219echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23220else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23221echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023222 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023223fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023225 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23226echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023227fi
23228
Guido van Rossum7f43da71994-08-01 12:15:30 +000023229
23230# check for --with-libc=...
23231
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023232{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23233echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023235# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023236if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023237 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023238if test "$withval" = no
23239then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023240 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23241echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023242elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023243then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023244 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23245echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23246else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23247echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023248 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023249fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023251 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23252echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023253fi
23254
Guido van Rossum7f43da71994-08-01 12:15:30 +000023255
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023256# **************************************************
23257# * Check for various properties of floating point *
23258# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023259
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023260{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23261echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023262if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023263 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023264else
23265
23266if test "$cross_compiling" = yes; then
23267 ac_cv_little_endian_double=no
23268else
23269 cat >conftest.$ac_ext <<_ACEOF
23270/* confdefs.h. */
23271_ACEOF
23272cat confdefs.h >>conftest.$ac_ext
23273cat >>conftest.$ac_ext <<_ACEOF
23274/* end confdefs.h. */
23275
23276#include <string.h>
23277int main() {
23278 double x = 9006104071832581.0;
23279 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23280 return 0;
23281 else
23282 return 1;
23283}
23284
23285_ACEOF
23286rm -f conftest$ac_exeext
23287if { (ac_try="$ac_link"
23288case "(($ac_try" in
23289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23290 *) ac_try_echo=$ac_try;;
23291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023293 (eval "$ac_link") 2>&5
23294 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23297 { (case "(($ac_try" in
23298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23299 *) ac_try_echo=$ac_try;;
23300esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023302 (eval "$ac_try") 2>&5
23303 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023305 (exit $ac_status); }; }; then
23306 ac_cv_little_endian_double=yes
23307else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023308 echo "$as_me: program exited with status $ac_status" >&5
23309echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023310sed 's/^/| /' conftest.$ac_ext >&5
23311
23312( exit $ac_status )
23313ac_cv_little_endian_double=no
23314fi
23315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23316fi
23317
23318
23319fi
23320
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023321{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23322echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023323if test "$ac_cv_little_endian_double" = yes
23324then
23325
23326cat >>confdefs.h <<\_ACEOF
23327#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23328_ACEOF
23329
23330fi
23331
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023332{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23333echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023334if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023335 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023336else
23337
23338if test "$cross_compiling" = yes; then
23339 ac_cv_big_endian_double=no
23340else
23341 cat >conftest.$ac_ext <<_ACEOF
23342/* confdefs.h. */
23343_ACEOF
23344cat confdefs.h >>conftest.$ac_ext
23345cat >>conftest.$ac_ext <<_ACEOF
23346/* end confdefs.h. */
23347
23348#include <string.h>
23349int main() {
23350 double x = 9006104071832581.0;
23351 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23352 return 0;
23353 else
23354 return 1;
23355}
23356
23357_ACEOF
23358rm -f conftest$ac_exeext
23359if { (ac_try="$ac_link"
23360case "(($ac_try" in
23361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23362 *) ac_try_echo=$ac_try;;
23363esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023365 (eval "$ac_link") 2>&5
23366 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023368 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23369 { (case "(($ac_try" in
23370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23371 *) ac_try_echo=$ac_try;;
23372esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023374 (eval "$ac_try") 2>&5
23375 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023377 (exit $ac_status); }; }; then
23378 ac_cv_big_endian_double=yes
23379else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023380 echo "$as_me: program exited with status $ac_status" >&5
23381echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023382sed 's/^/| /' conftest.$ac_ext >&5
23383
23384( exit $ac_status )
23385ac_cv_big_endian_double=no
23386fi
23387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23388fi
23389
23390
23391fi
23392
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023393{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23394echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023395if test "$ac_cv_big_endian_double" = yes
23396then
23397
23398cat >>confdefs.h <<\_ACEOF
23399#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23400_ACEOF
23401
23402fi
23403
23404# Some ARM platforms use a mixed-endian representation for doubles.
23405# While Python doesn't currently have full support for these platforms
23406# (see e.g., issue 1762561), we can at least make sure that float <-> string
23407# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023408{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23409echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023410if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023411 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023412else
23413
23414if test "$cross_compiling" = yes; then
23415 ac_cv_mixed_endian_double=no
23416else
23417 cat >conftest.$ac_ext <<_ACEOF
23418/* confdefs.h. */
23419_ACEOF
23420cat confdefs.h >>conftest.$ac_ext
23421cat >>conftest.$ac_ext <<_ACEOF
23422/* end confdefs.h. */
23423
23424#include <string.h>
23425int main() {
23426 double x = 9006104071832581.0;
23427 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23428 return 0;
23429 else
23430 return 1;
23431}
23432
23433_ACEOF
23434rm -f conftest$ac_exeext
23435if { (ac_try="$ac_link"
23436case "(($ac_try" in
23437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23438 *) ac_try_echo=$ac_try;;
23439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023441 (eval "$ac_link") 2>&5
23442 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023444 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23445 { (case "(($ac_try" in
23446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23447 *) ac_try_echo=$ac_try;;
23448esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023450 (eval "$ac_try") 2>&5
23451 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023453 (exit $ac_status); }; }; then
23454 ac_cv_mixed_endian_double=yes
23455else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023456 echo "$as_me: program exited with status $ac_status" >&5
23457echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023458sed 's/^/| /' conftest.$ac_ext >&5
23459
23460( exit $ac_status )
23461ac_cv_mixed_endian_double=no
23462fi
23463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23464fi
23465
23466
23467fi
23468
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023469{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23470echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023471if test "$ac_cv_mixed_endian_double" = yes
23472then
23473
23474cat >>confdefs.h <<\_ACEOF
23475#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23476_ACEOF
23477
23478fi
23479
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023480# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023481# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023482# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023483# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023484# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023485# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023486
23487# This inline assembler syntax may also work for suncc and icc,
23488# so we try it on all platforms.
23489
23490{ 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 +000023491echo $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 +000023492cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023493/* confdefs.h. */
23494_ACEOF
23495cat confdefs.h >>conftest.$ac_ext
23496cat >>conftest.$ac_ext <<_ACEOF
23497/* end confdefs.h. */
23498
23499int
23500main ()
23501{
23502
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023503 unsigned short cw;
23504 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23505 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023506
23507 ;
23508 return 0;
23509}
23510_ACEOF
23511rm -f conftest.$ac_objext
23512if { (ac_try="$ac_compile"
23513case "(($ac_try" in
23514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23515 *) ac_try_echo=$ac_try;;
23516esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023518 (eval "$ac_compile") 2>conftest.er1
23519 ac_status=$?
23520 grep -v '^ *+' conftest.er1 >conftest.err
23521 rm -f conftest.er1
23522 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023524 (exit $ac_status); } && {
23525 test -z "$ac_c_werror_flag" ||
23526 test ! -s conftest.err
23527 } && test -s conftest.$ac_objext; then
23528 have_gcc_asm_for_x87=yes
23529else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023530 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023531sed 's/^/| /' conftest.$ac_ext >&5
23532
23533 have_gcc_asm_for_x87=no
23534fi
23535
23536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023537{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023538echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023539if test "$have_gcc_asm_for_x87" = yes
23540then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023541
23542cat >>confdefs.h <<\_ACEOF
23543#define HAVE_GCC_ASM_FOR_X87 1
23544_ACEOF
23545
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023546fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023547
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023548# Detect whether system arithmetic is subject to x87-style double
23549# rounding issues. The result of this test has little meaning on non
23550# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23551# mode is round-to-nearest and double rounding issues are present, and
23552# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023553{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23554echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023555# $BASECFLAGS may affect the result
23556ac_save_cc="$CC"
23557CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023558if test "$cross_compiling" = yes; then
23559 ac_cv_x87_double_rounding=no
23560else
23561 cat >conftest.$ac_ext <<_ACEOF
23562/* confdefs.h. */
23563_ACEOF
23564cat confdefs.h >>conftest.$ac_ext
23565cat >>conftest.$ac_ext <<_ACEOF
23566/* end confdefs.h. */
23567
23568#include <stdlib.h>
23569#include <math.h>
23570int main() {
23571 volatile double x, y, z;
23572 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23573 x = 0.99999999999999989; /* 1-2**-53 */
23574 y = 1./x;
23575 if (y != 1.)
23576 exit(0);
23577 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23578 x = 1e16;
23579 y = 2.99999;
23580 z = x + y;
23581 if (z != 1e16+4.)
23582 exit(0);
23583 /* both tests show evidence of double rounding */
23584 exit(1);
23585}
23586
23587_ACEOF
23588rm -f conftest$ac_exeext
23589if { (ac_try="$ac_link"
23590case "(($ac_try" in
23591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23592 *) ac_try_echo=$ac_try;;
23593esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023595 (eval "$ac_link") 2>&5
23596 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023598 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23599 { (case "(($ac_try" in
23600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23601 *) ac_try_echo=$ac_try;;
23602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023604 (eval "$ac_try") 2>&5
23605 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023607 (exit $ac_status); }; }; then
23608 ac_cv_x87_double_rounding=no
23609else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023610 echo "$as_me: program exited with status $ac_status" >&5
23611echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023612sed 's/^/| /' conftest.$ac_ext >&5
23613
23614( exit $ac_status )
23615ac_cv_x87_double_rounding=yes
23616fi
23617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23618fi
23619
23620
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023621CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023622{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23623echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023624if test "$ac_cv_x87_double_rounding" = yes
23625then
23626
23627cat >>confdefs.h <<\_ACEOF
23628#define X87_DOUBLE_ROUNDING 1
23629_ACEOF
23630
23631fi
23632
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023633# ************************************
23634# * Check for mathematical functions *
23635# ************************************
23636
23637LIBS_SAVE=$LIBS
23638LIBS="$LIBS $LIBM"
23639
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023640# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23641# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023642{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23643echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023644if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023645 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023646else
23647
23648if test "$cross_compiling" = yes; then
23649 ac_cv_tanh_preserves_zero_sign=no
23650else
23651 cat >conftest.$ac_ext <<_ACEOF
23652/* confdefs.h. */
23653_ACEOF
23654cat confdefs.h >>conftest.$ac_ext
23655cat >>conftest.$ac_ext <<_ACEOF
23656/* end confdefs.h. */
23657
23658#include <math.h>
23659#include <stdlib.h>
23660int main() {
23661 /* return 0 if either negative zeros don't exist
23662 on this platform or if negative zeros exist
23663 and tanh(-0.) == -0. */
23664 if (atan2(0., -1.) == atan2(-0., -1.) ||
23665 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23666 else exit(1);
23667}
23668
23669_ACEOF
23670rm -f conftest$ac_exeext
23671if { (ac_try="$ac_link"
23672case "(($ac_try" in
23673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23674 *) ac_try_echo=$ac_try;;
23675esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023677 (eval "$ac_link") 2>&5
23678 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23681 { (case "(($ac_try" in
23682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23683 *) ac_try_echo=$ac_try;;
23684esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023686 (eval "$ac_try") 2>&5
23687 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023689 (exit $ac_status); }; }; then
23690 ac_cv_tanh_preserves_zero_sign=yes
23691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023692 echo "$as_me: program exited with status $ac_status" >&5
23693echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023694sed 's/^/| /' conftest.$ac_ext >&5
23695
23696( exit $ac_status )
23697ac_cv_tanh_preserves_zero_sign=no
23698fi
23699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23700fi
23701
23702
23703fi
23704
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023705{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23706echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023707if test "$ac_cv_tanh_preserves_zero_sign" = yes
23708then
23709
23710cat >>confdefs.h <<\_ACEOF
23711#define TANH_PRESERVES_ZERO_SIGN 1
23712_ACEOF
23713
23714fi
23715
23716
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023717
Michael W. Hudson54241132001-12-07 15:38:26 +000023718
Christian Heimes99170a52007-12-19 02:07:34 +000023719
23720
23721
23722
23723
Mark Dickinsonf2537862009-04-18 13:58:18 +000023724
Mark Dickinson9c113362009-09-05 10:36:23 +000023725for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23726do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23728{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023730if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023731 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023732else
23733 cat >conftest.$ac_ext <<_ACEOF
23734/* confdefs.h. */
23735_ACEOF
23736cat confdefs.h >>conftest.$ac_ext
23737cat >>conftest.$ac_ext <<_ACEOF
23738/* end confdefs.h. */
23739/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23740 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23741#define $ac_func innocuous_$ac_func
23742
23743/* System header to define __stub macros and hopefully few prototypes,
23744 which can conflict with char $ac_func (); below.
23745 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23746 <limits.h> exists even on freestanding compilers. */
23747
23748#ifdef __STDC__
23749# include <limits.h>
23750#else
23751# include <assert.h>
23752#endif
23753
23754#undef $ac_func
23755
23756/* Override any GCC internal prototype to avoid an error.
23757 Use char because int might match the return type of a GCC
23758 builtin and then its argument prototype would still apply. */
23759#ifdef __cplusplus
23760extern "C"
23761#endif
23762char $ac_func ();
23763/* The GNU C library defines this for functions which it implements
23764 to always fail with ENOSYS. Some functions are actually named
23765 something starting with __ and the normal name is an alias. */
23766#if defined __stub_$ac_func || defined __stub___$ac_func
23767choke me
23768#endif
23769
23770int
23771main ()
23772{
23773return $ac_func ();
23774 ;
23775 return 0;
23776}
23777_ACEOF
23778rm -f conftest.$ac_objext conftest$ac_exeext
23779if { (ac_try="$ac_link"
23780case "(($ac_try" in
23781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23782 *) ac_try_echo=$ac_try;;
23783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023785 (eval "$ac_link") 2>conftest.er1
23786 ac_status=$?
23787 grep -v '^ *+' conftest.er1 >conftest.err
23788 rm -f conftest.er1
23789 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023791 (exit $ac_status); } && {
23792 test -z "$ac_c_werror_flag" ||
23793 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023794 } && test -s conftest$ac_exeext &&
23795 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023796 eval "$as_ac_var=yes"
23797else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023798 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023799sed 's/^/| /' conftest.$ac_ext >&5
23800
23801 eval "$as_ac_var=no"
23802fi
23803
23804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23805 conftest$ac_exeext conftest.$ac_ext
23806fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023807ac_res=`eval echo '${'$as_ac_var'}'`
23808 { echo "$as_me:$LINENO: result: $ac_res" >&5
23809echo "${ECHO_T}$ac_res" >&6; }
23810if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023811 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023813_ACEOF
23814
23815fi
23816done
23817
23818
23819
23820
23821
23822
23823for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023824do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023825as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23826{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23827echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023828if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023829 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023830else
23831 cat >conftest.$ac_ext <<_ACEOF
23832/* confdefs.h. */
23833_ACEOF
23834cat confdefs.h >>conftest.$ac_ext
23835cat >>conftest.$ac_ext <<_ACEOF
23836/* end confdefs.h. */
23837/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23838 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23839#define $ac_func innocuous_$ac_func
23840
23841/* System header to define __stub macros and hopefully few prototypes,
23842 which can conflict with char $ac_func (); below.
23843 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23844 <limits.h> exists even on freestanding compilers. */
23845
23846#ifdef __STDC__
23847# include <limits.h>
23848#else
23849# include <assert.h>
23850#endif
23851
23852#undef $ac_func
23853
23854/* Override any GCC internal prototype to avoid an error.
23855 Use char because int might match the return type of a GCC
23856 builtin and then its argument prototype would still apply. */
23857#ifdef __cplusplus
23858extern "C"
23859#endif
23860char $ac_func ();
23861/* The GNU C library defines this for functions which it implements
23862 to always fail with ENOSYS. Some functions are actually named
23863 something starting with __ and the normal name is an alias. */
23864#if defined __stub_$ac_func || defined __stub___$ac_func
23865choke me
23866#endif
23867
23868int
23869main ()
23870{
23871return $ac_func ();
23872 ;
23873 return 0;
23874}
23875_ACEOF
23876rm -f conftest.$ac_objext conftest$ac_exeext
23877if { (ac_try="$ac_link"
23878case "(($ac_try" in
23879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23880 *) ac_try_echo=$ac_try;;
23881esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023883 (eval "$ac_link") 2>conftest.er1
23884 ac_status=$?
23885 grep -v '^ *+' conftest.er1 >conftest.err
23886 rm -f conftest.er1
23887 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023889 (exit $ac_status); } && {
23890 test -z "$ac_c_werror_flag" ||
23891 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023892 } && test -s conftest$ac_exeext &&
23893 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023894 eval "$as_ac_var=yes"
23895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023896 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023897sed 's/^/| /' conftest.$ac_ext >&5
23898
23899 eval "$as_ac_var=no"
23900fi
23901
23902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23903 conftest$ac_exeext conftest.$ac_ext
23904fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023905ac_res=`eval echo '${'$as_ac_var'}'`
23906 { echo "$as_me:$LINENO: result: $ac_res" >&5
23907echo "${ECHO_T}$ac_res" >&6; }
23908if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023909 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023910#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023911_ACEOF
23912
23913fi
23914done
23915
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023916{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23917echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023918if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023919 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023920else
23921 cat >conftest.$ac_ext <<_ACEOF
23922/* confdefs.h. */
23923_ACEOF
23924cat confdefs.h >>conftest.$ac_ext
23925cat >>conftest.$ac_ext <<_ACEOF
23926/* end confdefs.h. */
23927#include <math.h>
23928
23929int
23930main ()
23931{
23932#ifndef isinf
23933 (void) isinf;
23934#endif
23935
23936 ;
23937 return 0;
23938}
23939_ACEOF
23940rm -f conftest.$ac_objext
23941if { (ac_try="$ac_compile"
23942case "(($ac_try" in
23943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23944 *) ac_try_echo=$ac_try;;
23945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023947 (eval "$ac_compile") 2>conftest.er1
23948 ac_status=$?
23949 grep -v '^ *+' conftest.er1 >conftest.err
23950 rm -f conftest.er1
23951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023953 (exit $ac_status); } && {
23954 test -z "$ac_c_werror_flag" ||
23955 test ! -s conftest.err
23956 } && test -s conftest.$ac_objext; then
23957 ac_cv_have_decl_isinf=yes
23958else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023959 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023960sed 's/^/| /' conftest.$ac_ext >&5
23961
23962 ac_cv_have_decl_isinf=no
23963fi
23964
23965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23966fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023967{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23968echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23969if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023970
23971cat >>confdefs.h <<_ACEOF
23972#define HAVE_DECL_ISINF 1
23973_ACEOF
23974
23975
23976else
23977 cat >>confdefs.h <<_ACEOF
23978#define HAVE_DECL_ISINF 0
23979_ACEOF
23980
23981
23982fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023983{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23984echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023985if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023986 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023987else
23988 cat >conftest.$ac_ext <<_ACEOF
23989/* confdefs.h. */
23990_ACEOF
23991cat confdefs.h >>conftest.$ac_ext
23992cat >>conftest.$ac_ext <<_ACEOF
23993/* end confdefs.h. */
23994#include <math.h>
23995
23996int
23997main ()
23998{
23999#ifndef isnan
24000 (void) isnan;
24001#endif
24002
24003 ;
24004 return 0;
24005}
24006_ACEOF
24007rm -f conftest.$ac_objext
24008if { (ac_try="$ac_compile"
24009case "(($ac_try" in
24010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24011 *) ac_try_echo=$ac_try;;
24012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024014 (eval "$ac_compile") 2>conftest.er1
24015 ac_status=$?
24016 grep -v '^ *+' conftest.er1 >conftest.err
24017 rm -f conftest.er1
24018 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024020 (exit $ac_status); } && {
24021 test -z "$ac_c_werror_flag" ||
24022 test ! -s conftest.err
24023 } && test -s conftest.$ac_objext; then
24024 ac_cv_have_decl_isnan=yes
24025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024026 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024027sed 's/^/| /' conftest.$ac_ext >&5
24028
24029 ac_cv_have_decl_isnan=no
24030fi
24031
24032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24033fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024034{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24035echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24036if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024037
24038cat >>confdefs.h <<_ACEOF
24039#define HAVE_DECL_ISNAN 1
24040_ACEOF
24041
24042
24043else
24044 cat >>confdefs.h <<_ACEOF
24045#define HAVE_DECL_ISNAN 0
24046_ACEOF
24047
24048
24049fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024050{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24051echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024052if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024053 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024054else
24055 cat >conftest.$ac_ext <<_ACEOF
24056/* confdefs.h. */
24057_ACEOF
24058cat confdefs.h >>conftest.$ac_ext
24059cat >>conftest.$ac_ext <<_ACEOF
24060/* end confdefs.h. */
24061#include <math.h>
24062
24063int
24064main ()
24065{
24066#ifndef isfinite
24067 (void) isfinite;
24068#endif
24069
24070 ;
24071 return 0;
24072}
24073_ACEOF
24074rm -f conftest.$ac_objext
24075if { (ac_try="$ac_compile"
24076case "(($ac_try" in
24077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24078 *) ac_try_echo=$ac_try;;
24079esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024081 (eval "$ac_compile") 2>conftest.er1
24082 ac_status=$?
24083 grep -v '^ *+' conftest.er1 >conftest.err
24084 rm -f conftest.er1
24085 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024087 (exit $ac_status); } && {
24088 test -z "$ac_c_werror_flag" ||
24089 test ! -s conftest.err
24090 } && test -s conftest.$ac_objext; then
24091 ac_cv_have_decl_isfinite=yes
24092else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024093 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024094sed 's/^/| /' conftest.$ac_ext >&5
24095
24096 ac_cv_have_decl_isfinite=no
24097fi
24098
24099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24100fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024101{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24102echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24103if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024104
24105cat >>confdefs.h <<_ACEOF
24106#define HAVE_DECL_ISFINITE 1
24107_ACEOF
24108
24109
24110else
24111 cat >>confdefs.h <<_ACEOF
24112#define HAVE_DECL_ISFINITE 0
24113_ACEOF
24114
24115
24116fi
24117
24118
Christian Heimes99170a52007-12-19 02:07:34 +000024119
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024120LIBS=$LIBS_SAVE
24121
Mark Dickinsona614f042009-11-28 12:48:43 +000024122# For multiprocessing module, check that sem_open
24123# actually works. For FreeBSD versions <= 7.2,
24124# the kernel module that provides POSIX semaphores
24125# isn't loaded by default, so an attempt to call
24126# sem_open results in a 'Signal 12' error.
24127{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24128echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24129if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24130 echo $ECHO_N "(cached) $ECHO_C" >&6
24131else
24132 if test "$cross_compiling" = yes; then
24133 ac_cv_posix_semaphores_enabled=yes
24134else
24135 cat >conftest.$ac_ext <<_ACEOF
24136/* confdefs.h. */
24137_ACEOF
24138cat confdefs.h >>conftest.$ac_ext
24139cat >>conftest.$ac_ext <<_ACEOF
24140/* end confdefs.h. */
24141
24142#include <unistd.h>
24143#include <fcntl.h>
24144#include <stdio.h>
24145#include <semaphore.h>
24146#include <sys/stat.h>
24147
24148int main(void) {
24149 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24150 if (a == SEM_FAILED) {
24151 perror("sem_open");
24152 return 1;
24153 }
24154 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024155 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024156 return 0;
24157}
24158
24159_ACEOF
24160rm -f conftest$ac_exeext
24161if { (ac_try="$ac_link"
24162case "(($ac_try" in
24163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24164 *) ac_try_echo=$ac_try;;
24165esac
24166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24167 (eval "$ac_link") 2>&5
24168 ac_status=$?
24169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24170 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24171 { (case "(($ac_try" in
24172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24173 *) ac_try_echo=$ac_try;;
24174esac
24175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24176 (eval "$ac_try") 2>&5
24177 ac_status=$?
24178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24179 (exit $ac_status); }; }; then
24180 ac_cv_posix_semaphores_enabled=yes
24181else
24182 echo "$as_me: program exited with status $ac_status" >&5
24183echo "$as_me: failed program was:" >&5
24184sed 's/^/| /' conftest.$ac_ext >&5
24185
24186( exit $ac_status )
24187ac_cv_posix_semaphores_enabled=no
24188fi
24189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24190fi
24191
24192
24193
24194fi
24195
24196{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24197echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24198if test $ac_cv_posix_semaphores_enabled = no
24199then
24200
24201cat >>confdefs.h <<\_ACEOF
24202#define POSIX_SEMAPHORES_NOT_ENABLED 1
24203_ACEOF
24204
24205fi
24206
Mark Dickinson10683072009-04-18 21:18:19 +000024207# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024208{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24209echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024210if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024211 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024212else
24213 if test "$cross_compiling" = yes; then
24214 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024215else
24216 cat >conftest.$ac_ext <<_ACEOF
24217/* confdefs.h. */
24218_ACEOF
24219cat confdefs.h >>conftest.$ac_ext
24220cat >>conftest.$ac_ext <<_ACEOF
24221/* end confdefs.h. */
24222
24223#include <unistd.h>
24224#include <fcntl.h>
24225#include <stdio.h>
24226#include <semaphore.h>
24227#include <sys/stat.h>
24228
24229int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024230 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024231 int count;
24232 int res;
24233 if(a==SEM_FAILED){
24234 perror("sem_open");
24235 return 1;
24236
24237 }
24238 res = sem_getvalue(a, &count);
24239 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024240 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024241 return res==-1 ? 1 : 0;
24242}
24243
Mark Dickinson10683072009-04-18 21:18:19 +000024244_ACEOF
24245rm -f conftest$ac_exeext
24246if { (ac_try="$ac_link"
24247case "(($ac_try" in
24248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24249 *) ac_try_echo=$ac_try;;
24250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024252 (eval "$ac_link") 2>&5
24253 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24256 { (case "(($ac_try" in
24257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24258 *) ac_try_echo=$ac_try;;
24259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024261 (eval "$ac_try") 2>&5
24262 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024264 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024265 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024266else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024267 echo "$as_me: program exited with status $ac_status" >&5
24268echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024269sed 's/^/| /' conftest.$ac_ext >&5
24270
24271( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024272ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024273fi
24274rm -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 +000024275fi
24276
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024277
24278
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024279fi
24280
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024281{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24282echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024283if test $ac_cv_broken_sem_getvalue = yes
24284then
24285
24286cat >>confdefs.h <<\_ACEOF
24287#define HAVE_BROKEN_SEM_GETVALUE 1
24288_ACEOF
24289
24290fi
24291
Mark Dickinsonbd792642009-03-18 20:06:12 +000024292# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024293{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24294echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024295# Check whether --enable-big-digits was given.
24296if test "${enable_big_digits+set}" = set; then
24297 enableval=$enable_big_digits; case $enable_big_digits in
24298yes)
24299 enable_big_digits=30 ;;
24300no)
24301 enable_big_digits=15 ;;
2430215|30)
24303 ;;
24304*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024305 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24306echo "$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 +000024307 { (exit 1); exit 1; }; } ;;
24308esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024309{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24310echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024311
24312cat >>confdefs.h <<_ACEOF
24313#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24314_ACEOF
24315
24316
24317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024318 { echo "$as_me:$LINENO: result: no value specified" >&5
24319echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024320fi
24321
24322
Guido van Rossumef2255b2000-03-10 22:30:29 +000024323# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024324if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024325 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24326echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024327if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024328 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024329fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024330{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24331echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024332else
Martin v. Löwis11437992002-04-12 09:54:03 +000024333 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024334{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24335echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024336cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024337/* confdefs.h. */
24338_ACEOF
24339cat confdefs.h >>conftest.$ac_ext
24340cat >>conftest.$ac_ext <<_ACEOF
24341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024342$ac_includes_default
24343#include <wchar.h>
24344_ACEOF
24345rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024346if { (ac_try="$ac_compile"
24347case "(($ac_try" in
24348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24349 *) ac_try_echo=$ac_try;;
24350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024354 grep -v '^ *+' conftest.er1 >conftest.err
24355 rm -f conftest.er1
24356 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024358 (exit $ac_status); } && {
24359 test -z "$ac_c_werror_flag" ||
24360 test ! -s conftest.err
24361 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024362 ac_header_compiler=yes
24363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024365sed 's/^/| /' conftest.$ac_ext >&5
24366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024367 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024369
24370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024371{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24372echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024373
24374# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024375{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24376echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024377cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024378/* confdefs.h. */
24379_ACEOF
24380cat confdefs.h >>conftest.$ac_ext
24381cat >>conftest.$ac_ext <<_ACEOF
24382/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024383#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024384_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024385if { (ac_try="$ac_cpp conftest.$ac_ext"
24386case "(($ac_try" in
24387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24388 *) ac_try_echo=$ac_try;;
24389esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024391 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024392 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024393 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024394 rm -f conftest.er1
24395 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024397 (exit $ac_status); } >/dev/null && {
24398 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24399 test ! -s conftest.err
24400 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024401 ac_header_preproc=yes
24402else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024404sed 's/^/| /' conftest.$ac_ext >&5
24405
Martin v. Löwis11437992002-04-12 09:54:03 +000024406 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024408
Martin v. Löwis11437992002-04-12 09:54:03 +000024409rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024410{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24411echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024412
24413# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024414case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24415 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024416 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24417echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24418 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24419echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024420 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024421 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024422 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024423 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24424echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24425 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24426echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24427 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24428echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24429 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24430echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24431 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24432echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24433 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24434echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024435 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024436## -------------------------------------- ##
24437## Report this to http://bugs.python.org/ ##
24438## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024439_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024440 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024441 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024443{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24444echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024445if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024447else
24448 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024449fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024450{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24451echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024452
24453fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024454if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024455
24456
24457cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024458#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024459_ACEOF
24460
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024461 wchar_h="yes"
24462
Guido van Rossumef2255b2000-03-10 22:30:29 +000024463else
Martin v. Löwis11437992002-04-12 09:54:03 +000024464 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024465
24466fi
24467
Michael W. Hudson54241132001-12-07 15:38:26 +000024468
Martin v. Löwis11437992002-04-12 09:54:03 +000024469
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024470# determine wchar_t size
24471if test "$wchar_h" = yes
24472then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024473 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24474echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24475if test "${ac_cv_type_wchar_t+set}" = set; then
24476 echo $ECHO_N "(cached) $ECHO_C" >&6
24477else
24478 cat >conftest.$ac_ext <<_ACEOF
24479/* confdefs.h. */
24480_ACEOF
24481cat confdefs.h >>conftest.$ac_ext
24482cat >>conftest.$ac_ext <<_ACEOF
24483/* end confdefs.h. */
24484#include <wchar.h>
24485
24486typedef wchar_t ac__type_new_;
24487int
24488main ()
24489{
24490if ((ac__type_new_ *) 0)
24491 return 0;
24492if (sizeof (ac__type_new_))
24493 return 0;
24494 ;
24495 return 0;
24496}
24497_ACEOF
24498rm -f conftest.$ac_objext
24499if { (ac_try="$ac_compile"
24500case "(($ac_try" in
24501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24502 *) ac_try_echo=$ac_try;;
24503esac
24504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24505 (eval "$ac_compile") 2>conftest.er1
24506 ac_status=$?
24507 grep -v '^ *+' conftest.er1 >conftest.err
24508 rm -f conftest.er1
24509 cat conftest.err >&5
24510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24511 (exit $ac_status); } && {
24512 test -z "$ac_c_werror_flag" ||
24513 test ! -s conftest.err
24514 } && test -s conftest.$ac_objext; then
24515 ac_cv_type_wchar_t=yes
24516else
24517 echo "$as_me: failed program was:" >&5
24518sed 's/^/| /' conftest.$ac_ext >&5
24519
24520 ac_cv_type_wchar_t=no
24521fi
24522
24523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24524fi
24525{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24526echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24527
24528# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24531# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024532{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24533echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024534if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024535 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024536else
Martin v. Löwis11437992002-04-12 09:54:03 +000024537 if test "$cross_compiling" = yes; then
24538 # Depending upon the size, compute the lo and hi bounds.
24539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024540/* confdefs.h. */
24541_ACEOF
24542cat confdefs.h >>conftest.$ac_ext
24543cat >>conftest.$ac_ext <<_ACEOF
24544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024545#include <wchar.h>
24546
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024547 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024548int
24549main ()
24550{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024551static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024552test_array [0] = 0
24553
24554 ;
24555 return 0;
24556}
24557_ACEOF
24558rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024559if { (ac_try="$ac_compile"
24560case "(($ac_try" in
24561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24562 *) ac_try_echo=$ac_try;;
24563esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024567 grep -v '^ *+' conftest.er1 >conftest.err
24568 rm -f conftest.er1
24569 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024571 (exit $ac_status); } && {
24572 test -z "$ac_c_werror_flag" ||
24573 test ! -s conftest.err
24574 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024575 ac_lo=0 ac_mid=0
24576 while :; do
24577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024578/* confdefs.h. */
24579_ACEOF
24580cat confdefs.h >>conftest.$ac_ext
24581cat >>conftest.$ac_ext <<_ACEOF
24582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024583#include <wchar.h>
24584
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024585 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024586int
24587main ()
24588{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024590test_array [0] = 0
24591
24592 ;
24593 return 0;
24594}
24595_ACEOF
24596rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024597if { (ac_try="$ac_compile"
24598case "(($ac_try" in
24599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24600 *) ac_try_echo=$ac_try;;
24601esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024605 grep -v '^ *+' conftest.er1 >conftest.err
24606 rm -f conftest.er1
24607 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024609 (exit $ac_status); } && {
24610 test -z "$ac_c_werror_flag" ||
24611 test ! -s conftest.err
24612 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024613 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
24619 if test $ac_lo -le $ac_mid; then
24620 ac_lo= ac_hi=
24621 break
24622 fi
24623 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024625
24626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024627 done
24628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024630sed 's/^/| /' conftest.$ac_ext >&5
24631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024633/* confdefs.h. */
24634_ACEOF
24635cat confdefs.h >>conftest.$ac_ext
24636cat >>conftest.$ac_ext <<_ACEOF
24637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024638#include <wchar.h>
24639
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024640 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024641int
24642main ()
24643{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024645test_array [0] = 0
24646
24647 ;
24648 return 0;
24649}
24650_ACEOF
24651rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024652if { (ac_try="$ac_compile"
24653case "(($ac_try" in
24654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24655 *) ac_try_echo=$ac_try;;
24656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024660 grep -v '^ *+' conftest.er1 >conftest.err
24661 rm -f conftest.er1
24662 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024664 (exit $ac_status); } && {
24665 test -z "$ac_c_werror_flag" ||
24666 test ! -s conftest.err
24667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024668 ac_hi=-1 ac_mid=-1
24669 while :; do
24670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024671/* confdefs.h. */
24672_ACEOF
24673cat confdefs.h >>conftest.$ac_ext
24674cat >>conftest.$ac_ext <<_ACEOF
24675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024676#include <wchar.h>
24677
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024678 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024679int
24680main ()
24681{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024683test_array [0] = 0
24684
24685 ;
24686 return 0;
24687}
24688_ACEOF
24689rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024690if { (ac_try="$ac_compile"
24691case "(($ac_try" in
24692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24693 *) ac_try_echo=$ac_try;;
24694esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024698 grep -v '^ *+' conftest.er1 >conftest.err
24699 rm -f conftest.er1
24700 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024702 (exit $ac_status); } && {
24703 test -z "$ac_c_werror_flag" ||
24704 test ! -s conftest.err
24705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024706 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
24712 if test $ac_mid -le $ac_hi; then
24713 ac_lo= ac_hi=
24714 break
24715 fi
24716 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024718
24719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024720 done
24721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024723sed 's/^/| /' conftest.$ac_ext >&5
24724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024725 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024727
24728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024730
24731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024732# Binary search between lo and hi bounds.
24733while test "x$ac_lo" != "x$ac_hi"; do
24734 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024736/* confdefs.h. */
24737_ACEOF
24738cat confdefs.h >>conftest.$ac_ext
24739cat >>conftest.$ac_ext <<_ACEOF
24740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024741#include <wchar.h>
24742
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024743 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024744int
24745main ()
24746{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024748test_array [0] = 0
24749
24750 ;
24751 return 0;
24752}
24753_ACEOF
24754rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024755if { (ac_try="$ac_compile"
24756case "(($ac_try" in
24757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24758 *) ac_try_echo=$ac_try;;
24759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024763 grep -v '^ *+' conftest.er1 >conftest.err
24764 rm -f conftest.er1
24765 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024767 (exit $ac_status); } && {
24768 test -z "$ac_c_werror_flag" ||
24769 test ! -s conftest.err
24770 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024771 ac_hi=$ac_mid
24772else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024774sed 's/^/| /' conftest.$ac_ext >&5
24775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024776 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024778
24779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024780done
24781case $ac_lo in
24782?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024783'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024784 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024785See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024786echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024787See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024788 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024789 else
24790 ac_cv_sizeof_wchar_t=0
24791 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024792esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024793else
Martin v. Löwis11437992002-04-12 09:54:03 +000024794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024795/* confdefs.h. */
24796_ACEOF
24797cat confdefs.h >>conftest.$ac_ext
24798cat >>conftest.$ac_ext <<_ACEOF
24799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024800#include <wchar.h>
24801
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024802 typedef wchar_t ac__type_sizeof_;
24803static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24804static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024805#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024806#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024807int
24808main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024809{
Martin v. Löwis11437992002-04-12 09:54:03 +000024810
24811 FILE *f = fopen ("conftest.val", "w");
24812 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024813 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024814 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024815 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024816 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024817 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024818 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024819 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024820 }
24821 else
24822 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024823 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024824 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024825 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024826 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024827 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024828 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024829
24830 ;
24831 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024832}
Martin v. Löwis11437992002-04-12 09:54:03 +000024833_ACEOF
24834rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024835if { (ac_try="$ac_link"
24836case "(($ac_try" in
24837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24838 *) ac_try_echo=$ac_try;;
24839esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024841 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024842 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024844 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024845 { (case "(($ac_try" in
24846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24847 *) ac_try_echo=$ac_try;;
24848esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024850 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024851 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024853 (exit $ac_status); }; }; then
24854 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024855else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024856 echo "$as_me: program exited with status $ac_status" >&5
24857echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024858sed 's/^/| /' conftest.$ac_ext >&5
24859
Martin v. Löwis11437992002-04-12 09:54:03 +000024860( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024861if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024862 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024863See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024864echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024865See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024866 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024867 else
24868 ac_cv_sizeof_wchar_t=0
24869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024871rm -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 +000024872fi
24873rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024874fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024875{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24876echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024877
24878
24879
Martin v. Löwis11437992002-04-12 09:54:03 +000024880cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024881#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024882_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024883
Michael W. Hudson54241132001-12-07 15:38:26 +000024884
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024885fi
24886
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024887{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24888echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024889have_ucs4_tcl=no
24890cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024891/* confdefs.h. */
24892_ACEOF
24893cat confdefs.h >>conftest.$ac_ext
24894cat >>conftest.$ac_ext <<_ACEOF
24895/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024896
24897#include <tcl.h>
24898#if TCL_UTF_MAX != 6
24899# error "NOT UCS4_TCL"
24900#endif
24901int
24902main ()
24903{
24904
24905 ;
24906 return 0;
24907}
24908_ACEOF
24909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024910if { (ac_try="$ac_compile"
24911case "(($ac_try" in
24912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24913 *) ac_try_echo=$ac_try;;
24914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024918 grep -v '^ *+' conftest.er1 >conftest.err
24919 rm -f conftest.er1
24920 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024922 (exit $ac_status); } && {
24923 test -z "$ac_c_werror_flag" ||
24924 test ! -s conftest.err
24925 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024926
24927
24928cat >>confdefs.h <<\_ACEOF
24929#define HAVE_UCS4_TCL 1
24930_ACEOF
24931
24932 have_ucs4_tcl=yes
24933
24934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024936sed 's/^/| /' conftest.$ac_ext >&5
24937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024938
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024940
24941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024942{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24943echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024944
Skip Montanaro6dead952003-09-25 14:50:04 +000024945# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024946if test "$wchar_h" = yes
24947then
24948 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024949 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24950echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024951 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024952 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024953else
24954
24955 if test "$cross_compiling" = yes; then
24956 ac_cv_wchar_t_signed=yes
24957else
24958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024959/* confdefs.h. */
24960_ACEOF
24961cat confdefs.h >>conftest.$ac_ext
24962cat >>conftest.$ac_ext <<_ACEOF
24963/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024964
24965 #include <wchar.h>
24966 int main()
24967 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024968 /* Success: exit code 0 */
24969 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024970 }
24971
24972_ACEOF
24973rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024974if { (ac_try="$ac_link"
24975case "(($ac_try" in
24976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24977 *) ac_try_echo=$ac_try;;
24978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024980 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024981 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024984 { (case "(($ac_try" in
24985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24986 *) ac_try_echo=$ac_try;;
24987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024989 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024990 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024992 (exit $ac_status); }; }; then
24993 ac_cv_wchar_t_signed=yes
24994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024995 echo "$as_me: program exited with status $ac_status" >&5
24996echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024997sed 's/^/| /' conftest.$ac_ext >&5
24998
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024999( exit $ac_status )
25000ac_cv_wchar_t_signed=no
25001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025002rm -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 +000025003fi
25004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025005
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025006fi
25007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025008 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25009echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025010fi
25011
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025012{ echo "$as_me:$LINENO: checking what type to use for str" >&5
25013echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025014
25015# Check whether --with-wide-unicode was given.
25016if test "${with_wide_unicode+set}" = set; then
25017 withval=$with_wide_unicode;
25018if test "$withval" != no
25019then unicode_size="4"
25020else unicode_size="2"
25021fi
25022
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025023else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025024
Georg Brandl52d168a2008-01-07 18:10:24 +000025025case "$have_ucs4_tcl" in
25026 yes) unicode_size="4" ;;
25027 *) unicode_size="2" ;;
25028esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025029
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025030fi
25031
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025032
25033
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025034
Georg Brandl52d168a2008-01-07 18:10:24 +000025035case "$unicode_size" in
25036 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025037#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025038_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025039 ;;
25040 *) cat >>confdefs.h <<\_ACEOF
25041#define Py_UNICODE_SIZE 2
25042_ACEOF
25043 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025044esac
25045
Michael W. Hudson54241132001-12-07 15:38:26 +000025046
Martin v. Löwis11437992002-04-12 09:54:03 +000025047
25048
Georg Brandl52d168a2008-01-07 18:10:24 +000025049# wchar_t is only usable if it maps to an unsigned type
25050if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025051 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025052then
25053 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025054
Martin v. Löwis11437992002-04-12 09:54:03 +000025055cat >>confdefs.h <<\_ACEOF
25056#define HAVE_USABLE_WCHAR_T 1
25057_ACEOF
25058
Georg Brandl52d168a2008-01-07 18:10:24 +000025059 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025060#define PY_UNICODE_TYPE wchar_t
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 +000025063elif test "$ac_cv_sizeof_short" = "$unicode_size"
25064then
25065 PY_UNICODE_TYPE="unsigned short"
25066 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025067#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025068_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025069
Georg Brandl52d168a2008-01-07 18:10:24 +000025070elif test "$ac_cv_sizeof_long" = "$unicode_size"
25071then
25072 PY_UNICODE_TYPE="unsigned long"
25073 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025074#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025075_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025076
Georg Brandl52d168a2008-01-07 18:10:24 +000025077else
25078 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025079fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025080{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25081echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025082
25083# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025084{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25085echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025086if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025087 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025089 # See if sys/param.h defines the BYTE_ORDER macro.
25090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025091/* confdefs.h. */
25092_ACEOF
25093cat confdefs.h >>conftest.$ac_ext
25094cat >>conftest.$ac_ext <<_ACEOF
25095/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025096#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025097#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025098
Martin v. Löwis11437992002-04-12 09:54:03 +000025099int
25100main ()
25101{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025102#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25103 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25104 bogus endian macros
25105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025106
25107 ;
25108 return 0;
25109}
25110_ACEOF
25111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025112if { (ac_try="$ac_compile"
25113case "(($ac_try" in
25114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25115 *) ac_try_echo=$ac_try;;
25116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025120 grep -v '^ *+' conftest.er1 >conftest.err
25121 rm -f conftest.er1
25122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025124 (exit $ac_status); } && {
25125 test -z "$ac_c_werror_flag" ||
25126 test ! -s conftest.err
25127 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025128 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025130/* confdefs.h. */
25131_ACEOF
25132cat confdefs.h >>conftest.$ac_ext
25133cat >>conftest.$ac_ext <<_ACEOF
25134/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025135#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025136#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025137
Martin v. Löwis11437992002-04-12 09:54:03 +000025138int
25139main ()
25140{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025141#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025142 not big endian
25143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025144
25145 ;
25146 return 0;
25147}
25148_ACEOF
25149rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025150if { (ac_try="$ac_compile"
25151case "(($ac_try" in
25152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25153 *) ac_try_echo=$ac_try;;
25154esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025158 grep -v '^ *+' conftest.er1 >conftest.err
25159 rm -f conftest.er1
25160 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025162 (exit $ac_status); } && {
25163 test -z "$ac_c_werror_flag" ||
25164 test ! -s conftest.err
25165 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025166 ac_cv_c_bigendian=yes
25167else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025169sed 's/^/| /' conftest.$ac_ext >&5
25170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025171 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025173
25174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025177sed 's/^/| /' conftest.$ac_ext >&5
25178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025179 # It does not; compile a test program.
25180if test "$cross_compiling" = yes; then
25181 # try to guess the endianness by grepping values into an object file
25182 ac_cv_c_bigendian=unknown
25183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025184/* confdefs.h. */
25185_ACEOF
25186cat confdefs.h >>conftest.$ac_ext
25187cat >>conftest.$ac_ext <<_ACEOF
25188/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025189short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25190short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25191void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25192short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25193short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25194void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025195int
25196main ()
25197{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025198 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025199 ;
25200 return 0;
25201}
25202_ACEOF
25203rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025204if { (ac_try="$ac_compile"
25205case "(($ac_try" in
25206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25207 *) ac_try_echo=$ac_try;;
25208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025212 grep -v '^ *+' conftest.er1 >conftest.err
25213 rm -f conftest.er1
25214 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025216 (exit $ac_status); } && {
25217 test -z "$ac_c_werror_flag" ||
25218 test ! -s conftest.err
25219 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025220 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025221 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025222fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025223if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25224 if test "$ac_cv_c_bigendian" = unknown; then
25225 ac_cv_c_bigendian=no
25226 else
25227 # finding both strings is unlikely to happen, but who knows?
25228 ac_cv_c_bigendian=unknown
25229 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025230fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025233sed 's/^/| /' conftest.$ac_ext >&5
25234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025235
Martin v. Löwis11437992002-04-12 09:54:03 +000025236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025237
25238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025239else
25240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025241/* confdefs.h. */
25242_ACEOF
25243cat confdefs.h >>conftest.$ac_ext
25244cat >>conftest.$ac_ext <<_ACEOF
25245/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025246$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025247int
25248main ()
25249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025250
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025251 /* Are we little or big endian? From Harbison&Steele. */
25252 union
25253 {
25254 long int l;
25255 char c[sizeof (long int)];
25256 } u;
25257 u.l = 1;
25258 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025259
25260 ;
25261 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025262}
Martin v. Löwis11437992002-04-12 09:54:03 +000025263_ACEOF
25264rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025265if { (ac_try="$ac_link"
25266case "(($ac_try" in
25267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25268 *) ac_try_echo=$ac_try;;
25269esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025271 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025272 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025274 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025275 { (case "(($ac_try" in
25276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25277 *) ac_try_echo=$ac_try;;
25278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025280 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025281 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025283 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025284 ac_cv_c_bigendian=no
25285else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025286 echo "$as_me: program exited with status $ac_status" >&5
25287echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025288sed 's/^/| /' conftest.$ac_ext >&5
25289
Martin v. Löwis11437992002-04-12 09:54:03 +000025290( exit $ac_status )
25291ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025293rm -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 +000025294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025295
25296
Martin v. Löwis11437992002-04-12 09:54:03 +000025297fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025298
25299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25300fi
25301{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25302echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25303case $ac_cv_c_bigendian in
25304 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025305
25306cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025307#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025308_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025309 ;;
25310 no)
25311 ;;
25312 *)
25313 { { echo "$as_me:$LINENO: error: unknown endianness
25314presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25315echo "$as_me: error: unknown endianness
25316presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025317 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025318esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025319
Michael W. Hudson54241132001-12-07 15:38:26 +000025320
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025321# Check whether right shifting a negative integer extends the sign bit
25322# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025323{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25324echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025325if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025326 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025327else
Martin v. Löwis11437992002-04-12 09:54:03 +000025328
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025329if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025330 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025331else
Martin v. Löwis11437992002-04-12 09:54:03 +000025332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025333/* confdefs.h. */
25334_ACEOF
25335cat confdefs.h >>conftest.$ac_ext
25336cat >>conftest.$ac_ext <<_ACEOF
25337/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025338
25339int main()
25340{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025341 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025342}
25343
Martin v. Löwis11437992002-04-12 09:54:03 +000025344_ACEOF
25345rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025346if { (ac_try="$ac_link"
25347case "(($ac_try" in
25348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25349 *) ac_try_echo=$ac_try;;
25350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025352 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025353 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025356 { (case "(($ac_try" in
25357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25358 *) ac_try_echo=$ac_try;;
25359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025361 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025362 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025364 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025365 ac_cv_rshift_extends_sign=yes
25366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025367 echo "$as_me: program exited with status $ac_status" >&5
25368echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025369sed 's/^/| /' conftest.$ac_ext >&5
25370
Martin v. Löwis11437992002-04-12 09:54:03 +000025371( exit $ac_status )
25372ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025374rm -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 +000025375fi
25376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025377
25378fi
25379
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025380{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25381echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025382if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025383then
Martin v. Löwis11437992002-04-12 09:54:03 +000025384
25385cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025386#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025387_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025388
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025389fi
25390
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025391# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025392{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25393echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025394if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025395 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025396else
Martin v. Löwis11437992002-04-12 09:54:03 +000025397
25398cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025399/* confdefs.h. */
25400_ACEOF
25401cat confdefs.h >>conftest.$ac_ext
25402cat >>conftest.$ac_ext <<_ACEOF
25403/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025404#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025405int
25406main ()
25407{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025408
25409 FILE *f = fopen("/dev/null", "r");
25410 flockfile(f);
25411 getc_unlocked(f);
25412 funlockfile(f);
25413
Martin v. Löwis11437992002-04-12 09:54:03 +000025414 ;
25415 return 0;
25416}
25417_ACEOF
25418rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025419if { (ac_try="$ac_link"
25420case "(($ac_try" in
25421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25422 *) ac_try_echo=$ac_try;;
25423esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025425 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025427 grep -v '^ *+' conftest.er1 >conftest.err
25428 rm -f conftest.er1
25429 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025431 (exit $ac_status); } && {
25432 test -z "$ac_c_werror_flag" ||
25433 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025434 } && test -s conftest$ac_exeext &&
25435 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025436 ac_cv_have_getc_unlocked=yes
25437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025439sed 's/^/| /' conftest.$ac_ext >&5
25440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025441 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025443
25444rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025445 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025446fi
25447
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025448{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25449echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025450if test "$ac_cv_have_getc_unlocked" = yes
25451then
Martin v. Löwis11437992002-04-12 09:54:03 +000025452
25453cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025454#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025455_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025456
25457fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025458
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025459# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025460# save the value of LIBS so we don't actually link Python with readline
25461LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025462
Gregory P. Smith18820942008-09-07 06:24:49 +000025463# On some systems we need to link readline to a termcap compatible
25464# library. NOTE: Keep the precedence of listed libraries synchronised
25465# with setup.py.
25466py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025467{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25468echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025469for py_libtermcap in "" ncursesw ncurses curses termcap; do
25470 if test -z "$py_libtermcap"; then
25471 READLINE_LIBS="-lreadline"
25472 else
25473 READLINE_LIBS="-lreadline -l$py_libtermcap"
25474 fi
25475 LIBS="$READLINE_LIBS $LIBS_no_readline"
25476 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025477/* confdefs.h. */
25478_ACEOF
25479cat confdefs.h >>conftest.$ac_ext
25480cat >>conftest.$ac_ext <<_ACEOF
25481/* end confdefs.h. */
25482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025483/* Override any GCC internal prototype to avoid an error.
25484 Use char because int might match the return type of a GCC
25485 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025486#ifdef __cplusplus
25487extern "C"
25488#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025489char readline ();
25490int
25491main ()
25492{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025493return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025494 ;
25495 return 0;
25496}
25497_ACEOF
25498rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025499if { (ac_try="$ac_link"
25500case "(($ac_try" in
25501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25502 *) ac_try_echo=$ac_try;;
25503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025505 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025506 ac_status=$?
25507 grep -v '^ *+' conftest.er1 >conftest.err
25508 rm -f conftest.er1
25509 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025511 (exit $ac_status); } && {
25512 test -z "$ac_c_werror_flag" ||
25513 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025514 } && test -s conftest$ac_exeext &&
25515 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025516 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025518 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025519sed 's/^/| /' conftest.$ac_ext >&5
25520
Gregory P. Smith18820942008-09-07 06:24:49 +000025521
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025523
25524rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025525 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025526 if test $py_cv_lib_readline = yes; then
25527 break
25528 fi
25529done
25530# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25531#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025532if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025533 { echo "$as_me:$LINENO: result: none" >&5
25534echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025535else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025536 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25537echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025538
25539cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025540#define HAVE_LIBREADLINE 1
25541_ACEOF
25542
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025543fi
25544
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025545# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025546{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25547echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025548if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025549 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025550else
25551 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025552LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025553cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025554/* confdefs.h. */
25555_ACEOF
25556cat confdefs.h >>conftest.$ac_ext
25557cat >>conftest.$ac_ext <<_ACEOF
25558/* end confdefs.h. */
25559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025560/* Override any GCC internal prototype to avoid an error.
25561 Use char because int might match the return type of a GCC
25562 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025563#ifdef __cplusplus
25564extern "C"
25565#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025566char rl_callback_handler_install ();
25567int
25568main ()
25569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025570return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025571 ;
25572 return 0;
25573}
25574_ACEOF
25575rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025576if { (ac_try="$ac_link"
25577case "(($ac_try" in
25578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25579 *) ac_try_echo=$ac_try;;
25580esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025582 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025584 grep -v '^ *+' conftest.er1 >conftest.err
25585 rm -f conftest.er1
25586 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025588 (exit $ac_status); } && {
25589 test -z "$ac_c_werror_flag" ||
25590 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025591 } && test -s conftest$ac_exeext &&
25592 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025593 ac_cv_lib_readline_rl_callback_handler_install=yes
25594else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025595 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025596sed 's/^/| /' conftest.$ac_ext >&5
25597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025598 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025600
25601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025602 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025603LIBS=$ac_check_lib_save_LIBS
25604fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025605{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25606echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25607if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025608
25609cat >>confdefs.h <<\_ACEOF
25610#define HAVE_RL_CALLBACK 1
25611_ACEOF
25612
25613fi
25614
25615
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025616# check for readline 2.2
25617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025618/* confdefs.h. */
25619_ACEOF
25620cat confdefs.h >>conftest.$ac_ext
25621cat >>conftest.$ac_ext <<_ACEOF
25622/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025623#include <readline/readline.h>
25624_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025625if { (ac_try="$ac_cpp conftest.$ac_ext"
25626case "(($ac_try" in
25627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25628 *) ac_try_echo=$ac_try;;
25629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025632 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025633 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025634 rm -f conftest.er1
25635 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025637 (exit $ac_status); } >/dev/null && {
25638 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25639 test ! -s conftest.err
25640 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025641 have_readline=yes
25642else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025644sed 's/^/| /' conftest.$ac_ext >&5
25645
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025646 have_readline=no
25647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025648
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025649rm -f conftest.err conftest.$ac_ext
25650if test $have_readline = yes
25651then
25652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025653/* confdefs.h. */
25654_ACEOF
25655cat confdefs.h >>conftest.$ac_ext
25656cat >>conftest.$ac_ext <<_ACEOF
25657/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025658#include <readline/readline.h>
25659
25660_ACEOF
25661if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025662 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025663
25664cat >>confdefs.h <<\_ACEOF
25665#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25666_ACEOF
25667
25668fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000025669rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025670
Antoine Pitroud5131772009-10-26 19:22:14 +000025671 cat >conftest.$ac_ext <<_ACEOF
25672/* confdefs.h. */
25673_ACEOF
25674cat confdefs.h >>conftest.$ac_ext
25675cat >>conftest.$ac_ext <<_ACEOF
25676/* end confdefs.h. */
25677#include <readline/readline.h>
25678
25679_ACEOF
25680if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25681 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25682
25683cat >>confdefs.h <<\_ACEOF
25684#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25685_ACEOF
25686
25687fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000025688rm -f -r conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025689
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025690fi
25691
Martin v. Löwis0daad592001-09-30 21:09:59 +000025692# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025693{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25694echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025695if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025697else
Martin v. Löwis11437992002-04-12 09:54:03 +000025698 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025699LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025701/* confdefs.h. */
25702_ACEOF
25703cat confdefs.h >>conftest.$ac_ext
25704cat >>conftest.$ac_ext <<_ACEOF
25705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025707/* Override any GCC internal prototype to avoid an error.
25708 Use char because int might match the return type of a GCC
25709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025710#ifdef __cplusplus
25711extern "C"
25712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025713char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025714int
25715main ()
25716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025717return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025718 ;
25719 return 0;
25720}
25721_ACEOF
25722rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025723if { (ac_try="$ac_link"
25724case "(($ac_try" in
25725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25726 *) ac_try_echo=$ac_try;;
25727esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025731 grep -v '^ *+' conftest.er1 >conftest.err
25732 rm -f conftest.er1
25733 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025735 (exit $ac_status); } && {
25736 test -z "$ac_c_werror_flag" ||
25737 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025738 } && test -s conftest$ac_exeext &&
25739 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025740 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025743sed 's/^/| /' conftest.$ac_ext >&5
25744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025745 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025747
25748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025750LIBS=$ac_check_lib_save_LIBS
25751fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025752{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25753echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25754if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025755
Martin v. Löwis11437992002-04-12 09:54:03 +000025756cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025757#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025758_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025759
Martin v. Löwis0daad592001-09-30 21:09:59 +000025760fi
25761
Michael W. Hudson54241132001-12-07 15:38:26 +000025762
Thomas Wouters89d996e2007-09-08 17:39:28 +000025763# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025764{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25765echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025766if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025767 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025768else
25769 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025770LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025771cat >conftest.$ac_ext <<_ACEOF
25772/* confdefs.h. */
25773_ACEOF
25774cat confdefs.h >>conftest.$ac_ext
25775cat >>conftest.$ac_ext <<_ACEOF
25776/* end confdefs.h. */
25777
25778/* Override any GCC internal prototype to avoid an error.
25779 Use char because int might match the return type of a GCC
25780 builtin and then its argument prototype would still apply. */
25781#ifdef __cplusplus
25782extern "C"
25783#endif
25784char rl_completion_display_matches_hook ();
25785int
25786main ()
25787{
25788return rl_completion_display_matches_hook ();
25789 ;
25790 return 0;
25791}
25792_ACEOF
25793rm -f conftest.$ac_objext conftest$ac_exeext
25794if { (ac_try="$ac_link"
25795case "(($ac_try" in
25796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25797 *) ac_try_echo=$ac_try;;
25798esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025800 (eval "$ac_link") 2>conftest.er1
25801 ac_status=$?
25802 grep -v '^ *+' conftest.er1 >conftest.err
25803 rm -f conftest.er1
25804 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025806 (exit $ac_status); } && {
25807 test -z "$ac_c_werror_flag" ||
25808 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025809 } && test -s conftest$ac_exeext &&
25810 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025811 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25812else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025813 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025814sed 's/^/| /' conftest.$ac_ext >&5
25815
25816 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25817fi
25818
25819rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25820 conftest$ac_exeext conftest.$ac_ext
25821LIBS=$ac_check_lib_save_LIBS
25822fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025823{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25824echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25825if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025826
25827cat >>confdefs.h <<\_ACEOF
25828#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25829_ACEOF
25830
25831fi
25832
25833
Martin v. Löwis0daad592001-09-30 21:09:59 +000025834# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025835{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25836echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025837if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025838 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025839else
Martin v. Löwis11437992002-04-12 09:54:03 +000025840 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025841LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025842cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025843/* confdefs.h. */
25844_ACEOF
25845cat confdefs.h >>conftest.$ac_ext
25846cat >>conftest.$ac_ext <<_ACEOF
25847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025849/* Override any GCC internal prototype to avoid an error.
25850 Use char because int might match the return type of a GCC
25851 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025852#ifdef __cplusplus
25853extern "C"
25854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025855char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025856int
25857main ()
25858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025859return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025860 ;
25861 return 0;
25862}
25863_ACEOF
25864rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025865if { (ac_try="$ac_link"
25866case "(($ac_try" in
25867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25868 *) ac_try_echo=$ac_try;;
25869esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025871 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025873 grep -v '^ *+' conftest.er1 >conftest.err
25874 rm -f conftest.er1
25875 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025877 (exit $ac_status); } && {
25878 test -z "$ac_c_werror_flag" ||
25879 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025880 } && test -s conftest$ac_exeext &&
25881 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025882 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025883else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025885sed 's/^/| /' conftest.$ac_ext >&5
25886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025887 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025889
25890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025892LIBS=$ac_check_lib_save_LIBS
25893fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025894{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25895echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25896if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025897
Martin v. Löwis11437992002-04-12 09:54:03 +000025898cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025899#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025900_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025901
Guido van Rossum353ae582001-07-10 16:45:32 +000025902fi
25903
Jack Jansendd19cf82001-12-06 22:36:17 +000025904
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025905# also in readline 4.2
25906cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025907/* confdefs.h. */
25908_ACEOF
25909cat confdefs.h >>conftest.$ac_ext
25910cat >>conftest.$ac_ext <<_ACEOF
25911/* end confdefs.h. */
25912#include <readline/readline.h>
25913_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025914if { (ac_try="$ac_cpp conftest.$ac_ext"
25915case "(($ac_try" in
25916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25917 *) ac_try_echo=$ac_try;;
25918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025920 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025921 ac_status=$?
25922 grep -v '^ *+' conftest.er1 >conftest.err
25923 rm -f conftest.er1
25924 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025926 (exit $ac_status); } >/dev/null && {
25927 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25928 test ! -s conftest.err
25929 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025930 have_readline=yes
25931else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025932 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025933sed 's/^/| /' conftest.$ac_ext >&5
25934
25935 have_readline=no
25936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025937
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025938rm -f conftest.err conftest.$ac_ext
25939if test $have_readline = yes
25940then
25941 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025942/* confdefs.h. */
25943_ACEOF
25944cat confdefs.h >>conftest.$ac_ext
25945cat >>conftest.$ac_ext <<_ACEOF
25946/* end confdefs.h. */
25947#include <readline/readline.h>
25948
25949_ACEOF
25950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25951 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25952
25953cat >>confdefs.h <<\_ACEOF
25954#define HAVE_RL_CATCH_SIGNAL 1
25955_ACEOF
25956
25957fi
Ronald Oussorenb8f11a62010-03-08 07:02:03 +000025958rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025959
25960fi
25961
Martin v. Löwis82bca632006-02-10 20:49:30 +000025962# End of readline checks: restore LIBS
25963LIBS=$LIBS_no_readline
25964
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025965{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25966echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025967if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025968 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025969else
Martin v. Löwis11437992002-04-12 09:54:03 +000025970
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025971if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025972 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025973else
Martin v. Löwis11437992002-04-12 09:54:03 +000025974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025975/* confdefs.h. */
25976_ACEOF
25977cat confdefs.h >>conftest.$ac_ext
25978cat >>conftest.$ac_ext <<_ACEOF
25979/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025980
25981int main()
25982{
25983 int val1 = nice(1);
25984 if (val1 != -1 && val1 == nice(2))
25985 exit(0);
25986 exit(1);
25987}
25988
Martin v. Löwis11437992002-04-12 09:54:03 +000025989_ACEOF
25990rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025991if { (ac_try="$ac_link"
25992case "(($ac_try" in
25993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25994 *) ac_try_echo=$ac_try;;
25995esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025997 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025998 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026001 { (case "(($ac_try" in
26002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26003 *) ac_try_echo=$ac_try;;
26004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026006 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026007 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026009 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026010 ac_cv_broken_nice=yes
26011else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026012 echo "$as_me: program exited with status $ac_status" >&5
26013echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026014sed 's/^/| /' conftest.$ac_ext >&5
26015
Martin v. Löwis11437992002-04-12 09:54:03 +000026016( exit $ac_status )
26017ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026019rm -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 +000026020fi
26021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026022
26023fi
26024
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026025{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26026echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026027if test "$ac_cv_broken_nice" = yes
26028then
Martin v. Löwis11437992002-04-12 09:54:03 +000026029
26030cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026031#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026032_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026033
26034fi
26035
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026036{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26037echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026038if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026039 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026040else
26041 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026042 ac_cv_broken_poll=no
26043else
26044 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026045/* confdefs.h. */
26046_ACEOF
26047cat confdefs.h >>conftest.$ac_ext
26048cat >>conftest.$ac_ext <<_ACEOF
26049/* end confdefs.h. */
26050
26051#include <poll.h>
26052
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026053int main()
26054{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026055 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026056 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026057
26058 close (42);
26059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026060 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026061 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026062 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026063 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026064 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026065 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026066 return 1;
26067}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026068
26069_ACEOF
26070rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026071if { (ac_try="$ac_link"
26072case "(($ac_try" in
26073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26074 *) ac_try_echo=$ac_try;;
26075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026077 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026078 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026081 { (case "(($ac_try" in
26082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26083 *) ac_try_echo=$ac_try;;
26084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026086 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026087 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026089 (exit $ac_status); }; }; then
26090 ac_cv_broken_poll=yes
26091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026092 echo "$as_me: program exited with status $ac_status" >&5
26093echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026094sed 's/^/| /' conftest.$ac_ext >&5
26095
26096( exit $ac_status )
26097ac_cv_broken_poll=no
26098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026099rm -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 +000026100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026101
26102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026103fi
26104
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026105{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26106echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026107if test "$ac_cv_broken_poll" = yes
26108then
26109
26110cat >>confdefs.h <<\_ACEOF
26111#define HAVE_BROKEN_POLL 1
26112_ACEOF
26113
26114fi
26115
Brett Cannon43802422005-02-10 20:48:03 +000026116# 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 +000026117# (which is not required by ISO C or UNIX spec) and/or if we support
26118# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026119{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26120echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026121if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026122 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026123else
26124 cat >conftest.$ac_ext <<_ACEOF
26125/* confdefs.h. */
26126_ACEOF
26127cat confdefs.h >>conftest.$ac_ext
26128cat >>conftest.$ac_ext <<_ACEOF
26129/* end confdefs.h. */
26130#include <sys/types.h>
26131#include <$ac_cv_struct_tm>
26132
26133
26134int
26135main ()
26136{
26137static struct tm ac_aggr;
26138if (ac_aggr.tm_zone)
26139return 0;
26140 ;
26141 return 0;
26142}
26143_ACEOF
26144rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026145if { (ac_try="$ac_compile"
26146case "(($ac_try" in
26147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26148 *) ac_try_echo=$ac_try;;
26149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026151 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026152 ac_status=$?
26153 grep -v '^ *+' conftest.er1 >conftest.err
26154 rm -f conftest.er1
26155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026157 (exit $ac_status); } && {
26158 test -z "$ac_c_werror_flag" ||
26159 test ! -s conftest.err
26160 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026161 ac_cv_member_struct_tm_tm_zone=yes
26162else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026163 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026164sed 's/^/| /' conftest.$ac_ext >&5
26165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026166 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026167/* confdefs.h. */
26168_ACEOF
26169cat confdefs.h >>conftest.$ac_ext
26170cat >>conftest.$ac_ext <<_ACEOF
26171/* end confdefs.h. */
26172#include <sys/types.h>
26173#include <$ac_cv_struct_tm>
26174
26175
26176int
26177main ()
26178{
26179static struct tm ac_aggr;
26180if (sizeof ac_aggr.tm_zone)
26181return 0;
26182 ;
26183 return 0;
26184}
26185_ACEOF
26186rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026187if { (ac_try="$ac_compile"
26188case "(($ac_try" in
26189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26190 *) ac_try_echo=$ac_try;;
26191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026193 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026194 ac_status=$?
26195 grep -v '^ *+' conftest.er1 >conftest.err
26196 rm -f conftest.er1
26197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026199 (exit $ac_status); } && {
26200 test -z "$ac_c_werror_flag" ||
26201 test ! -s conftest.err
26202 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026203 ac_cv_member_struct_tm_tm_zone=yes
26204else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026205 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026206sed 's/^/| /' conftest.$ac_ext >&5
26207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026208 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026210
26211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026213
26214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026215fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026216{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26217echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26218if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026219
26220cat >>confdefs.h <<_ACEOF
26221#define HAVE_STRUCT_TM_TM_ZONE 1
26222_ACEOF
26223
26224
26225fi
26226
26227if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26228
26229cat >>confdefs.h <<\_ACEOF
26230#define HAVE_TM_ZONE 1
26231_ACEOF
26232
26233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026234 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26235echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026236if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026237 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026238else
26239 cat >conftest.$ac_ext <<_ACEOF
26240/* confdefs.h. */
26241_ACEOF
26242cat confdefs.h >>conftest.$ac_ext
26243cat >>conftest.$ac_ext <<_ACEOF
26244/* end confdefs.h. */
26245#include <time.h>
26246
26247int
26248main ()
26249{
26250#ifndef tzname
26251 (void) tzname;
26252#endif
26253
26254 ;
26255 return 0;
26256}
26257_ACEOF
26258rm -f conftest.$ac_objext
26259if { (ac_try="$ac_compile"
26260case "(($ac_try" in
26261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26262 *) ac_try_echo=$ac_try;;
26263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026265 (eval "$ac_compile") 2>conftest.er1
26266 ac_status=$?
26267 grep -v '^ *+' conftest.er1 >conftest.err
26268 rm -f conftest.er1
26269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026271 (exit $ac_status); } && {
26272 test -z "$ac_c_werror_flag" ||
26273 test ! -s conftest.err
26274 } && test -s conftest.$ac_objext; then
26275 ac_cv_have_decl_tzname=yes
26276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026277 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026278sed 's/^/| /' conftest.$ac_ext >&5
26279
26280 ac_cv_have_decl_tzname=no
26281fi
26282
26283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26284fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026285{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26286echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26287if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026288
26289cat >>confdefs.h <<_ACEOF
26290#define HAVE_DECL_TZNAME 1
26291_ACEOF
26292
26293
26294else
26295 cat >>confdefs.h <<_ACEOF
26296#define HAVE_DECL_TZNAME 0
26297_ACEOF
26298
26299
26300fi
26301
26302
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026303 { echo "$as_me:$LINENO: checking for tzname" >&5
26304echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026305if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026306 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026307else
26308 cat >conftest.$ac_ext <<_ACEOF
26309/* confdefs.h. */
26310_ACEOF
26311cat confdefs.h >>conftest.$ac_ext
26312cat >>conftest.$ac_ext <<_ACEOF
26313/* end confdefs.h. */
26314#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026315#if !HAVE_DECL_TZNAME
26316extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026317#endif
26318
26319int
26320main ()
26321{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026322return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026323 ;
26324 return 0;
26325}
26326_ACEOF
26327rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026328if { (ac_try="$ac_link"
26329case "(($ac_try" in
26330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26331 *) ac_try_echo=$ac_try;;
26332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026334 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026335 ac_status=$?
26336 grep -v '^ *+' conftest.er1 >conftest.err
26337 rm -f conftest.er1
26338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026340 (exit $ac_status); } && {
26341 test -z "$ac_c_werror_flag" ||
26342 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026343 } && test -s conftest$ac_exeext &&
26344 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026345 ac_cv_var_tzname=yes
26346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026347 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026348sed 's/^/| /' conftest.$ac_ext >&5
26349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026350 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026352
26353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026354 conftest$ac_exeext conftest.$ac_ext
26355fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026356{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26357echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026358 if test $ac_cv_var_tzname = yes; then
26359
26360cat >>confdefs.h <<\_ACEOF
26361#define HAVE_TZNAME 1
26362_ACEOF
26363
26364 fi
26365fi
26366
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026367
Martin v. Löwis1d459062005-03-14 21:23:33 +000026368# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026369{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26370echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026371if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026372 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026373else
26374
26375if test "$cross_compiling" = yes; then
26376 ac_cv_working_tzset=no
26377else
26378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026379/* confdefs.h. */
26380_ACEOF
26381cat confdefs.h >>conftest.$ac_ext
26382cat >>conftest.$ac_ext <<_ACEOF
26383/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026384
26385#include <stdlib.h>
26386#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026387#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026388
26389#if HAVE_TZNAME
26390extern char *tzname[];
26391#endif
26392
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026393int main()
26394{
Brett Cannon18367812003-09-19 00:59:16 +000026395 /* Note that we need to ensure that not only does tzset(3)
26396 do 'something' with localtime, but it works as documented
26397 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026398 This includes making sure that tzname is set properly if
26399 tm->tm_zone does not exist since it is the alternative way
26400 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026401
26402 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026403 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026404 */
26405
Martin v. Löwis1d459062005-03-14 21:23:33 +000026406 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026407 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26408
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026409 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026410 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026411 if (localtime(&groundhogday)->tm_hour != 0)
26412 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026413#if HAVE_TZNAME
26414 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26415 if (strcmp(tzname[0], "UTC") ||
26416 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26417 exit(1);
26418#endif
Brett Cannon18367812003-09-19 00:59:16 +000026419
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026420 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026421 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026422 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026423 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026424#if HAVE_TZNAME
26425 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26426 exit(1);
26427#endif
Brett Cannon18367812003-09-19 00:59:16 +000026428
26429 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26430 tzset();
26431 if (localtime(&groundhogday)->tm_hour != 11)
26432 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026433#if HAVE_TZNAME
26434 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26435 exit(1);
26436#endif
26437
26438#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026439 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26440 exit(1);
26441 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26442 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026443#endif
Brett Cannon18367812003-09-19 00:59:16 +000026444
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026445 exit(0);
26446}
26447
26448_ACEOF
26449rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026450if { (ac_try="$ac_link"
26451case "(($ac_try" in
26452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26453 *) ac_try_echo=$ac_try;;
26454esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026456 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026457 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026459 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026460 { (case "(($ac_try" in
26461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26462 *) ac_try_echo=$ac_try;;
26463esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026465 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026466 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026468 (exit $ac_status); }; }; then
26469 ac_cv_working_tzset=yes
26470else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026471 echo "$as_me: program exited with status $ac_status" >&5
26472echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026473sed 's/^/| /' conftest.$ac_ext >&5
26474
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026475( exit $ac_status )
26476ac_cv_working_tzset=no
26477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026478rm -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 +000026479fi
26480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026481
26482fi
26483
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026484{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26485echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026486if test "$ac_cv_working_tzset" = yes
26487then
26488
26489cat >>confdefs.h <<\_ACEOF
26490#define HAVE_WORKING_TZSET 1
26491_ACEOF
26492
26493fi
26494
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026495# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026496{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26497echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026498if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026499 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026500else
26501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026502/* confdefs.h. */
26503_ACEOF
26504cat confdefs.h >>conftest.$ac_ext
26505cat >>conftest.$ac_ext <<_ACEOF
26506/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026507#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026508int
26509main ()
26510{
26511
26512struct stat st;
26513st.st_mtim.tv_nsec = 1;
26514
26515 ;
26516 return 0;
26517}
26518_ACEOF
26519rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026520if { (ac_try="$ac_compile"
26521case "(($ac_try" in
26522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26523 *) ac_try_echo=$ac_try;;
26524esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026528 grep -v '^ *+' conftest.er1 >conftest.err
26529 rm -f conftest.er1
26530 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026532 (exit $ac_status); } && {
26533 test -z "$ac_c_werror_flag" ||
26534 test ! -s conftest.err
26535 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026536 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026539sed 's/^/| /' conftest.$ac_ext >&5
26540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026541 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026542fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26545fi
26546
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026547{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26548echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026549if test "$ac_cv_stat_tv_nsec" = yes
26550then
26551
26552cat >>confdefs.h <<\_ACEOF
26553#define HAVE_STAT_TV_NSEC 1
26554_ACEOF
26555
26556fi
26557
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026558# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026559{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26560echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026561if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026562 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026563else
26564 cat >conftest.$ac_ext <<_ACEOF
26565/* confdefs.h. */
26566_ACEOF
26567cat confdefs.h >>conftest.$ac_ext
26568cat >>conftest.$ac_ext <<_ACEOF
26569/* end confdefs.h. */
26570#include <sys/stat.h>
26571int
26572main ()
26573{
26574
26575struct stat st;
26576st.st_mtimespec.tv_nsec = 1;
26577
26578 ;
26579 return 0;
26580}
26581_ACEOF
26582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026583if { (ac_try="$ac_compile"
26584case "(($ac_try" in
26585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26586 *) ac_try_echo=$ac_try;;
26587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026590 ac_status=$?
26591 grep -v '^ *+' conftest.er1 >conftest.err
26592 rm -f conftest.er1
26593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026595 (exit $ac_status); } && {
26596 test -z "$ac_c_werror_flag" ||
26597 test ! -s conftest.err
26598 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026599 ac_cv_stat_tv_nsec2=yes
26600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026601 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026602sed 's/^/| /' conftest.$ac_ext >&5
26603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026604 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026605fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26608fi
26609
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026610{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26611echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026612if test "$ac_cv_stat_tv_nsec2" = yes
26613then
26614
26615cat >>confdefs.h <<\_ACEOF
26616#define HAVE_STAT_TV_NSEC2 1
26617_ACEOF
26618
26619fi
26620
Jack Jansen666b1e72001-10-31 12:11:48 +000026621# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026622{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26623echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026624if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026625 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026626else
Martin v. Löwis11437992002-04-12 09:54:03 +000026627 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026628/* confdefs.h. */
26629_ACEOF
26630cat confdefs.h >>conftest.$ac_ext
26631cat >>conftest.$ac_ext <<_ACEOF
26632/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026633#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026634int
26635main ()
26636{
Jack Jansen666b1e72001-10-31 12:11:48 +000026637
26638 int rtn;
26639 rtn = mvwdelch(0,0,0);
26640
Martin v. Löwis11437992002-04-12 09:54:03 +000026641 ;
26642 return 0;
26643}
26644_ACEOF
26645rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026646if { (ac_try="$ac_compile"
26647case "(($ac_try" in
26648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26649 *) ac_try_echo=$ac_try;;
26650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026654 grep -v '^ *+' conftest.er1 >conftest.err
26655 rm -f conftest.er1
26656 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026658 (exit $ac_status); } && {
26659 test -z "$ac_c_werror_flag" ||
26660 test ! -s conftest.err
26661 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026662 ac_cv_mvwdelch_is_expression=yes
26663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026665sed 's/^/| /' conftest.$ac_ext >&5
26666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026667 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026668fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26671fi
26672
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026673{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26674echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026675
26676if test "$ac_cv_mvwdelch_is_expression" = yes
26677then
Martin v. Löwis11437992002-04-12 09:54:03 +000026678
26679cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026680#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026681_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026682
26683fi
26684
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026685{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26686echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026687if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026688 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026689else
Martin v. Löwis11437992002-04-12 09:54:03 +000026690 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026691/* confdefs.h. */
26692_ACEOF
26693cat confdefs.h >>conftest.$ac_ext
26694cat >>conftest.$ac_ext <<_ACEOF
26695/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026696#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026697int
26698main ()
26699{
Jack Jansen666b1e72001-10-31 12:11:48 +000026700
26701 WINDOW *w;
26702 w->_flags = 0;
26703
Martin v. Löwis11437992002-04-12 09:54:03 +000026704 ;
26705 return 0;
26706}
26707_ACEOF
26708rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026709if { (ac_try="$ac_compile"
26710case "(($ac_try" in
26711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26712 *) ac_try_echo=$ac_try;;
26713esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026717 grep -v '^ *+' conftest.er1 >conftest.err
26718 rm -f conftest.er1
26719 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026721 (exit $ac_status); } && {
26722 test -z "$ac_c_werror_flag" ||
26723 test ! -s conftest.err
26724 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026725 ac_cv_window_has_flags=yes
26726else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026728sed 's/^/| /' conftest.$ac_ext >&5
26729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026730 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026731fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26734fi
26735
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026736{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26737echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026738
Jack Jansen666b1e72001-10-31 12:11:48 +000026739
26740if test "$ac_cv_window_has_flags" = yes
26741then
Martin v. Löwis11437992002-04-12 09:54:03 +000026742
26743cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026744#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026745_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026746
26747fi
26748
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026749{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26750echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026751cat >conftest.$ac_ext <<_ACEOF
26752/* confdefs.h. */
26753_ACEOF
26754cat confdefs.h >>conftest.$ac_ext
26755cat >>conftest.$ac_ext <<_ACEOF
26756/* end confdefs.h. */
26757#include <curses.h>
26758int
26759main ()
26760{
26761void *x=is_term_resized
26762 ;
26763 return 0;
26764}
26765_ACEOF
26766rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026767if { (ac_try="$ac_compile"
26768case "(($ac_try" in
26769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26770 *) ac_try_echo=$ac_try;;
26771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026773 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026774 ac_status=$?
26775 grep -v '^ *+' conftest.er1 >conftest.err
26776 rm -f conftest.er1
26777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026779 (exit $ac_status); } && {
26780 test -z "$ac_c_werror_flag" ||
26781 test ! -s conftest.err
26782 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026783
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026784cat >>confdefs.h <<\_ACEOF
26785#define HAVE_CURSES_IS_TERM_RESIZED 1
26786_ACEOF
26787
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026788 { echo "$as_me:$LINENO: result: yes" >&5
26789echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026791 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026792sed 's/^/| /' conftest.$ac_ext >&5
26793
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026794 { echo "$as_me:$LINENO: result: no" >&5
26795echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026796
26797fi
26798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26800
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026801{ echo "$as_me:$LINENO: checking for resize_term" >&5
26802echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026803cat >conftest.$ac_ext <<_ACEOF
26804/* confdefs.h. */
26805_ACEOF
26806cat confdefs.h >>conftest.$ac_ext
26807cat >>conftest.$ac_ext <<_ACEOF
26808/* end confdefs.h. */
26809#include <curses.h>
26810int
26811main ()
26812{
26813void *x=resize_term
26814 ;
26815 return 0;
26816}
26817_ACEOF
26818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026819if { (ac_try="$ac_compile"
26820case "(($ac_try" in
26821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26822 *) ac_try_echo=$ac_try;;
26823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026825 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026826 ac_status=$?
26827 grep -v '^ *+' conftest.er1 >conftest.err
26828 rm -f conftest.er1
26829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026831 (exit $ac_status); } && {
26832 test -z "$ac_c_werror_flag" ||
26833 test ! -s conftest.err
26834 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026835
26836cat >>confdefs.h <<\_ACEOF
26837#define HAVE_CURSES_RESIZE_TERM 1
26838_ACEOF
26839
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026840 { echo "$as_me:$LINENO: result: yes" >&5
26841echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026843 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026844sed 's/^/| /' conftest.$ac_ext >&5
26845
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026846 { echo "$as_me:$LINENO: result: no" >&5
26847echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026848
26849fi
26850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26852
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026853{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26854echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026855cat >conftest.$ac_ext <<_ACEOF
26856/* confdefs.h. */
26857_ACEOF
26858cat confdefs.h >>conftest.$ac_ext
26859cat >>conftest.$ac_ext <<_ACEOF
26860/* end confdefs.h. */
26861#include <curses.h>
26862int
26863main ()
26864{
26865void *x=resizeterm
26866 ;
26867 return 0;
26868}
26869_ACEOF
26870rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026871if { (ac_try="$ac_compile"
26872case "(($ac_try" in
26873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26874 *) ac_try_echo=$ac_try;;
26875esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026877 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026878 ac_status=$?
26879 grep -v '^ *+' conftest.er1 >conftest.err
26880 rm -f conftest.er1
26881 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026883 (exit $ac_status); } && {
26884 test -z "$ac_c_werror_flag" ||
26885 test ! -s conftest.err
26886 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026887
26888cat >>confdefs.h <<\_ACEOF
26889#define HAVE_CURSES_RESIZETERM 1
26890_ACEOF
26891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026892 { echo "$as_me:$LINENO: result: yes" >&5
26893echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026894else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026895 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026896sed 's/^/| /' conftest.$ac_ext >&5
26897
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026898 { echo "$as_me:$LINENO: result: no" >&5
26899echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026900
26901fi
26902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26904
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026905{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26906echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026907
26908if test -r /dev/ptmx
26909then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026910 { echo "$as_me:$LINENO: result: yes" >&5
26911echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026912
26913cat >>confdefs.h <<\_ACEOF
26914#define HAVE_DEV_PTMX 1
26915_ACEOF
26916
Thomas Wouters89f507f2006-12-13 04:49:30 +000026917else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026918 { echo "$as_me:$LINENO: result: no" >&5
26919echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026920fi
26921
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026922{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26923echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026924
26925if test -r /dev/ptc
26926then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026927 { echo "$as_me:$LINENO: result: yes" >&5
26928echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026929
26930cat >>confdefs.h <<\_ACEOF
26931#define HAVE_DEV_PTC 1
26932_ACEOF
26933
Thomas Wouters89f507f2006-12-13 04:49:30 +000026934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026935 { echo "$as_me:$LINENO: result: no" >&5
26936echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026937fi
26938
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026939if test "$have_long_long" = yes
26940then
26941 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26942echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26943 if test "${ac_cv_have_long_long_format+set}" = set; then
26944 echo $ECHO_N "(cached) $ECHO_C" >&6
26945else
26946 if test "$cross_compiling" = yes; then
26947 ac_cv_have_long_long_format=no
26948else
26949 cat >conftest.$ac_ext <<_ACEOF
26950/* confdefs.h. */
26951_ACEOF
26952cat confdefs.h >>conftest.$ac_ext
26953cat >>conftest.$ac_ext <<_ACEOF
26954/* end confdefs.h. */
26955
26956 #include <stdio.h>
26957 #include <stddef.h>
26958 #include <string.h>
26959
26960 #ifdef HAVE_SYS_TYPES_H
26961 #include <sys/types.h>
26962 #endif
26963
26964 int main()
26965 {
26966 char buffer[256];
26967
26968 if (sprintf(buffer, "%lld", (long long)123) < 0)
26969 return 1;
26970 if (strcmp(buffer, "123"))
26971 return 1;
26972
26973 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26974 return 1;
26975 if (strcmp(buffer, "-123"))
26976 return 1;
26977
26978 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26979 return 1;
26980 if (strcmp(buffer, "123"))
26981 return 1;
26982
26983 return 0;
26984 }
26985
26986_ACEOF
26987rm -f conftest$ac_exeext
26988if { (ac_try="$ac_link"
26989case "(($ac_try" in
26990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26991 *) ac_try_echo=$ac_try;;
26992esac
26993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26994 (eval "$ac_link") 2>&5
26995 ac_status=$?
26996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26997 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26998 { (case "(($ac_try" in
26999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27000 *) ac_try_echo=$ac_try;;
27001esac
27002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27003 (eval "$ac_try") 2>&5
27004 ac_status=$?
27005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27006 (exit $ac_status); }; }; then
27007 ac_cv_have_long_long_format=yes
27008else
27009 echo "$as_me: program exited with status $ac_status" >&5
27010echo "$as_me: failed program was:" >&5
27011sed 's/^/| /' conftest.$ac_ext >&5
27012
27013( exit $ac_status )
27014ac_cv_have_long_long_format=no
27015fi
27016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27017fi
27018
27019
27020
27021fi
27022
27023 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27024echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27025fi
27026
Mark Dickinson89d7d412009-12-31 20:50:59 +000027027if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027028then
27029
27030cat >>confdefs.h <<\_ACEOF
27031#define PY_FORMAT_LONG_LONG "ll"
27032_ACEOF
27033
27034fi
27035
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027036if test $ac_sys_system = Darwin
27037then
27038 LIBS="$LIBS -framework CoreFoundation"
27039fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027040
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027041{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27042echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027043if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027044 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027045else
27046 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027047 ac_cv_have_size_t_format="cross -- assuming yes"
27048
Thomas Wouters477c8d52006-05-27 19:21:47 +000027049else
27050 cat >conftest.$ac_ext <<_ACEOF
27051/* confdefs.h. */
27052_ACEOF
27053cat confdefs.h >>conftest.$ac_ext
27054cat >>conftest.$ac_ext <<_ACEOF
27055/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027056
Thomas Wouters477c8d52006-05-27 19:21:47 +000027057#include <stdio.h>
27058#include <stddef.h>
27059#include <string.h>
27060
Christian Heimes2c181612007-12-17 20:04:13 +000027061#ifdef HAVE_SYS_TYPES_H
27062#include <sys/types.h>
27063#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027064
27065#ifdef HAVE_SSIZE_T
27066typedef ssize_t Py_ssize_t;
27067#elif SIZEOF_VOID_P == SIZEOF_LONG
27068typedef long Py_ssize_t;
27069#else
27070typedef int Py_ssize_t;
27071#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027072
Christian Heimes2c181612007-12-17 20:04:13 +000027073int main()
27074{
27075 char buffer[256];
27076
Thomas Wouters477c8d52006-05-27 19:21:47 +000027077 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27078 return 1;
27079
Thomas Wouters89f507f2006-12-13 04:49:30 +000027080 if (strcmp(buffer, "123"))
27081 return 1;
27082
27083 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27084 return 1;
27085
27086 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027087 return 1;
27088
27089 return 0;
27090}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027091
Thomas Wouters477c8d52006-05-27 19:21:47 +000027092_ACEOF
27093rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027094if { (ac_try="$ac_link"
27095case "(($ac_try" in
27096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27097 *) ac_try_echo=$ac_try;;
27098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027100 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027101 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027104 { (case "(($ac_try" in
27105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27106 *) ac_try_echo=$ac_try;;
27107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027109 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027110 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027112 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027113 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027115 echo "$as_me: program exited with status $ac_status" >&5
27116echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027117sed 's/^/| /' conftest.$ac_ext >&5
27118
27119( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027120ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027121fi
27122rm -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 +000027123fi
27124
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027126fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027127{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27128echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027129if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027130
27131cat >>confdefs.h <<\_ACEOF
27132#define PY_FORMAT_SIZE_T "z"
27133_ACEOF
27134
27135fi
27136
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027137{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27138echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027139if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027140 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027141else
Martin v. Löwis11437992002-04-12 09:54:03 +000027142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027143/* confdefs.h. */
27144_ACEOF
27145cat confdefs.h >>conftest.$ac_ext
27146cat >>conftest.$ac_ext <<_ACEOF
27147/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027148
27149#ifdef HAVE_SYS_TYPES_H
27150#include <sys/types.h>
27151#endif
27152#ifdef HAVE_SYS_SOCKET_H
27153#include <sys/socket.h>
27154#endif
27155
27156
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027157typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027158int
27159main ()
27160{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027161if ((ac__type_new_ *) 0)
27162 return 0;
27163if (sizeof (ac__type_new_))
27164 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027165 ;
27166 return 0;
27167}
27168_ACEOF
27169rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027170if { (ac_try="$ac_compile"
27171case "(($ac_try" in
27172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27173 *) ac_try_echo=$ac_try;;
27174esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027178 grep -v '^ *+' conftest.er1 >conftest.err
27179 rm -f conftest.er1
27180 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027182 (exit $ac_status); } && {
27183 test -z "$ac_c_werror_flag" ||
27184 test ! -s conftest.err
27185 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027186 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027187else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027189sed 's/^/| /' conftest.$ac_ext >&5
27190
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027191 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027193
27194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027195fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027196{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27197echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27198if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027199 :
27200else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027201
Martin v. Löwis01c04012002-11-11 14:58:44 +000027202cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027203#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027204_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027205
27206fi
27207
Michael W. Hudson54241132001-12-07 15:38:26 +000027208
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027209{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27210echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027211if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027212 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027213else
27214 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027215 ac_cv_broken_mbstowcs=no
27216else
27217 cat >conftest.$ac_ext <<_ACEOF
27218/* confdefs.h. */
27219_ACEOF
27220cat confdefs.h >>conftest.$ac_ext
27221cat >>conftest.$ac_ext <<_ACEOF
27222/* end confdefs.h. */
27223
27224#include<stdlib.h>
27225int main() {
27226 size_t len = -1;
27227 const char *str = "text";
27228 len = mbstowcs(NULL, str, 0);
27229 return (len != 4);
27230}
27231
27232_ACEOF
27233rm -f conftest$ac_exeext
27234if { (ac_try="$ac_link"
27235case "(($ac_try" in
27236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27237 *) ac_try_echo=$ac_try;;
27238esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027240 (eval "$ac_link") 2>&5
27241 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27244 { (case "(($ac_try" in
27245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27246 *) ac_try_echo=$ac_try;;
27247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027249 (eval "$ac_try") 2>&5
27250 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027252 (exit $ac_status); }; }; then
27253 ac_cv_broken_mbstowcs=no
27254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027255 echo "$as_me: program exited with status $ac_status" >&5
27256echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027257sed 's/^/| /' conftest.$ac_ext >&5
27258
27259( exit $ac_status )
27260ac_cv_broken_mbstowcs=yes
27261fi
27262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27263fi
27264
27265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027266fi
27267
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027268{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27269echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027270if test "$ac_cv_broken_mbstowcs" = yes
27271then
27272
27273cat >>confdefs.h <<\_ACEOF
27274#define HAVE_BROKEN_MBSTOWCS 1
27275_ACEOF
27276
27277fi
27278
Antoine Pitroub52ec782009-01-25 16:34:23 +000027279# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027280{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27281echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027282
27283# Check whether --with-computed-gotos was given.
27284if test "${with_computed_gotos+set}" = set; then
27285 withval=$with_computed_gotos;
27286if test "$withval" != no
27287then
27288
27289cat >>confdefs.h <<\_ACEOF
27290#define USE_COMPUTED_GOTOS 1
27291_ACEOF
27292
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027293 { echo "$as_me:$LINENO: result: yes" >&5
27294echo "${ECHO_T}yes" >&6; }
27295else { echo "$as_me:$LINENO: result: no" >&5
27296echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027297fi
27298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027299 { echo "$as_me:$LINENO: result: no" >&5
27300echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027301fi
27302
27303
27304
Michael W. Hudson54241132001-12-07 15:38:26 +000027305
27306
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027307for h in `(cd $srcdir;echo Python/thread_*.h)`
27308do
27309 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27310done
27311
Michael W. Hudson54241132001-12-07 15:38:26 +000027312
Neal Norwitzd24499d2005-12-18 21:36:39 +000027313SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027314{ echo "$as_me:$LINENO: checking for build directories" >&5
27315echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027316for dir in $SRCDIRS; do
27317 if test ! -d $dir; then
27318 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027319 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027320done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027321{ echo "$as_me:$LINENO: result: done" >&5
27322echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027323
Guido van Rossum627b2d71993-12-24 10:39:16 +000027324# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027325ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027326
Martin v. Löwis11437992002-04-12 09:54:03 +000027327cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027328# This file is a shell script that caches the results of configure
27329# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027330# scripts and configure runs, see configure's option --config-cache.
27331# It is not useful on other systems. If it contains results you don't
27332# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027333#
Martin v. Löwis11437992002-04-12 09:54:03 +000027334# config.status only pays attention to the cache file if you give it
27335# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027336#
Skip Montanaro6dead952003-09-25 14:50:04 +000027337# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027338# loading this file, other *unset* `ac_cv_foo' will be assigned the
27339# following values.
27340
27341_ACEOF
27342
Guido van Rossumf78abae1997-01-21 22:02:36 +000027343# The following way of writing the cache mishandles newlines in values,
27344# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027345# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027346# Ultrix sh set writes to stderr and can't be redirected directly,
27347# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027348(
27349 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27350 eval ac_val=\$$ac_var
27351 case $ac_val in #(
27352 *${as_nl}*)
27353 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027354 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27355echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027356 esac
27357 case $ac_var in #(
27358 _ | IFS | as_nl) ;; #(
27359 *) $as_unset $ac_var ;;
27360 esac ;;
27361 esac
27362 done
27363
Martin v. Löwis11437992002-04-12 09:54:03 +000027364 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027365 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27366 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027367 # `set' does not quote correctly, so add quotes (double-quote
27368 # substitution turns \\\\ into \\, and sed turns \\ into \).
27369 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027370 "s/'/'\\\\''/g;
27371 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027372 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027373 *)
27374 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027375 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027376 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027377 esac |
27378 sort
27379) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027380 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027381 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027382 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027383 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027384 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27385 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027386 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27387 :end' >>confcache
27388if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27389 if test -w "$cache_file"; then
27390 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027391 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27392echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027393 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027394 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027395 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27396echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027397 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027398fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027399rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027400
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027401test "x$prefix" = xNONE && prefix=$ac_default_prefix
27402# Let make expand exec_prefix.
27403test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027404
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027405DEFS=-DHAVE_CONFIG_H
27406
Skip Montanaro6dead952003-09-25 14:50:04 +000027407ac_libobjs=
27408ac_ltlibobjs=
27409for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27410 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027411 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027412 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027413 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27414 # will be set to the directory where LIBOBJS objects are built.
27415 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27416 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027417done
27418LIBOBJS=$ac_libobjs
27419
27420LTLIBOBJS=$ac_ltlibobjs
27421
27422
Martin v. Löwis11437992002-04-12 09:54:03 +000027423
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027424: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027425ac_clean_files_save=$ac_clean_files
27426ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027427{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27428echo "$as_me: creating $CONFIG_STATUS" >&6;}
27429cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027430#! $SHELL
27431# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027432# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027433# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027434# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027435
Martin v. Löwis11437992002-04-12 09:54:03 +000027436debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027437ac_cs_recheck=false
27438ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027439SHELL=\${CONFIG_SHELL-$SHELL}
27440_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027441
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027442cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027443## --------------------- ##
27444## M4sh Initialization. ##
27445## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027447# Be more Bourne compatible
27448DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027449if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27450 emulate sh
27451 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027452 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027453 # is contrary to our usage. Disable this feature.
27454 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027455 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027456else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027457 case `(set -o) 2>/dev/null` in
27458 *posix*) set -o posix ;;
27459esac
27460
Michael W. Hudson54241132001-12-07 15:38:26 +000027461fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027462
27463
Michael W. Hudson54241132001-12-07 15:38:26 +000027464
Michael W. Hudson54241132001-12-07 15:38:26 +000027465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027466# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027467# Avoid depending upon Character Ranges.
27468as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27469as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27470as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27471as_cr_digits='0123456789'
27472as_cr_alnum=$as_cr_Letters$as_cr_digits
27473
27474# The user is always right.
27475if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027476 echo "#! /bin/sh" >conf$$.sh
27477 echo "exit 0" >>conf$$.sh
27478 chmod +x conf$$.sh
27479 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27480 PATH_SEPARATOR=';'
27481 else
27482 PATH_SEPARATOR=:
27483 fi
27484 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027485fi
27486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027487# Support unset when possible.
27488if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27489 as_unset=unset
27490else
27491 as_unset=false
27492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027494
27495# IFS
27496# We need space, tab and new line, in precisely that order. Quoting is
27497# there to prevent editors from complaining about space-tab.
27498# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27499# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027500as_nl='
27501'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027502IFS=" "" $as_nl"
27503
27504# Find who we are. Look in the path if we contain no directory separator.
27505case $0 in
27506 *[\\/]* ) as_myself=$0 ;;
27507 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027508for as_dir in $PATH
27509do
27510 IFS=$as_save_IFS
27511 test -z "$as_dir" && as_dir=.
27512 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27513done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027514IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027516 ;;
27517esac
27518# We did not find ourselves, most probably we were run as `sh COMMAND'
27519# in which case we are not to be found in the path.
27520if test "x$as_myself" = x; then
27521 as_myself=$0
27522fi
27523if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027524 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027525 { (exit 1); exit 1; }
27526fi
27527
27528# Work around bugs in pre-3.0 UWIN ksh.
27529for as_var in ENV MAIL MAILPATH
27530do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27531done
27532PS1='$ '
27533PS2='> '
27534PS4='+ '
27535
27536# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027537for as_var in \
27538 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27539 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27540 LC_TELEPHONE LC_TIME
27541do
27542 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27543 eval $as_var=C; export $as_var
27544 else
27545 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27546 fi
27547done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027548
27549# Required to use basename.
27550if expr a : '\(a\)' >/dev/null 2>&1 &&
27551 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27552 as_expr=expr
27553else
27554 as_expr=false
27555fi
27556
27557if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27558 as_basename=basename
27559else
27560 as_basename=false
27561fi
27562
27563
27564# Name of the executable.
27565as_me=`$as_basename -- "$0" ||
27566$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27567 X"$0" : 'X\(//\)$' \| \
27568 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027569echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027570 sed '/^.*\/\([^/][^/]*\)\/*$/{
27571 s//\1/
27572 q
27573 }
27574 /^X\/\(\/\/\)$/{
27575 s//\1/
27576 q
27577 }
27578 /^X\/\(\/\).*/{
27579 s//\1/
27580 q
27581 }
27582 s/.*/./; q'`
27583
27584# CDPATH.
27585$as_unset CDPATH
27586
27587
27588
Martin v. Löwis11437992002-04-12 09:54:03 +000027589 as_lineno_1=$LINENO
27590 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027591 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027592 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027593
Martin v. Löwis11437992002-04-12 09:54:03 +000027594 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27595 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027596 # line-number line after each line using $LINENO; the second 'sed'
27597 # does the real work. The second script uses 'N' to pair each
27598 # line-number line with the line containing $LINENO, and appends
27599 # trailing '-' during substitution so that $LINENO is not a special
27600 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027601 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027602 # scripts with optimization help from Paolo Bonzini. Blame Lee
27603 # E. McMahon (1931-1989) for sed's syntax. :-)
27604 sed -n '
27605 p
27606 /[$]LINENO/=
27607 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027608 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027609 s/[$]LINENO.*/&-/
27610 t lineno
27611 b
27612 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027613 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027614 :loop
27615 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027616 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027617 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027618 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027619 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027620 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027621 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027622
Martin v. Löwis11437992002-04-12 09:54:03 +000027623 # Don't try to exec as it changes $[0], causing all sort of problems
27624 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027625 # original and so on. Autoconf is especially sensitive to this).
27626 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027627 # Exit status is that of the last command.
27628 exit
27629}
27630
27631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027632if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27633 as_dirname=dirname
27634else
27635 as_dirname=false
27636fi
27637
27638ECHO_C= ECHO_N= ECHO_T=
27639case `echo -n x` in
27640-n*)
27641 case `echo 'x\c'` in
27642 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27643 *) ECHO_C='\c';;
27644 esac;;
27645*)
27646 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027647esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027649if expr a : '\(a\)' >/dev/null 2>&1 &&
27650 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027651 as_expr=expr
27652else
27653 as_expr=false
27654fi
27655
27656rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027657if test -d conf$$.dir; then
27658 rm -f conf$$.dir/conf$$.file
27659else
27660 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027661 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027662fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027663echo >conf$$.file
27664if ln -s conf$$.file conf$$ 2>/dev/null; then
27665 as_ln_s='ln -s'
27666 # ... but there are two gotchas:
27667 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27668 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27669 # In both cases, we have to default to `cp -p'.
27670 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027671 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027672elif ln conf$$.file conf$$ 2>/dev/null; then
27673 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027674else
27675 as_ln_s='cp -p'
27676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027677rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27678rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027679
Skip Montanaro6dead952003-09-25 14:50:04 +000027680if mkdir -p . 2>/dev/null; then
27681 as_mkdir_p=:
27682else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027683 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027684 as_mkdir_p=false
27685fi
27686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027687if test -x / >/dev/null 2>&1; then
27688 as_test_x='test -x'
27689else
27690 if ls -dL / >/dev/null 2>&1; then
27691 as_ls_L_option=L
27692 else
27693 as_ls_L_option=
27694 fi
27695 as_test_x='
27696 eval sh -c '\''
27697 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027698 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027699 else
27700 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027701 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027702 esac;
27703 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27704 ???[sx]*):;;*)false;;esac;fi
27705 '\'' sh
27706 '
27707fi
27708as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027709
27710# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027711as_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 +000027712
27713# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027714as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027715
27716
Martin v. Löwis11437992002-04-12 09:54:03 +000027717exec 6>&1
27718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027719# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027720# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027721# values after options handling.
27722ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027723This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027724generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027725
27726 CONFIG_FILES = $CONFIG_FILES
27727 CONFIG_HEADERS = $CONFIG_HEADERS
27728 CONFIG_LINKS = $CONFIG_LINKS
27729 CONFIG_COMMANDS = $CONFIG_COMMANDS
27730 $ $0 $@
27731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027732on `(hostname || uname -n) 2>/dev/null | sed 1q`
27733"
27734
Martin v. Löwis11437992002-04-12 09:54:03 +000027735_ACEOF
27736
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027737cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027738# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027739config_files="$ac_config_files"
27740config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027742_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027743
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027744cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027745ac_cs_usage="\
27746\`$as_me' instantiates files from templates according to the
27747current configuration.
27748
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027749Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027750
27751 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027752 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027753 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027754 -d, --debug don't remove temporary files
27755 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027756 --file=FILE[:TEMPLATE]
27757 instantiate the configuration file FILE
27758 --header=FILE[:TEMPLATE]
27759 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027760
27761Configuration files:
27762$config_files
27763
27764Configuration headers:
27765$config_headers
27766
27767Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027769_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027770cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027771ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027772python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027773configured by $0, generated by GNU Autoconf 2.61,
27774 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027775
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027776Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027777This config.status script is free software; the Free Software Foundation
27778gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027779
27780ac_pwd='$ac_pwd'
27781srcdir='$srcdir'
27782INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027783_ACEOF
27784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027785cat >>$CONFIG_STATUS <<\_ACEOF
27786# If no file are specified by the user, then we need to provide default
27787# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027788ac_need_defaults=:
27789while test $# != 0
27790do
27791 case $1 in
27792 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027793 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27794 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027795 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027796 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027797 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027798 ac_option=$1
27799 ac_optarg=$2
27800 ac_shift=shift
27801 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027802 esac
27803
Skip Montanaro6dead952003-09-25 14:50:04 +000027804 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027805 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027806 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27807 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027808 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027809 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027810 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027811 debug=: ;;
27812 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027813 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027814 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027815 ac_need_defaults=false;;
27816 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027817 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027818 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027819 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027820 --he | --h)
27821 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027822 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027823Try \`$0 --help' for more information." >&2
27824 { (exit 1); exit 1; }; };;
27825 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027826 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027827 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27828 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27829 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027830
27831 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027832 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027833Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027834 { (exit 1); exit 1; }; } ;;
27835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027836 *) ac_config_targets="$ac_config_targets $1"
27837 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027838
27839 esac
27840 shift
27841done
27842
Skip Montanaro6dead952003-09-25 14:50:04 +000027843ac_configure_extra_args=
27844
27845if $ac_cs_silent; then
27846 exec 6>/dev/null
27847 ac_configure_extra_args="$ac_configure_extra_args --silent"
27848fi
27849
27850_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027851cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027852if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027853 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27854 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027855 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027856 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027857fi
27858
Martin v. Löwis11437992002-04-12 09:54:03 +000027859_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027860cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027861exec 5>>config.log
27862{
27863 echo
27864 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27865## Running $as_me. ##
27866_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027867 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027868} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027870_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027871cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027872_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027873
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027874cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875
27876# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027877for ac_config_target in $ac_config_targets
27878do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027879 case $ac_config_target in
27880 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27881 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27882 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027883 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27884 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027885 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27886 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027887 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027889 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27890echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027891 { (exit 1); exit 1; }; };;
27892 esac
27893done
27894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027895
Martin v. Löwis11437992002-04-12 09:54:03 +000027896# If the user did not use the arguments to specify the items to instantiate,
27897# then the envvar interface is used. Set only those that are not.
27898# We use the long form for the default assignment because of an extremely
27899# bizarre bug on SunOS 4.1.3.
27900if $ac_need_defaults; then
27901 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27902 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27903fi
27904
Skip Montanaro6dead952003-09-25 14:50:04 +000027905# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027906# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027907# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027908# Hook for its removal unless debugging.
27909# Note that there is a small window in which the directory will not be cleaned:
27910# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027911$debug ||
27912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027913 tmp=
27914 trap 'exit_status=$?
27915 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27916' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027917 trap '{ (exit 1); exit 1; }' 1 2 13 15
27918}
Martin v. Löwis11437992002-04-12 09:54:03 +000027919# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027920
Martin v. Löwis11437992002-04-12 09:54:03 +000027921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027922 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027923 test -n "$tmp" && test -d "$tmp"
27924} ||
27925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027926 tmp=./conf$$-$RANDOM
27927 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027928} ||
27929{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027930 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027931 { (exit 1); exit 1; }
27932}
27933
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027934#
27935# Set up the sed scripts for CONFIG_FILES section.
27936#
27937
27938# No need to generate the scripts if there are no CONFIG_FILES.
27939# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027940if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027941
27942_ACEOF
27943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027944
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027946ac_delim='%!_!# '
27947for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027948 cat >conf$$subs.sed <<_ACEOF
27949SHELL!$SHELL$ac_delim
27950PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27951PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27952PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27953PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27954PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27955PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27956exec_prefix!$exec_prefix$ac_delim
27957prefix!$prefix$ac_delim
27958program_transform_name!$program_transform_name$ac_delim
27959bindir!$bindir$ac_delim
27960sbindir!$sbindir$ac_delim
27961libexecdir!$libexecdir$ac_delim
27962datarootdir!$datarootdir$ac_delim
27963datadir!$datadir$ac_delim
27964sysconfdir!$sysconfdir$ac_delim
27965sharedstatedir!$sharedstatedir$ac_delim
27966localstatedir!$localstatedir$ac_delim
27967includedir!$includedir$ac_delim
27968oldincludedir!$oldincludedir$ac_delim
27969docdir!$docdir$ac_delim
27970infodir!$infodir$ac_delim
27971htmldir!$htmldir$ac_delim
27972dvidir!$dvidir$ac_delim
27973pdfdir!$pdfdir$ac_delim
27974psdir!$psdir$ac_delim
27975libdir!$libdir$ac_delim
27976localedir!$localedir$ac_delim
27977mandir!$mandir$ac_delim
27978DEFS!$DEFS$ac_delim
27979ECHO_C!$ECHO_C$ac_delim
27980ECHO_N!$ECHO_N$ac_delim
27981ECHO_T!$ECHO_T$ac_delim
27982LIBS!$LIBS$ac_delim
27983build_alias!$build_alias$ac_delim
27984host_alias!$host_alias$ac_delim
27985target_alias!$target_alias$ac_delim
27986VERSION!$VERSION$ac_delim
27987SOVERSION!$SOVERSION$ac_delim
27988CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27989UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27990ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027991LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027992PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27993PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27994PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27995PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27996PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27997FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27998FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27999FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28000FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28001FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28002MACHDEP!$MACHDEP$ac_delim
28003SGI_ABI!$SGI_ABI$ac_delim
28004CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28005EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28006CC!$CC$ac_delim
28007CFLAGS!$CFLAGS$ac_delim
28008LDFLAGS!$LDFLAGS$ac_delim
28009CPPFLAGS!$CPPFLAGS$ac_delim
28010ac_ct_CC!$ac_ct_CC$ac_delim
28011EXEEXT!$EXEEXT$ac_delim
28012OBJEXT!$OBJEXT$ac_delim
28013CXX!$CXX$ac_delim
28014MAINCC!$MAINCC$ac_delim
28015CPP!$CPP$ac_delim
28016GREP!$GREP$ac_delim
28017EGREP!$EGREP$ac_delim
28018BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28019LIBRARY!$LIBRARY$ac_delim
28020LDLIBRARY!$LDLIBRARY$ac_delim
28021DLLLIBRARY!$DLLLIBRARY$ac_delim
28022BLDLIBRARY!$BLDLIBRARY$ac_delim
28023LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28024INSTSONAME!$INSTSONAME$ac_delim
28025RUNSHARED!$RUNSHARED$ac_delim
28026LINKCC!$LINKCC$ac_delim
28027GNULD!$GNULD$ac_delim
28028RANLIB!$RANLIB$ac_delim
28029AR!$AR$ac_delim
28030ARFLAGS!$ARFLAGS$ac_delim
28031SVNVERSION!$SVNVERSION$ac_delim
28032INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28033INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28034INSTALL_DATA!$INSTALL_DATA$ac_delim
28035LN!$LN$ac_delim
28036OPT!$OPT$ac_delim
28037BASECFLAGS!$BASECFLAGS$ac_delim
28038UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28039OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28040LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28041SO!$SO$ac_delim
28042LDSHARED!$LDSHARED$ac_delim
28043BLDSHARED!$BLDSHARED$ac_delim
28044CCSHARED!$CCSHARED$ac_delim
28045LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028046_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028047
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028048 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028049 break
28050 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028051 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28052echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028053 { (exit 1); exit 1; }; }
28054 else
28055 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028056 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028057done
28058
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028059ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28060if test -n "$ac_eof"; then
28061 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28062 ac_eof=`expr $ac_eof + 1`
28063fi
28064
28065cat >>$CONFIG_STATUS <<_ACEOF
28066cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28067/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028068_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028069sed '
28070s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28071s/^/s,@/; s/!/@,|#_!!_#|/
28072:n
28073t n
28074s/'"$ac_delim"'$/,g/; t
28075s/$/\\/; p
28076N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28077' >>$CONFIG_STATUS <conf$$subs.sed
28078rm -f conf$$subs.sed
28079cat >>$CONFIG_STATUS <<_ACEOF
28080CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028081_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028082
28083
28084ac_delim='%!_!# '
28085for ac_last_try in false false false false false :; do
28086 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028087CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028088SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028089PKG_CONFIG!$PKG_CONFIG$ac_delim
28090LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028091USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28092SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28093USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28094LDLAST!$LDLAST$ac_delim
28095THREADOBJ!$THREADOBJ$ac_delim
28096DLINCLDIR!$DLINCLDIR$ac_delim
28097DYNLOADFILE!$DYNLOADFILE$ac_delim
28098MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28099TRUE!$TRUE$ac_delim
28100LIBOBJS!$LIBOBJS$ac_delim
28101HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28102HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28103HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28104HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28105HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28106LIBM!$LIBM$ac_delim
28107LIBC!$LIBC$ac_delim
28108THREADHEADERS!$THREADHEADERS$ac_delim
28109SRCDIRS!$SRCDIRS$ac_delim
28110LTLIBOBJS!$LTLIBOBJS$ac_delim
28111_ACEOF
28112
Benjamin Petersond78735d2010-01-01 16:04:23 +000028113 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028114 break
28115 elif $ac_last_try; then
28116 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28117echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028118 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028119 else
28120 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28121 fi
28122done
28123
28124ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28125if test -n "$ac_eof"; then
28126 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28127 ac_eof=`expr $ac_eof + 1`
28128fi
28129
28130cat >>$CONFIG_STATUS <<_ACEOF
28131cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28132/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028133_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028134sed '
28135s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28136s/^/s,@/; s/!/@,|#_!!_#|/
28137:n
28138t n
28139s/'"$ac_delim"'$/,g/; t
28140s/$/\\/; p
28141N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28142' >>$CONFIG_STATUS <conf$$subs.sed
28143rm -f conf$$subs.sed
28144cat >>$CONFIG_STATUS <<_ACEOF
28145:end
28146s/|#_!!_#|//g
28147CEOF$ac_eof
28148_ACEOF
28149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028150
28151# VPATH may cause trouble with some makes, so we remove $(srcdir),
28152# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28153# trailing colons and then remove the whole line if VPATH becomes empty
28154# (actually we leave an empty line to preserve line numbers).
28155if test "x$srcdir" = x.; then
28156 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28157s/:*\$(srcdir):*/:/
28158s/:*\${srcdir}:*/:/
28159s/:*@srcdir@:*/:/
28160s/^\([^=]*=[ ]*\):*/\1/
28161s/:*$//
28162s/^[^=]*=[ ]*$//
28163}'
28164fi
28165
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028166cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028167fi # test -n "$CONFIG_FILES"
28168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028169
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028170for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028171do
28172 case $ac_tag in
28173 :[FHLC]) ac_mode=$ac_tag; continue;;
28174 esac
28175 case $ac_mode$ac_tag in
28176 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028177 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28178echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028179 { (exit 1); exit 1; }; };;
28180 :[FH]-) ac_tag=-:-;;
28181 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28182 esac
28183 ac_save_IFS=$IFS
28184 IFS=:
28185 set x $ac_tag
28186 IFS=$ac_save_IFS
28187 shift
28188 ac_file=$1
28189 shift
28190
28191 case $ac_mode in
28192 :L) ac_source=$1;;
28193 :[FH])
28194 ac_file_inputs=
28195 for ac_f
28196 do
28197 case $ac_f in
28198 -) ac_f="$tmp/stdin";;
28199 *) # Look for the file first in the build tree, then in the source tree
28200 # (if the path is not absolute). The absolute path cannot be DOS-style,
28201 # because $ac_f cannot contain `:'.
28202 test -f "$ac_f" ||
28203 case $ac_f in
28204 [\\/$]*) false;;
28205 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28206 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028207 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28208echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028209 { (exit 1); exit 1; }; };;
28210 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028211 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028212 done
28213
28214 # Let's still pretend it is `configure' which instantiates (i.e., don't
28215 # use $as_me), people would be surprised to read:
28216 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028217 configure_input="Generated from "`IFS=:
28218 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028219 if test x"$ac_file" != x-; then
28220 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028221 { echo "$as_me:$LINENO: creating $ac_file" >&5
28222echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028223 fi
28224
28225 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028226 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028227 esac
28228 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028229 esac
28230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028231 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028232$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028233 X"$ac_file" : 'X\(//\)[^/]' \| \
28234 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028235 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028236echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028237 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28238 s//\1/
28239 q
28240 }
28241 /^X\(\/\/\)[^/].*/{
28242 s//\1/
28243 q
28244 }
28245 /^X\(\/\/\)$/{
28246 s//\1/
28247 q
28248 }
28249 /^X\(\/\).*/{
28250 s//\1/
28251 q
28252 }
28253 s/.*/./; q'`
28254 { as_dir="$ac_dir"
28255 case $as_dir in #(
28256 -*) as_dir=./$as_dir;;
28257 esac
28258 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028259 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028260 while :; do
28261 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028262 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028263 *) as_qdir=$as_dir;;
28264 esac
28265 as_dirs="'$as_qdir' $as_dirs"
28266 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028267$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028268 X"$as_dir" : 'X\(//\)[^/]' \| \
28269 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028270 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028271echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028272 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28273 s//\1/
28274 q
28275 }
28276 /^X\(\/\/\)[^/].*/{
28277 s//\1/
28278 q
28279 }
28280 /^X\(\/\/\)$/{
28281 s//\1/
28282 q
28283 }
28284 /^X\(\/\).*/{
28285 s//\1/
28286 q
28287 }
28288 s/.*/./; q'`
28289 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028290 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028291 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028292 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28293echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028294 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028295 ac_builddir=.
28296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028297case "$ac_dir" in
28298.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28299*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028300 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028301 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028302 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028303 case $ac_top_builddir_sub in
28304 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28305 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28306 esac ;;
28307esac
28308ac_abs_top_builddir=$ac_pwd
28309ac_abs_builddir=$ac_pwd$ac_dir_suffix
28310# for backward compatibility:
28311ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028312
28313case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028314 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028315 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028316 ac_top_srcdir=$ac_top_builddir_sub
28317 ac_abs_top_srcdir=$ac_pwd ;;
28318 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028319 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028320 ac_top_srcdir=$srcdir
28321 ac_abs_top_srcdir=$srcdir ;;
28322 *) # Relative name.
28323 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28324 ac_top_srcdir=$ac_top_build_prefix$srcdir
28325 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028326esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028327ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028328
Martin v. Löwis11437992002-04-12 09:54:03 +000028329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028330 case $ac_mode in
28331 :F)
28332 #
28333 # CONFIG_FILE
28334 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028335
28336 case $INSTALL in
28337 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028338 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028339 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028340_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028341
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028342cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028343# If the template does not know about datarootdir, expand it.
28344# FIXME: This hack should be removed a few years after 2.60.
28345ac_datarootdir_hack=; ac_datarootdir_seen=
28346
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028347case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028348 p
28349 q
28350}
28351/@datadir@/p
28352/@docdir@/p
28353/@infodir@/p
28354/@localedir@/p
28355/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028356' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028357*datarootdir*) ac_datarootdir_seen=yes;;
28358*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028359 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28360echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028361_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028362cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028363 ac_datarootdir_hack='
28364 s&@datadir@&$datadir&g
28365 s&@docdir@&$docdir&g
28366 s&@infodir@&$infodir&g
28367 s&@localedir@&$localedir&g
28368 s&@mandir@&$mandir&g
28369 s&\\\${datarootdir}&$datarootdir&g' ;;
28370esac
28371_ACEOF
28372
28373# Neutralize VPATH when `$srcdir' = `.'.
28374# Shell code in configure.ac might set extrasub.
28375# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028376cat >>$CONFIG_STATUS <<_ACEOF
28377 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028378$extrasub
28379_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028380cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028381:t
28382/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028383s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028384s&@top_builddir@&$ac_top_builddir_sub&;t t
28385s&@srcdir@&$ac_srcdir&;t t
28386s&@abs_srcdir@&$ac_abs_srcdir&;t t
28387s&@top_srcdir@&$ac_top_srcdir&;t t
28388s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28389s&@builddir@&$ac_builddir&;t t
28390s&@abs_builddir@&$ac_abs_builddir&;t t
28391s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28392s&@INSTALL@&$ac_INSTALL&;t t
28393$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028394" $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 +000028395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028396test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28397 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28398 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028399 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028400which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028401echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028402which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028404 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028405 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028406 -) cat "$tmp/out"; rm -f "$tmp/out";;
28407 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28408 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028409 ;;
28410 :H)
28411 #
28412 # CONFIG_HEADER
28413 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028414_ACEOF
28415
28416# Transform confdefs.h into a sed script `conftest.defines', that
28417# substitutes the proper values into config.h.in to produce config.h.
28418rm -f conftest.defines conftest.tail
28419# First, append a space to every undef/define line, to ease matching.
28420echo 's/$/ /' >conftest.defines
28421# Then, protect against being on the right side of a sed subst, or in
28422# an unquoted here document, in config.status. If some macros were
28423# called several times there might be several #defines for the same
28424# symbol, which is useless. But do not sort them, since the last
28425# AC_DEFINE must be honored.
28426ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28427# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28428# NAME is the cpp macro being defined, VALUE is the value it is being given.
28429# PARAMS is the parameter list in the macro definition--in most cases, it's
28430# just an empty string.
28431ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28432ac_dB='\\)[ (].*,\\1define\\2'
28433ac_dC=' '
28434ac_dD=' ,'
28435
28436uniq confdefs.h |
28437 sed -n '
28438 t rset
28439 :rset
28440 s/^[ ]*#[ ]*define[ ][ ]*//
28441 t ok
28442 d
28443 :ok
28444 s/[\\&,]/\\&/g
28445 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28446 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28447 ' >>conftest.defines
28448
28449# Remove the space that was appended to ease matching.
28450# Then replace #undef with comments. This is necessary, for
28451# example, in the case of _POSIX_SOURCE, which is predefined and required
28452# on some systems where configure will not decide to define it.
28453# (The regexp can be short, since the line contains either #define or #undef.)
28454echo 's/ $//
28455s,^[ #]*u.*,/* & */,' >>conftest.defines
28456
28457# Break up conftest.defines:
28458ac_max_sed_lines=50
28459
28460# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28461# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28462# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28463# et cetera.
28464ac_in='$ac_file_inputs'
28465ac_out='"$tmp/out1"'
28466ac_nxt='"$tmp/out2"'
28467
28468while :
28469do
28470 # Write a here document:
28471 cat >>$CONFIG_STATUS <<_ACEOF
28472 # First, check the format of the line:
28473 cat >"\$tmp/defines.sed" <<\\CEOF
28474/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28475/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28476b
28477:def
28478_ACEOF
28479 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28480 echo 'CEOF
28481 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28482 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28483 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28484 grep . conftest.tail >/dev/null || break
28485 rm -f conftest.defines
28486 mv conftest.tail conftest.defines
28487done
28488rm -f conftest.defines conftest.tail
28489
28490echo "ac_result=$ac_in" >>$CONFIG_STATUS
28491cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028492 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028493 echo "/* $configure_input */" >"$tmp/config.h"
28494 cat "$ac_result" >>"$tmp/config.h"
28495 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28496 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28497echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028498 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028499 rm -f $ac_file
28500 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028501 fi
28502 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028503 echo "/* $configure_input */"
28504 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028505 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028506 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028507 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028509
28510 esac
28511
28512done # for ac_tag
28513
Guido van Rossum627b2d71993-12-24 10:39:16 +000028514
Martin v. Löwis11437992002-04-12 09:54:03 +000028515{ (exit 0); exit 0; }
28516_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028517chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028518ac_clean_files=$ac_clean_files_save
28519
28520
28521# configure is writing to config.log, and then calls config.status.
28522# config.status does its own redirection, appending to config.log.
28523# Unfortunately, on DOS this fails, as config.log is still kept open
28524# by configure, so config.status won't be able to write to it; its
28525# output is simply discarded. So we exec the FD to /dev/null,
28526# effectively closing config.log, so it can be properly (re)opened and
28527# appended to by config.status. When coming back to configure, we
28528# need to make the FD available again.
28529if test "$no_create" != yes; then
28530 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028531 ac_config_status_args=
28532 test "$silent" = yes &&
28533 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028534 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028535 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028536 exec 5>>config.log
28537 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28538 # would make configure fail if this is the last instruction.
28539 $ac_cs_success || { (exit 1); exit 1; }
28540fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028541
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028542
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028543echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028544if test ! -f Modules/Setup
28545then
28546 cp $srcdir/Modules/Setup.dist Modules/Setup
28547fi
28548
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028549echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028550if test ! -f Modules/Setup.local
28551then
28552 echo "# Edit this file for local setup changes" >Modules/Setup.local
28553fi
28554
28555echo "creating Makefile"
28556$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28557 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028558 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028559mv config.c Modules