blob: 50d07698b9f8fb1ba86c99cbd3c32ad59d0c3745 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitroub7572f02009-12-02 20:46:48 +00002# From configure.in Revision: 76566 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001249\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001356 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001357 --with(out)-pymalloc disable/enable specialized mallocs
1358 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001359 --with-fpectl enable SIGFPE catching
1360 --with-libm=STRING math library
1361 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001362 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001363 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1364 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001365
1366Some influential environment variables:
1367 CC C compiler command
1368 CFLAGS C compiler flags
1369 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1370 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371 LIBS libraries to pass to the linker, e.g. -l<library>
1372 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1373 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 CPP C preprocessor
1375
1376Use these variables to override the choices made by `configure' or to help
1377it to find libraries and programs with nonstandard names/locations.
1378
Georg Brandle2e15612009-05-20 18:25:10 +00001379Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001380_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001382fi
1383
1384if test "$ac_init_help" = "recursive"; then
1385 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001387 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 ac_builddir=.
1389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001390case "$ac_dir" in
1391.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1392*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001394 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001395 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396 case $ac_top_builddir_sub in
1397 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1399 esac ;;
1400esac
1401ac_abs_top_builddir=$ac_pwd
1402ac_abs_builddir=$ac_pwd$ac_dir_suffix
1403# for backward compatibility:
1404ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001407 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001409 ac_top_srcdir=$ac_top_builddir_sub
1410 ac_abs_top_srcdir=$ac_pwd ;;
1411 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 ac_top_srcdir=$srcdir
1414 ac_abs_top_srcdir=$srcdir ;;
1415 *) # Relative name.
1416 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1417 ac_top_srcdir=$ac_top_build_prefix$srcdir
1418 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001419esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001420ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001422 cd "$ac_dir" || { ac_status=$?; continue; }
1423 # Check for guested configure.
1424 if test -f "$ac_srcdir/configure.gnu"; then
1425 echo &&
1426 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1427 elif test -f "$ac_srcdir/configure"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001431 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 fi || ac_status=$?
1433 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 done
1435fi
1436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001437test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001438if $ac_init_version; then
1439 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001440python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001441generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014442002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001445This configure script is free software; the Free Software Foundation
1446gives unlimited permission to copy, distribute and modify it.
1447_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001448 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This file contains any messages produced by compilers while
1452running configure, to aid debugging if configure makes a mistake.
1453
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001454It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001455generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001456
1457 $ $0 $@
1458
1459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001461{
1462cat <<_ASUNAME
1463## --------- ##
1464## Platform. ##
1465## --------- ##
1466
1467hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1468uname -m = `(uname -m) 2>/dev/null || echo unknown`
1469uname -r = `(uname -r) 2>/dev/null || echo unknown`
1470uname -s = `(uname -s) 2>/dev/null || echo unknown`
1471uname -v = `(uname -v) 2>/dev/null || echo unknown`
1472
1473/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1474/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1475
1476/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1477/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1478/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001480/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1481/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1482/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1483
1484_ASUNAME
1485
1486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1487for as_dir in $PATH
1488do
1489 IFS=$as_save_IFS
1490 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001491 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001492done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495} >&5
1496
1497cat >&5 <<_ACEOF
1498
1499
1500## ----------- ##
1501## Core tests. ##
1502## ----------- ##
1503
1504_ACEOF
1505
1506
1507# Keep a trace of the command line.
1508# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001509# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001511# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001513ac_configure_args0=
1514ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001515ac_must_keep_next=false
1516for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001517do
Skip Montanaro6dead952003-09-25 14:50:04 +00001518 for ac_arg
1519 do
1520 case $ac_arg in
1521 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1522 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1523 | -silent | --silent | --silen | --sile | --sil)
1524 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001526 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001527 esac
1528 case $ac_pass in
1529 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1530 2)
1531 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1532 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001534 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535 case $ac_arg in
1536 *=* | --config-cache | -C | -disable-* | --disable-* \
1537 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1538 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1539 | -with-* | --with-* | -without-* | --without-* | --x)
1540 case "$ac_configure_args0 " in
1541 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1542 esac
1543 ;;
1544 -* ) ac_must_keep_next=true ;;
1545 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001546 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001548 ;;
1549 esac
1550 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001551done
Skip Montanaro6dead952003-09-25 14:50:04 +00001552$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1553$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
1555# When interrupted or exit'd, cleanup temporary files, and complete
1556# config.log. We remove comments because anyway the quotes in there
1557# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558# WARNING: Use '\'' to represent an apostrophe within the trap.
1559# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560trap 'exit_status=$?
1561 # Save into config.log some information that might help in debugging.
1562 {
1563 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001564
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 cat <<\_ASBOX
1566## ---------------- ##
1567## Cache variables. ##
1568## ---------------- ##
1569_ASBOX
1570 echo
1571 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572(
1573 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1574 eval ac_val=\$$ac_var
1575 case $ac_val in #(
1576 *${as_nl}*)
1577 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001578 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1579echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 esac
1581 case $ac_var in #(
1582 _ | IFS | as_nl) ;; #(
1583 *) $as_unset $ac_var ;;
1584 esac ;;
1585 esac
1586 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1589 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 "s/'\''/'\''\\\\'\'''\''/g;
1592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1593 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001594 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001596 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 esac |
1598 sort
1599)
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001601
1602 cat <<\_ASBOX
1603## ----------------- ##
1604## Output variables. ##
1605## ----------------- ##
1606_ASBOX
1607 echo
1608 for ac_var in $ac_subst_vars
1609 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610 eval ac_val=\$$ac_var
1611 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001612 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001614 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001615 done | sort
1616 echo
1617
1618 if test -n "$ac_subst_files"; then
1619 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620## ------------------- ##
1621## File substitutions. ##
1622## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001623_ASBOX
1624 echo
1625 for ac_var in $ac_subst_files
1626 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 eval ac_val=\$$ac_var
1628 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001629 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001631 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001632 done | sort
1633 echo
1634 fi
1635
Martin v. Löwis11437992002-04-12 09:54:03 +00001636 if test -s confdefs.h; then
1637 cat <<\_ASBOX
1638## ----------- ##
1639## confdefs.h. ##
1640## ----------- ##
1641_ASBOX
1642 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 echo
1645 fi
1646 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001647 echo "$as_me: caught signal $ac_signal"
1648 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001649 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 rm -f core *.core core.conftest.* &&
1651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001653' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001654for ac_signal in 1 2 13 15; do
1655 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1656done
1657ac_signal=0
1658
1659# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001661
1662# Predefined preprocessor variables.
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_NAME "$PACKAGE_NAME"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1671_ACEOF
1672
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_VERSION "$PACKAGE_VERSION"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_STRING "$PACKAGE_STRING"
1681_ACEOF
1682
1683
1684cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1686_ACEOF
1687
1688
1689# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001690# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001691if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001692 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001693elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001694 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696 set x "$ac_default_prefix/share/config.site" \
1697 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001699shift
1700for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001703 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1704echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 . "$ac_site_file"
1707 fi
1708done
1709
1710if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 # Some versions of bash will fail to source /dev/null (special
1712 # files actually), so we avoid doing that.
1713 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001714 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1715echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1718 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001719 esac
1720 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001721else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001722 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1723echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 >$cache_file
1725fi
1726
1727# Check that the precious variables saved in the cache have kept the same
1728# value.
1729ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001730for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1732 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1734 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 case $ac_old_set,$ac_new_set in
1736 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001737 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1738echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 ac_cache_corrupted=: ;;
1740 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,);;
1745 *)
1746 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1748echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1749 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1750echo "$as_me: former value: $ac_old_val" >&2;}
1751 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1752echo "$as_me: current value: $ac_new_val" >&2;}
1753 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 fi;;
1755 esac
1756 # Pass precious variables to config.status.
1757 if test "$ac_new_set" = set; then
1758 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001759 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 *) ac_arg=$ac_var=$ac_new_val ;;
1761 esac
1762 case " $ac_configure_args " in
1763 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1764 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1765 esac
1766 fi
1767done
1768if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001769 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1770echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1771 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1772echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001773 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774fi
1775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
Guido van Rossum7f43da71994-08-01 12:15:30 +00001800ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001802ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1803ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1804ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805
Guido van Rossum627b2d71993-12-24 10:39:16 +00001806
Michael W. Hudson54241132001-12-07 15:38:26 +00001807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001808ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001809
1810
Martin v. Löwis11437992002-04-12 09:54:03 +00001811
Benjamin Petersond23f8222009-04-05 19:13:16 +00001812if test "$prefix" != "/"; then
1813 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1814fi
1815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
1818
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001819
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001820
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001821# We don't use PACKAGE_ variables, and they cause conflicts
1822# with other autoconf-based packages that include Python.h
1823grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1824rm confdefs.h
1825mv confdefs.h.new confdefs.h
1826
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001827
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001828VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001829
Martin v. Löwis1142de32002-03-29 16:28:31 +00001830
1831SOVERSION=1.0
1832
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001833# The later defininition of _XOPEN_SOURCE disables certain features
1834# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _GNU_SOURCE 1
1838_ACEOF
1839
1840
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define _NETBSD_SOURCE 1
1847_ACEOF
1848
1849
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1852# them.
1853
1854cat >>confdefs.h <<\_ACEOF
1855#define __BSD_VISIBLE 1
1856_ACEOF
1857
1858
Martin v. Löwisd6320502004-08-12 13:45:08 +00001859# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1860# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _BSD_TYPES 1
1864_ACEOF
1865
1866
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001867# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1868# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1869# them.
1870
1871cat >>confdefs.h <<\_ACEOF
1872#define _DARWIN_C_SOURCE 1
1873_ACEOF
1874
1875
1876
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001877define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001878
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001879# Arguments passed to configure.
1880
1881CONFIG_ARGS="$ac_configure_args"
1882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001883# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001884if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001885 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001886 case $enableval in
1887 yes)
1888 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1889 ;;
1890 esac
1891 case $enableval in
1892 no)
1893 UNIVERSALSDK=
1894 enable_universalsdk=
1895 ;;
1896 *)
1897 UNIVERSALSDK=$enableval
1898 ;;
1899 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001900
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901else
1902
1903 UNIVERSALSDK=
1904 enable_universalsdk=
1905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001907
1908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001909
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001910
1911
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001912UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001913{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1914echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001915
1916# Check whether --with-universal-archs was given.
1917if test "${with_universal_archs+set}" = set; then
1918 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001919 { echo "$as_me:$LINENO: result: $withval" >&5
1920echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001921 UNIVERSAL_ARCHS="$withval"
1922
1923else
1924
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001925 { echo "$as_me:$LINENO: result: 32-bit" >&5
1926echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001927
1928fi
1929
1930
1931
1932
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001933
1934# Check whether --with-framework-name was given.
1935if test "${with_framework_name+set}" = set; then
1936 withval=$with_framework_name;
1937 PYTHONFRAMEWORK=${withval}
1938 PYTHONFRAMEWORKDIR=${withval}.framework
1939 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1940
1941else
1942
1943 PYTHONFRAMEWORK=Python
1944 PYTHONFRAMEWORKDIR=Python.framework
1945 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1946
1947fi
1948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001949# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001950if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001951 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001952 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001953 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001954 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001955 esac
1956 case $enableval in
1957 no)
1958 PYTHONFRAMEWORK=
1959 PYTHONFRAMEWORKDIR=no-framework
1960 PYTHONFRAMEWORKPREFIX=
1961 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001962 FRAMEWORKINSTALLFIRST=
1963 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001964 FRAMEWORKALTINSTALLFIRST=
1965 FRAMEWORKALTINSTALLLAST=
1966 if test "x${prefix}" = "xNONE"; then
1967 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1968 else
1969 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1970 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001971 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001972 ;;
1973 *)
1974 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001975 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001976 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001977 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001978 if test "$UNIVERSAL_ARCHS" = "all"
1979 then
1980 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001981 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001982 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001983 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001984 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1985 fi
1986
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001987 if test "x${prefix}" = "xNONE" ; then
1988 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1989 else
1990 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1991 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001992 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001993
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001994 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001995 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001996 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001998 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001999
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002000 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2001
2002 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2003
Jack Jansene578a632001-08-15 01:27:14 +00002004 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002005
Guido van Rossum563e7081996-09-10 18:20:48 +00002006else
Martin v. Löwis11437992002-04-12 09:54:03 +00002007
Jack Jansene578a632001-08-15 01:27:14 +00002008 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002009 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002010 PYTHONFRAMEWORKPREFIX=
2011 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002012 FRAMEWORKINSTALLFIRST=
2013 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002014 FRAMEWORKALTINSTALLFIRST=
2015 FRAMEWORKALTINSTALLLAST=
2016 if test "x${prefix}" = "xNONE" ; then
2017 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2018 else
2019 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2020 fi
Jack Jansene578a632001-08-15 01:27:14 +00002021 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002022
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002023 if test "$UNIVERSAL_ARCHS" = "all"
2024 then
2025 FRAMEWORKINSTALLLAST=update4wayuniversal
2026 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2027 fi
2028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002029fi
2030
Thomas Wouters477c8d52006-05-27 19:21:47 +00002031
2032
Michael W. Hudson54241132001-12-07 15:38:26 +00002033
2034
2035
2036
Jack Jansene578a632001-08-15 01:27:14 +00002037
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002038
2039
2040
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002041
Jack Jansene578a632001-08-15 01:27:14 +00002042##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002043## AC_HELP_STRING(--with-dyld,
2044## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002045##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046# Set name for machine-dependent library files
2047
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002048{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2049echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050if test -z "$MACHDEP"
2051then
Guido van Rossum563e7081996-09-10 18:20:48 +00002052 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002053 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002054 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002055 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002056 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002057 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002058 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002059 ac_md_system=`echo $ac_sys_system |
2060 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2061 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002062 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002063 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002064
Guido van Rossum07397971997-04-29 21:49:50 +00002065 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002066 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002067 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002068 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002069 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070 esac
2071fi
Guido van Rossum91922671997-10-09 20:24:13 +00002072
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002073# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2074# disable features if it is defined, without any means to access these
2075# features as extensions. For these systems, we skip the definition of
2076# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2077# some feature, make sure there is no alternative way to access this
2078# feature. Also, when using wildcards, make sure you have verified the
2079# need for not defining _XOPEN_SOURCE on all systems matching the
2080# wildcard, and that the wildcard does not include future systems
2081# (which may remove their limitations).
2082case $ac_sys_system/$ac_sys_release in
2083 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2084 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002085 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002086 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002087 define_xopen_source=no
2088 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2089 # also defined. This can be overridden by defining _BSD_SOURCE
2090 # As this has a different meaning on Linux, only define it on OpenBSD
2091
2092cat >>confdefs.h <<\_ACEOF
2093#define _BSD_SOURCE 1
2094_ACEOF
2095
2096 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002097 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2098 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2099 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002100 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002101 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002102 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2103 # of union __?sigval. Reported by Stuart Bishop.
2104 SunOS/5.6)
2105 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002106 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2107 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002108 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002109 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002110 define_xopen_source=no;;
2111 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002112 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002115 # On FreeBSD 4, the math functions C89 does not cover are never defined
2116 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2117 FreeBSD/4.*)
2118 define_xopen_source=no;;
2119 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2120 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2121 # identifies itself as Darwin/7.*
2122 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2123 # disables platform specific features beyond repair.
2124 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # has no effect, don't bother defining them
2126 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002127 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002128 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2129 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2130 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002131 AIX/4)
2132 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002133 AIX/5)
2134 if test `uname -r` -eq 1; then
2135 define_xopen_source=no
2136 fi
2137 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002138 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2139 # defining NI_NUMERICHOST.
2140 QNX/6.3.2)
2141 define_xopen_source=no
2142 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002143
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002144esac
2145
2146if test $define_xopen_source = yes
2147then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2149 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002150 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2151 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002152 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002153 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154
2155cat >>confdefs.h <<\_ACEOF
2156#define _XOPEN_SOURCE 500
2157_ACEOF
2158
2159 ;;
2160 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002161
2162cat >>confdefs.h <<\_ACEOF
2163#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002164_ACEOF
2165
Skip Montanarof0d5f792004-08-15 14:08:23 +00002166 ;;
2167 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2170 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2171 # several APIs are not declared. Since this is also needed in some
2172 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002173 # except for Solaris 10, where it must not be defined,
2174 # as it implies XPG4.2
2175 case $ac_sys_system/$ac_sys_release in
2176 SunOS/5.10)
2177 ;;
2178 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002179
2180cat >>confdefs.h <<\_ACEOF
2181#define _XOPEN_SOURCE_EXTENDED 1
2182_ACEOF
2183
Martin v. Löwis7dece662005-11-26 11:38:24 +00002184 ;;
2185 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002186
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002187
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188cat >>confdefs.h <<\_ACEOF
2189#define _POSIX_C_SOURCE 200112L
2190_ACEOF
2191
2192
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002193fi
2194
Guido van Rossum91922671997-10-09 20:24:13 +00002195#
2196# SGI compilers allow the specification of the both the ABI and the
2197# ISA on the command line. Depending on the values of these switches,
2198# different and often incompatable code will be generated.
2199#
2200# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2201# thus supply support for various ABI/ISA combinations. The MACHDEP
2202# variable is also adjusted.
2203#
2204
2205if test ! -z "$SGI_ABI"
2206then
2207 CC="cc $SGI_ABI"
2208 LDFLAGS="$SGI_ABI $LDFLAGS"
2209 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2210fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002211{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2212echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002213
Jack Jansen6b08a402004-06-03 12:41:45 +00002214# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2215# it may influence the way we can build extensions, so distutils
2216# needs to check it
2217
Thomas Wouters477c8d52006-05-27 19:21:47 +00002218
Jack Jansen6b08a402004-06-03 12:41:45 +00002219CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002221
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002222{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2223echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002224ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002225{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2226echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002227
Guido van Rossum627b2d71993-12-24 10:39:16 +00002228# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002229
2230# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2231# for debug/optimization stuff. BASECFLAGS is for flags that are required
2232# just to get things to compile and link. Users are free to override OPT
2233# when running configure or make. The build should not break if they do.
2234# BASECFLAGS should generally not be messed with, however.
2235
2236# XXX shouldn't some/most/all of this code be merged with the stuff later
2237# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002238{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2239echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002241# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002244 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002245 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002246 without_gcc=yes;;
2247 yes) CC=gcc
2248 without_gcc=no;;
2249 *) CC=$withval
2250 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002251 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002252else
Martin v. Löwis11437992002-04-12 09:54:03 +00002253
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002254 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002255 AIX*) CC=cc_r
2256 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002257 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002258 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002259fi
2260
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002261{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2262echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002263
Guido van Rossum8b131c51995-03-09 14:10:13 +00002264# If the user switches compilers, we can't believe the cache
2265if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2266then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002267 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002268(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002269echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002270(it is also a good idea to do 'make clean' before compiling)" >&2;}
2271 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002272fi
2273
Martin v. Löwis11437992002-04-12 09:54:03 +00002274ac_ext=c
2275ac_cpp='$CPP $CPPFLAGS'
2276ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2277ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2278ac_compiler_gnu=$ac_cv_c_compiler_gnu
2279if test -n "$ac_tool_prefix"; then
2280 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2281set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002284if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002286else
2287 if test -n "$CC"; then
2288 ac_cv_prog_CC="$CC" # Let the user override the test.
2289else
Martin v. Löwis11437992002-04-12 09:54:03 +00002290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2291for as_dir in $PATH
2292do
2293 IFS=$as_save_IFS
2294 test -z "$as_dir" && as_dir=.
2295 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002296 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002297 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002298 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002299 break 2
2300 fi
2301done
2302done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002303IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002304
Jack Jansendd19cf82001-12-06 22:36:17 +00002305fi
2306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002307CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002308if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002309 { echo "$as_me:$LINENO: result: $CC" >&5
2310echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002312 { echo "$as_me:$LINENO: result: no" >&5
2313echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002314fi
2315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002316
Martin v. Löwis11437992002-04-12 09:54:03 +00002317fi
2318if test -z "$ac_cv_prog_CC"; then
2319 ac_ct_CC=$CC
2320 # Extract the first word of "gcc", so it can be a program name with args.
2321set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002322{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002324if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002325 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002326else
2327 if test -n "$ac_ct_CC"; then
2328 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2329else
2330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2331for as_dir in $PATH
2332do
2333 IFS=$as_save_IFS
2334 test -z "$as_dir" && as_dir=.
2335 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002337 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002339 break 2
2340 fi
2341done
2342done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345fi
2346fi
2347ac_ct_CC=$ac_cv_prog_ac_ct_CC
2348if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002349 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2350echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002352 { echo "$as_me:$LINENO: result: no" >&5
2353echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002354fi
2355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356 if test "x$ac_ct_CC" = x; then
2357 CC=""
2358 else
2359 case $cross_compiling:$ac_tool_warned in
2360yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002361{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2362whose name does not start with the host triplet. If you think this
2363configuration is useful to you, please write to autoconf@gnu.org." >&5
2364echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2365whose name does not start with the host triplet. If you think this
2366configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367ac_tool_warned=yes ;;
2368esac
2369 CC=$ac_ct_CC
2370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371else
2372 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002373fi
2374
Jack Jansendd19cf82001-12-06 22:36:17 +00002375if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376 if test -n "$ac_tool_prefix"; then
2377 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002378set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002381if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002382 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002383else
2384 if test -n "$CC"; then
2385 ac_cv_prog_CC="$CC" # Let the user override the test.
2386else
Martin v. Löwis11437992002-04-12 09:54:03 +00002387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
2392 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002393 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002394 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 break 2
2397 fi
2398done
2399done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002401
2402fi
2403fi
2404CC=$ac_cv_prog_CC
2405if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002406 { echo "$as_me:$LINENO: result: $CC" >&5
2407echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002409 { echo "$as_me:$LINENO: result: no" >&5
2410echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002411fi
2412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413
Martin v. Löwis11437992002-04-12 09:54:03 +00002414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002415fi
2416if test -z "$CC"; then
2417 # Extract the first word of "cc", so it can be a program name with args.
2418set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002421if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002423else
2424 if test -n "$CC"; then
2425 ac_cv_prog_CC="$CC" # Let the user override the test.
2426else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002427 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2436 ac_prog_rejected=yes
2437 continue
2438 fi
2439 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002440 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 break 2
2442 fi
2443done
2444done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002446
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002447if test $ac_prog_rejected = yes; then
2448 # We found a bogon in the path, so make sure we never use it.
2449 set dummy $ac_cv_prog_CC
2450 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002451 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002452 # We chose a different compiler from the bogus one.
2453 # However, it has the same basename, so the bogon will be chosen
2454 # first if we set CC to just the basename; use the full file name.
2455 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002456 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002457 fi
2458fi
2459fi
2460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002461CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002463 { echo "$as_me:$LINENO: result: $CC" >&5
2464echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002466 { echo "$as_me:$LINENO: result: no" >&5
2467echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002468fi
2469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470
Martin v. Löwis11437992002-04-12 09:54:03 +00002471fi
2472if test -z "$CC"; then
2473 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 do
2476 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2477set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002482else
2483 if test -n "$CC"; then
2484 ac_cv_prog_CC="$CC" # Let the user override the test.
2485else
Martin v. Löwis11437992002-04-12 09:54:03 +00002486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002495 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002497done
2498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501fi
2502fi
2503CC=$ac_cv_prog_CC
2504if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002505 { echo "$as_me:$LINENO: result: $CC" >&5
2506echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002510fi
2511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$CC" && break
2514 done
2515fi
2516if test -z "$CC"; then
2517 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002519do
2520 # Extract the first word of "$ac_prog", so it can be a program name with args.
2521set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002522{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2523echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002524if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002525 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002526else
2527 if test -n "$ac_ct_CC"; then
2528 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2529else
2530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2531for as_dir in $PATH
2532do
2533 IFS=$as_save_IFS
2534 test -z "$as_dir" && as_dir=.
2535 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 break 2
2540 fi
2541done
2542done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545fi
2546fi
2547ac_ct_CC=$ac_cv_prog_ac_ct_CC
2548if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002549 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2550echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002551else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002552 { echo "$as_me:$LINENO: result: no" >&5
2553echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002554fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 test -n "$ac_ct_CC" && break
2558done
Michael W. Hudson54241132001-12-07 15:38:26 +00002559
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 if test "x$ac_ct_CC" = x; then
2561 CC=""
2562 else
2563 case $cross_compiling:$ac_tool_warned in
2564yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002565{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2566whose name does not start with the host triplet. If you think this
2567configuration is useful to you, please write to autoconf@gnu.org." >&5
2568echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2569whose name does not start with the host triplet. If you think this
2570configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571ac_tool_warned=yes ;;
2572esac
2573 CC=$ac_ct_CC
2574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002575fi
2576
2577fi
2578
2579
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002580test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002581See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002583See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002584 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
2586# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002587echo "$as_me:$LINENO: checking for C compiler version" >&5
2588ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589{ (ac_try="$ac_compiler --version >&5"
2590case "(($ac_try" in
2591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2592 *) ac_try_echo=$ac_try;;
2593esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599{ (ac_try="$ac_compiler -v >&5"
2600case "(($ac_try" in
2601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2602 *) ac_try_echo=$ac_try;;
2603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609{ (ac_try="$ac_compiler -V >&5"
2610case "(($ac_try" in
2611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2612 *) ac_try_echo=$ac_try;;
2613esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 (exit $ac_status); }
2619
2620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002621/* confdefs.h. */
2622_ACEOF
2623cat confdefs.h >>conftest.$ac_ext
2624cat >>conftest.$ac_ext <<_ACEOF
2625/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627int
2628main ()
2629{
2630
2631 ;
2632 return 0;
2633}
2634_ACEOF
2635ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002637# Try to create an executable without -o first, disregard a.out.
2638# It will help us diagnose broken compilers, and finding out an intuition
2639# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002640{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2641echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2642ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2643#
2644# List of possible output files, starting from the most likely.
2645# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2646# only as a last resort. b.out is created by i960 compilers.
2647ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2648#
2649# The IRIX 6 linker writes into existing files which may not be
2650# executable, retaining their permissions. Remove them first so a
2651# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652ac_rmfiles=
2653for ac_file in $ac_files
2654do
2655 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002656 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2658 esac
2659done
2660rm -f $ac_rmfiles
2661
2662if { (ac_try="$ac_link_default"
2663case "(($ac_try" in
2664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2665 *) ac_try_echo=$ac_try;;
2666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2673# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2674# in a Makefile. We should not override ac_cv_exeext if it was cached,
2675# so that the user can short-circuit this test for compilers unknown to
2676# Autoconf.
2677for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002678do
2679 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002681 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002682 ;;
2683 [ab].out )
2684 # We found the default executable, but exeext='' is most
2685 # certainly right.
2686 break;;
2687 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2689 then :; else
2690 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2691 fi
2692 # We set ac_cv_exeext here because the later test for it is not
2693 # safe: cross compilers may not add the suffix if given an `-o'
2694 # argument, so we may need to know it at that point already.
2695 # Even if this section looks crufty: it has the advantage of
2696 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002697 break;;
2698 * )
2699 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 esac
2701done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002702test "$ac_cv_exeext" = no && ac_cv_exeext=
2703
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002704else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 ac_file=''
2706fi
2707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002708{ echo "$as_me:$LINENO: result: $ac_file" >&5
2709echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002712sed 's/^/| /' conftest.$ac_ext >&5
2713
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002714{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002715See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002716echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002717See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002718 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002719fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002720
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002721ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002724# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002725{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2726echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002727# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2728# If not cross compiling, check that we can run a simple program.
2729if test "$cross_compiling" != yes; then
2730 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002731 { (case "(($ac_try" in
2732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2733 *) ac_try_echo=$ac_try;;
2734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 (exit $ac_status); }; }; then
2740 cross_compiling=no
2741 else
2742 if test "$cross_compiling" = maybe; then
2743 cross_compiling=yes
2744 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002746If you meant to cross compile, use \`--host'.
2747See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002748echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002749If you meant to cross compile, use \`--host'.
2750See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002751 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 fi
2753 fi
2754fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002755{ echo "$as_me:$LINENO: result: yes" >&5
2756echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002757
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002758rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002759ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002761# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002762{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2763echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2764{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2765echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002767{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2768echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769if { (ac_try="$ac_link"
2770case "(($ac_try" in
2771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772 *) ac_try_echo=$ac_try;;
2773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002779 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2780# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2781# work properly (i.e., refer to `conftest.exe'), while it won't with
2782# `rm'.
2783for ac_file in conftest.exe conftest conftest.*; do
2784 test -f "$ac_file" || continue
2785 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002786 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002787 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2788 break;;
2789 * ) break;;
2790 esac
2791done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002793 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002794See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002796See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002797 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002798fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002799
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002800rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002801{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2802echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002803
2804rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002805EXEEXT=$ac_cv_exeext
2806ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002807{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2808echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002809if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002810 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002811else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002812 cat >conftest.$ac_ext <<_ACEOF
2813/* confdefs.h. */
2814_ACEOF
2815cat confdefs.h >>conftest.$ac_ext
2816cat >>conftest.$ac_ext <<_ACEOF
2817/* end confdefs.h. */
2818
2819int
2820main ()
2821{
2822
2823 ;
2824 return 0;
2825}
2826_ACEOF
2827rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828if { (ac_try="$ac_compile"
2829case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838 for ac_file in conftest.o conftest.obj conftest.*; do
2839 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2843 break;;
2844 esac
2845done
2846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002848sed 's/^/| /' conftest.$ac_ext >&5
2849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002850{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002851See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002852echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002853See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002854 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855fi
2856
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002857rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002858fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002859{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2860echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861OBJEXT=$ac_cv_objext
2862ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002863{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2864echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002865if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002867else
2868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002869/* confdefs.h. */
2870_ACEOF
2871cat confdefs.h >>conftest.$ac_ext
2872cat >>conftest.$ac_ext <<_ACEOF
2873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002874
Martin v. Löwis11437992002-04-12 09:54:03 +00002875int
2876main ()
2877{
2878#ifndef __GNUC__
2879 choke me
2880#endif
2881
2882 ;
2883 return 0;
2884}
2885_ACEOF
2886rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887if { (ac_try="$ac_compile"
2888case "(($ac_try" in
2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2890 *) ac_try_echo=$ac_try;;
2891esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002895 grep -v '^ *+' conftest.er1 >conftest.err
2896 rm -f conftest.er1
2897 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002899 (exit $ac_status); } && {
2900 test -z "$ac_c_werror_flag" ||
2901 test ! -s conftest.err
2902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 ac_compiler_gnu=yes
2904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002906sed 's/^/| /' conftest.$ac_ext >&5
2907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910
2911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002912ac_cv_c_compiler_gnu=$ac_compiler_gnu
2913
2914fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002915{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2916echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2917GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002918ac_test_CFLAGS=${CFLAGS+set}
2919ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002920{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2921echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002922if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002924else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002925 ac_save_c_werror_flag=$ac_c_werror_flag
2926 ac_c_werror_flag=yes
2927 ac_cv_prog_cc_g=no
2928 CFLAGS="-g"
2929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002930/* confdefs.h. */
2931_ACEOF
2932cat confdefs.h >>conftest.$ac_ext
2933cat >>conftest.$ac_ext <<_ACEOF
2934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
Martin v. Löwis11437992002-04-12 09:54:03 +00002936int
2937main ()
2938{
2939
2940 ;
2941 return 0;
2942}
2943_ACEOF
2944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002945if { (ac_try="$ac_compile"
2946case "(($ac_try" in
2947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948 *) ac_try_echo=$ac_try;;
2949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002953 grep -v '^ *+' conftest.er1 >conftest.err
2954 rm -f conftest.er1
2955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002957 (exit $ac_status); } && {
2958 test -z "$ac_c_werror_flag" ||
2959 test ! -s conftest.err
2960 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002961 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002964sed 's/^/| /' conftest.$ac_ext >&5
2965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002966 CFLAGS=""
2967 cat >conftest.$ac_ext <<_ACEOF
2968/* confdefs.h. */
2969_ACEOF
2970cat confdefs.h >>conftest.$ac_ext
2971cat >>conftest.$ac_ext <<_ACEOF
2972/* end confdefs.h. */
2973
2974int
2975main ()
2976{
2977
2978 ;
2979 return 0;
2980}
2981_ACEOF
2982rm -f conftest.$ac_objext
2983if { (ac_try="$ac_compile"
2984case "(($ac_try" in
2985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2986 *) ac_try_echo=$ac_try;;
2987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 (eval "$ac_compile") 2>conftest.er1
2990 ac_status=$?
2991 grep -v '^ *+' conftest.er1 >conftest.err
2992 rm -f conftest.er1
2993 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995 (exit $ac_status); } && {
2996 test -z "$ac_c_werror_flag" ||
2997 test ! -s conftest.err
2998 } && test -s conftest.$ac_objext; then
2999 :
3000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003001 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002sed 's/^/| /' conftest.$ac_ext >&5
3003
3004 ac_c_werror_flag=$ac_save_c_werror_flag
3005 CFLAGS="-g"
3006 cat >conftest.$ac_ext <<_ACEOF
3007/* confdefs.h. */
3008_ACEOF
3009cat confdefs.h >>conftest.$ac_ext
3010cat >>conftest.$ac_ext <<_ACEOF
3011/* end confdefs.h. */
3012
3013int
3014main ()
3015{
3016
3017 ;
3018 return 0;
3019}
3020_ACEOF
3021rm -f conftest.$ac_objext
3022if { (ac_try="$ac_compile"
3023case "(($ac_try" in
3024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3025 *) ac_try_echo=$ac_try;;
3026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (eval "$ac_compile") 2>conftest.er1
3029 ac_status=$?
3030 grep -v '^ *+' conftest.er1 >conftest.err
3031 rm -f conftest.er1
3032 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034 (exit $ac_status); } && {
3035 test -z "$ac_c_werror_flag" ||
3036 test ! -s conftest.err
3037 } && test -s conftest.$ac_objext; then
3038 ac_cv_prog_cc_g=yes
3039else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003040 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041sed 's/^/| /' conftest.$ac_ext >&5
3042
3043
Guido van Rossum627b2d71993-12-24 10:39:16 +00003044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045
3046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003048
3049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3050fi
3051
3052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3053 ac_c_werror_flag=$ac_save_c_werror_flag
3054fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003055{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3056echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003057if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003058 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003059elif test $ac_cv_prog_cc_g = yes; then
3060 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003061 CFLAGS="-g -O2"
3062 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003063 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064 fi
3065else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003066 if test "$GCC" = yes; then
3067 CFLAGS="-O2"
3068 else
3069 CFLAGS=
3070 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003072{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3073echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003075 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003076else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003078ac_save_CC=$CC
3079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003080/* confdefs.h. */
3081_ACEOF
3082cat confdefs.h >>conftest.$ac_ext
3083cat >>conftest.$ac_ext <<_ACEOF
3084/* end confdefs.h. */
3085#include <stdarg.h>
3086#include <stdio.h>
3087#include <sys/types.h>
3088#include <sys/stat.h>
3089/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3090struct buf { int x; };
3091FILE * (*rcsopen) (struct buf *, struct stat *, int);
3092static char *e (p, i)
3093 char **p;
3094 int i;
3095{
3096 return p[i];
3097}
3098static char *f (char * (*g) (char **, int), char **p, ...)
3099{
3100 char *s;
3101 va_list v;
3102 va_start (v,p);
3103 s = g (p, va_arg (v,int));
3104 va_end (v);
3105 return s;
3106}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003107
3108/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3109 function prototypes and stuff, but not '\xHH' hex character constants.
3110 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003112 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3113 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003114 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003115int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3118 inside strings and character constants. */
3119#define FOO(x) 'x'
3120int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3121
Skip Montanaro6dead952003-09-25 14:50:04 +00003122int test (int i, double x);
3123struct s1 {int (*f) (int a);};
3124struct s2 {int (*f) (double a);};
3125int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3126int argc;
3127char **argv;
3128int
3129main ()
3130{
3131return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3132 ;
3133 return 0;
3134}
3135_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003136for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3137 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003138do
3139 CC="$ac_save_CC $ac_arg"
3140 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141if { (ac_try="$ac_compile"
3142case "(($ac_try" in
3143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3144 *) ac_try_echo=$ac_try;;
3145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003149 grep -v '^ *+' conftest.er1 >conftest.err
3150 rm -f conftest.er1
3151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 (exit $ac_status); } && {
3154 test -z "$ac_c_werror_flag" ||
3155 test ! -s conftest.err
3156 } && test -s conftest.$ac_objext; then
3157 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003160sed 's/^/| /' conftest.$ac_ext >&5
3161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162
Skip Montanaro6dead952003-09-25 14:50:04 +00003163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164
3165rm -f core conftest.err conftest.$ac_objext
3166 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003167done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003169CC=$ac_save_CC
3170
3171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172# AC_CACHE_VAL
3173case "x$ac_cv_prog_cc_c89" in
3174 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003175 { echo "$as_me:$LINENO: result: none needed" >&5
3176echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003178 { echo "$as_me:$LINENO: result: unsupported" >&5
3179echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003180 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003182 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3183echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003184esac
3185
Skip Montanaro6dead952003-09-25 14:50:04 +00003186
Martin v. Löwis11437992002-04-12 09:54:03 +00003187ac_ext=c
3188ac_cpp='$CPP $CPPFLAGS'
3189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3191ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003192
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003193
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194
3195
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003196{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3197echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003202
3203 case $withval in
3204 no) with_cxx_main=no
3205 MAINCC='$(CC)';;
3206 yes) with_cxx_main=yes
3207 MAINCC='$(CXX)';;
3208 *) with_cxx_main=yes
3209 MAINCC=$withval
3210 if test -z "$CXX"
3211 then
3212 CXX=$withval
3213 fi;;
3214 esac
3215else
3216
3217 with_cxx_main=no
3218 MAINCC='$(CC)'
3219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220fi
3221
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003222{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3223echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003224
3225preset_cxx="$CXX"
3226if test -z "$CXX"
3227then
3228 case "$CC" in
3229 gcc) # Extract the first word of "g++", so it can be a program name with args.
3230set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003231{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003234 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235else
3236 case $CXX in
3237 [\\/]* | ?:[\\/]*)
3238 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3239 ;;
3240 *)
3241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3242for as_dir in notfound
3243do
3244 IFS=$as_save_IFS
3245 test -z "$as_dir" && as_dir=.
3246 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003247 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003248 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003249 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003250 break 2
3251 fi
3252done
3253done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255
3256 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3257 ;;
3258esac
3259fi
3260CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003261if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003262 { echo "$as_me:$LINENO: result: $CXX" >&5
3263echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003264else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003265 { echo "$as_me:$LINENO: result: no" >&5
3266echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003269 ;;
3270 cc) # Extract the first word of "c++", so it can be a program name with args.
3271set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003272{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003274if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003275 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003276else
3277 case $CXX in
3278 [\\/]* | ?:[\\/]*)
3279 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3280 ;;
3281 *)
3282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in notfound
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003288 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003289 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003291 break 2
3292 fi
3293done
3294done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003296
3297 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3298 ;;
3299esac
3300fi
3301CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003302if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003303 { echo "$as_me:$LINENO: result: $CXX" >&5
3304echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003306 { echo "$as_me:$LINENO: result: no" >&5
3307echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003310 ;;
3311 esac
3312 if test "$CXX" = "notfound"
3313 then
3314 CXX=""
3315 fi
3316fi
3317if test -z "$CXX"
3318then
3319 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3320do
3321 # Extract the first word of "$ac_prog", so it can be a program name with args.
3322set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003325if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003326 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327else
3328 if test -n "$CXX"; then
3329 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3330else
3331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332for as_dir in $PATH
3333do
3334 IFS=$as_save_IFS
3335 test -z "$as_dir" && as_dir=.
3336 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003338 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003340 break 2
3341 fi
3342done
3343done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003344IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003345
3346fi
3347fi
3348CXX=$ac_cv_prog_CXX
3349if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003350 { echo "$as_me:$LINENO: result: $CXX" >&5
3351echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003353 { echo "$as_me:$LINENO: result: no" >&5
3354echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003355fi
3356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003357
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358 test -n "$CXX" && break
3359done
3360test -n "$CXX" || CXX="notfound"
3361
3362 if test "$CXX" = "notfound"
3363 then
3364 CXX=""
3365 fi
3366fi
3367if test "$preset_cxx" != "$CXX"
3368then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003369 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003370
3371 By default, distutils will build C++ extension modules with \"$CXX\".
3372 If this is not intended, then set CXX on the configure command line.
3373 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003374echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375
3376 By default, distutils will build C++ extension modules with \"$CXX\".
3377 If this is not intended, then set CXX on the configure command line.
3378 " >&2;}
3379fi
3380
3381
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003382# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003383
3384ac_ext=c
3385ac_cpp='$CPP $CPPFLAGS'
3386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3388ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003389{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3390echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003391# On Suns, sometimes $CPP names a directory.
3392if test -n "$CPP" && test -d "$CPP"; then
3393 CPP=
3394fi
3395if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003396 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003398else
Martin v. Löwis11437992002-04-12 09:54:03 +00003399 # Double quotes because CPP needs to be expanded
3400 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3401 do
3402 ac_preproc_ok=false
3403for ac_c_preproc_warn_flag in '' yes
3404do
3405 # Use a header file that comes with gcc, so configuring glibc
3406 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003407 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3408 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003409 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 # not just through cpp. "Syntax error" is here to catch this case.
3411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003412/* confdefs.h. */
3413_ACEOF
3414cat confdefs.h >>conftest.$ac_ext
3415cat >>conftest.$ac_ext <<_ACEOF
3416/* end confdefs.h. */
3417#ifdef __STDC__
3418# include <limits.h>
3419#else
3420# include <assert.h>
3421#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003422 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003423_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003424if { (ac_try="$ac_cpp conftest.$ac_ext"
3425case "(($ac_try" in
3426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3427 *) ac_try_echo=$ac_try;;
3428esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003431 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003432 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 rm -f conftest.er1
3434 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436 (exit $ac_status); } >/dev/null && {
3437 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3438 test ! -s conftest.err
3439 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440 :
3441else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003443sed 's/^/| /' conftest.$ac_ext >&5
3444
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 # Broken: fails on valid input.
3446continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003448
Martin v. Löwis11437992002-04-12 09:54:03 +00003449rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 # can be detected and how.
3453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003454/* confdefs.h. */
3455_ACEOF
3456cat confdefs.h >>conftest.$ac_ext
3457cat >>conftest.$ac_ext <<_ACEOF
3458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003459#include <ac_nonexistent.h>
3460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461if { (ac_try="$ac_cpp conftest.$ac_ext"
3462case "(($ac_try" in
3463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3464 *) ac_try_echo=$ac_try;;
3465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003469 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 rm -f conftest.er1
3471 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (exit $ac_status); } >/dev/null && {
3474 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3475 test ! -s conftest.err
3476 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 # Broken: success on invalid input.
3478continue
3479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003481sed 's/^/| /' conftest.$ac_ext >&5
3482
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 # Passes both tests.
3484ac_preproc_ok=:
3485break
3486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488rm -f conftest.err conftest.$ac_ext
3489
3490done
3491# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3492rm -f conftest.err conftest.$ac_ext
3493if $ac_preproc_ok; then
3494 break
3495fi
3496
3497 done
3498 ac_cv_prog_CPP=$CPP
3499
3500fi
3501 CPP=$ac_cv_prog_CPP
3502else
3503 ac_cv_prog_CPP=$CPP
3504fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003505{ echo "$as_me:$LINENO: result: $CPP" >&5
3506echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507ac_preproc_ok=false
3508for ac_c_preproc_warn_flag in '' yes
3509do
3510 # Use a header file that comes with gcc, so configuring glibc
3511 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003512 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3513 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003514 # On the NeXT, cc -E runs the code through the compiler's parser,
3515 # not just through cpp. "Syntax error" is here to catch this case.
3516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003517/* confdefs.h. */
3518_ACEOF
3519cat confdefs.h >>conftest.$ac_ext
3520cat >>conftest.$ac_ext <<_ACEOF
3521/* end confdefs.h. */
3522#ifdef __STDC__
3523# include <limits.h>
3524#else
3525# include <assert.h>
3526#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003527 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003528_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529if { (ac_try="$ac_cpp conftest.$ac_ext"
3530case "(($ac_try" in
3531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3532 *) ac_try_echo=$ac_try;;
3533esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003537 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 rm -f conftest.er1
3539 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 (exit $ac_status); } >/dev/null && {
3542 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3543 test ! -s conftest.err
3544 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 :
3546else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003548sed 's/^/| /' conftest.$ac_ext >&5
3549
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 # Broken: fails on valid input.
3551continue
3552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553
Martin v. Löwis11437992002-04-12 09:54:03 +00003554rm -f conftest.err conftest.$ac_ext
3555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 # can be detected and how.
3558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003559/* confdefs.h. */
3560_ACEOF
3561cat confdefs.h >>conftest.$ac_ext
3562cat >>conftest.$ac_ext <<_ACEOF
3563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003564#include <ac_nonexistent.h>
3565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566if { (ac_try="$ac_cpp conftest.$ac_ext"
3567case "(($ac_try" in
3568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3569 *) ac_try_echo=$ac_try;;
3570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 rm -f conftest.er1
3576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (exit $ac_status); } >/dev/null && {
3579 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3580 test ! -s conftest.err
3581 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Broken: success on invalid input.
3583continue
3584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # Passes both tests.
3589ac_preproc_ok=:
3590break
3591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593rm -f conftest.err conftest.$ac_ext
3594
3595done
3596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3597rm -f conftest.err conftest.$ac_ext
3598if $ac_preproc_ok; then
3599 :
3600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003601 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003602See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003603echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003604See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003605 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606fi
3607
3608ac_ext=c
3609ac_cpp='$CPP $CPPFLAGS'
3610ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3611ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3612ac_compiler_gnu=$ac_cv_c_compiler_gnu
3613
3614
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003615{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3616echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003618 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003620 # Extract the first word of "grep ggrep" to use in msg output
3621if test -z "$GREP"; then
3622set dummy grep ggrep; ac_prog_name=$2
3623if test "${ac_cv_path_GREP+set}" = set; then
3624 echo $ECHO_N "(cached) $ECHO_C" >&6
3625else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003627# Loop through the user's path and test for each of PROGNAME-LIST
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
3633 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
3635 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3636 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3637 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 # Check for GNU $ac_path_GREP
3639case `"$ac_path_GREP" --version 2>&1` in
3640*GNU*)
3641 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3642*)
3643 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 while :
3646 do
3647 cat "conftest.in" "conftest.in" >"conftest.tmp"
3648 mv "conftest.tmp" "conftest.in"
3649 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003650 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3652 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3653 ac_count=`expr $ac_count + 1`
3654 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3655 # Best one so far, save it but keep looking for a better one
3656 ac_cv_path_GREP="$ac_path_GREP"
3657 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003658 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 # 10*(2^10) chars as input seems more than enough
3660 test $ac_count -gt 10 && break
3661 done
3662 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3663esac
3664
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003665
3666 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667 done
3668done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003669
3670done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003672
3673
3674fi
3675
3676GREP="$ac_cv_path_GREP"
3677if test -z "$GREP"; then
3678 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3679echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681fi
3682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683else
3684 ac_cv_path_GREP=$GREP
3685fi
3686
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003689{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3690echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691 GREP="$ac_cv_path_GREP"
3692
3693
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003694{ echo "$as_me:$LINENO: checking for egrep" >&5
3695echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003697 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698else
3699 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3700 then ac_cv_path_EGREP="$GREP -E"
3701 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003702 # Extract the first word of "egrep" to use in msg output
3703if test -z "$EGREP"; then
3704set dummy egrep; ac_prog_name=$2
3705if test "${ac_cv_path_EGREP+set}" = set; then
3706 echo $ECHO_N "(cached) $ECHO_C" >&6
3707else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003709# Loop through the user's path and test for each of PROGNAME-LIST
3710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3712do
3713 IFS=$as_save_IFS
3714 test -z "$as_dir" && as_dir=.
3715 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003716 for ac_exec_ext in '' $ac_executable_extensions; do
3717 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3718 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3719 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720 # Check for GNU $ac_path_EGREP
3721case `"$ac_path_EGREP" --version 2>&1` in
3722*GNU*)
3723 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3724*)
3725 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 while :
3728 do
3729 cat "conftest.in" "conftest.in" >"conftest.tmp"
3730 mv "conftest.tmp" "conftest.in"
3731 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003732 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3734 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3735 ac_count=`expr $ac_count + 1`
3736 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3737 # Best one so far, save it but keep looking for a better one
3738 ac_cv_path_EGREP="$ac_path_EGREP"
3739 ac_path_EGREP_max=$ac_count
3740 fi
3741 # 10*(2^10) chars as input seems more than enough
3742 test $ac_count -gt 10 && break
3743 done
3744 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3745esac
3746
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003747
3748 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749 done
3750done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003751
3752done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003754
3755
3756fi
3757
3758EGREP="$ac_cv_path_EGREP"
3759if test -z "$EGREP"; then
3760 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3761echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765else
3766 ac_cv_path_EGREP=$EGREP
3767fi
3768
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 fi
3771fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003772{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3773echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003775
3776
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003777
3778{ echo "$as_me:$LINENO: checking for AIX" >&5
3779echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3780cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003781/* confdefs.h. */
3782_ACEOF
3783cat confdefs.h >>conftest.$ac_ext
3784cat >>conftest.$ac_ext <<_ACEOF
3785/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003786#ifdef _AIX
3787 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003788#endif
3789
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003790_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3792 $EGREP "yes" >/dev/null 2>&1; then
3793 { echo "$as_me:$LINENO: result: yes" >&5
3794echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003795cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003796#define _ALL_SOURCE 1
3797_ACEOF
3798
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003799else
3800 { echo "$as_me:$LINENO: result: no" >&5
3801echo "${ECHO_T}no" >&6; }
3802fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00003803rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003804
3805
3806
3807# Check for unsupported systems
3808case $ac_sys_system/$ac_sys_release in
3809atheos*|Linux*/1*)
3810 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3811 echo See README for details.
3812 exit 1;;
3813esac
3814
3815
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003816{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3817echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003818
3819# Check whether --with-suffix was given.
3820if test "${with_suffix+set}" = set; then
3821 withval=$with_suffix;
3822 case $withval in
3823 no) EXEEXT=;;
3824 yes) EXEEXT=.exe;;
3825 *) EXEEXT=$withval;;
3826 esac
3827fi
3828
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003829{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3830echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003831
3832# Test whether we're running on a non-case-sensitive system, in which
3833# case we give a warning if no ext is given
3834
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003835{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3836echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003837if test ! -d CaseSensitiveTestDir; then
3838mkdir CaseSensitiveTestDir
3839fi
3840
3841if test -d casesensitivetestdir
3842then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003843 { echo "$as_me:$LINENO: result: yes" >&5
3844echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003845 BUILDEXEEXT=.exe
3846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003847 { echo "$as_me:$LINENO: result: no" >&5
3848echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003849 BUILDEXEEXT=$EXEEXT
3850fi
3851rmdir CaseSensitiveTestDir
3852
3853case $MACHDEP in
3854bsdos*)
3855 case $CC in
3856 gcc) CC="$CC -D_HAVE_BSDI";;
3857 esac;;
3858esac
3859
3860case $ac_sys_system in
3861hp*|HP*)
3862 case $CC in
3863 cc|*/cc) CC="$CC -Ae";;
3864 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003865SunOS*)
3866 # Some functions have a prototype only with that define, e.g. confstr
3867
3868cat >>confdefs.h <<\_ACEOF
3869#define __EXTENSIONS__ 1
3870_ACEOF
3871
3872 ;;
3873esac
3874
3875
3876
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003877{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3878echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003879if test -z "$LIBRARY"
3880then
3881 LIBRARY='libpython$(VERSION).a'
3882fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003883{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3884echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003885
3886# LDLIBRARY is the name of the library to link against (as opposed to the
3887# name of the library into which to insert object files). BLDLIBRARY is also
3888# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3889# is blank as the main program is not linked directly against LDLIBRARY.
3890# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3891# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3892# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3893# DLLLIBRARY is the shared (i.e., DLL) library.
3894#
3895# RUNSHARED is used to run shared python without installed libraries
3896#
3897# INSTSONAME is the name of the shared library that will be use to install
3898# on the system - some systems like version suffix, others don't
3899
3900
3901
3902
3903
3904
3905LDLIBRARY="$LIBRARY"
3906BLDLIBRARY='$(LDLIBRARY)'
3907INSTSONAME='$(LDLIBRARY)'
3908DLLLIBRARY=''
3909LDLIBRARYDIR=''
3910RUNSHARED=''
3911
3912# LINKCC is the command that links the python executable -- default is $(CC).
3913# If CXX is set, and if it is needed to link a main function that was
3914# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3915# python might then depend on the C++ runtime
3916# This is altered for AIX in order to build the export list before
3917# linking.
3918
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003919{ echo "$as_me:$LINENO: checking LINKCC" >&5
3920echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003921if test -z "$LINKCC"
3922then
3923 LINKCC='$(PURIFY) $(MAINCC)'
3924 case $ac_sys_system in
3925 AIX*)
3926 exp_extra="\"\""
3927 if test $ac_sys_release -ge 5 -o \
3928 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3929 exp_extra="."
3930 fi
3931 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003932 QNX*)
3933 # qcc must be used because the other compilers do not
3934 # support -N.
3935 LINKCC=qcc;;
3936 esac
3937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003938{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3939echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003940
3941# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3942# make sure we default having it set to "no": this is used by
3943# distutils.unixccompiler to know if it should add --enable-new-dtags
3944# to linker command lines, and failing to detect GNU ld simply results
3945# in the same bahaviour as before.
3946
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003947{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3948echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003949ac_prog=ld
3950if test "$GCC" = yes; then
3951 ac_prog=`$CC -print-prog-name=ld`
3952fi
3953case `"$ac_prog" -V 2>&1 < /dev/null` in
3954 *GNU*)
3955 GNULD=yes;;
3956 *)
3957 GNULD=no;;
3958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003959{ echo "$as_me:$LINENO: result: $GNULD" >&5
3960echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003961
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003962{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3963echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003964# Check whether --enable-shared was given.
3965if test "${enable_shared+set}" = set; then
3966 enableval=$enable_shared;
3967fi
3968
3969
3970if test -z "$enable_shared"
3971then
3972 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003973 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003974 enable_shared="yes";;
3975 *)
3976 enable_shared="no";;
3977 esac
3978fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003979{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3980echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003981
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003982{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3983echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003984# Check whether --enable-profiling was given.
3985if test "${enable_profiling+set}" = set; then
3986 enableval=$enable_profiling; ac_save_cc="$CC"
3987 CC="$CC -pg"
3988 if test "$cross_compiling" = yes; then
3989 ac_enable_profiling="no"
3990else
3991 cat >conftest.$ac_ext <<_ACEOF
3992/* confdefs.h. */
3993_ACEOF
3994cat confdefs.h >>conftest.$ac_ext
3995cat >>conftest.$ac_ext <<_ACEOF
3996/* end confdefs.h. */
3997int main() { return 0; }
3998_ACEOF
3999rm -f conftest$ac_exeext
4000if { (ac_try="$ac_link"
4001case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004006 (eval "$ac_link") 2>&5
4007 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4010 { (case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015 (eval "$ac_try") 2>&5
4016 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004018 (exit $ac_status); }; }; then
4019 ac_enable_profiling="yes"
4020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004021 echo "$as_me: program exited with status $ac_status" >&5
4022echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004023sed 's/^/| /' conftest.$ac_ext >&5
4024
4025( exit $ac_status )
4026ac_enable_profiling="no"
4027fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4029fi
4030
4031
4032 CC="$ac_save_cc"
4033fi
4034
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004035{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4036echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004037
4038case "$ac_enable_profiling" in
4039 "yes")
4040 BASECFLAGS="-pg $BASECFLAGS"
4041 LDFLAGS="-pg $LDFLAGS"
4042 ;;
4043esac
4044
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004045{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4046echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004047
4048# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4049# library that we build, but we do not want to link against it (we
4050# will find it with a -framework option). For this reason there is an
4051# extra variable BLDLIBRARY against which Python and the extension
4052# modules are linked, BLDLIBRARY. This is normally the same as
4053# LDLIBRARY, but empty for MacOSX framework builds.
4054if test "$enable_framework"
4055then
4056 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4057 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4058 BLDLIBRARY=''
4059else
4060 BLDLIBRARY='$(LDLIBRARY)'
4061fi
4062
4063# Other platforms follow
4064if test $enable_shared = "yes"; then
4065
4066cat >>confdefs.h <<\_ACEOF
4067#define Py_ENABLE_SHARED 1
4068_ACEOF
4069
4070 case $ac_sys_system in
4071 CYGWIN*)
4072 LDLIBRARY='libpython$(VERSION).dll.a'
4073 DLLLIBRARY='libpython$(VERSION).dll'
4074 ;;
4075 SunOS*)
4076 LDLIBRARY='libpython$(VERSION).so'
4077 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4078 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4079 INSTSONAME="$LDLIBRARY".$SOVERSION
4080 ;;
4081 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4082 LDLIBRARY='libpython$(VERSION).so'
4083 BLDLIBRARY='-L. -lpython$(VERSION)'
4084 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4085 case $ac_sys_system in
4086 FreeBSD*)
4087 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4088 ;;
4089 esac
4090 INSTSONAME="$LDLIBRARY".$SOVERSION
4091 ;;
4092 hp*|HP*)
4093 case `uname -m` in
4094 ia64)
4095 LDLIBRARY='libpython$(VERSION).so'
4096 ;;
4097 *)
4098 LDLIBRARY='libpython$(VERSION).sl'
4099 ;;
4100 esac
4101 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4102 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4103 ;;
4104 OSF*)
4105 LDLIBRARY='libpython$(VERSION).so'
4106 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4107 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4108 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004109 Darwin*)
4110 LDLIBRARY='libpython$(VERSION).dylib'
4111 BLDLIBRARY='-L. -lpython$(VERSION)'
4112 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4113 ;;
4114
4115 esac
4116else # shared is disabled
4117 case $ac_sys_system in
4118 CYGWIN*)
4119 BLDLIBRARY='$(LIBRARY)'
4120 LDLIBRARY='libpython$(VERSION).dll.a'
4121 ;;
4122 esac
4123fi
4124
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004125{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4126echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004127
4128if test -n "$ac_tool_prefix"; then
4129 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4130set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004131{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4132echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004133if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004134 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004135else
4136 if test -n "$RANLIB"; then
4137 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4138else
4139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4140for as_dir in $PATH
4141do
4142 IFS=$as_save_IFS
4143 test -z "$as_dir" && as_dir=.
4144 for ac_exec_ext in '' $ac_executable_extensions; do
4145 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4146 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004147 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004148 break 2
4149 fi
4150done
4151done
4152IFS=$as_save_IFS
4153
4154fi
4155fi
4156RANLIB=$ac_cv_prog_RANLIB
4157if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004158 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4159echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004161 { echo "$as_me:$LINENO: result: no" >&5
4162echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004163fi
4164
4165
4166fi
4167if test -z "$ac_cv_prog_RANLIB"; then
4168 ac_ct_RANLIB=$RANLIB
4169 # Extract the first word of "ranlib", so it can be a program name with args.
4170set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004171{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4172echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004173if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004174 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004175else
4176 if test -n "$ac_ct_RANLIB"; then
4177 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4178else
4179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4180for as_dir in $PATH
4181do
4182 IFS=$as_save_IFS
4183 test -z "$as_dir" && as_dir=.
4184 for ac_exec_ext in '' $ac_executable_extensions; do
4185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4186 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004187 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004188 break 2
4189 fi
4190done
4191done
4192IFS=$as_save_IFS
4193
4194fi
4195fi
4196ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4197if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004198 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4199echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004201 { echo "$as_me:$LINENO: result: no" >&5
4202echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004203fi
4204
4205 if test "x$ac_ct_RANLIB" = x; then
4206 RANLIB=":"
4207 else
4208 case $cross_compiling:$ac_tool_warned in
4209yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004210{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4211whose name does not start with the host triplet. If you think this
4212configuration is useful to you, please write to autoconf@gnu.org." >&5
4213echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4214whose name does not start with the host triplet. If you think this
4215configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004216ac_tool_warned=yes ;;
4217esac
4218 RANLIB=$ac_ct_RANLIB
4219 fi
4220else
4221 RANLIB="$ac_cv_prog_RANLIB"
4222fi
4223
4224
4225for ac_prog in ar aal
4226do
4227 # Extract the first word of "$ac_prog", so it can be a program name with args.
4228set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004229{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4230echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004231if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004232 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233else
4234 if test -n "$AR"; then
4235 ac_cv_prog_AR="$AR" # Let the user override the test.
4236else
4237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4238for as_dir in $PATH
4239do
4240 IFS=$as_save_IFS
4241 test -z "$as_dir" && as_dir=.
4242 for ac_exec_ext in '' $ac_executable_extensions; do
4243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4244 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004246 break 2
4247 fi
4248done
4249done
4250IFS=$as_save_IFS
4251
4252fi
4253fi
4254AR=$ac_cv_prog_AR
4255if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004256 { echo "$as_me:$LINENO: result: $AR" >&5
4257echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004259 { echo "$as_me:$LINENO: result: no" >&5
4260echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004261fi
4262
4263
4264 test -n "$AR" && break
4265done
4266test -n "$AR" || AR="ar"
4267
4268
4269# tweak ARFLAGS only if the user didn't set it on the command line
4270
4271if test -z "$ARFLAGS"
4272then
4273 ARFLAGS="rc"
4274fi
4275
4276
4277# Extract the first word of "svnversion", so it can be a program name with args.
4278set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004281if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004282 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004283else
4284 if test -n "$SVNVERSION"; then
4285 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4286else
4287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4288for as_dir in $PATH
4289do
4290 IFS=$as_save_IFS
4291 test -z "$as_dir" && as_dir=.
4292 for ac_exec_ext in '' $ac_executable_extensions; do
4293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4294 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004296 break 2
4297 fi
4298done
4299done
4300IFS=$as_save_IFS
4301
4302 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4303fi
4304fi
4305SVNVERSION=$ac_cv_prog_SVNVERSION
4306if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004307 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4308echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004310 { echo "$as_me:$LINENO: result: no" >&5
4311echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312fi
4313
4314
4315if test $SVNVERSION = found
4316then
4317 SVNVERSION="svnversion \$(srcdir)"
4318else
4319 SVNVERSION="echo Unversioned directory"
4320fi
4321
4322case $MACHDEP in
4323bsdos*|hp*|HP*)
4324 # install -d does not work on BSDI or HP-UX
4325 if test -z "$INSTALL"
4326 then
4327 INSTALL="${srcdir}/install-sh -c"
4328 fi
4329esac
4330ac_aux_dir=
4331for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4332 if test -f "$ac_dir/install-sh"; then
4333 ac_aux_dir=$ac_dir
4334 ac_install_sh="$ac_aux_dir/install-sh -c"
4335 break
4336 elif test -f "$ac_dir/install.sh"; then
4337 ac_aux_dir=$ac_dir
4338 ac_install_sh="$ac_aux_dir/install.sh -c"
4339 break
4340 elif test -f "$ac_dir/shtool"; then
4341 ac_aux_dir=$ac_dir
4342 ac_install_sh="$ac_aux_dir/shtool install -c"
4343 break
4344 fi
4345done
4346if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004347 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4348echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004349 { (exit 1); exit 1; }; }
4350fi
4351
4352# These three variables are undocumented and unsupported,
4353# and are intended to be withdrawn in a future Autoconf release.
4354# They can cause serious problems if a builder's source tree is in a directory
4355# whose full name contains unusual characters.
4356ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4357ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4358ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4359
4360
4361# Find a good install program. We prefer a C program (faster),
4362# so one script is as good as another. But avoid the broken or
4363# incompatible versions:
4364# SysV /etc/install, /usr/sbin/install
4365# SunOS /usr/etc/install
4366# IRIX /sbin/install
4367# AIX /bin/install
4368# AmigaOS /C/install, which installs bootblocks on floppy discs
4369# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4370# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4371# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4372# OS/2's system install, which has a completely different semantic
4373# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004374{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4375echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004376if test -z "$INSTALL"; then
4377if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004378 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004379else
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
4385 # Account for people who put trailing slashes in PATH elements.
4386case $as_dir/ in
4387 ./ | .// | /cC/* | \
4388 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4389 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4390 /usr/ucb/* ) ;;
4391 *)
4392 # OSF1 and SCO ODT 3.0 have their own names for install.
4393 # Don't use installbsd from OSF since it installs stuff as root
4394 # by default.
4395 for ac_prog in ginstall scoinst install; do
4396 for ac_exec_ext in '' $ac_executable_extensions; do
4397 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4398 if test $ac_prog = install &&
4399 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4400 # AIX install. It has an incompatible calling convention.
4401 :
4402 elif test $ac_prog = install &&
4403 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4404 # program-specific install script used by HP pwplus--don't use.
4405 :
4406 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004407 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4408 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409 fi
4410 fi
4411 done
4412 done
4413 ;;
4414esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004415done
4416IFS=$as_save_IFS
4417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004418
4419fi
4420 if test "${ac_cv_path_install+set}" = set; then
4421 INSTALL=$ac_cv_path_install
4422 else
4423 # As a last resort, use the slow shell script. Don't cache a
4424 # value for INSTALL within a source directory, because that will
4425 # break other packages using the cache if that directory is
4426 # removed, or if the value is a relative name.
4427 INSTALL=$ac_install_sh
4428 fi
4429fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004430{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4431echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004432
4433# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4434# It thinks the first close brace ends the variable substitution.
4435test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4436
4437test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4438
4439test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4440
4441
4442# Not every filesystem supports hard links
4443
4444if test -z "$LN" ; then
4445 case $ac_sys_system in
4446 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004447 *) LN=ln;;
4448 esac
4449fi
4450
4451# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004452{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4453echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004454
4455# Check whether --with-pydebug was given.
4456if test "${with_pydebug+set}" = set; then
4457 withval=$with_pydebug;
4458if test "$withval" != no
4459then
4460
4461cat >>confdefs.h <<\_ACEOF
4462#define Py_DEBUG 1
4463_ACEOF
4464
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004465 { echo "$as_me:$LINENO: result: yes" >&5
4466echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004467 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004468else { echo "$as_me:$LINENO: result: no" >&5
4469echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004470fi
4471else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004472 { echo "$as_me:$LINENO: result: no" >&5
4473echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004474fi
4475
4476
4477# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4478# merged with this chunk of code?
4479
4480# Optimizer/debugger flags
4481# ------------------------
4482# (The following bit of code is complicated enough - please keep things
4483# indented properly. Just pretend you're editing Python code. ;-)
4484
4485# There are two parallel sets of case statements below, one that checks to
4486# see if OPT was set and one that does BASECFLAGS setting based upon
4487# compiler and platform. BASECFLAGS tweaks need to be made even if the
4488# user set OPT.
4489
4490# tweak OPT based on compiler and platform, only if the user didn't set
4491# it on the command line
4492
4493if test -z "$OPT"
4494then
4495 case $GCC in
4496 yes)
4497 if test "$CC" != 'g++' ; then
4498 STRICT_PROTO="-Wstrict-prototypes"
4499 fi
4500 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4501 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4502 WRAP="-fwrapv"
4503 fi
4504 case $ac_cv_prog_cc_g in
4505 yes)
4506 if test "$Py_DEBUG" = 'true' ; then
4507 # Optimization messes up debuggers, so turn it off for
4508 # debug builds.
4509 OPT="-g -Wall $STRICT_PROTO"
4510 else
4511 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4512 fi
4513 ;;
4514 *)
4515 OPT="-O3 -Wall $STRICT_PROTO"
4516 ;;
4517 esac
4518 case $ac_sys_system in
4519 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4520 ;;
4521 esac
4522 ;;
4523
4524 *)
4525 OPT="-O"
4526 ;;
4527 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004528fi
4529
4530
4531
4532# The -arch flags for universal builds on OSX
4533UNIVERSAL_ARCH_FLAGS=
4534
4535
4536# tweak BASECFLAGS based on compiler and platform
4537case $GCC in
4538yes)
4539 # Python violates C99 rules, by casting between incompatible
4540 # pointer types. GCC may generate bad code as a result of that,
4541 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004542 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4543echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004544 ac_save_cc="$CC"
4545 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004546 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004547 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004548else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004549 cat >conftest.$ac_ext <<_ACEOF
4550/* confdefs.h. */
4551_ACEOF
4552cat confdefs.h >>conftest.$ac_ext
4553cat >>conftest.$ac_ext <<_ACEOF
4554/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004555
4556int
4557main ()
4558{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004559int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004560 ;
4561 return 0;
4562}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004563_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004564rm -f conftest.$ac_objext
4565if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566case "(($ac_try" in
4567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4568 *) ac_try_echo=$ac_try;;
4569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004571 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004572 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004573 grep -v '^ *+' conftest.er1 >conftest.err
4574 rm -f conftest.er1
4575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004577 (exit $ac_status); } && {
4578 test -z "$ac_c_werror_flag" ||
4579 test ! -s conftest.err
4580 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004581 ac_cv_no_strict_aliasing_ok=yes
4582else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004583 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004584sed 's/^/| /' conftest.$ac_ext >&5
4585
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004586 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004587fi
4588
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004590fi
4591
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004592 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004593 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4594echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595 if test $ac_cv_no_strict_aliasing_ok = yes
4596 then
4597 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4598 fi
4599
4600 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4601 # support. Without this, treatment of subnormals doesn't follow
4602 # the standard.
4603 case $ac_sys_machine in
4604 alpha*)
4605 BASECFLAGS="$BASECFLAGS -mieee"
4606 ;;
4607 esac
4608
4609 case $ac_sys_system in
4610 SCO_SV*)
4611 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4612 ;;
4613 # is there any other compiler on Darwin besides gcc?
4614 Darwin*)
4615 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4616 # used to be here, but non-Apple gcc doesn't accept them.
4617
4618
4619 if test "${enable_universalsdk}"; then
4620 UNIVERSAL_ARCH_FLAGS=""
4621 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4622 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4623 ARCH_RUN_32BIT=""
4624
4625 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4626 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004627 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628
4629 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4630 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4631 ARCH_RUN_32BIT="arch -i386 -ppc"
4632
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004633 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4634 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4635 ARCH_RUN_32BIT="arch -i386"
4636
4637 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4638 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4639 ARCH_RUN_32BIT="arch -i386 -ppc"
4640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004642 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4643echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004644 { (exit 1); exit 1; }; }
4645
4646 fi
4647
4648
4649 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4650 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4651 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4652 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4653 fi
4654 fi
4655
4656 # Calculate the right deployment target for this build.
4657 #
4658 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4659 if test ${cur_target} '>' 10.2; then
4660 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004661 if test ${enable_universalsdk}; then
4662 if test "${UNIVERSAL_ARCHS}" = "all"; then
4663 # Ensure that the default platform for a
4664 # 4-way universal build is OSX 10.5,
4665 # that's the first OS release where
4666 # 4-way builds make sense.
4667 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004668
4669 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4670 cur_target='10.5'
4671
4672 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4673 cur_target='10.5'
4674
4675 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4676 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004677 fi
4678 else
4679 if test `arch` = "i386"; then
4680 # On Intel macs default to a deployment
4681 # target of 10.4, that's the first OSX
4682 # release with Intel support.
4683 cur_target="10.4"
4684 fi
4685 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686 fi
4687 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4688
4689 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4690 # environment with a value that is the same as what we'll use
4691 # in the Makefile to ensure that we'll get the same compiler
4692 # environment during configure and build time.
4693 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4694 export MACOSX_DEPLOYMENT_TARGET
4695 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4696
4697 ;;
4698 OSF*)
4699 BASECFLAGS="$BASECFLAGS -mieee"
4700 ;;
4701 esac
4702 ;;
4703
4704*)
4705 case $ac_sys_system in
4706 OpenUNIX*|UnixWare*)
4707 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4708 ;;
4709 OSF*)
4710 BASECFLAGS="$BASECFLAGS -ieee -std"
4711 ;;
4712 SCO_SV*)
4713 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4714 ;;
4715 esac
4716 ;;
4717esac
4718
4719if test "$Py_DEBUG" = 'true'; then
4720 :
4721else
4722 OPT="-DNDEBUG $OPT"
4723fi
4724
4725if test "$ac_arch_flags"
4726then
4727 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4728fi
4729
4730# disable check for icc since it seems to pass, but generates a warning
4731if test "$CC" = icc
4732then
4733 ac_cv_opt_olimit_ok=no
4734fi
4735
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004736{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4737echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004739 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740else
4741 ac_save_cc="$CC"
4742CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004743cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744/* confdefs.h. */
4745_ACEOF
4746cat confdefs.h >>conftest.$ac_ext
4747cat >>conftest.$ac_ext <<_ACEOF
4748/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004749
4750int
4751main ()
4752{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004754 ;
4755 return 0;
4756}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004758rm -f conftest.$ac_objext
4759if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760case "(($ac_try" in
4761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4762 *) ac_try_echo=$ac_try;;
4763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004765 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004766 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004767 grep -v '^ *+' conftest.er1 >conftest.err
4768 rm -f conftest.er1
4769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004771 (exit $ac_status); } && {
4772 test -z "$ac_c_werror_flag" ||
4773 test ! -s conftest.err
4774 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775 ac_cv_opt_olimit_ok=yes
4776else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004777 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004778sed 's/^/| /' conftest.$ac_ext >&5
4779
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004780 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781fi
4782
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004784CC="$ac_save_cc"
4785fi
4786
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004787{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4788echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789if test $ac_cv_opt_olimit_ok = yes; then
4790 case $ac_sys_system in
4791 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4792 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4793 # environment?
4794 Darwin*)
4795 ;;
4796 *)
4797 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4798 ;;
4799 esac
4800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004801 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4802echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004804 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805else
4806 ac_save_cc="$CC"
4807 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808 cat >conftest.$ac_ext <<_ACEOF
4809/* confdefs.h. */
4810_ACEOF
4811cat confdefs.h >>conftest.$ac_ext
4812cat >>conftest.$ac_ext <<_ACEOF
4813/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004814
4815int
4816main ()
4817{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004818int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004819 ;
4820 return 0;
4821}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004823rm -f conftest.$ac_objext
4824if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004825case "(($ac_try" in
4826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4827 *) ac_try_echo=$ac_try;;
4828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004830 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004831 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004832 grep -v '^ *+' conftest.er1 >conftest.err
4833 rm -f conftest.er1
4834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004836 (exit $ac_status); } && {
4837 test -z "$ac_c_werror_flag" ||
4838 test ! -s conftest.err
4839 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840 ac_cv_olimit_ok=yes
4841else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004842 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843sed 's/^/| /' conftest.$ac_ext >&5
4844
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004845 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004846fi
4847
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849 CC="$ac_save_cc"
4850fi
4851
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004852 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4853echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854 if test $ac_cv_olimit_ok = yes; then
4855 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4856 fi
4857fi
4858
4859# Check whether GCC supports PyArg_ParseTuple format
4860if test "$GCC" = "yes"
4861then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004862 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4863echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864 save_CFLAGS=$CFLAGS
4865 CFLAGS="$CFLAGS -Werror"
4866 cat >conftest.$ac_ext <<_ACEOF
4867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
4872
4873 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4874
4875int
4876main ()
4877{
4878
4879 ;
4880 return 0;
4881}
4882_ACEOF
4883rm -f conftest.$ac_objext
4884if { (ac_try="$ac_compile"
4885case "(($ac_try" in
4886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4887 *) ac_try_echo=$ac_try;;
4888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890 (eval "$ac_compile") 2>conftest.er1
4891 ac_status=$?
4892 grep -v '^ *+' conftest.er1 >conftest.err
4893 rm -f conftest.er1
4894 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896 (exit $ac_status); } && {
4897 test -z "$ac_c_werror_flag" ||
4898 test ! -s conftest.err
4899 } && test -s conftest.$ac_objext; then
4900
4901cat >>confdefs.h <<\_ACEOF
4902#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4903_ACEOF
4904
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004905 { echo "$as_me:$LINENO: result: yes" >&5
4906echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004908 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909sed 's/^/| /' conftest.$ac_ext >&5
4910
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004911 { echo "$as_me:$LINENO: result: no" >&5
4912echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913
4914fi
4915
4916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4917 CFLAGS=$save_CFLAGS
4918fi
4919
4920# On some compilers, pthreads are available without further options
4921# (e.g. MacOS X). On some of these systems, the compiler will not
4922# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4923# So we have to see first whether pthreads are available without
4924# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004925{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4926echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004928 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929else
4930 if test "$cross_compiling" = yes; then
4931 ac_cv_pthread_is_default=no
4932else
4933 cat >conftest.$ac_ext <<_ACEOF
4934/* confdefs.h. */
4935_ACEOF
4936cat confdefs.h >>conftest.$ac_ext
4937cat >>conftest.$ac_ext <<_ACEOF
4938/* end confdefs.h. */
4939
4940#include <pthread.h>
4941
4942void* routine(void* p){return NULL;}
4943
4944int main(){
4945 pthread_t p;
4946 if(pthread_create(&p,NULL,routine,NULL)!=0)
4947 return 1;
4948 (void)pthread_detach(p);
4949 return 0;
4950}
4951
4952_ACEOF
4953rm -f conftest$ac_exeext
4954if { (ac_try="$ac_link"
4955case "(($ac_try" in
4956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4957 *) ac_try_echo=$ac_try;;
4958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 (eval "$ac_link") 2>&5
4961 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4964 { (case "(($ac_try" in
4965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4966 *) ac_try_echo=$ac_try;;
4967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969 (eval "$ac_try") 2>&5
4970 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 (exit $ac_status); }; }; then
4973
4974 ac_cv_pthread_is_default=yes
4975 ac_cv_kthread=no
4976 ac_cv_pthread=no
4977
4978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004979 echo "$as_me: program exited with status $ac_status" >&5
4980echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981sed 's/^/| /' conftest.$ac_ext >&5
4982
4983( exit $ac_status )
4984ac_cv_pthread_is_default=no
4985fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4987fi
4988
4989
4990
4991fi
4992
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004993{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4994echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995
4996
4997if test $ac_cv_pthread_is_default = yes
4998then
4999 ac_cv_kpthread=no
5000else
5001# -Kpthread, if available, provides the right #defines
5002# and linker options to make pthread_create available
5003# Some compilers won't report that they do not support -Kpthread,
5004# so we need to run a program to see whether it really made the
5005# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005006{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5007echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005009 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010else
5011 ac_save_cc="$CC"
5012CC="$CC -Kpthread"
5013if test "$cross_compiling" = yes; then
5014 ac_cv_kpthread=no
5015else
5016 cat >conftest.$ac_ext <<_ACEOF
5017/* confdefs.h. */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h. */
5022
5023#include <pthread.h>
5024
5025void* routine(void* p){return NULL;}
5026
5027int main(){
5028 pthread_t p;
5029 if(pthread_create(&p,NULL,routine,NULL)!=0)
5030 return 1;
5031 (void)pthread_detach(p);
5032 return 0;
5033}
5034
5035_ACEOF
5036rm -f conftest$ac_exeext
5037if { (ac_try="$ac_link"
5038case "(($ac_try" in
5039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5040 *) ac_try_echo=$ac_try;;
5041esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 (eval "$ac_link") 2>&5
5044 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5047 { (case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052 (eval "$ac_try") 2>&5
5053 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 (exit $ac_status); }; }; then
5056 ac_cv_kpthread=yes
5057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005058 echo "$as_me: program exited with status $ac_status" >&5
5059echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060sed 's/^/| /' conftest.$ac_ext >&5
5061
5062( exit $ac_status )
5063ac_cv_kpthread=no
5064fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5066fi
5067
5068
5069CC="$ac_save_cc"
5070fi
5071
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005072{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5073echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074fi
5075
5076if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5077then
5078# -Kthread, if available, provides the right #defines
5079# and linker options to make pthread_create available
5080# Some compilers won't report that they do not support -Kthread,
5081# so we need to run a program to see whether it really made the
5082# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005083{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5084echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005085if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005086 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087else
5088 ac_save_cc="$CC"
5089CC="$CC -Kthread"
5090if test "$cross_compiling" = yes; then
5091 ac_cv_kthread=no
5092else
5093 cat >conftest.$ac_ext <<_ACEOF
5094/* confdefs.h. */
5095_ACEOF
5096cat confdefs.h >>conftest.$ac_ext
5097cat >>conftest.$ac_ext <<_ACEOF
5098/* end confdefs.h. */
5099
5100#include <pthread.h>
5101
5102void* routine(void* p){return NULL;}
5103
5104int main(){
5105 pthread_t p;
5106 if(pthread_create(&p,NULL,routine,NULL)!=0)
5107 return 1;
5108 (void)pthread_detach(p);
5109 return 0;
5110}
5111
5112_ACEOF
5113rm -f conftest$ac_exeext
5114if { (ac_try="$ac_link"
5115case "(($ac_try" in
5116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5117 *) ac_try_echo=$ac_try;;
5118esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 (eval "$ac_link") 2>&5
5121 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5124 { (case "(($ac_try" in
5125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126 *) ac_try_echo=$ac_try;;
5127esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 (eval "$ac_try") 2>&5
5130 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 (exit $ac_status); }; }; then
5133 ac_cv_kthread=yes
5134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005135 echo "$as_me: program exited with status $ac_status" >&5
5136echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137sed 's/^/| /' conftest.$ac_ext >&5
5138
5139( exit $ac_status )
5140ac_cv_kthread=no
5141fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5143fi
5144
5145
5146CC="$ac_save_cc"
5147fi
5148
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005149{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5150echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151fi
5152
5153if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5154then
5155# -pthread, if available, provides the right #defines
5156# and linker options to make pthread_create available
5157# Some compilers won't report that they do not support -pthread,
5158# so we need to run a program to see whether it really made the
5159# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005160{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5161echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005162if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005163 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005164else
5165 ac_save_cc="$CC"
5166CC="$CC -pthread"
5167if test "$cross_compiling" = yes; then
5168 ac_cv_pthread=no
5169else
5170 cat >conftest.$ac_ext <<_ACEOF
5171/* confdefs.h. */
5172_ACEOF
5173cat confdefs.h >>conftest.$ac_ext
5174cat >>conftest.$ac_ext <<_ACEOF
5175/* end confdefs.h. */
5176
5177#include <pthread.h>
5178
5179void* routine(void* p){return NULL;}
5180
5181int main(){
5182 pthread_t p;
5183 if(pthread_create(&p,NULL,routine,NULL)!=0)
5184 return 1;
5185 (void)pthread_detach(p);
5186 return 0;
5187}
5188
5189_ACEOF
5190rm -f conftest$ac_exeext
5191if { (ac_try="$ac_link"
5192case "(($ac_try" in
5193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5194 *) ac_try_echo=$ac_try;;
5195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 (eval "$ac_link") 2>&5
5198 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5201 { (case "(($ac_try" in
5202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5203 *) ac_try_echo=$ac_try;;
5204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 (eval "$ac_try") 2>&5
5207 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209 (exit $ac_status); }; }; then
5210 ac_cv_pthread=yes
5211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005212 echo "$as_me: program exited with status $ac_status" >&5
5213echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005214sed 's/^/| /' conftest.$ac_ext >&5
5215
5216( exit $ac_status )
5217ac_cv_pthread=no
5218fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5220fi
5221
5222
5223CC="$ac_save_cc"
5224fi
5225
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005226{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5227echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228fi
5229
5230# If we have set a CC compiler flag for thread support then
5231# check if it works for CXX, too.
5232ac_cv_cxx_thread=no
5233if test ! -z "$CXX"
5234then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005235{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5236echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237ac_save_cxx="$CXX"
5238
5239if test "$ac_cv_kpthread" = "yes"
5240then
5241 CXX="$CXX -Kpthread"
5242 ac_cv_cxx_thread=yes
5243elif test "$ac_cv_kthread" = "yes"
5244then
5245 CXX="$CXX -Kthread"
5246 ac_cv_cxx_thread=yes
5247elif test "$ac_cv_pthread" = "yes"
5248then
5249 CXX="$CXX -pthread"
5250 ac_cv_cxx_thread=yes
5251fi
5252
5253if test $ac_cv_cxx_thread = yes
5254then
5255 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5256 $CXX -c conftest.$ac_ext 2>&5
5257 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5258 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5259 then
5260 ac_cv_cxx_thread=yes
5261 else
5262 ac_cv_cxx_thread=no
5263 fi
5264 rm -fr conftest*
5265fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005266{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5267echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268fi
5269CXX="$ac_save_cxx"
5270
5271
5272# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005273{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5274echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005276 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005277else
5278 cat >conftest.$ac_ext <<_ACEOF
5279/* confdefs.h. */
5280_ACEOF
5281cat confdefs.h >>conftest.$ac_ext
5282cat >>conftest.$ac_ext <<_ACEOF
5283/* end confdefs.h. */
5284#include <stdlib.h>
5285#include <stdarg.h>
5286#include <string.h>
5287#include <float.h>
5288
5289int
5290main ()
5291{
5292
5293 ;
5294 return 0;
5295}
5296_ACEOF
5297rm -f conftest.$ac_objext
5298if { (ac_try="$ac_compile"
5299case "(($ac_try" in
5300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5301 *) ac_try_echo=$ac_try;;
5302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304 (eval "$ac_compile") 2>conftest.er1
5305 ac_status=$?
5306 grep -v '^ *+' conftest.er1 >conftest.err
5307 rm -f conftest.er1
5308 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 (exit $ac_status); } && {
5311 test -z "$ac_c_werror_flag" ||
5312 test ! -s conftest.err
5313 } && test -s conftest.$ac_objext; then
5314 ac_cv_header_stdc=yes
5315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005316 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317sed 's/^/| /' conftest.$ac_ext >&5
5318
5319 ac_cv_header_stdc=no
5320fi
5321
5322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5323
5324if test $ac_cv_header_stdc = yes; then
5325 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5326 cat >conftest.$ac_ext <<_ACEOF
5327/* confdefs.h. */
5328_ACEOF
5329cat confdefs.h >>conftest.$ac_ext
5330cat >>conftest.$ac_ext <<_ACEOF
5331/* end confdefs.h. */
5332#include <string.h>
5333
5334_ACEOF
5335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5336 $EGREP "memchr" >/dev/null 2>&1; then
5337 :
5338else
5339 ac_cv_header_stdc=no
5340fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00005341rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342
5343fi
5344
5345if test $ac_cv_header_stdc = yes; then
5346 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5347 cat >conftest.$ac_ext <<_ACEOF
5348/* confdefs.h. */
5349_ACEOF
5350cat confdefs.h >>conftest.$ac_ext
5351cat >>conftest.$ac_ext <<_ACEOF
5352/* end confdefs.h. */
5353#include <stdlib.h>
5354
5355_ACEOF
5356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5357 $EGREP "free" >/dev/null 2>&1; then
5358 :
5359else
5360 ac_cv_header_stdc=no
5361fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00005362rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364fi
5365
5366if test $ac_cv_header_stdc = yes; then
5367 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5368 if test "$cross_compiling" = yes; then
5369 :
5370else
5371 cat >conftest.$ac_ext <<_ACEOF
5372/* confdefs.h. */
5373_ACEOF
5374cat confdefs.h >>conftest.$ac_ext
5375cat >>conftest.$ac_ext <<_ACEOF
5376/* end confdefs.h. */
5377#include <ctype.h>
5378#include <stdlib.h>
5379#if ((' ' & 0x0FF) == 0x020)
5380# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5381# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5382#else
5383# define ISLOWER(c) \
5384 (('a' <= (c) && (c) <= 'i') \
5385 || ('j' <= (c) && (c) <= 'r') \
5386 || ('s' <= (c) && (c) <= 'z'))
5387# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5388#endif
5389
5390#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5391int
5392main ()
5393{
5394 int i;
5395 for (i = 0; i < 256; i++)
5396 if (XOR (islower (i), ISLOWER (i))
5397 || toupper (i) != TOUPPER (i))
5398 return 2;
5399 return 0;
5400}
5401_ACEOF
5402rm -f conftest$ac_exeext
5403if { (ac_try="$ac_link"
5404case "(($ac_try" in
5405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5406 *) ac_try_echo=$ac_try;;
5407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409 (eval "$ac_link") 2>&5
5410 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5413 { (case "(($ac_try" in
5414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5415 *) ac_try_echo=$ac_try;;
5416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418 (eval "$ac_try") 2>&5
5419 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421 (exit $ac_status); }; }; then
5422 :
5423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005424 echo "$as_me: program exited with status $ac_status" >&5
5425echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426sed 's/^/| /' conftest.$ac_ext >&5
5427
5428( exit $ac_status )
5429ac_cv_header_stdc=no
5430fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5432fi
5433
5434
5435fi
5436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005437{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5438echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439if test $ac_cv_header_stdc = yes; then
5440
5441cat >>confdefs.h <<\_ACEOF
5442#define STDC_HEADERS 1
5443_ACEOF
5444
5445fi
5446
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005447# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5458 inttypes.h stdint.h unistd.h
5459do
5460as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5461{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5462echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5463if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5464 echo $ECHO_N "(cached) $ECHO_C" >&6
5465else
5466 cat >conftest.$ac_ext <<_ACEOF
5467/* confdefs.h. */
5468_ACEOF
5469cat confdefs.h >>conftest.$ac_ext
5470cat >>conftest.$ac_ext <<_ACEOF
5471/* end confdefs.h. */
5472$ac_includes_default
5473
5474#include <$ac_header>
5475_ACEOF
5476rm -f conftest.$ac_objext
5477if { (ac_try="$ac_compile"
5478case "(($ac_try" in
5479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5480 *) ac_try_echo=$ac_try;;
5481esac
5482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5483 (eval "$ac_compile") 2>conftest.er1
5484 ac_status=$?
5485 grep -v '^ *+' conftest.er1 >conftest.err
5486 rm -f conftest.er1
5487 cat conftest.err >&5
5488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489 (exit $ac_status); } && {
5490 test -z "$ac_c_werror_flag" ||
5491 test ! -s conftest.err
5492 } && test -s conftest.$ac_objext; then
5493 eval "$as_ac_Header=yes"
5494else
5495 echo "$as_me: failed program was:" >&5
5496sed 's/^/| /' conftest.$ac_ext >&5
5497
5498 eval "$as_ac_Header=no"
5499fi
5500
5501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5502fi
5503ac_res=`eval echo '${'$as_ac_Header'}'`
5504 { echo "$as_me:$LINENO: result: $ac_res" >&5
5505echo "${ECHO_T}$ac_res" >&6; }
5506if test `eval echo '${'$as_ac_Header'}'` = yes; then
5507 cat >>confdefs.h <<_ACEOF
5508#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5509_ACEOF
5510
5511fi
5512
5513done
5514
5515
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516
Martin v. Löwis11437992002-04-12 09:54:03 +00005517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
Anthony Baxter8a560de2004-10-13 15:30:56 +00005552
Martin v. Löwisc3001752005-01-23 09:27:24 +00005553
Martin v. Löwis11017b12006-01-14 18:12:57 +00005554
Thomas Wouters477c8d52006-05-27 19:21:47 +00005555
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005556
5557
5558
5559
5560
5561
5562
5563
Thomas Wouters89f507f2006-12-13 04:49:30 +00005564
Christian Heimes043d6f62008-01-07 17:19:16 +00005565
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005566
5567
Christian Heimesbbe741d2008-03-28 10:53:29 +00005568
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005569
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005570for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5571fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005572ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005573shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005574unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005575sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5576sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005577sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005578sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005579sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005580sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005581bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005582do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005583as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005584if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005585 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5586echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005587if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005588 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005589fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005590ac_res=`eval echo '${'$as_ac_Header'}'`
5591 { echo "$as_me:$LINENO: result: $ac_res" >&5
5592echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005593else
Martin v. Löwis11437992002-04-12 09:54:03 +00005594 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005595{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5596echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005598/* confdefs.h. */
5599_ACEOF
5600cat confdefs.h >>conftest.$ac_ext
5601cat >>conftest.$ac_ext <<_ACEOF
5602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005603$ac_includes_default
5604#include <$ac_header>
5605_ACEOF
5606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005607if { (ac_try="$ac_compile"
5608case "(($ac_try" in
5609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5610 *) ac_try_echo=$ac_try;;
5611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005615 grep -v '^ *+' conftest.er1 >conftest.err
5616 rm -f conftest.er1
5617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005619 (exit $ac_status); } && {
5620 test -z "$ac_c_werror_flag" ||
5621 test ! -s conftest.err
5622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005623 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005626sed 's/^/| /' conftest.$ac_ext >&5
5627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005628 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005630
5631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005632{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5633echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005634
5635# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005636{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5637echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005639/* confdefs.h. */
5640_ACEOF
5641cat confdefs.h >>conftest.$ac_ext
5642cat >>conftest.$ac_ext <<_ACEOF
5643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005644#include <$ac_header>
5645_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005646if { (ac_try="$ac_cpp conftest.$ac_ext"
5647case "(($ac_try" in
5648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5649 *) ac_try_echo=$ac_try;;
5650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005652 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005654 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005655 rm -f conftest.er1
5656 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005658 (exit $ac_status); } >/dev/null && {
5659 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5660 test ! -s conftest.err
5661 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 ac_header_preproc=yes
5663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005665sed 's/^/| /' conftest.$ac_ext >&5
5666
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005669
Martin v. Löwis11437992002-04-12 09:54:03 +00005670rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005671{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5672echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005673
5674# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005675case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5676 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005677 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5678echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5679 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5680echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005681 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005682 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005683 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005684 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5685echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5686 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5687echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5688 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5689echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5690 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5691echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5692 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5693echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5694 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5695echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005696 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005697## -------------------------------------- ##
5698## Report this to http://bugs.python.org/ ##
5699## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005700_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005701 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005702 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005704{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5705echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005706if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005707 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005708else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005709 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005710fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005711ac_res=`eval echo '${'$as_ac_Header'}'`
5712 { echo "$as_me:$LINENO: result: $ac_res" >&5
5713echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005714
5715fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005716if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005717 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005718#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005719_ACEOF
5720
5721fi
5722
Guido van Rossum627b2d71993-12-24 10:39:16 +00005723done
5724
Martin v. Löwis11437992002-04-12 09:54:03 +00005725
5726
5727
5728
5729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005730ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005731for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005732 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5733{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5734echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005735if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005737else
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005739/* confdefs.h. */
5740_ACEOF
5741cat confdefs.h >>conftest.$ac_ext
5742cat >>conftest.$ac_ext <<_ACEOF
5743/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005744#include <sys/types.h>
5745#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005746
Martin v. Löwis11437992002-04-12 09:54:03 +00005747int
5748main ()
5749{
5750if ((DIR *) 0)
5751return 0;
5752 ;
5753 return 0;
5754}
5755_ACEOF
5756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005757if { (ac_try="$ac_compile"
5758case "(($ac_try" in
5759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5760 *) ac_try_echo=$ac_try;;
5761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005765 grep -v '^ *+' conftest.er1 >conftest.err
5766 rm -f conftest.er1
5767 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005769 (exit $ac_status); } && {
5770 test -z "$ac_c_werror_flag" ||
5771 test ! -s conftest.err
5772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005773 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005774else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005776sed 's/^/| /' conftest.$ac_ext >&5
5777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005778 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005780
5781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005782fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005783ac_res=`eval echo '${'$as_ac_Header'}'`
5784 { echo "$as_me:$LINENO: result: $ac_res" >&5
5785echo "${ECHO_T}$ac_res" >&6; }
5786if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005788#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005789_ACEOF
5790
5791ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005794done
5795# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5796if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005797 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5798echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005799if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801else
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005804/* confdefs.h. */
5805_ACEOF
5806cat confdefs.h >>conftest.$ac_ext
5807cat >>conftest.$ac_ext <<_ACEOF
5808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005810/* Override any GCC internal prototype to avoid an error.
5811 Use char because int might match the return type of a GCC
5812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005813#ifdef __cplusplus
5814extern "C"
5815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005816char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005817int
5818main ()
5819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005820return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005821 ;
5822 return 0;
5823}
5824_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005825for ac_lib in '' dir; do
5826 if test -z "$ac_lib"; then
5827 ac_res="none required"
5828 else
5829 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005831 fi
5832 rm -f conftest.$ac_objext conftest$ac_exeext
5833if { (ac_try="$ac_link"
5834case "(($ac_try" in
5835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5836 *) ac_try_echo=$ac_try;;
5837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005839 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005840 ac_status=$?
5841 grep -v '^ *+' conftest.er1 >conftest.err
5842 rm -f conftest.er1
5843 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005845 (exit $ac_status); } && {
5846 test -z "$ac_c_werror_flag" ||
5847 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005848 } && test -s conftest$ac_exeext &&
5849 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005850 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005852 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005853sed 's/^/| /' conftest.$ac_ext >&5
5854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005855
Thomas Wouters477c8d52006-05-27 19:21:47 +00005856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857
5858rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5859 conftest$ac_exeext
5860 if test "${ac_cv_search_opendir+set}" = set; then
5861 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005863done
5864if test "${ac_cv_search_opendir+set}" = set; then
5865 :
5866else
5867 ac_cv_search_opendir=no
5868fi
5869rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005870LIBS=$ac_func_search_save_LIBS
5871fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005872{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5873echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005874ac_res=$ac_cv_search_opendir
5875if test "$ac_res" != no; then
5876 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005879
Michael W. Hudson54241132001-12-07 15:38:26 +00005880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005881 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5882echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005883if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005884 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005885else
5886 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005888/* confdefs.h. */
5889_ACEOF
5890cat confdefs.h >>conftest.$ac_ext
5891cat >>conftest.$ac_ext <<_ACEOF
5892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005894/* Override any GCC internal prototype to avoid an error.
5895 Use char because int might match the return type of a GCC
5896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005897#ifdef __cplusplus
5898extern "C"
5899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005900char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005901int
5902main ()
5903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005904return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005905 ;
5906 return 0;
5907}
5908_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005909for ac_lib in '' x; do
5910 if test -z "$ac_lib"; then
5911 ac_res="none required"
5912 else
5913 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005915 fi
5916 rm -f conftest.$ac_objext conftest$ac_exeext
5917if { (ac_try="$ac_link"
5918case "(($ac_try" in
5919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5920 *) ac_try_echo=$ac_try;;
5921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005923 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005924 ac_status=$?
5925 grep -v '^ *+' conftest.er1 >conftest.err
5926 rm -f conftest.er1
5927 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005929 (exit $ac_status); } && {
5930 test -z "$ac_c_werror_flag" ||
5931 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005932 } && test -s conftest$ac_exeext &&
5933 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005934 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005936 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005937sed 's/^/| /' conftest.$ac_ext >&5
5938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005939
Thomas Wouters477c8d52006-05-27 19:21:47 +00005940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005941
5942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5943 conftest$ac_exeext
5944 if test "${ac_cv_search_opendir+set}" = set; then
5945 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005947done
5948if test "${ac_cv_search_opendir+set}" = set; then
5949 :
5950else
5951 ac_cv_search_opendir=no
5952fi
5953rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005954LIBS=$ac_func_search_save_LIBS
5955fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005956{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5957echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005958ac_res=$ac_cv_search_opendir
5959if test "$ac_res" != no; then
5960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005961
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962fi
5963
5964fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005965
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005966{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5967echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005968if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005970else
5971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005972/* confdefs.h. */
5973_ACEOF
5974cat confdefs.h >>conftest.$ac_ext
5975cat >>conftest.$ac_ext <<_ACEOF
5976/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978int
5979main ()
5980{
5981return makedev(0, 0);
5982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005987if { (ac_try="$ac_link"
5988case "(($ac_try" in
5989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990 *) ac_try_echo=$ac_try;;
5991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005995 grep -v '^ *+' conftest.er1 >conftest.err
5996 rm -f conftest.er1
5997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005999 (exit $ac_status); } && {
6000 test -z "$ac_c_werror_flag" ||
6001 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006002 } && test -s conftest$ac_exeext &&
6003 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006004 ac_cv_header_sys_types_h_makedev=yes
6005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006007sed 's/^/| /' conftest.$ac_ext >&5
6008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006009 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011
6012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006013 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006014
6015fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006016{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6017echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006018
6019if test $ac_cv_header_sys_types_h_makedev = no; then
6020if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006021 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6022echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006024 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006026{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6027echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006028else
6029 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006030{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6031echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006033/* confdefs.h. */
6034_ACEOF
6035cat confdefs.h >>conftest.$ac_ext
6036cat >>conftest.$ac_ext <<_ACEOF
6037/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038$ac_includes_default
6039#include <sys/mkdev.h>
6040_ACEOF
6041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006042if { (ac_try="$ac_compile"
6043case "(($ac_try" in
6044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6045 *) ac_try_echo=$ac_try;;
6046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006050 grep -v '^ *+' conftest.er1 >conftest.err
6051 rm -f conftest.er1
6052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006054 (exit $ac_status); } && {
6055 test -z "$ac_c_werror_flag" ||
6056 test ! -s conftest.err
6057 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058 ac_header_compiler=yes
6059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006061sed 's/^/| /' conftest.$ac_ext >&5
6062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006063 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065
6066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006067{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6068echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069
6070# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006071{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6072echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006074/* confdefs.h. */
6075_ACEOF
6076cat confdefs.h >>conftest.$ac_ext
6077cat >>conftest.$ac_ext <<_ACEOF
6078/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079#include <sys/mkdev.h>
6080_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081if { (ac_try="$ac_cpp conftest.$ac_ext"
6082case "(($ac_try" in
6083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6084 *) ac_try_echo=$ac_try;;
6085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006089 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090 rm -f conftest.er1
6091 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093 (exit $ac_status); } >/dev/null && {
6094 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6095 test ! -s conftest.err
6096 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 ac_header_preproc=yes
6098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006100sed 's/^/| /' conftest.$ac_ext >&5
6101
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102 ac_header_preproc=no
6103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006104
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006106{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6107echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108
6109# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006110case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6111 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006112 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6113echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6114 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6115echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006116 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006117 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006118 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006119 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6120echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6121 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6122echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6123 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6124echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6125 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6126echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6127 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6128echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006132## -------------------------------------- ##
6133## Report this to http://bugs.python.org/ ##
6134## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006135_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006137 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006139{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6140echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006142 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143else
6144 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6145fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006146{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6147echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148
6149fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006150if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151
6152cat >>confdefs.h <<\_ACEOF
6153#define MAJOR_IN_MKDEV 1
6154_ACEOF
6155
6156fi
6157
6158
6159
6160 if test $ac_cv_header_sys_mkdev_h = no; then
6161 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006162 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6163echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006165 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006167{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6168echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169else
6170 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006171{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6172echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006174/* confdefs.h. */
6175_ACEOF
6176cat confdefs.h >>conftest.$ac_ext
6177cat >>conftest.$ac_ext <<_ACEOF
6178/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179$ac_includes_default
6180#include <sys/sysmacros.h>
6181_ACEOF
6182rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183if { (ac_try="$ac_compile"
6184case "(($ac_try" in
6185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6186 *) ac_try_echo=$ac_try;;
6187esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006191 grep -v '^ *+' conftest.er1 >conftest.err
6192 rm -f conftest.er1
6193 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195 (exit $ac_status); } && {
6196 test -z "$ac_c_werror_flag" ||
6197 test ! -s conftest.err
6198 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199 ac_header_compiler=yes
6200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006202sed 's/^/| /' conftest.$ac_ext >&5
6203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206
6207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006208{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6209echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210
6211# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006212{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6213echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006215/* confdefs.h. */
6216_ACEOF
6217cat confdefs.h >>conftest.$ac_ext
6218cat >>conftest.$ac_ext <<_ACEOF
6219/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220#include <sys/sysmacros.h>
6221_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006222if { (ac_try="$ac_cpp conftest.$ac_ext"
6223case "(($ac_try" in
6224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6225 *) ac_try_echo=$ac_try;;
6226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006230 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231 rm -f conftest.er1
6232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 (exit $ac_status); } >/dev/null && {
6235 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6236 test ! -s conftest.err
6237 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238 ac_header_preproc=yes
6239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006241sed 's/^/| /' conftest.$ac_ext >&5
6242
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243 ac_header_preproc=no
6244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006245
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006247{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6248echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249
6250# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006251case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6252 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006253 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6254echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6255 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6256echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006257 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006258 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006259 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006260 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6261echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6262 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6263echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6264 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6265echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6266 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6267echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6268 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6269echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006273## -------------------------------------- ##
6274## Report this to http://bugs.python.org/ ##
6275## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006276_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006277 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006278 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006280{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6281echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284else
6285 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6286fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006287{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6288echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289
6290fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006291if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293cat >>confdefs.h <<\_ACEOF
6294#define MAJOR_IN_SYSMACROS 1
6295_ACEOF
6296
6297fi
6298
6299
6300 fi
6301fi
6302
Michael W. Hudson54241132001-12-07 15:38:26 +00006303
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006304# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006305
6306for ac_header in term.h
6307do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006308as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6309{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6310echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006311if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006312 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313else
6314 cat >conftest.$ac_ext <<_ACEOF
6315/* confdefs.h. */
6316_ACEOF
6317cat confdefs.h >>conftest.$ac_ext
6318cat >>conftest.$ac_ext <<_ACEOF
6319/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006320
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006321#ifdef HAVE_CURSES_H
6322#include <curses.h>
6323#endif
6324
6325
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006326#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006327_ACEOF
6328rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329if { (ac_try="$ac_compile"
6330case "(($ac_try" in
6331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6332 *) ac_try_echo=$ac_try;;
6333esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006336 ac_status=$?
6337 grep -v '^ *+' conftest.er1 >conftest.err
6338 rm -f conftest.er1
6339 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341 (exit $ac_status); } && {
6342 test -z "$ac_c_werror_flag" ||
6343 test ! -s conftest.err
6344 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006345 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006347 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006348sed 's/^/| /' conftest.$ac_ext >&5
6349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006350 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006352
6353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006355ac_res=`eval echo '${'$as_ac_Header'}'`
6356 { echo "$as_me:$LINENO: result: $ac_res" >&5
6357echo "${ECHO_T}$ac_res" >&6; }
6358if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006359 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006360#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006361_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006363fi
6364
6365done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366
6367
Martin v. Löwis11017b12006-01-14 18:12:57 +00006368# On Linux, netlink.h requires asm/types.h
6369
6370for ac_header in linux/netlink.h
6371do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6373{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6374echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006375if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006376 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377else
6378 cat >conftest.$ac_ext <<_ACEOF
6379/* confdefs.h. */
6380_ACEOF
6381cat confdefs.h >>conftest.$ac_ext
6382cat >>conftest.$ac_ext <<_ACEOF
6383/* end confdefs.h. */
6384
6385#ifdef HAVE_ASM_TYPES_H
6386#include <asm/types.h>
6387#endif
6388#ifdef HAVE_SYS_SOCKET_H
6389#include <sys/socket.h>
6390#endif
6391
6392
6393#include <$ac_header>
6394_ACEOF
6395rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006396if { (ac_try="$ac_compile"
6397case "(($ac_try" in
6398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6399 *) ac_try_echo=$ac_try;;
6400esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006403 ac_status=$?
6404 grep -v '^ *+' conftest.er1 >conftest.err
6405 rm -f conftest.er1
6406 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408 (exit $ac_status); } && {
6409 test -z "$ac_c_werror_flag" ||
6410 test ! -s conftest.err
6411 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412 eval "$as_ac_Header=yes"
6413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006414 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415sed 's/^/| /' conftest.$ac_ext >&5
6416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006417 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419
6420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006422ac_res=`eval echo '${'$as_ac_Header'}'`
6423 { echo "$as_me:$LINENO: result: $ac_res" >&5
6424echo "${ECHO_T}$ac_res" >&6; }
6425if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006426 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006427#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006428_ACEOF
6429
6430fi
6431
6432done
6433
6434
Guido van Rossum627b2d71993-12-24 10:39:16 +00006435# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006436was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006437{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6438echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006439cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006440/* confdefs.h. */
6441_ACEOF
6442cat confdefs.h >>conftest.$ac_ext
6443cat >>conftest.$ac_ext <<_ACEOF
6444/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006445#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006446
6447_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006449 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006450 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006451else
Martin v. Löwis11437992002-04-12 09:54:03 +00006452
6453
6454cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006455#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006456_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006458
Guido van Rossum627b2d71993-12-24 10:39:16 +00006459fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00006460rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006462{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6463echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006464
Neal Norwitz11690112002-07-30 01:08:28 +00006465# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006466{ echo "$as_me:$LINENO: checking for makedev" >&5
6467echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006469/* confdefs.h. */
6470_ACEOF
6471cat confdefs.h >>conftest.$ac_ext
6472cat >>conftest.$ac_ext <<_ACEOF
6473/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006474#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006475int
6476main ()
6477{
6478 makedev(0, 0)
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006484if { (ac_try="$ac_link"
6485case "(($ac_try" in
6486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6487 *) ac_try_echo=$ac_try;;
6488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006490 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006492 grep -v '^ *+' conftest.er1 >conftest.err
6493 rm -f conftest.er1
6494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006496 (exit $ac_status); } && {
6497 test -z "$ac_c_werror_flag" ||
6498 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006499 } && test -s conftest$ac_exeext &&
6500 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006501 ac_cv_has_makedev=yes
6502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006504sed 's/^/| /' conftest.$ac_ext >&5
6505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006506 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006508
6509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006510 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006511if test "$ac_cv_has_makedev" = "no"; then
6512 # we didn't link, try if _OSF_SOURCE will allow us to link
6513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006519
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006520#define _OSF_SOURCE 1
6521#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006522
Neal Norwitz11690112002-07-30 01:08:28 +00006523int
6524main ()
6525{
6526 makedev(0, 0)
6527 ;
6528 return 0;
6529}
6530_ACEOF
6531rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006532if { (ac_try="$ac_link"
6533case "(($ac_try" in
6534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6535 *) ac_try_echo=$ac_try;;
6536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006538 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006540 grep -v '^ *+' conftest.er1 >conftest.err
6541 rm -f conftest.er1
6542 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006544 (exit $ac_status); } && {
6545 test -z "$ac_c_werror_flag" ||
6546 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006547 } && test -s conftest$ac_exeext &&
6548 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006549 ac_cv_has_makedev=yes
6550else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006552sed 's/^/| /' conftest.$ac_ext >&5
6553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556
6557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006558 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006559 if test "$ac_cv_has_makedev" = "yes"; then
6560
6561cat >>confdefs.h <<\_ACEOF
6562#define _OSF_SOURCE 1
6563_ACEOF
6564
6565 fi
6566fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006567{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6568echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006569if test "$ac_cv_has_makedev" = "yes"; then
6570
6571cat >>confdefs.h <<\_ACEOF
6572#define HAVE_MAKEDEV 1
6573_ACEOF
6574
6575fi
6576
Martin v. Löwis399a6892002-10-04 10:22:02 +00006577# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6578# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6579# defined, but the compiler does not support pragma redefine_extname,
6580# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6581# structures (such as rlimit64) without declaring them. As a
6582# work-around, disable LFS on such configurations
6583
6584use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006585{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6586echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006588/* confdefs.h. */
6589_ACEOF
6590cat confdefs.h >>conftest.$ac_ext
6591cat >>conftest.$ac_ext <<_ACEOF
6592/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006593
6594#define _LARGEFILE_SOURCE 1
6595#define _FILE_OFFSET_BITS 64
6596#include <sys/resource.h>
6597
Martin v. Löwis399a6892002-10-04 10:22:02 +00006598int
6599main ()
6600{
6601struct rlimit foo;
6602 ;
6603 return 0;
6604}
6605_ACEOF
6606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607if { (ac_try="$ac_compile"
6608case "(($ac_try" in
6609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6610 *) ac_try_echo=$ac_try;;
6611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006615 grep -v '^ *+' conftest.er1 >conftest.err
6616 rm -f conftest.er1
6617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619 (exit $ac_status); } && {
6620 test -z "$ac_c_werror_flag" ||
6621 test ! -s conftest.err
6622 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006623 sol_lfs_bug=no
6624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006626sed 's/^/| /' conftest.$ac_ext >&5
6627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630
6631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006632{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6633echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006634if test "$sol_lfs_bug" = "yes"; then
6635 use_lfs=no
6636fi
6637
6638if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006639# Two defines needed to enable largefile support on various platforms
6640# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642cat >>confdefs.h <<\_ACEOF
6643#define _LARGEFILE_SOURCE 1
6644_ACEOF
6645
6646
6647cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006648#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006649_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006650
Martin v. Löwis399a6892002-10-04 10:22:02 +00006651fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006652
Guido van Rossum84e7b241996-08-19 21:59:00 +00006653# Add some code to confdefs.h so that the test for off_t works on SCO
6654cat >> confdefs.h <<\EOF
6655#if defined(SCO_DS)
6656#undef _OFF_T
6657#endif
6658EOF
6659
Guido van Rossumef2255b2000-03-10 22:30:29 +00006660# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006661{ echo "$as_me:$LINENO: checking for mode_t" >&5
6662echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006663if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006664 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006665else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006666 cat >conftest.$ac_ext <<_ACEOF
6667/* confdefs.h. */
6668_ACEOF
6669cat confdefs.h >>conftest.$ac_ext
6670cat >>conftest.$ac_ext <<_ACEOF
6671/* end confdefs.h. */
6672$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006673typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006674int
6675main ()
6676{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006677if ((ac__type_new_ *) 0)
6678 return 0;
6679if (sizeof (ac__type_new_))
6680 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006681 ;
6682 return 0;
6683}
6684_ACEOF
6685rm -f conftest.$ac_objext
6686if { (ac_try="$ac_compile"
6687case "(($ac_try" in
6688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6689 *) ac_try_echo=$ac_try;;
6690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006692 (eval "$ac_compile") 2>conftest.er1
6693 ac_status=$?
6694 grep -v '^ *+' conftest.er1 >conftest.err
6695 rm -f conftest.er1
6696 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006698 (exit $ac_status); } && {
6699 test -z "$ac_c_werror_flag" ||
6700 test ! -s conftest.err
6701 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006702 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006705sed 's/^/| /' conftest.$ac_ext >&5
6706
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006707 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709
6710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006712{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6713echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6714if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006716else
Martin v. Löwis11437992002-04-12 09:54:03 +00006717
6718cat >>confdefs.h <<_ACEOF
6719#define mode_t int
6720_ACEOF
6721
6722fi
6723
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006724{ echo "$as_me:$LINENO: checking for off_t" >&5
6725echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006726if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006729 cat >conftest.$ac_ext <<_ACEOF
6730/* confdefs.h. */
6731_ACEOF
6732cat confdefs.h >>conftest.$ac_ext
6733cat >>conftest.$ac_ext <<_ACEOF
6734/* end confdefs.h. */
6735$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006736typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006737int
6738main ()
6739{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006740if ((ac__type_new_ *) 0)
6741 return 0;
6742if (sizeof (ac__type_new_))
6743 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006744 ;
6745 return 0;
6746}
6747_ACEOF
6748rm -f conftest.$ac_objext
6749if { (ac_try="$ac_compile"
6750case "(($ac_try" in
6751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6752 *) ac_try_echo=$ac_try;;
6753esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006755 (eval "$ac_compile") 2>conftest.er1
6756 ac_status=$?
6757 grep -v '^ *+' conftest.er1 >conftest.err
6758 rm -f conftest.er1
6759 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006761 (exit $ac_status); } && {
6762 test -z "$ac_c_werror_flag" ||
6763 test ! -s conftest.err
6764 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006765 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006768sed 's/^/| /' conftest.$ac_ext >&5
6769
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006770 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006772
6773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006774fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006775{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6776echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6777if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006779else
Martin v. Löwis11437992002-04-12 09:54:03 +00006780
6781cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
6784
6785fi
6786
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006787{ echo "$as_me:$LINENO: checking for pid_t" >&5
6788echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006789if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006791else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006792 cat >conftest.$ac_ext <<_ACEOF
6793/* confdefs.h. */
6794_ACEOF
6795cat confdefs.h >>conftest.$ac_ext
6796cat >>conftest.$ac_ext <<_ACEOF
6797/* end confdefs.h. */
6798$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006799typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006800int
6801main ()
6802{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006803if ((ac__type_new_ *) 0)
6804 return 0;
6805if (sizeof (ac__type_new_))
6806 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext
6812if { (ac_try="$ac_compile"
6813case "(($ac_try" in
6814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6815 *) ac_try_echo=$ac_try;;
6816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006818 (eval "$ac_compile") 2>conftest.er1
6819 ac_status=$?
6820 grep -v '^ *+' conftest.er1 >conftest.err
6821 rm -f conftest.er1
6822 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006824 (exit $ac_status); } && {
6825 test -z "$ac_c_werror_flag" ||
6826 test ! -s conftest.err
6827 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006828 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006831sed 's/^/| /' conftest.$ac_ext >&5
6832
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006833 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006835
6836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006837fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006838{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6839echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6840if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006841 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006842else
Martin v. Löwis11437992002-04-12 09:54:03 +00006843
6844cat >>confdefs.h <<_ACEOF
6845#define pid_t int
6846_ACEOF
6847
6848fi
6849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006850{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6851echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006852if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006853 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006854else
6855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006856/* confdefs.h. */
6857_ACEOF
6858cat confdefs.h >>conftest.$ac_ext
6859cat >>conftest.$ac_ext <<_ACEOF
6860/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006861#include <sys/types.h>
6862#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006863
Martin v. Löwis11437992002-04-12 09:54:03 +00006864int
6865main ()
6866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006868 ;
6869 return 0;
6870}
6871_ACEOF
6872rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873if { (ac_try="$ac_compile"
6874case "(($ac_try" in
6875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6876 *) ac_try_echo=$ac_try;;
6877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006881 grep -v '^ *+' conftest.er1 >conftest.err
6882 rm -f conftest.er1
6883 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885 (exit $ac_status); } && {
6886 test -z "$ac_c_werror_flag" ||
6887 test ! -s conftest.err
6888 } && test -s conftest.$ac_objext; then
6889 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006892sed 's/^/| /' conftest.$ac_ext >&5
6893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896
6897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006898fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006899{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6900echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006903#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006904_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905
Michael W. Hudson54241132001-12-07 15:38:26 +00006906
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006907{ echo "$as_me:$LINENO: checking for size_t" >&5
6908echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006909if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006911else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006912 cat >conftest.$ac_ext <<_ACEOF
6913/* confdefs.h. */
6914_ACEOF
6915cat confdefs.h >>conftest.$ac_ext
6916cat >>conftest.$ac_ext <<_ACEOF
6917/* end confdefs.h. */
6918$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006919typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006920int
6921main ()
6922{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006923if ((ac__type_new_ *) 0)
6924 return 0;
6925if (sizeof (ac__type_new_))
6926 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006927 ;
6928 return 0;
6929}
6930_ACEOF
6931rm -f conftest.$ac_objext
6932if { (ac_try="$ac_compile"
6933case "(($ac_try" in
6934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6935 *) ac_try_echo=$ac_try;;
6936esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006938 (eval "$ac_compile") 2>conftest.er1
6939 ac_status=$?
6940 grep -v '^ *+' conftest.er1 >conftest.err
6941 rm -f conftest.er1
6942 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006944 (exit $ac_status); } && {
6945 test -z "$ac_c_werror_flag" ||
6946 test ! -s conftest.err
6947 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006948 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006951sed 's/^/| /' conftest.$ac_ext >&5
6952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006953 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955
6956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006957fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006958{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6959echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6960if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006961 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962else
Martin v. Löwis11437992002-04-12 09:54:03 +00006963
6964cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006965#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006966_ACEOF
6967
6968fi
6969
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006970{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6971echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006972if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006973 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006974else
6975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006976/* confdefs.h. */
6977_ACEOF
6978cat confdefs.h >>conftest.$ac_ext
6979cat >>conftest.$ac_ext <<_ACEOF
6980/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006982
6983_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006985 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986 ac_cv_type_uid_t=yes
6987else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988 ac_cv_type_uid_t=no
6989fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00006990rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006992fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006993{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6994echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006995if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996
Martin v. Löwis11437992002-04-12 09:54:03 +00006997cat >>confdefs.h <<\_ACEOF
6998#define uid_t int
6999_ACEOF
7000
7001
7002cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005
7006fi
7007
Mark Dickinsonbd792642009-03-18 20:06:12 +00007008
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007009 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7010echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007011if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007012 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007013else
7014 ac_cv_c_uint32_t=no
7015 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7016 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7017 cat >conftest.$ac_ext <<_ACEOF
7018/* confdefs.h. */
7019_ACEOF
7020cat confdefs.h >>conftest.$ac_ext
7021cat >>conftest.$ac_ext <<_ACEOF
7022/* end confdefs.h. */
7023$ac_includes_default
7024int
7025main ()
7026{
7027static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7028test_array [0] = 0
7029
7030 ;
7031 return 0;
7032}
7033_ACEOF
7034rm -f conftest.$ac_objext
7035if { (ac_try="$ac_compile"
7036case "(($ac_try" in
7037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7038 *) ac_try_echo=$ac_try;;
7039esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007041 (eval "$ac_compile") 2>conftest.er1
7042 ac_status=$?
7043 grep -v '^ *+' conftest.er1 >conftest.err
7044 rm -f conftest.er1
7045 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007047 (exit $ac_status); } && {
7048 test -z "$ac_c_werror_flag" ||
7049 test ! -s conftest.err
7050 } && test -s conftest.$ac_objext; then
7051 case $ac_type in
7052 uint32_t) ac_cv_c_uint32_t=yes ;;
7053 *) ac_cv_c_uint32_t=$ac_type ;;
7054esac
7055
7056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007057 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007058sed 's/^/| /' conftest.$ac_ext >&5
7059
7060
7061fi
7062
7063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7064 test "$ac_cv_c_uint32_t" != no && break
7065 done
7066fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007067{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7068echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007069 case $ac_cv_c_uint32_t in #(
7070 no|yes) ;; #(
7071 *)
7072
7073cat >>confdefs.h <<\_ACEOF
7074#define _UINT32_T 1
7075_ACEOF
7076
7077
7078cat >>confdefs.h <<_ACEOF
7079#define uint32_t $ac_cv_c_uint32_t
7080_ACEOF
7081;;
7082 esac
7083
7084
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007085 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7086echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007087if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007088 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007089else
7090 ac_cv_c_uint64_t=no
7091 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7092 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7093 cat >conftest.$ac_ext <<_ACEOF
7094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
7099$ac_includes_default
7100int
7101main ()
7102{
7103static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7104test_array [0] = 0
7105
7106 ;
7107 return 0;
7108}
7109_ACEOF
7110rm -f conftest.$ac_objext
7111if { (ac_try="$ac_compile"
7112case "(($ac_try" in
7113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7114 *) ac_try_echo=$ac_try;;
7115esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007117 (eval "$ac_compile") 2>conftest.er1
7118 ac_status=$?
7119 grep -v '^ *+' conftest.er1 >conftest.err
7120 rm -f conftest.er1
7121 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007123 (exit $ac_status); } && {
7124 test -z "$ac_c_werror_flag" ||
7125 test ! -s conftest.err
7126 } && test -s conftest.$ac_objext; then
7127 case $ac_type in
7128 uint64_t) ac_cv_c_uint64_t=yes ;;
7129 *) ac_cv_c_uint64_t=$ac_type ;;
7130esac
7131
7132else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007133 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007134sed 's/^/| /' conftest.$ac_ext >&5
7135
7136
7137fi
7138
7139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7140 test "$ac_cv_c_uint64_t" != no && break
7141 done
7142fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007143{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7144echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007145 case $ac_cv_c_uint64_t in #(
7146 no|yes) ;; #(
7147 *)
7148
7149cat >>confdefs.h <<\_ACEOF
7150#define _UINT64_T 1
7151_ACEOF
7152
7153
7154cat >>confdefs.h <<_ACEOF
7155#define uint64_t $ac_cv_c_uint64_t
7156_ACEOF
7157;;
7158 esac
7159
7160
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007161 { echo "$as_me:$LINENO: checking for int32_t" >&5
7162echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007163if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007164 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007165else
7166 ac_cv_c_int32_t=no
7167 for ac_type in 'int32_t' 'int' 'long int' \
7168 'long long int' 'short int' 'signed char'; do
7169 cat >conftest.$ac_ext <<_ACEOF
7170/* confdefs.h. */
7171_ACEOF
7172cat confdefs.h >>conftest.$ac_ext
7173cat >>conftest.$ac_ext <<_ACEOF
7174/* end confdefs.h. */
7175$ac_includes_default
7176int
7177main ()
7178{
7179static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7180test_array [0] = 0
7181
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186rm -f conftest.$ac_objext
7187if { (ac_try="$ac_compile"
7188case "(($ac_try" in
7189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7190 *) ac_try_echo=$ac_try;;
7191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007193 (eval "$ac_compile") 2>conftest.er1
7194 ac_status=$?
7195 grep -v '^ *+' conftest.er1 >conftest.err
7196 rm -f conftest.er1
7197 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007199 (exit $ac_status); } && {
7200 test -z "$ac_c_werror_flag" ||
7201 test ! -s conftest.err
7202 } && test -s conftest.$ac_objext; then
7203 cat >conftest.$ac_ext <<_ACEOF
7204/* confdefs.h. */
7205_ACEOF
7206cat confdefs.h >>conftest.$ac_ext
7207cat >>conftest.$ac_ext <<_ACEOF
7208/* end confdefs.h. */
7209$ac_includes_default
7210int
7211main ()
7212{
7213static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007214 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007215test_array [0] = 0
7216
7217 ;
7218 return 0;
7219}
7220_ACEOF
7221rm -f conftest.$ac_objext
7222if { (ac_try="$ac_compile"
7223case "(($ac_try" in
7224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7225 *) ac_try_echo=$ac_try;;
7226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007228 (eval "$ac_compile") 2>conftest.er1
7229 ac_status=$?
7230 grep -v '^ *+' conftest.er1 >conftest.err
7231 rm -f conftest.er1
7232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007234 (exit $ac_status); } && {
7235 test -z "$ac_c_werror_flag" ||
7236 test ! -s conftest.err
7237 } && test -s conftest.$ac_objext; then
7238 :
7239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007240 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007241sed 's/^/| /' conftest.$ac_ext >&5
7242
7243 case $ac_type in
7244 int32_t) ac_cv_c_int32_t=yes ;;
7245 *) ac_cv_c_int32_t=$ac_type ;;
7246esac
7247
7248fi
7249
7250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7251else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007252 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007253sed 's/^/| /' conftest.$ac_ext >&5
7254
7255
7256fi
7257
7258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259 test "$ac_cv_c_int32_t" != no && break
7260 done
7261fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007262{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7263echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007264 case $ac_cv_c_int32_t in #(
7265 no|yes) ;; #(
7266 *)
7267
7268cat >>confdefs.h <<_ACEOF
7269#define int32_t $ac_cv_c_int32_t
7270_ACEOF
7271;;
7272 esac
7273
7274
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007275 { echo "$as_me:$LINENO: checking for int64_t" >&5
7276echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007277if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007278 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007279else
7280 ac_cv_c_int64_t=no
7281 for ac_type in 'int64_t' 'int' 'long int' \
7282 'long long int' 'short int' 'signed char'; do
7283 cat >conftest.$ac_ext <<_ACEOF
7284/* confdefs.h. */
7285_ACEOF
7286cat confdefs.h >>conftest.$ac_ext
7287cat >>conftest.$ac_ext <<_ACEOF
7288/* end confdefs.h. */
7289$ac_includes_default
7290int
7291main ()
7292{
7293static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7294test_array [0] = 0
7295
7296 ;
7297 return 0;
7298}
7299_ACEOF
7300rm -f conftest.$ac_objext
7301if { (ac_try="$ac_compile"
7302case "(($ac_try" in
7303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7304 *) ac_try_echo=$ac_try;;
7305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007307 (eval "$ac_compile") 2>conftest.er1
7308 ac_status=$?
7309 grep -v '^ *+' conftest.er1 >conftest.err
7310 rm -f conftest.er1
7311 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007313 (exit $ac_status); } && {
7314 test -z "$ac_c_werror_flag" ||
7315 test ! -s conftest.err
7316 } && test -s conftest.$ac_objext; then
7317 cat >conftest.$ac_ext <<_ACEOF
7318/* confdefs.h. */
7319_ACEOF
7320cat confdefs.h >>conftest.$ac_ext
7321cat >>conftest.$ac_ext <<_ACEOF
7322/* end confdefs.h. */
7323$ac_includes_default
7324int
7325main ()
7326{
7327static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007328 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007329test_array [0] = 0
7330
7331 ;
7332 return 0;
7333}
7334_ACEOF
7335rm -f conftest.$ac_objext
7336if { (ac_try="$ac_compile"
7337case "(($ac_try" in
7338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7339 *) ac_try_echo=$ac_try;;
7340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007342 (eval "$ac_compile") 2>conftest.er1
7343 ac_status=$?
7344 grep -v '^ *+' conftest.er1 >conftest.err
7345 rm -f conftest.er1
7346 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007348 (exit $ac_status); } && {
7349 test -z "$ac_c_werror_flag" ||
7350 test ! -s conftest.err
7351 } && test -s conftest.$ac_objext; then
7352 :
7353else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007354 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007355sed 's/^/| /' conftest.$ac_ext >&5
7356
7357 case $ac_type in
7358 int64_t) ac_cv_c_int64_t=yes ;;
7359 *) ac_cv_c_int64_t=$ac_type ;;
7360esac
7361
7362fi
7363
7364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007366 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007367sed 's/^/| /' conftest.$ac_ext >&5
7368
7369
7370fi
7371
7372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7373 test "$ac_cv_c_int64_t" != no && break
7374 done
7375fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007376{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7377echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007378 case $ac_cv_c_int64_t in #(
7379 no|yes) ;; #(
7380 *)
7381
7382cat >>confdefs.h <<_ACEOF
7383#define int64_t $ac_cv_c_int64_t
7384_ACEOF
7385;;
7386 esac
7387
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007388{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7389echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007390if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007392else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007393 cat >conftest.$ac_ext <<_ACEOF
7394/* confdefs.h. */
7395_ACEOF
7396cat confdefs.h >>conftest.$ac_ext
7397cat >>conftest.$ac_ext <<_ACEOF
7398/* end confdefs.h. */
7399$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007400typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007401int
7402main ()
7403{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007404if ((ac__type_new_ *) 0)
7405 return 0;
7406if (sizeof (ac__type_new_))
7407 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007408 ;
7409 return 0;
7410}
7411_ACEOF
7412rm -f conftest.$ac_objext
7413if { (ac_try="$ac_compile"
7414case "(($ac_try" in
7415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7416 *) ac_try_echo=$ac_try;;
7417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007419 (eval "$ac_compile") 2>conftest.er1
7420 ac_status=$?
7421 grep -v '^ *+' conftest.er1 >conftest.err
7422 rm -f conftest.er1
7423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007425 (exit $ac_status); } && {
7426 test -z "$ac_c_werror_flag" ||
7427 test ! -s conftest.err
7428 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007429 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007431 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007432sed 's/^/| /' conftest.$ac_ext >&5
7433
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007434 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007436
7437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007438fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007439{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7440echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7441if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442
7443cat >>confdefs.h <<\_ACEOF
7444#define HAVE_SSIZE_T 1
7445_ACEOF
7446
7447fi
7448
Jack Jansendd19cf82001-12-06 22:36:17 +00007449
Michael W. Hudson54241132001-12-07 15:38:26 +00007450# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007451# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007452{ echo "$as_me:$LINENO: checking for int" >&5
7453echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7454if test "${ac_cv_type_int+set}" = set; then
7455 echo $ECHO_N "(cached) $ECHO_C" >&6
7456else
7457 cat >conftest.$ac_ext <<_ACEOF
7458/* confdefs.h. */
7459_ACEOF
7460cat confdefs.h >>conftest.$ac_ext
7461cat >>conftest.$ac_ext <<_ACEOF
7462/* end confdefs.h. */
7463$ac_includes_default
7464typedef int ac__type_new_;
7465int
7466main ()
7467{
7468if ((ac__type_new_ *) 0)
7469 return 0;
7470if (sizeof (ac__type_new_))
7471 return 0;
7472 ;
7473 return 0;
7474}
7475_ACEOF
7476rm -f conftest.$ac_objext
7477if { (ac_try="$ac_compile"
7478case "(($ac_try" in
7479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7480 *) ac_try_echo=$ac_try;;
7481esac
7482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7483 (eval "$ac_compile") 2>conftest.er1
7484 ac_status=$?
7485 grep -v '^ *+' conftest.er1 >conftest.err
7486 rm -f conftest.er1
7487 cat conftest.err >&5
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); } && {
7490 test -z "$ac_c_werror_flag" ||
7491 test ! -s conftest.err
7492 } && test -s conftest.$ac_objext; then
7493 ac_cv_type_int=yes
7494else
7495 echo "$as_me: failed program was:" >&5
7496sed 's/^/| /' conftest.$ac_ext >&5
7497
7498 ac_cv_type_int=no
7499fi
7500
7501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7502fi
7503{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7504echo "${ECHO_T}$ac_cv_type_int" >&6; }
7505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007506# The cast to long int works around a bug in the HP C Compiler
7507# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7508# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7509# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007510{ echo "$as_me:$LINENO: checking size of int" >&5
7511echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007512if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007513 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007514else
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 if test "$cross_compiling" = yes; then
7516 # Depending upon the size, compute the lo and hi bounds.
7517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007518/* confdefs.h. */
7519_ACEOF
7520cat confdefs.h >>conftest.$ac_ext
7521cat >>conftest.$ac_ext <<_ACEOF
7522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007523$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007524 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007525int
7526main ()
7527{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007528static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007529test_array [0] = 0
7530
7531 ;
7532 return 0;
7533}
7534_ACEOF
7535rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007536if { (ac_try="$ac_compile"
7537case "(($ac_try" in
7538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7539 *) ac_try_echo=$ac_try;;
7540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007544 grep -v '^ *+' conftest.er1 >conftest.err
7545 rm -f conftest.er1
7546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548 (exit $ac_status); } && {
7549 test -z "$ac_c_werror_flag" ||
7550 test ! -s conftest.err
7551 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 ac_lo=0 ac_mid=0
7553 while :; do
7554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007555/* confdefs.h. */
7556_ACEOF
7557cat confdefs.h >>conftest.$ac_ext
7558cat >>conftest.$ac_ext <<_ACEOF
7559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007560$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007561 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007562int
7563main ()
7564{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007566test_array [0] = 0
7567
7568 ;
7569 return 0;
7570}
7571_ACEOF
7572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007573if { (ac_try="$ac_compile"
7574case "(($ac_try" in
7575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7576 *) ac_try_echo=$ac_try;;
7577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007581 grep -v '^ *+' conftest.er1 >conftest.err
7582 rm -f conftest.er1
7583 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585 (exit $ac_status); } && {
7586 test -z "$ac_c_werror_flag" ||
7587 test ! -s conftest.err
7588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 ac_hi=$ac_mid; break
7590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007592sed 's/^/| /' conftest.$ac_ext >&5
7593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007594 ac_lo=`expr $ac_mid + 1`
7595 if test $ac_lo -le $ac_mid; then
7596 ac_lo= ac_hi=
7597 break
7598 fi
7599 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601
7602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007603 done
7604else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007606sed 's/^/| /' conftest.$ac_ext >&5
7607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007609/* confdefs.h. */
7610_ACEOF
7611cat confdefs.h >>conftest.$ac_ext
7612cat >>conftest.$ac_ext <<_ACEOF
7613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007614$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007615 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007616int
7617main ()
7618{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007620test_array [0] = 0
7621
7622 ;
7623 return 0;
7624}
7625_ACEOF
7626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627if { (ac_try="$ac_compile"
7628case "(($ac_try" in
7629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7630 *) ac_try_echo=$ac_try;;
7631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007635 grep -v '^ *+' conftest.er1 >conftest.err
7636 rm -f conftest.er1
7637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639 (exit $ac_status); } && {
7640 test -z "$ac_c_werror_flag" ||
7641 test ! -s conftest.err
7642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 ac_hi=-1 ac_mid=-1
7644 while :; do
7645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007646/* confdefs.h. */
7647_ACEOF
7648cat confdefs.h >>conftest.$ac_ext
7649cat >>conftest.$ac_ext <<_ACEOF
7650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007651$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007652 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007653int
7654main ()
7655{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007657test_array [0] = 0
7658
7659 ;
7660 return 0;
7661}
7662_ACEOF
7663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664if { (ac_try="$ac_compile"
7665case "(($ac_try" in
7666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7667 *) ac_try_echo=$ac_try;;
7668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007672 grep -v '^ *+' conftest.er1 >conftest.err
7673 rm -f conftest.er1
7674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676 (exit $ac_status); } && {
7677 test -z "$ac_c_werror_flag" ||
7678 test ! -s conftest.err
7679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 ac_lo=$ac_mid; break
7681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007683sed 's/^/| /' conftest.$ac_ext >&5
7684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 ac_hi=`expr '(' $ac_mid ')' - 1`
7686 if test $ac_mid -le $ac_hi; then
7687 ac_lo= ac_hi=
7688 break
7689 fi
7690 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692
7693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007694 done
7695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007697sed 's/^/| /' conftest.$ac_ext >&5
7698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701
7702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706# Binary search between lo and hi bounds.
7707while test "x$ac_lo" != "x$ac_hi"; do
7708 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007710/* confdefs.h. */
7711_ACEOF
7712cat confdefs.h >>conftest.$ac_ext
7713cat >>conftest.$ac_ext <<_ACEOF
7714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007715$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007716 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007717int
7718main ()
7719{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007721test_array [0] = 0
7722
7723 ;
7724 return 0;
7725}
7726_ACEOF
7727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728if { (ac_try="$ac_compile"
7729case "(($ac_try" in
7730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7731 *) ac_try_echo=$ac_try;;
7732esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007736 grep -v '^ *+' conftest.er1 >conftest.err
7737 rm -f conftest.er1
7738 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740 (exit $ac_status); } && {
7741 test -z "$ac_c_werror_flag" ||
7742 test ! -s conftest.err
7743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_hi=$ac_mid
7745else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007747sed 's/^/| /' conftest.$ac_ext >&5
7748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751
7752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007753done
7754case $ac_lo in
7755?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007757 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007758See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007759echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007760See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007761 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762 else
7763 ac_cv_sizeof_int=0
7764 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007765esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007766else
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007768/* confdefs.h. */
7769_ACEOF
7770cat confdefs.h >>conftest.$ac_ext
7771cat >>conftest.$ac_ext <<_ACEOF
7772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007773$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007774 typedef int ac__type_sizeof_;
7775static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7776static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007777#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007778#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007779int
7780main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007781{
Martin v. Löwis11437992002-04-12 09:54:03 +00007782
7783 FILE *f = fopen ("conftest.val", "w");
7784 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007786 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007789 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007791 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 }
7793 else
7794 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007796 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007798 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007801
7802 ;
7803 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007804}
Martin v. Löwis11437992002-04-12 09:54:03 +00007805_ACEOF
7806rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807if { (ac_try="$ac_link"
7808case "(($ac_try" in
7809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7810 *) ac_try_echo=$ac_try;;
7811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 { (case "(($ac_try" in
7818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7819 *) ac_try_echo=$ac_try;;
7820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 (exit $ac_status); }; }; then
7826 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007828 echo "$as_me: program exited with status $ac_status" >&5
7829echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007830sed 's/^/| /' conftest.$ac_ext >&5
7831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007834 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007835See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007836echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007837See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007838 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839 else
7840 ac_cv_sizeof_int=0
7841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007844fi
7845rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007846fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007847{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7848echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849
7850
7851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007855
7856
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007857{ echo "$as_me:$LINENO: checking for long" >&5
7858echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7859if test "${ac_cv_type_long+set}" = set; then
7860 echo $ECHO_N "(cached) $ECHO_C" >&6
7861else
7862 cat >conftest.$ac_ext <<_ACEOF
7863/* confdefs.h. */
7864_ACEOF
7865cat confdefs.h >>conftest.$ac_ext
7866cat >>conftest.$ac_ext <<_ACEOF
7867/* end confdefs.h. */
7868$ac_includes_default
7869typedef long ac__type_new_;
7870int
7871main ()
7872{
7873if ((ac__type_new_ *) 0)
7874 return 0;
7875if (sizeof (ac__type_new_))
7876 return 0;
7877 ;
7878 return 0;
7879}
7880_ACEOF
7881rm -f conftest.$ac_objext
7882if { (ac_try="$ac_compile"
7883case "(($ac_try" in
7884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7885 *) ac_try_echo=$ac_try;;
7886esac
7887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7888 (eval "$ac_compile") 2>conftest.er1
7889 ac_status=$?
7890 grep -v '^ *+' conftest.er1 >conftest.err
7891 rm -f conftest.er1
7892 cat conftest.err >&5
7893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7894 (exit $ac_status); } && {
7895 test -z "$ac_c_werror_flag" ||
7896 test ! -s conftest.err
7897 } && test -s conftest.$ac_objext; then
7898 ac_cv_type_long=yes
7899else
7900 echo "$as_me: failed program was:" >&5
7901sed 's/^/| /' conftest.$ac_ext >&5
7902
7903 ac_cv_type_long=no
7904fi
7905
7906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7907fi
7908{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7909echo "${ECHO_T}$ac_cv_type_long" >&6; }
7910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911# The cast to long int works around a bug in the HP C Compiler
7912# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7913# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7914# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007915{ echo "$as_me:$LINENO: checking size of long" >&5
7916echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007917if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007918 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007919else
Martin v. Löwis11437992002-04-12 09:54:03 +00007920 if test "$cross_compiling" = yes; then
7921 # Depending upon the size, compute the lo and hi bounds.
7922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007923/* confdefs.h. */
7924_ACEOF
7925cat confdefs.h >>conftest.$ac_ext
7926cat >>conftest.$ac_ext <<_ACEOF
7927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007928$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007929 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007930int
7931main ()
7932{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007933static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007934test_array [0] = 0
7935
7936 ;
7937 return 0;
7938}
7939_ACEOF
7940rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941if { (ac_try="$ac_compile"
7942case "(($ac_try" in
7943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7944 *) ac_try_echo=$ac_try;;
7945esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007949 grep -v '^ *+' conftest.er1 >conftest.err
7950 rm -f conftest.er1
7951 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953 (exit $ac_status); } && {
7954 test -z "$ac_c_werror_flag" ||
7955 test ! -s conftest.err
7956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 ac_lo=0 ac_mid=0
7958 while :; do
7959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007960/* confdefs.h. */
7961_ACEOF
7962cat confdefs.h >>conftest.$ac_ext
7963cat >>conftest.$ac_ext <<_ACEOF
7964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007965$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007966 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007967int
7968main ()
7969{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007971test_array [0] = 0
7972
7973 ;
7974 return 0;
7975}
7976_ACEOF
7977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978if { (ac_try="$ac_compile"
7979case "(($ac_try" in
7980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7981 *) ac_try_echo=$ac_try;;
7982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007986 grep -v '^ *+' conftest.er1 >conftest.err
7987 rm -f conftest.er1
7988 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990 (exit $ac_status); } && {
7991 test -z "$ac_c_werror_flag" ||
7992 test ! -s conftest.err
7993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 ac_hi=$ac_mid; break
7995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007997sed 's/^/| /' conftest.$ac_ext >&5
7998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 ac_lo=`expr $ac_mid + 1`
8000 if test $ac_lo -le $ac_mid; then
8001 ac_lo= ac_hi=
8002 break
8003 fi
8004 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006
8007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008008 done
8009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008011sed 's/^/| /' conftest.$ac_ext >&5
8012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008014/* confdefs.h. */
8015_ACEOF
8016cat confdefs.h >>conftest.$ac_ext
8017cat >>conftest.$ac_ext <<_ACEOF
8018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008019$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008020 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008021int
8022main ()
8023{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008024static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008025test_array [0] = 0
8026
8027 ;
8028 return 0;
8029}
8030_ACEOF
8031rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032if { (ac_try="$ac_compile"
8033case "(($ac_try" in
8034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8035 *) ac_try_echo=$ac_try;;
8036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008040 grep -v '^ *+' conftest.er1 >conftest.err
8041 rm -f conftest.er1
8042 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 (exit $ac_status); } && {
8045 test -z "$ac_c_werror_flag" ||
8046 test ! -s conftest.err
8047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 ac_hi=-1 ac_mid=-1
8049 while :; do
8050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008051/* confdefs.h. */
8052_ACEOF
8053cat confdefs.h >>conftest.$ac_ext
8054cat >>conftest.$ac_ext <<_ACEOF
8055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008056$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008057 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008058int
8059main ()
8060{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008062test_array [0] = 0
8063
8064 ;
8065 return 0;
8066}
8067_ACEOF
8068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069if { (ac_try="$ac_compile"
8070case "(($ac_try" in
8071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8072 *) ac_try_echo=$ac_try;;
8073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008077 grep -v '^ *+' conftest.er1 >conftest.err
8078 rm -f conftest.er1
8079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081 (exit $ac_status); } && {
8082 test -z "$ac_c_werror_flag" ||
8083 test ! -s conftest.err
8084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 ac_lo=$ac_mid; break
8086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008088sed 's/^/| /' conftest.$ac_ext >&5
8089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008090 ac_hi=`expr '(' $ac_mid ')' - 1`
8091 if test $ac_mid -le $ac_hi; then
8092 ac_lo= ac_hi=
8093 break
8094 fi
8095 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097
8098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 done
8100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008102sed 's/^/| /' conftest.$ac_ext >&5
8103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106
8107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109
8110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111# Binary search between lo and hi bounds.
8112while test "x$ac_lo" != "x$ac_hi"; do
8113 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008115/* confdefs.h. */
8116_ACEOF
8117cat confdefs.h >>conftest.$ac_ext
8118cat >>conftest.$ac_ext <<_ACEOF
8119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008120$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008121 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008122int
8123main ()
8124{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008126test_array [0] = 0
8127
8128 ;
8129 return 0;
8130}
8131_ACEOF
8132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133if { (ac_try="$ac_compile"
8134case "(($ac_try" in
8135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8136 *) ac_try_echo=$ac_try;;
8137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008141 grep -v '^ *+' conftest.er1 >conftest.err
8142 rm -f conftest.er1
8143 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008145 (exit $ac_status); } && {
8146 test -z "$ac_c_werror_flag" ||
8147 test ! -s conftest.err
8148 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ac_hi=$ac_mid
8150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008152sed 's/^/| /' conftest.$ac_ext >&5
8153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156
8157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008158done
8159case $ac_lo in
8160?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008161'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008162 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008163See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008164echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008165See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008166 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008167 else
8168 ac_cv_sizeof_long=0
8169 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008170esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008171else
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008173/* confdefs.h. */
8174_ACEOF
8175cat confdefs.h >>conftest.$ac_ext
8176cat >>conftest.$ac_ext <<_ACEOF
8177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008178$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008179 typedef long ac__type_sizeof_;
8180static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8181static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008182#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008183#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008184int
8185main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008186{
Martin v. Löwis11437992002-04-12 09:54:03 +00008187
8188 FILE *f = fopen ("conftest.val", "w");
8189 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008191 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008192 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008194 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008195 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008196 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008197 }
8198 else
8199 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008201 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008203 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
8207 ;
8208 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008209}
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
8211rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212if { (ac_try="$ac_link"
8213case "(($ac_try" in
8214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8215 *) ac_try_echo=$ac_try;;
8216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222 { (case "(($ac_try" in
8223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8224 *) ac_try_echo=$ac_try;;
8225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 (exit $ac_status); }; }; then
8231 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008232else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008233 echo "$as_me: program exited with status $ac_status" >&5
8234echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008235sed 's/^/| /' conftest.$ac_ext >&5
8236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008239 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008241echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008242See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008243 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 else
8245 ac_cv_sizeof_long=0
8246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008249fi
8250rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008251fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008252{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8253echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254
8255
8256
Martin v. Löwis11437992002-04-12 09:54:03 +00008257cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008258#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008259_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008260
8261
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008262{ echo "$as_me:$LINENO: checking for void *" >&5
8263echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8264if test "${ac_cv_type_void_p+set}" = set; then
8265 echo $ECHO_N "(cached) $ECHO_C" >&6
8266else
8267 cat >conftest.$ac_ext <<_ACEOF
8268/* confdefs.h. */
8269_ACEOF
8270cat confdefs.h >>conftest.$ac_ext
8271cat >>conftest.$ac_ext <<_ACEOF
8272/* end confdefs.h. */
8273$ac_includes_default
8274typedef void * ac__type_new_;
8275int
8276main ()
8277{
8278if ((ac__type_new_ *) 0)
8279 return 0;
8280if (sizeof (ac__type_new_))
8281 return 0;
8282 ;
8283 return 0;
8284}
8285_ACEOF
8286rm -f conftest.$ac_objext
8287if { (ac_try="$ac_compile"
8288case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
8292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8293 (eval "$ac_compile") 2>conftest.er1
8294 ac_status=$?
8295 grep -v '^ *+' conftest.er1 >conftest.err
8296 rm -f conftest.er1
8297 cat conftest.err >&5
8298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8299 (exit $ac_status); } && {
8300 test -z "$ac_c_werror_flag" ||
8301 test ! -s conftest.err
8302 } && test -s conftest.$ac_objext; then
8303 ac_cv_type_void_p=yes
8304else
8305 echo "$as_me: failed program was:" >&5
8306sed 's/^/| /' conftest.$ac_ext >&5
8307
8308 ac_cv_type_void_p=no
8309fi
8310
8311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8312fi
8313{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8314echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316# The cast to long int works around a bug in the HP C Compiler
8317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8319# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008320{ echo "$as_me:$LINENO: checking size of void *" >&5
8321echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008322if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008323 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008324else
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 if test "$cross_compiling" = yes; then
8326 # Depending upon the size, compute the lo and hi bounds.
8327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008328/* confdefs.h. */
8329_ACEOF
8330cat confdefs.h >>conftest.$ac_ext
8331cat >>conftest.$ac_ext <<_ACEOF
8332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008333$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008334 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008335int
8336main ()
8337{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008338static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008339test_array [0] = 0
8340
8341 ;
8342 return 0;
8343}
8344_ACEOF
8345rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346if { (ac_try="$ac_compile"
8347case "(($ac_try" in
8348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8349 *) ac_try_echo=$ac_try;;
8350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008354 grep -v '^ *+' conftest.er1 >conftest.err
8355 rm -f conftest.er1
8356 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358 (exit $ac_status); } && {
8359 test -z "$ac_c_werror_flag" ||
8360 test ! -s conftest.err
8361 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 ac_lo=0 ac_mid=0
8363 while :; do
8364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008365/* confdefs.h. */
8366_ACEOF
8367cat confdefs.h >>conftest.$ac_ext
8368cat >>conftest.$ac_ext <<_ACEOF
8369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008370$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008371 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008372int
8373main ()
8374{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008375static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008376test_array [0] = 0
8377
8378 ;
8379 return 0;
8380}
8381_ACEOF
8382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383if { (ac_try="$ac_compile"
8384case "(($ac_try" in
8385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8386 *) ac_try_echo=$ac_try;;
8387esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008391 grep -v '^ *+' conftest.er1 >conftest.err
8392 rm -f conftest.er1
8393 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395 (exit $ac_status); } && {
8396 test -z "$ac_c_werror_flag" ||
8397 test ! -s conftest.err
8398 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 ac_hi=$ac_mid; break
8400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008402sed 's/^/| /' conftest.$ac_ext >&5
8403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008404 ac_lo=`expr $ac_mid + 1`
8405 if test $ac_lo -le $ac_mid; then
8406 ac_lo= ac_hi=
8407 break
8408 fi
8409 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411
8412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 done
8414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008416sed 's/^/| /' conftest.$ac_ext >&5
8417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008419/* confdefs.h. */
8420_ACEOF
8421cat confdefs.h >>conftest.$ac_ext
8422cat >>conftest.$ac_ext <<_ACEOF
8423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008424$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008425 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008426int
8427main ()
8428{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008430test_array [0] = 0
8431
8432 ;
8433 return 0;
8434}
8435_ACEOF
8436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437if { (ac_try="$ac_compile"
8438case "(($ac_try" in
8439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8440 *) ac_try_echo=$ac_try;;
8441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008445 grep -v '^ *+' conftest.er1 >conftest.err
8446 rm -f conftest.er1
8447 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449 (exit $ac_status); } && {
8450 test -z "$ac_c_werror_flag" ||
8451 test ! -s conftest.err
8452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 ac_hi=-1 ac_mid=-1
8454 while :; do
8455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008456/* confdefs.h. */
8457_ACEOF
8458cat confdefs.h >>conftest.$ac_ext
8459cat >>conftest.$ac_ext <<_ACEOF
8460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008461$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008462 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008467test_array [0] = 0
8468
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474if { (ac_try="$ac_compile"
8475case "(($ac_try" in
8476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8477 *) ac_try_echo=$ac_try;;
8478esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008482 grep -v '^ *+' conftest.er1 >conftest.err
8483 rm -f conftest.er1
8484 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486 (exit $ac_status); } && {
8487 test -z "$ac_c_werror_flag" ||
8488 test ! -s conftest.err
8489 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 ac_lo=$ac_mid; break
8491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008493sed 's/^/| /' conftest.$ac_ext >&5
8494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 ac_hi=`expr '(' $ac_mid ')' - 1`
8496 if test $ac_mid -le $ac_hi; then
8497 ac_lo= ac_hi=
8498 break
8499 fi
8500 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502
8503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 done
8505else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008507sed 's/^/| /' conftest.$ac_ext >&5
8508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516# Binary search between lo and hi bounds.
8517while test "x$ac_lo" != "x$ac_hi"; do
8518 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008520/* confdefs.h. */
8521_ACEOF
8522cat confdefs.h >>conftest.$ac_ext
8523cat >>conftest.$ac_ext <<_ACEOF
8524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008525$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008526 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008527int
8528main ()
8529{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008531test_array [0] = 0
8532
8533 ;
8534 return 0;
8535}
8536_ACEOF
8537rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538if { (ac_try="$ac_compile"
8539case "(($ac_try" in
8540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8541 *) ac_try_echo=$ac_try;;
8542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008546 grep -v '^ *+' conftest.er1 >conftest.err
8547 rm -f conftest.er1
8548 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550 (exit $ac_status); } && {
8551 test -z "$ac_c_werror_flag" ||
8552 test ! -s conftest.err
8553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_hi=$ac_mid
8555else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008557sed 's/^/| /' conftest.$ac_ext >&5
8558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561
8562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008563done
8564case $ac_lo in
8565?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008567 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008568See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008569echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008570See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008571 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572 else
8573 ac_cv_sizeof_void_p=0
8574 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008575esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008576else
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008578/* confdefs.h. */
8579_ACEOF
8580cat confdefs.h >>conftest.$ac_ext
8581cat >>conftest.$ac_ext <<_ACEOF
8582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008583$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008584 typedef void * ac__type_sizeof_;
8585static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8586static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008587#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008589int
8590main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008591{
Martin v. Löwis11437992002-04-12 09:54:03 +00008592
8593 FILE *f = fopen ("conftest.val", "w");
8594 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008596 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008599 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008601 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 }
8603 else
8604 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008606 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008608 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008611
8612 ;
8613 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008614}
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
8616rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617if { (ac_try="$ac_link"
8618case "(($ac_try" in
8619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8620 *) ac_try_echo=$ac_try;;
8621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 { (case "(($ac_try" in
8628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8629 *) ac_try_echo=$ac_try;;
8630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 (exit $ac_status); }; }; then
8636 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008638 echo "$as_me: program exited with status $ac_status" >&5
8639echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008640sed 's/^/| /' conftest.$ac_ext >&5
8641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008644 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008645See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008646echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008647See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008648 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 else
8650 ac_cv_sizeof_void_p=0
8651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008654fi
8655rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008656fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008657{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8658echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659
8660
8661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008663#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008664_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008665
8666
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008667{ echo "$as_me:$LINENO: checking for short" >&5
8668echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8669if test "${ac_cv_type_short+set}" = set; then
8670 echo $ECHO_N "(cached) $ECHO_C" >&6
8671else
8672 cat >conftest.$ac_ext <<_ACEOF
8673/* confdefs.h. */
8674_ACEOF
8675cat confdefs.h >>conftest.$ac_ext
8676cat >>conftest.$ac_ext <<_ACEOF
8677/* end confdefs.h. */
8678$ac_includes_default
8679typedef short ac__type_new_;
8680int
8681main ()
8682{
8683if ((ac__type_new_ *) 0)
8684 return 0;
8685if (sizeof (ac__type_new_))
8686 return 0;
8687 ;
8688 return 0;
8689}
8690_ACEOF
8691rm -f conftest.$ac_objext
8692if { (ac_try="$ac_compile"
8693case "(($ac_try" in
8694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8695 *) ac_try_echo=$ac_try;;
8696esac
8697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8698 (eval "$ac_compile") 2>conftest.er1
8699 ac_status=$?
8700 grep -v '^ *+' conftest.er1 >conftest.err
8701 rm -f conftest.er1
8702 cat conftest.err >&5
8703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); } && {
8705 test -z "$ac_c_werror_flag" ||
8706 test ! -s conftest.err
8707 } && test -s conftest.$ac_objext; then
8708 ac_cv_type_short=yes
8709else
8710 echo "$as_me: failed program was:" >&5
8711sed 's/^/| /' conftest.$ac_ext >&5
8712
8713 ac_cv_type_short=no
8714fi
8715
8716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8717fi
8718{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8719echo "${ECHO_T}$ac_cv_type_short" >&6; }
8720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721# The cast to long int works around a bug in the HP C Compiler
8722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8724# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008725{ echo "$as_me:$LINENO: checking size of short" >&5
8726echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008727if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008728 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008729else
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 if test "$cross_compiling" = yes; then
8731 # Depending upon the size, compute the lo and hi bounds.
8732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008733/* confdefs.h. */
8734_ACEOF
8735cat confdefs.h >>conftest.$ac_ext
8736cat >>conftest.$ac_ext <<_ACEOF
8737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008738$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008739 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008740int
8741main ()
8742{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008743static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008744test_array [0] = 0
8745
8746 ;
8747 return 0;
8748}
8749_ACEOF
8750rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008751if { (ac_try="$ac_compile"
8752case "(($ac_try" in
8753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8754 *) ac_try_echo=$ac_try;;
8755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008759 grep -v '^ *+' conftest.er1 >conftest.err
8760 rm -f conftest.er1
8761 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763 (exit $ac_status); } && {
8764 test -z "$ac_c_werror_flag" ||
8765 test ! -s conftest.err
8766 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ac_lo=0 ac_mid=0
8768 while :; do
8769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008770/* confdefs.h. */
8771_ACEOF
8772cat confdefs.h >>conftest.$ac_ext
8773cat >>conftest.$ac_ext <<_ACEOF
8774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008775$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008776 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008777int
8778main ()
8779{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008781test_array [0] = 0
8782
8783 ;
8784 return 0;
8785}
8786_ACEOF
8787rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008788if { (ac_try="$ac_compile"
8789case "(($ac_try" in
8790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8791 *) ac_try_echo=$ac_try;;
8792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008796 grep -v '^ *+' conftest.er1 >conftest.err
8797 rm -f conftest.er1
8798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 (exit $ac_status); } && {
8801 test -z "$ac_c_werror_flag" ||
8802 test ! -s conftest.err
8803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 ac_hi=$ac_mid; break
8805else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008807sed 's/^/| /' conftest.$ac_ext >&5
8808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809 ac_lo=`expr $ac_mid + 1`
8810 if test $ac_lo -le $ac_mid; then
8811 ac_lo= ac_hi=
8812 break
8813 fi
8814 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816
8817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 done
8819else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008821sed 's/^/| /' conftest.$ac_ext >&5
8822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* confdefs.h. */
8825_ACEOF
8826cat confdefs.h >>conftest.$ac_ext
8827cat >>conftest.$ac_ext <<_ACEOF
8828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008829$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008830 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008831int
8832main ()
8833{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008835test_array [0] = 0
8836
8837 ;
8838 return 0;
8839}
8840_ACEOF
8841rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842if { (ac_try="$ac_compile"
8843case "(($ac_try" in
8844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8845 *) ac_try_echo=$ac_try;;
8846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008850 grep -v '^ *+' conftest.er1 >conftest.err
8851 rm -f conftest.er1
8852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854 (exit $ac_status); } && {
8855 test -z "$ac_c_werror_flag" ||
8856 test ! -s conftest.err
8857 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_hi=-1 ac_mid=-1
8859 while :; do
8860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008861/* confdefs.h. */
8862_ACEOF
8863cat confdefs.h >>conftest.$ac_ext
8864cat >>conftest.$ac_ext <<_ACEOF
8865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008867 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008868int
8869main ()
8870{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008872test_array [0] = 0
8873
8874 ;
8875 return 0;
8876}
8877_ACEOF
8878rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879if { (ac_try="$ac_compile"
8880case "(($ac_try" in
8881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8882 *) ac_try_echo=$ac_try;;
8883esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008887 grep -v '^ *+' conftest.er1 >conftest.err
8888 rm -f conftest.er1
8889 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891 (exit $ac_status); } && {
8892 test -z "$ac_c_werror_flag" ||
8893 test ! -s conftest.err
8894 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_lo=$ac_mid; break
8896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008898sed 's/^/| /' conftest.$ac_ext >&5
8899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900 ac_hi=`expr '(' $ac_mid ')' - 1`
8901 if test $ac_mid -le $ac_hi; then
8902 ac_lo= ac_hi=
8903 break
8904 fi
8905 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907
8908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 done
8910else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008912sed 's/^/| /' conftest.$ac_ext >&5
8913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916
8917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919
8920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921# Binary search between lo and hi bounds.
8922while test "x$ac_lo" != "x$ac_hi"; do
8923 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* confdefs.h. */
8926_ACEOF
8927cat confdefs.h >>conftest.$ac_ext
8928cat >>conftest.$ac_ext <<_ACEOF
8929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008930$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008931 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008935static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008936test_array [0] = 0
8937
8938 ;
8939 return 0;
8940}
8941_ACEOF
8942rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943if { (ac_try="$ac_compile"
8944case "(($ac_try" in
8945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8946 *) ac_try_echo=$ac_try;;
8947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008951 grep -v '^ *+' conftest.er1 >conftest.err
8952 rm -f conftest.er1
8953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955 (exit $ac_status); } && {
8956 test -z "$ac_c_werror_flag" ||
8957 test ! -s conftest.err
8958 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ac_hi=$ac_mid
8960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008962sed 's/^/| /' conftest.$ac_ext >&5
8963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966
8967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008968done
8969case $ac_lo in
8970?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008971'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008972 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008973See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008974echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008975See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008976 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977 else
8978 ac_cv_sizeof_short=0
8979 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008980esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008981else
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008983/* confdefs.h. */
8984_ACEOF
8985cat confdefs.h >>conftest.$ac_ext
8986cat >>conftest.$ac_ext <<_ACEOF
8987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008989 typedef short ac__type_sizeof_;
8990static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8991static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008992#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008993#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008994int
8995main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008996{
Martin v. Löwis11437992002-04-12 09:54:03 +00008997
8998 FILE *f = fopen ("conftest.val", "w");
8999 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009001 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009004 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009005 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009006 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 }
9008 else
9009 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009011 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009012 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009013 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
9017 ;
9018 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009019}
Martin v. Löwis11437992002-04-12 09:54:03 +00009020_ACEOF
9021rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022if { (ac_try="$ac_link"
9023case "(($ac_try" in
9024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9025 *) ac_try_echo=$ac_try;;
9026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032 { (case "(($ac_try" in
9033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9034 *) ac_try_echo=$ac_try;;
9035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 (exit $ac_status); }; }; then
9041 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009043 echo "$as_me: program exited with status $ac_status" >&5
9044echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009045sed 's/^/| /' conftest.$ac_ext >&5
9046
Martin v. Löwis11437992002-04-12 09:54:03 +00009047( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009049 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009050See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009051echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009052See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009053 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054 else
9055 ac_cv_sizeof_short=0
9056 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009059fi
9060rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009061fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009062{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9063echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009064
9065
9066
Martin v. Löwis11437992002-04-12 09:54:03 +00009067cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009068#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009069_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009070
9071
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009072{ echo "$as_me:$LINENO: checking for float" >&5
9073echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9074if test "${ac_cv_type_float+set}" = set; then
9075 echo $ECHO_N "(cached) $ECHO_C" >&6
9076else
9077 cat >conftest.$ac_ext <<_ACEOF
9078/* confdefs.h. */
9079_ACEOF
9080cat confdefs.h >>conftest.$ac_ext
9081cat >>conftest.$ac_ext <<_ACEOF
9082/* end confdefs.h. */
9083$ac_includes_default
9084typedef float ac__type_new_;
9085int
9086main ()
9087{
9088if ((ac__type_new_ *) 0)
9089 return 0;
9090if (sizeof (ac__type_new_))
9091 return 0;
9092 ;
9093 return 0;
9094}
9095_ACEOF
9096rm -f conftest.$ac_objext
9097if { (ac_try="$ac_compile"
9098case "(($ac_try" in
9099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9100 *) ac_try_echo=$ac_try;;
9101esac
9102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9103 (eval "$ac_compile") 2>conftest.er1
9104 ac_status=$?
9105 grep -v '^ *+' conftest.er1 >conftest.err
9106 rm -f conftest.er1
9107 cat conftest.err >&5
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); } && {
9110 test -z "$ac_c_werror_flag" ||
9111 test ! -s conftest.err
9112 } && test -s conftest.$ac_objext; then
9113 ac_cv_type_float=yes
9114else
9115 echo "$as_me: failed program was:" >&5
9116sed 's/^/| /' conftest.$ac_ext >&5
9117
9118 ac_cv_type_float=no
9119fi
9120
9121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9122fi
9123{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9124echo "${ECHO_T}$ac_cv_type_float" >&6; }
9125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126# The cast to long int works around a bug in the HP C Compiler
9127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9129# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009130{ echo "$as_me:$LINENO: checking size of float" >&5
9131echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009132if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009133 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009134else
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 if test "$cross_compiling" = yes; then
9136 # Depending upon the size, compute the lo and hi bounds.
9137cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009138/* confdefs.h. */
9139_ACEOF
9140cat confdefs.h >>conftest.$ac_ext
9141cat >>conftest.$ac_ext <<_ACEOF
9142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009143$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009144 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009145int
9146main ()
9147{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009149test_array [0] = 0
9150
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156if { (ac_try="$ac_compile"
9157case "(($ac_try" in
9158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9159 *) ac_try_echo=$ac_try;;
9160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009164 grep -v '^ *+' conftest.er1 >conftest.err
9165 rm -f conftest.er1
9166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168 (exit $ac_status); } && {
9169 test -z "$ac_c_werror_flag" ||
9170 test ! -s conftest.err
9171 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 ac_lo=0 ac_mid=0
9173 while :; do
9174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009175/* confdefs.h. */
9176_ACEOF
9177cat confdefs.h >>conftest.$ac_ext
9178cat >>conftest.$ac_ext <<_ACEOF
9179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009180$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009181 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009182int
9183main ()
9184{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009185static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009186test_array [0] = 0
9187
9188 ;
9189 return 0;
9190}
9191_ACEOF
9192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009193if { (ac_try="$ac_compile"
9194case "(($ac_try" in
9195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9196 *) ac_try_echo=$ac_try;;
9197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009201 grep -v '^ *+' conftest.er1 >conftest.err
9202 rm -f conftest.er1
9203 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205 (exit $ac_status); } && {
9206 test -z "$ac_c_werror_flag" ||
9207 test ! -s conftest.err
9208 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ac_hi=$ac_mid; break
9210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009212sed 's/^/| /' conftest.$ac_ext >&5
9213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214 ac_lo=`expr $ac_mid + 1`
9215 if test $ac_lo -le $ac_mid; then
9216 ac_lo= ac_hi=
9217 break
9218 fi
9219 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009221
9222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 done
9224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009226sed 's/^/| /' conftest.$ac_ext >&5
9227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009229/* confdefs.h. */
9230_ACEOF
9231cat confdefs.h >>conftest.$ac_ext
9232cat >>conftest.$ac_ext <<_ACEOF
9233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009234$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009235 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009236int
9237main ()
9238{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009239static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009240test_array [0] = 0
9241
9242 ;
9243 return 0;
9244}
9245_ACEOF
9246rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009247if { (ac_try="$ac_compile"
9248case "(($ac_try" in
9249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9250 *) ac_try_echo=$ac_try;;
9251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009255 grep -v '^ *+' conftest.er1 >conftest.err
9256 rm -f conftest.er1
9257 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259 (exit $ac_status); } && {
9260 test -z "$ac_c_werror_flag" ||
9261 test ! -s conftest.err
9262 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 ac_hi=-1 ac_mid=-1
9264 while :; do
9265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* confdefs.h. */
9267_ACEOF
9268cat confdefs.h >>conftest.$ac_ext
9269cat >>conftest.$ac_ext <<_ACEOF
9270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009271$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009272 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009273int
9274main ()
9275{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009276static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009277test_array [0] = 0
9278
9279 ;
9280 return 0;
9281}
9282_ACEOF
9283rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009284if { (ac_try="$ac_compile"
9285case "(($ac_try" in
9286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9287 *) ac_try_echo=$ac_try;;
9288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009292 grep -v '^ *+' conftest.er1 >conftest.err
9293 rm -f conftest.er1
9294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296 (exit $ac_status); } && {
9297 test -z "$ac_c_werror_flag" ||
9298 test ! -s conftest.err
9299 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 ac_lo=$ac_mid; break
9301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009303sed 's/^/| /' conftest.$ac_ext >&5
9304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305 ac_hi=`expr '(' $ac_mid ')' - 1`
9306 if test $ac_mid -le $ac_hi; then
9307 ac_lo= ac_hi=
9308 break
9309 fi
9310 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312
9313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 done
9315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009317sed 's/^/| /' conftest.$ac_ext >&5
9318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321
9322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326# Binary search between lo and hi bounds.
9327while test "x$ac_lo" != "x$ac_hi"; do
9328 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009330/* confdefs.h. */
9331_ACEOF
9332cat confdefs.h >>conftest.$ac_ext
9333cat >>conftest.$ac_ext <<_ACEOF
9334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009335$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009336 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009337int
9338main ()
9339{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009340static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009341test_array [0] = 0
9342
9343 ;
9344 return 0;
9345}
9346_ACEOF
9347rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009348if { (ac_try="$ac_compile"
9349case "(($ac_try" in
9350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9351 *) ac_try_echo=$ac_try;;
9352esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009356 grep -v '^ *+' conftest.er1 >conftest.err
9357 rm -f conftest.er1
9358 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360 (exit $ac_status); } && {
9361 test -z "$ac_c_werror_flag" ||
9362 test ! -s conftest.err
9363 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ac_hi=$ac_mid
9365else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009367sed 's/^/| /' conftest.$ac_ext >&5
9368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371
9372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009373done
9374case $ac_lo in
9375?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009376'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009377 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009378See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009379echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009380See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009381 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382 else
9383 ac_cv_sizeof_float=0
9384 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009385esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009386else
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009388/* confdefs.h. */
9389_ACEOF
9390cat confdefs.h >>conftest.$ac_ext
9391cat >>conftest.$ac_ext <<_ACEOF
9392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009393$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009394 typedef float ac__type_sizeof_;
9395static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9396static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009397#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009398#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009399int
9400main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009401{
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
9403 FILE *f = fopen ("conftest.val", "w");
9404 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009406 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009407 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009409 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009411 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 }
9413 else
9414 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009416 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009418 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009421
9422 ;
9423 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009424}
Martin v. Löwis11437992002-04-12 09:54:03 +00009425_ACEOF
9426rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427if { (ac_try="$ac_link"
9428case "(($ac_try" in
9429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9430 *) ac_try_echo=$ac_try;;
9431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437 { (case "(($ac_try" in
9438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9439 *) ac_try_echo=$ac_try;;
9440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 (exit $ac_status); }; }; then
9446 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009448 echo "$as_me: program exited with status $ac_status" >&5
9449echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009450sed 's/^/| /' conftest.$ac_ext >&5
9451
Martin v. Löwis11437992002-04-12 09:54:03 +00009452( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009455See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009456echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009457See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009458 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459 else
9460 ac_cv_sizeof_float=0
9461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009464fi
9465rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009466fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009467{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9468echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469
9470
9471
Martin v. Löwis11437992002-04-12 09:54:03 +00009472cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009473#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009474_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009475
9476
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009477{ echo "$as_me:$LINENO: checking for double" >&5
9478echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9479if test "${ac_cv_type_double+set}" = set; then
9480 echo $ECHO_N "(cached) $ECHO_C" >&6
9481else
9482 cat >conftest.$ac_ext <<_ACEOF
9483/* confdefs.h. */
9484_ACEOF
9485cat confdefs.h >>conftest.$ac_ext
9486cat >>conftest.$ac_ext <<_ACEOF
9487/* end confdefs.h. */
9488$ac_includes_default
9489typedef double ac__type_new_;
9490int
9491main ()
9492{
9493if ((ac__type_new_ *) 0)
9494 return 0;
9495if (sizeof (ac__type_new_))
9496 return 0;
9497 ;
9498 return 0;
9499}
9500_ACEOF
9501rm -f conftest.$ac_objext
9502if { (ac_try="$ac_compile"
9503case "(($ac_try" in
9504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9505 *) ac_try_echo=$ac_try;;
9506esac
9507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9508 (eval "$ac_compile") 2>conftest.er1
9509 ac_status=$?
9510 grep -v '^ *+' conftest.er1 >conftest.err
9511 rm -f conftest.er1
9512 cat conftest.err >&5
9513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9514 (exit $ac_status); } && {
9515 test -z "$ac_c_werror_flag" ||
9516 test ! -s conftest.err
9517 } && test -s conftest.$ac_objext; then
9518 ac_cv_type_double=yes
9519else
9520 echo "$as_me: failed program was:" >&5
9521sed 's/^/| /' conftest.$ac_ext >&5
9522
9523 ac_cv_type_double=no
9524fi
9525
9526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9527fi
9528{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9529echo "${ECHO_T}$ac_cv_type_double" >&6; }
9530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531# The cast to long int works around a bug in the HP C Compiler
9532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9534# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009535{ echo "$as_me:$LINENO: checking size of double" >&5
9536echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009537if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009538 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009539else
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 if test "$cross_compiling" = yes; then
9541 # Depending upon the size, compute the lo and hi bounds.
9542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* confdefs.h. */
9544_ACEOF
9545cat confdefs.h >>conftest.$ac_ext
9546cat >>conftest.$ac_ext <<_ACEOF
9547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009549 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009550int
9551main ()
9552{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009553static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009554test_array [0] = 0
9555
9556 ;
9557 return 0;
9558}
9559_ACEOF
9560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561if { (ac_try="$ac_compile"
9562case "(($ac_try" in
9563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9564 *) ac_try_echo=$ac_try;;
9565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009569 grep -v '^ *+' conftest.er1 >conftest.err
9570 rm -f conftest.er1
9571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 (exit $ac_status); } && {
9574 test -z "$ac_c_werror_flag" ||
9575 test ! -s conftest.err
9576 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 ac_lo=0 ac_mid=0
9578 while :; do
9579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009580/* confdefs.h. */
9581_ACEOF
9582cat confdefs.h >>conftest.$ac_ext
9583cat >>conftest.$ac_ext <<_ACEOF
9584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009585$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009586 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009587int
9588main ()
9589{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009590static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009591test_array [0] = 0
9592
9593 ;
9594 return 0;
9595}
9596_ACEOF
9597rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598if { (ac_try="$ac_compile"
9599case "(($ac_try" in
9600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9601 *) ac_try_echo=$ac_try;;
9602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009606 grep -v '^ *+' conftest.er1 >conftest.err
9607 rm -f conftest.er1
9608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610 (exit $ac_status); } && {
9611 test -z "$ac_c_werror_flag" ||
9612 test ! -s conftest.err
9613 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ac_hi=$ac_mid; break
9615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009617sed 's/^/| /' conftest.$ac_ext >&5
9618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009619 ac_lo=`expr $ac_mid + 1`
9620 if test $ac_lo -le $ac_mid; then
9621 ac_lo= ac_hi=
9622 break
9623 fi
9624 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626
9627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 done
9629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009631sed 's/^/| /' conftest.$ac_ext >&5
9632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009634/* confdefs.h. */
9635_ACEOF
9636cat confdefs.h >>conftest.$ac_ext
9637cat >>conftest.$ac_ext <<_ACEOF
9638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009639$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009640 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009641int
9642main ()
9643{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009644static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009645test_array [0] = 0
9646
9647 ;
9648 return 0;
9649}
9650_ACEOF
9651rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652if { (ac_try="$ac_compile"
9653case "(($ac_try" in
9654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9655 *) ac_try_echo=$ac_try;;
9656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009660 grep -v '^ *+' conftest.er1 >conftest.err
9661 rm -f conftest.er1
9662 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664 (exit $ac_status); } && {
9665 test -z "$ac_c_werror_flag" ||
9666 test ! -s conftest.err
9667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_hi=-1 ac_mid=-1
9669 while :; do
9670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* confdefs.h. */
9672_ACEOF
9673cat confdefs.h >>conftest.$ac_ext
9674cat >>conftest.$ac_ext <<_ACEOF
9675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009677 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009678int
9679main ()
9680{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009681static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009682test_array [0] = 0
9683
9684 ;
9685 return 0;
9686}
9687_ACEOF
9688rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689if { (ac_try="$ac_compile"
9690case "(($ac_try" in
9691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9692 *) ac_try_echo=$ac_try;;
9693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009697 grep -v '^ *+' conftest.er1 >conftest.err
9698 rm -f conftest.er1
9699 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701 (exit $ac_status); } && {
9702 test -z "$ac_c_werror_flag" ||
9703 test ! -s conftest.err
9704 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 ac_lo=$ac_mid; break
9706else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009708sed 's/^/| /' conftest.$ac_ext >&5
9709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710 ac_hi=`expr '(' $ac_mid ')' - 1`
9711 if test $ac_mid -le $ac_hi; then
9712 ac_lo= ac_hi=
9713 break
9714 fi
9715 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009717
9718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 done
9720else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009722sed 's/^/| /' conftest.$ac_ext >&5
9723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726
9727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729
9730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731# Binary search between lo and hi bounds.
9732while test "x$ac_lo" != "x$ac_hi"; do
9733 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* confdefs.h. */
9736_ACEOF
9737cat confdefs.h >>conftest.$ac_ext
9738cat >>conftest.$ac_ext <<_ACEOF
9739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009741 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009742int
9743main ()
9744{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009745static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009746test_array [0] = 0
9747
9748 ;
9749 return 0;
9750}
9751_ACEOF
9752rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753if { (ac_try="$ac_compile"
9754case "(($ac_try" in
9755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9756 *) ac_try_echo=$ac_try;;
9757esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009761 grep -v '^ *+' conftest.er1 >conftest.err
9762 rm -f conftest.er1
9763 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765 (exit $ac_status); } && {
9766 test -z "$ac_c_werror_flag" ||
9767 test ! -s conftest.err
9768 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ac_hi=$ac_mid
9770else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009772sed 's/^/| /' conftest.$ac_ext >&5
9773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776
9777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009778done
9779case $ac_lo in
9780?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009782 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009783See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009784echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009785See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009786 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787 else
9788 ac_cv_sizeof_double=0
9789 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009790esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009791else
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* confdefs.h. */
9794_ACEOF
9795cat confdefs.h >>conftest.$ac_ext
9796cat >>conftest.$ac_ext <<_ACEOF
9797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009799 typedef double ac__type_sizeof_;
9800static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9801static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009802#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009803#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009804int
9805main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009806{
Martin v. Löwis11437992002-04-12 09:54:03 +00009807
9808 FILE *f = fopen ("conftest.val", "w");
9809 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009811 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009814 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009815 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009816 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 }
9818 else
9819 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009821 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009823 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009826
9827 ;
9828 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009829}
Martin v. Löwis11437992002-04-12 09:54:03 +00009830_ACEOF
9831rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832if { (ac_try="$ac_link"
9833case "(($ac_try" in
9834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9835 *) ac_try_echo=$ac_try;;
9836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842 { (case "(($ac_try" in
9843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9844 *) ac_try_echo=$ac_try;;
9845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 (exit $ac_status); }; }; then
9851 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009853 echo "$as_me: program exited with status $ac_status" >&5
9854echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009855sed 's/^/| /' conftest.$ac_ext >&5
9856
Martin v. Löwis11437992002-04-12 09:54:03 +00009857( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009859 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009860See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009861echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009862See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009863 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 else
9865 ac_cv_sizeof_double=0
9866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009869fi
9870rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009871fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009872{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9873echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874
9875
9876
Martin v. Löwis11437992002-04-12 09:54:03 +00009877cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009878#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009879_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009880
9881
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009882{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9883echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9884if test "${ac_cv_type_fpos_t+set}" = set; then
9885 echo $ECHO_N "(cached) $ECHO_C" >&6
9886else
9887 cat >conftest.$ac_ext <<_ACEOF
9888/* confdefs.h. */
9889_ACEOF
9890cat confdefs.h >>conftest.$ac_ext
9891cat >>conftest.$ac_ext <<_ACEOF
9892/* end confdefs.h. */
9893$ac_includes_default
9894typedef fpos_t ac__type_new_;
9895int
9896main ()
9897{
9898if ((ac__type_new_ *) 0)
9899 return 0;
9900if (sizeof (ac__type_new_))
9901 return 0;
9902 ;
9903 return 0;
9904}
9905_ACEOF
9906rm -f conftest.$ac_objext
9907if { (ac_try="$ac_compile"
9908case "(($ac_try" in
9909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9910 *) ac_try_echo=$ac_try;;
9911esac
9912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9913 (eval "$ac_compile") 2>conftest.er1
9914 ac_status=$?
9915 grep -v '^ *+' conftest.er1 >conftest.err
9916 rm -f conftest.er1
9917 cat conftest.err >&5
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); } && {
9920 test -z "$ac_c_werror_flag" ||
9921 test ! -s conftest.err
9922 } && test -s conftest.$ac_objext; then
9923 ac_cv_type_fpos_t=yes
9924else
9925 echo "$as_me: failed program was:" >&5
9926sed 's/^/| /' conftest.$ac_ext >&5
9927
9928 ac_cv_type_fpos_t=no
9929fi
9930
9931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9932fi
9933{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9934echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936# The cast to long int works around a bug in the HP C Compiler
9937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9939# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009940{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9941echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009942if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009943 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009944else
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 if test "$cross_compiling" = yes; then
9946 # Depending upon the size, compute the lo and hi bounds.
9947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009948/* confdefs.h. */
9949_ACEOF
9950cat confdefs.h >>conftest.$ac_ext
9951cat >>conftest.$ac_ext <<_ACEOF
9952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009953$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009954 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009955int
9956main ()
9957{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009958static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009959test_array [0] = 0
9960
9961 ;
9962 return 0;
9963}
9964_ACEOF
9965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966if { (ac_try="$ac_compile"
9967case "(($ac_try" in
9968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9969 *) ac_try_echo=$ac_try;;
9970esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009974 grep -v '^ *+' conftest.er1 >conftest.err
9975 rm -f conftest.er1
9976 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978 (exit $ac_status); } && {
9979 test -z "$ac_c_werror_flag" ||
9980 test ! -s conftest.err
9981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 ac_lo=0 ac_mid=0
9983 while :; do
9984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009991 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009992int
9993main ()
9994{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009995static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009996test_array [0] = 0
9997
9998 ;
9999 return 0;
10000}
10001_ACEOF
10002rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003if { (ac_try="$ac_compile"
10004case "(($ac_try" in
10005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10006 *) ac_try_echo=$ac_try;;
10007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010011 grep -v '^ *+' conftest.er1 >conftest.err
10012 rm -f conftest.er1
10013 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015 (exit $ac_status); } && {
10016 test -z "$ac_c_werror_flag" ||
10017 test ! -s conftest.err
10018 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ac_hi=$ac_mid; break
10020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010022sed 's/^/| /' conftest.$ac_ext >&5
10023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024 ac_lo=`expr $ac_mid + 1`
10025 if test $ac_lo -le $ac_mid; then
10026 ac_lo= ac_hi=
10027 break
10028 fi
10029 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010031
10032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 done
10034else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010036sed 's/^/| /' conftest.$ac_ext >&5
10037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010039/* confdefs.h. */
10040_ACEOF
10041cat confdefs.h >>conftest.$ac_ext
10042cat >>conftest.$ac_ext <<_ACEOF
10043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010044$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010045 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010046int
10047main ()
10048{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010049static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010050test_array [0] = 0
10051
10052 ;
10053 return 0;
10054}
10055_ACEOF
10056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057if { (ac_try="$ac_compile"
10058case "(($ac_try" in
10059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10060 *) ac_try_echo=$ac_try;;
10061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010065 grep -v '^ *+' conftest.er1 >conftest.err
10066 rm -f conftest.er1
10067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069 (exit $ac_status); } && {
10070 test -z "$ac_c_werror_flag" ||
10071 test ! -s conftest.err
10072 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010073 ac_hi=-1 ac_mid=-1
10074 while :; do
10075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010076/* confdefs.h. */
10077_ACEOF
10078cat confdefs.h >>conftest.$ac_ext
10079cat >>conftest.$ac_ext <<_ACEOF
10080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010081$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010082 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010083int
10084main ()
10085{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010086static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010087test_array [0] = 0
10088
10089 ;
10090 return 0;
10091}
10092_ACEOF
10093rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094if { (ac_try="$ac_compile"
10095case "(($ac_try" in
10096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10097 *) ac_try_echo=$ac_try;;
10098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010102 grep -v '^ *+' conftest.er1 >conftest.err
10103 rm -f conftest.er1
10104 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106 (exit $ac_status); } && {
10107 test -z "$ac_c_werror_flag" ||
10108 test ! -s conftest.err
10109 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 ac_lo=$ac_mid; break
10111else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010113sed 's/^/| /' conftest.$ac_ext >&5
10114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115 ac_hi=`expr '(' $ac_mid ')' - 1`
10116 if test $ac_mid -le $ac_hi; then
10117 ac_lo= ac_hi=
10118 break
10119 fi
10120 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122
10123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 done
10125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010127sed 's/^/| /' conftest.$ac_ext >&5
10128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131
10132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
10135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136# Binary search between lo and hi bounds.
10137while test "x$ac_lo" != "x$ac_hi"; do
10138 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010140/* confdefs.h. */
10141_ACEOF
10142cat confdefs.h >>conftest.$ac_ext
10143cat >>conftest.$ac_ext <<_ACEOF
10144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010145$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010146 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010147int
10148main ()
10149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010150static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010151test_array [0] = 0
10152
10153 ;
10154 return 0;
10155}
10156_ACEOF
10157rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158if { (ac_try="$ac_compile"
10159case "(($ac_try" in
10160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10161 *) ac_try_echo=$ac_try;;
10162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010166 grep -v '^ *+' conftest.er1 >conftest.err
10167 rm -f conftest.er1
10168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170 (exit $ac_status); } && {
10171 test -z "$ac_c_werror_flag" ||
10172 test ! -s conftest.err
10173 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 ac_hi=$ac_mid
10175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010177sed 's/^/| /' conftest.$ac_ext >&5
10178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181
10182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010183done
10184case $ac_lo in
10185?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010186'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010187 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010188See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010189echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010190See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010191 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192 else
10193 ac_cv_sizeof_fpos_t=0
10194 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010195esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010196else
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010198/* confdefs.h. */
10199_ACEOF
10200cat confdefs.h >>conftest.$ac_ext
10201cat >>conftest.$ac_ext <<_ACEOF
10202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010203$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010204 typedef fpos_t ac__type_sizeof_;
10205static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10206static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010207#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010208#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010209int
10210main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010211{
Martin v. Löwis11437992002-04-12 09:54:03 +000010212
10213 FILE *f = fopen ("conftest.val", "w");
10214 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010216 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010219 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010221 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 }
10223 else
10224 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010226 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010228 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010231
10232 ;
10233 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010234}
Martin v. Löwis11437992002-04-12 09:54:03 +000010235_ACEOF
10236rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237if { (ac_try="$ac_link"
10238case "(($ac_try" in
10239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10240 *) ac_try_echo=$ac_try;;
10241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010243 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247 { (case "(($ac_try" in
10248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10249 *) ac_try_echo=$ac_try;;
10250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 (exit $ac_status); }; }; then
10256 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010257else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010258 echo "$as_me: program exited with status $ac_status" >&5
10259echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010260sed 's/^/| /' conftest.$ac_ext >&5
10261
Martin v. Löwis11437992002-04-12 09:54:03 +000010262( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010265See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010266echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010267See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010268 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269 else
10270 ac_cv_sizeof_fpos_t=0
10271 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010274fi
10275rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010276fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010277{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10278echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279
10280
10281
Martin v. Löwis11437992002-04-12 09:54:03 +000010282cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010283#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010284_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010285
Michael W. Hudson54241132001-12-07 15:38:26 +000010286
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010287{ echo "$as_me:$LINENO: checking for size_t" >&5
10288echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10289if test "${ac_cv_type_size_t+set}" = set; then
10290 echo $ECHO_N "(cached) $ECHO_C" >&6
10291else
10292 cat >conftest.$ac_ext <<_ACEOF
10293/* confdefs.h. */
10294_ACEOF
10295cat confdefs.h >>conftest.$ac_ext
10296cat >>conftest.$ac_ext <<_ACEOF
10297/* end confdefs.h. */
10298$ac_includes_default
10299typedef size_t ac__type_new_;
10300int
10301main ()
10302{
10303if ((ac__type_new_ *) 0)
10304 return 0;
10305if (sizeof (ac__type_new_))
10306 return 0;
10307 ;
10308 return 0;
10309}
10310_ACEOF
10311rm -f conftest.$ac_objext
10312if { (ac_try="$ac_compile"
10313case "(($ac_try" in
10314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315 *) ac_try_echo=$ac_try;;
10316esac
10317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10318 (eval "$ac_compile") 2>conftest.er1
10319 ac_status=$?
10320 grep -v '^ *+' conftest.er1 >conftest.err
10321 rm -f conftest.er1
10322 cat conftest.err >&5
10323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10324 (exit $ac_status); } && {
10325 test -z "$ac_c_werror_flag" ||
10326 test ! -s conftest.err
10327 } && test -s conftest.$ac_objext; then
10328 ac_cv_type_size_t=yes
10329else
10330 echo "$as_me: failed program was:" >&5
10331sed 's/^/| /' conftest.$ac_ext >&5
10332
10333 ac_cv_type_size_t=no
10334fi
10335
10336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10337fi
10338{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10339echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341# The cast to long int works around a bug in the HP C Compiler
10342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10344# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010345{ echo "$as_me:$LINENO: checking size of size_t" >&5
10346echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010347if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010348 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010349else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350 if test "$cross_compiling" = yes; then
10351 # Depending upon the size, compute the lo and hi bounds.
10352cat >conftest.$ac_ext <<_ACEOF
10353/* confdefs.h. */
10354_ACEOF
10355cat confdefs.h >>conftest.$ac_ext
10356cat >>conftest.$ac_ext <<_ACEOF
10357/* end confdefs.h. */
10358$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010359 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010360int
10361main ()
10362{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010363static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010364test_array [0] = 0
10365
10366 ;
10367 return 0;
10368}
10369_ACEOF
10370rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010371if { (ac_try="$ac_compile"
10372case "(($ac_try" in
10373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10374 *) ac_try_echo=$ac_try;;
10375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010378 ac_status=$?
10379 grep -v '^ *+' conftest.er1 >conftest.err
10380 rm -f conftest.er1
10381 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383 (exit $ac_status); } && {
10384 test -z "$ac_c_werror_flag" ||
10385 test ! -s conftest.err
10386 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010387 ac_lo=0 ac_mid=0
10388 while :; do
10389 cat >conftest.$ac_ext <<_ACEOF
10390/* confdefs.h. */
10391_ACEOF
10392cat confdefs.h >>conftest.$ac_ext
10393cat >>conftest.$ac_ext <<_ACEOF
10394/* end confdefs.h. */
10395$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010396 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010397int
10398main ()
10399{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010400static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010401test_array [0] = 0
10402
10403 ;
10404 return 0;
10405}
10406_ACEOF
10407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408if { (ac_try="$ac_compile"
10409case "(($ac_try" in
10410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10411 *) ac_try_echo=$ac_try;;
10412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010415 ac_status=$?
10416 grep -v '^ *+' conftest.er1 >conftest.err
10417 rm -f conftest.er1
10418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420 (exit $ac_status); } && {
10421 test -z "$ac_c_werror_flag" ||
10422 test ! -s conftest.err
10423 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424 ac_hi=$ac_mid; break
10425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010426 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427sed 's/^/| /' conftest.$ac_ext >&5
10428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429 ac_lo=`expr $ac_mid + 1`
10430 if test $ac_lo -le $ac_mid; then
10431 ac_lo= ac_hi=
10432 break
10433 fi
10434 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436
10437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010438 done
10439else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010440 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441sed 's/^/| /' conftest.$ac_ext >&5
10442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444/* confdefs.h. */
10445_ACEOF
10446cat confdefs.h >>conftest.$ac_ext
10447cat >>conftest.$ac_ext <<_ACEOF
10448/* end confdefs.h. */
10449$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010450 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010451int
10452main ()
10453{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010454static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010455test_array [0] = 0
10456
10457 ;
10458 return 0;
10459}
10460_ACEOF
10461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462if { (ac_try="$ac_compile"
10463case "(($ac_try" in
10464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10465 *) ac_try_echo=$ac_try;;
10466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469 ac_status=$?
10470 grep -v '^ *+' conftest.er1 >conftest.err
10471 rm -f conftest.er1
10472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474 (exit $ac_status); } && {
10475 test -z "$ac_c_werror_flag" ||
10476 test ! -s conftest.err
10477 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010478 ac_hi=-1 ac_mid=-1
10479 while :; do
10480 cat >conftest.$ac_ext <<_ACEOF
10481/* confdefs.h. */
10482_ACEOF
10483cat confdefs.h >>conftest.$ac_ext
10484cat >>conftest.$ac_ext <<_ACEOF
10485/* end confdefs.h. */
10486$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010487 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010488int
10489main ()
10490{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010491static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010492test_array [0] = 0
10493
10494 ;
10495 return 0;
10496}
10497_ACEOF
10498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499if { (ac_try="$ac_compile"
10500case "(($ac_try" in
10501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10502 *) ac_try_echo=$ac_try;;
10503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010506 ac_status=$?
10507 grep -v '^ *+' conftest.er1 >conftest.err
10508 rm -f conftest.er1
10509 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010511 (exit $ac_status); } && {
10512 test -z "$ac_c_werror_flag" ||
10513 test ! -s conftest.err
10514 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010515 ac_lo=$ac_mid; break
10516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010517 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518sed 's/^/| /' conftest.$ac_ext >&5
10519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520 ac_hi=`expr '(' $ac_mid ')' - 1`
10521 if test $ac_mid -le $ac_hi; then
10522 ac_lo= ac_hi=
10523 break
10524 fi
10525 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010527
10528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529 done
10530else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010531 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532sed 's/^/| /' conftest.$ac_ext >&5
10533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536
10537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539
10540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541# Binary search between lo and hi bounds.
10542while test "x$ac_lo" != "x$ac_hi"; do
10543 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10544 cat >conftest.$ac_ext <<_ACEOF
10545/* confdefs.h. */
10546_ACEOF
10547cat confdefs.h >>conftest.$ac_ext
10548cat >>conftest.$ac_ext <<_ACEOF
10549/* end confdefs.h. */
10550$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010551 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552int
10553main ()
10554{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010555static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010556test_array [0] = 0
10557
10558 ;
10559 return 0;
10560}
10561_ACEOF
10562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563if { (ac_try="$ac_compile"
10564case "(($ac_try" in
10565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10566 *) ac_try_echo=$ac_try;;
10567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010570 ac_status=$?
10571 grep -v '^ *+' conftest.er1 >conftest.err
10572 rm -f conftest.er1
10573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575 (exit $ac_status); } && {
10576 test -z "$ac_c_werror_flag" ||
10577 test ! -s conftest.err
10578 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579 ac_hi=$ac_mid
10580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010581 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582sed 's/^/| /' conftest.$ac_ext >&5
10583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586
10587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588done
10589case $ac_lo in
10590?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010591'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010592 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010594echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010596 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010597 else
10598 ac_cv_sizeof_size_t=0
10599 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600esac
10601else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602 cat >conftest.$ac_ext <<_ACEOF
10603/* confdefs.h. */
10604_ACEOF
10605cat confdefs.h >>conftest.$ac_ext
10606cat >>conftest.$ac_ext <<_ACEOF
10607/* end confdefs.h. */
10608$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010609 typedef size_t ac__type_sizeof_;
10610static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10611static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612#include <stdio.h>
10613#include <stdlib.h>
10614int
10615main ()
10616{
10617
10618 FILE *f = fopen ("conftest.val", "w");
10619 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010621 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010624 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010626 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627 }
10628 else
10629 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010631 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010633 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636
10637 ;
10638 return 0;
10639}
10640_ACEOF
10641rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642if { (ac_try="$ac_link"
10643case "(($ac_try" in
10644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10645 *) ac_try_echo=$ac_try;;
10646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652 { (case "(($ac_try" in
10653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10654 *) ac_try_echo=$ac_try;;
10655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660 (exit $ac_status); }; }; then
10661 ac_cv_sizeof_size_t=`cat conftest.val`
10662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010663 echo "$as_me: program exited with status $ac_status" >&5
10664echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665sed 's/^/| /' conftest.$ac_ext >&5
10666
10667( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010669 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010671echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010673 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674 else
10675 ac_cv_sizeof_size_t=0
10676 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679fi
10680rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010681fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010682{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10683echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684
10685
10686
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687cat >>confdefs.h <<_ACEOF
10688#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10689_ACEOF
10690
10691
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010692{ echo "$as_me:$LINENO: checking for pid_t" >&5
10693echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10694if test "${ac_cv_type_pid_t+set}" = set; then
10695 echo $ECHO_N "(cached) $ECHO_C" >&6
10696else
10697 cat >conftest.$ac_ext <<_ACEOF
10698/* confdefs.h. */
10699_ACEOF
10700cat confdefs.h >>conftest.$ac_ext
10701cat >>conftest.$ac_ext <<_ACEOF
10702/* end confdefs.h. */
10703$ac_includes_default
10704typedef pid_t ac__type_new_;
10705int
10706main ()
10707{
10708if ((ac__type_new_ *) 0)
10709 return 0;
10710if (sizeof (ac__type_new_))
10711 return 0;
10712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest.$ac_objext
10717if { (ac_try="$ac_compile"
10718case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
10722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10723 (eval "$ac_compile") 2>conftest.er1
10724 ac_status=$?
10725 grep -v '^ *+' conftest.er1 >conftest.err
10726 rm -f conftest.er1
10727 cat conftest.err >&5
10728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10729 (exit $ac_status); } && {
10730 test -z "$ac_c_werror_flag" ||
10731 test ! -s conftest.err
10732 } && test -s conftest.$ac_objext; then
10733 ac_cv_type_pid_t=yes
10734else
10735 echo "$as_me: failed program was:" >&5
10736sed 's/^/| /' conftest.$ac_ext >&5
10737
10738 ac_cv_type_pid_t=no
10739fi
10740
10741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10742fi
10743{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10744echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10745
Christian Heimes400adb02008-02-01 08:12:03 +000010746# The cast to long int works around a bug in the HP C Compiler
10747# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10748# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10749# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010750{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10751echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010752if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010753 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010754else
10755 if test "$cross_compiling" = yes; then
10756 # Depending upon the size, compute the lo and hi bounds.
10757cat >conftest.$ac_ext <<_ACEOF
10758/* confdefs.h. */
10759_ACEOF
10760cat confdefs.h >>conftest.$ac_ext
10761cat >>conftest.$ac_ext <<_ACEOF
10762/* end confdefs.h. */
10763$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010764 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010765int
10766main ()
10767{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010768static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010769test_array [0] = 0
10770
10771 ;
10772 return 0;
10773}
10774_ACEOF
10775rm -f conftest.$ac_objext
10776if { (ac_try="$ac_compile"
10777case "(($ac_try" in
10778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10779 *) ac_try_echo=$ac_try;;
10780esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010782 (eval "$ac_compile") 2>conftest.er1
10783 ac_status=$?
10784 grep -v '^ *+' conftest.er1 >conftest.err
10785 rm -f conftest.er1
10786 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010788 (exit $ac_status); } && {
10789 test -z "$ac_c_werror_flag" ||
10790 test ! -s conftest.err
10791 } && test -s conftest.$ac_objext; then
10792 ac_lo=0 ac_mid=0
10793 while :; do
10794 cat >conftest.$ac_ext <<_ACEOF
10795/* confdefs.h. */
10796_ACEOF
10797cat confdefs.h >>conftest.$ac_ext
10798cat >>conftest.$ac_ext <<_ACEOF
10799/* end confdefs.h. */
10800$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010801 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010802int
10803main ()
10804{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010805static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010806test_array [0] = 0
10807
10808 ;
10809 return 0;
10810}
10811_ACEOF
10812rm -f conftest.$ac_objext
10813if { (ac_try="$ac_compile"
10814case "(($ac_try" in
10815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10816 *) ac_try_echo=$ac_try;;
10817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010819 (eval "$ac_compile") 2>conftest.er1
10820 ac_status=$?
10821 grep -v '^ *+' conftest.er1 >conftest.err
10822 rm -f conftest.er1
10823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010825 (exit $ac_status); } && {
10826 test -z "$ac_c_werror_flag" ||
10827 test ! -s conftest.err
10828 } && test -s conftest.$ac_objext; then
10829 ac_hi=$ac_mid; break
10830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010831 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010832sed 's/^/| /' conftest.$ac_ext >&5
10833
10834 ac_lo=`expr $ac_mid + 1`
10835 if test $ac_lo -le $ac_mid; then
10836 ac_lo= ac_hi=
10837 break
10838 fi
10839 ac_mid=`expr 2 '*' $ac_mid + 1`
10840fi
10841
10842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10843 done
10844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010845 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010846sed 's/^/| /' conftest.$ac_ext >&5
10847
10848 cat >conftest.$ac_ext <<_ACEOF
10849/* confdefs.h. */
10850_ACEOF
10851cat confdefs.h >>conftest.$ac_ext
10852cat >>conftest.$ac_ext <<_ACEOF
10853/* end confdefs.h. */
10854$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010855 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010856int
10857main ()
10858{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010859static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010860test_array [0] = 0
10861
10862 ;
10863 return 0;
10864}
10865_ACEOF
10866rm -f conftest.$ac_objext
10867if { (ac_try="$ac_compile"
10868case "(($ac_try" in
10869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10870 *) ac_try_echo=$ac_try;;
10871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010873 (eval "$ac_compile") 2>conftest.er1
10874 ac_status=$?
10875 grep -v '^ *+' conftest.er1 >conftest.err
10876 rm -f conftest.er1
10877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010879 (exit $ac_status); } && {
10880 test -z "$ac_c_werror_flag" ||
10881 test ! -s conftest.err
10882 } && test -s conftest.$ac_objext; then
10883 ac_hi=-1 ac_mid=-1
10884 while :; do
10885 cat >conftest.$ac_ext <<_ACEOF
10886/* confdefs.h. */
10887_ACEOF
10888cat confdefs.h >>conftest.$ac_ext
10889cat >>conftest.$ac_ext <<_ACEOF
10890/* end confdefs.h. */
10891$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010892 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010893int
10894main ()
10895{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010897test_array [0] = 0
10898
10899 ;
10900 return 0;
10901}
10902_ACEOF
10903rm -f conftest.$ac_objext
10904if { (ac_try="$ac_compile"
10905case "(($ac_try" in
10906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10907 *) ac_try_echo=$ac_try;;
10908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010910 (eval "$ac_compile") 2>conftest.er1
10911 ac_status=$?
10912 grep -v '^ *+' conftest.er1 >conftest.err
10913 rm -f conftest.er1
10914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010916 (exit $ac_status); } && {
10917 test -z "$ac_c_werror_flag" ||
10918 test ! -s conftest.err
10919 } && test -s conftest.$ac_objext; then
10920 ac_lo=$ac_mid; break
10921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010922 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010923sed 's/^/| /' conftest.$ac_ext >&5
10924
10925 ac_hi=`expr '(' $ac_mid ')' - 1`
10926 if test $ac_mid -le $ac_hi; then
10927 ac_lo= ac_hi=
10928 break
10929 fi
10930 ac_mid=`expr 2 '*' $ac_mid`
10931fi
10932
10933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10934 done
10935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010936 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010937sed 's/^/| /' conftest.$ac_ext >&5
10938
10939 ac_lo= ac_hi=
10940fi
10941
10942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943fi
10944
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946# Binary search between lo and hi bounds.
10947while test "x$ac_lo" != "x$ac_hi"; do
10948 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10949 cat >conftest.$ac_ext <<_ACEOF
10950/* confdefs.h. */
10951_ACEOF
10952cat confdefs.h >>conftest.$ac_ext
10953cat >>conftest.$ac_ext <<_ACEOF
10954/* end confdefs.h. */
10955$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010956 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010957int
10958main ()
10959{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010960static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010961test_array [0] = 0
10962
10963 ;
10964 return 0;
10965}
10966_ACEOF
10967rm -f conftest.$ac_objext
10968if { (ac_try="$ac_compile"
10969case "(($ac_try" in
10970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10971 *) ac_try_echo=$ac_try;;
10972esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010974 (eval "$ac_compile") 2>conftest.er1
10975 ac_status=$?
10976 grep -v '^ *+' conftest.er1 >conftest.err
10977 rm -f conftest.er1
10978 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010980 (exit $ac_status); } && {
10981 test -z "$ac_c_werror_flag" ||
10982 test ! -s conftest.err
10983 } && test -s conftest.$ac_objext; then
10984 ac_hi=$ac_mid
10985else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010986 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010987sed 's/^/| /' conftest.$ac_ext >&5
10988
10989 ac_lo=`expr '(' $ac_mid ')' + 1`
10990fi
10991
10992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10993done
10994case $ac_lo in
10995?*) ac_cv_sizeof_pid_t=$ac_lo;;
10996'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010997 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010998See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010999echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011000See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011001 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011002 else
11003 ac_cv_sizeof_pid_t=0
11004 fi ;;
11005esac
11006else
11007 cat >conftest.$ac_ext <<_ACEOF
11008/* confdefs.h. */
11009_ACEOF
11010cat confdefs.h >>conftest.$ac_ext
11011cat >>conftest.$ac_ext <<_ACEOF
11012/* end confdefs.h. */
11013$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011014 typedef pid_t ac__type_sizeof_;
11015static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11016static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011017#include <stdio.h>
11018#include <stdlib.h>
11019int
11020main ()
11021{
11022
11023 FILE *f = fopen ("conftest.val", "w");
11024 if (! f)
11025 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011026 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011027 {
11028 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011029 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011030 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011031 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011032 }
11033 else
11034 {
11035 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011036 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011037 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011038 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011039 }
11040 return ferror (f) || fclose (f) != 0;
11041
11042 ;
11043 return 0;
11044}
11045_ACEOF
11046rm -f conftest$ac_exeext
11047if { (ac_try="$ac_link"
11048case "(($ac_try" in
11049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11050 *) ac_try_echo=$ac_try;;
11051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011053 (eval "$ac_link") 2>&5
11054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11057 { (case "(($ac_try" in
11058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11059 *) ac_try_echo=$ac_try;;
11060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011062 (eval "$ac_try") 2>&5
11063 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (exit $ac_status); }; }; then
11066 ac_cv_sizeof_pid_t=`cat conftest.val`
11067else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011068 echo "$as_me: program exited with status $ac_status" >&5
11069echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011070sed 's/^/| /' conftest.$ac_ext >&5
11071
11072( exit $ac_status )
11073if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011074 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011075See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011076echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011077See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011078 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011079 else
11080 ac_cv_sizeof_pid_t=0
11081 fi
11082fi
11083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11084fi
11085rm -f conftest.val
11086fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011087{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11088echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011089
11090
11091
11092cat >>confdefs.h <<_ACEOF
11093#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11094_ACEOF
11095
11096
Michael W. Hudson54241132001-12-07 15:38:26 +000011097
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011098{ echo "$as_me:$LINENO: checking for long long support" >&5
11099echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011100have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* confdefs.h. */
11103_ACEOF
11104cat confdefs.h >>conftest.$ac_ext
11105cat >>conftest.$ac_ext <<_ACEOF
11106/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108int
11109main ()
11110{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011111long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ;
11113 return 0;
11114}
11115_ACEOF
11116rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117if { (ac_try="$ac_compile"
11118case "(($ac_try" in
11119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11120 *) ac_try_echo=$ac_try;;
11121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011125 grep -v '^ *+' conftest.er1 >conftest.err
11126 rm -f conftest.er1
11127 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129 (exit $ac_status); } && {
11130 test -z "$ac_c_werror_flag" ||
11131 test ! -s conftest.err
11132 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011133
11134
11135cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011136#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011137_ACEOF
11138
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011139 have_long_long=yes
11140
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011143sed 's/^/| /' conftest.$ac_ext >&5
11144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011145
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147
11148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011149{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11150echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011151if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011152{ echo "$as_me:$LINENO: checking for long long" >&5
11153echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11154if test "${ac_cv_type_long_long+set}" = set; then
11155 echo $ECHO_N "(cached) $ECHO_C" >&6
11156else
11157 cat >conftest.$ac_ext <<_ACEOF
11158/* confdefs.h. */
11159_ACEOF
11160cat confdefs.h >>conftest.$ac_ext
11161cat >>conftest.$ac_ext <<_ACEOF
11162/* end confdefs.h. */
11163$ac_includes_default
11164typedef long long ac__type_new_;
11165int
11166main ()
11167{
11168if ((ac__type_new_ *) 0)
11169 return 0;
11170if (sizeof (ac__type_new_))
11171 return 0;
11172 ;
11173 return 0;
11174}
11175_ACEOF
11176rm -f conftest.$ac_objext
11177if { (ac_try="$ac_compile"
11178case "(($ac_try" in
11179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11180 *) ac_try_echo=$ac_try;;
11181esac
11182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11183 (eval "$ac_compile") 2>conftest.er1
11184 ac_status=$?
11185 grep -v '^ *+' conftest.er1 >conftest.err
11186 rm -f conftest.er1
11187 cat conftest.err >&5
11188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189 (exit $ac_status); } && {
11190 test -z "$ac_c_werror_flag" ||
11191 test ! -s conftest.err
11192 } && test -s conftest.$ac_objext; then
11193 ac_cv_type_long_long=yes
11194else
11195 echo "$as_me: failed program was:" >&5
11196sed 's/^/| /' conftest.$ac_ext >&5
11197
11198 ac_cv_type_long_long=no
11199fi
11200
11201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11202fi
11203{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11204echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206# The cast to long int works around a bug in the HP C Compiler
11207# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11208# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11209# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011210{ echo "$as_me:$LINENO: checking size of long long" >&5
11211echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011212if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011213 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011214else
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 if test "$cross_compiling" = yes; then
11216 # Depending upon the size, compute the lo and hi bounds.
11217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011218/* confdefs.h. */
11219_ACEOF
11220cat confdefs.h >>conftest.$ac_ext
11221cat >>conftest.$ac_ext <<_ACEOF
11222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011223$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011224 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011225int
11226main ()
11227{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011229test_array [0] = 0
11230
11231 ;
11232 return 0;
11233}
11234_ACEOF
11235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236if { (ac_try="$ac_compile"
11237case "(($ac_try" in
11238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11239 *) ac_try_echo=$ac_try;;
11240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011244 grep -v '^ *+' conftest.er1 >conftest.err
11245 rm -f conftest.er1
11246 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248 (exit $ac_status); } && {
11249 test -z "$ac_c_werror_flag" ||
11250 test ! -s conftest.err
11251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ac_lo=0 ac_mid=0
11253 while :; do
11254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* confdefs.h. */
11256_ACEOF
11257cat confdefs.h >>conftest.$ac_ext
11258cat >>conftest.$ac_ext <<_ACEOF
11259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011260$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011261 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011262int
11263main ()
11264{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011265static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011266test_array [0] = 0
11267
11268 ;
11269 return 0;
11270}
11271_ACEOF
11272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011273if { (ac_try="$ac_compile"
11274case "(($ac_try" in
11275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11276 *) ac_try_echo=$ac_try;;
11277esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011281 grep -v '^ *+' conftest.er1 >conftest.err
11282 rm -f conftest.er1
11283 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285 (exit $ac_status); } && {
11286 test -z "$ac_c_werror_flag" ||
11287 test ! -s conftest.err
11288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 ac_hi=$ac_mid; break
11290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011292sed 's/^/| /' conftest.$ac_ext >&5
11293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294 ac_lo=`expr $ac_mid + 1`
11295 if test $ac_lo -le $ac_mid; then
11296 ac_lo= ac_hi=
11297 break
11298 fi
11299 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301
11302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 done
11304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011306sed 's/^/| /' conftest.$ac_ext >&5
11307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011309/* confdefs.h. */
11310_ACEOF
11311cat confdefs.h >>conftest.$ac_ext
11312cat >>conftest.$ac_ext <<_ACEOF
11313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011314$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011315 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011316int
11317main ()
11318{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011320test_array [0] = 0
11321
11322 ;
11323 return 0;
11324}
11325_ACEOF
11326rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327if { (ac_try="$ac_compile"
11328case "(($ac_try" in
11329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11330 *) ac_try_echo=$ac_try;;
11331esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011335 grep -v '^ *+' conftest.er1 >conftest.err
11336 rm -f conftest.er1
11337 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339 (exit $ac_status); } && {
11340 test -z "$ac_c_werror_flag" ||
11341 test ! -s conftest.err
11342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ac_hi=-1 ac_mid=-1
11344 while :; do
11345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* confdefs.h. */
11347_ACEOF
11348cat confdefs.h >>conftest.$ac_ext
11349cat >>conftest.$ac_ext <<_ACEOF
11350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011351$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011352 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011353int
11354main ()
11355{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011356static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011357test_array [0] = 0
11358
11359 ;
11360 return 0;
11361}
11362_ACEOF
11363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364if { (ac_try="$ac_compile"
11365case "(($ac_try" in
11366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11367 *) ac_try_echo=$ac_try;;
11368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011372 grep -v '^ *+' conftest.er1 >conftest.err
11373 rm -f conftest.er1
11374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376 (exit $ac_status); } && {
11377 test -z "$ac_c_werror_flag" ||
11378 test ! -s conftest.err
11379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ac_lo=$ac_mid; break
11381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011383sed 's/^/| /' conftest.$ac_ext >&5
11384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385 ac_hi=`expr '(' $ac_mid ')' - 1`
11386 if test $ac_mid -le $ac_hi; then
11387 ac_lo= ac_hi=
11388 break
11389 fi
11390 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392
11393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 done
11395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011397sed 's/^/| /' conftest.$ac_ext >&5
11398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011401
11402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406# Binary search between lo and hi bounds.
11407while test "x$ac_lo" != "x$ac_hi"; do
11408 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011410/* confdefs.h. */
11411_ACEOF
11412cat confdefs.h >>conftest.$ac_ext
11413cat >>conftest.$ac_ext <<_ACEOF
11414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011415$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011416 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011417int
11418main ()
11419{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011421test_array [0] = 0
11422
11423 ;
11424 return 0;
11425}
11426_ACEOF
11427rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428if { (ac_try="$ac_compile"
11429case "(($ac_try" in
11430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11431 *) ac_try_echo=$ac_try;;
11432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011436 grep -v '^ *+' conftest.er1 >conftest.err
11437 rm -f conftest.er1
11438 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440 (exit $ac_status); } && {
11441 test -z "$ac_c_werror_flag" ||
11442 test ! -s conftest.err
11443 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 ac_hi=$ac_mid
11445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011447sed 's/^/| /' conftest.$ac_ext >&5
11448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451
11452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011453done
11454case $ac_lo in
11455?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011458See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011459echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011460See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011461 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462 else
11463 ac_cv_sizeof_long_long=0
11464 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011465esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011466else
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011468/* confdefs.h. */
11469_ACEOF
11470cat confdefs.h >>conftest.$ac_ext
11471cat >>conftest.$ac_ext <<_ACEOF
11472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011473$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011474 typedef long long ac__type_sizeof_;
11475static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11476static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011477#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011478#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011479int
11480main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011481{
Martin v. Löwis11437992002-04-12 09:54:03 +000011482
11483 FILE *f = fopen ("conftest.val", "w");
11484 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011486 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011489 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011491 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 }
11493 else
11494 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011496 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011498 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
11502 ;
11503 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011504}
Martin v. Löwis11437992002-04-12 09:54:03 +000011505_ACEOF
11506rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507if { (ac_try="$ac_link"
11508case "(($ac_try" in
11509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11510 *) ac_try_echo=$ac_try;;
11511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517 { (case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 (exit $ac_status); }; }; then
11526 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011528 echo "$as_me: program exited with status $ac_status" >&5
11529echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011530sed 's/^/| /' conftest.$ac_ext >&5
11531
Martin v. Löwis11437992002-04-12 09:54:03 +000011532( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011534 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011535See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011536echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011537See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011538 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539 else
11540 ac_cv_sizeof_long_long=0
11541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011544fi
11545rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011546fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011547{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11548echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011549
11550
11551
Martin v. Löwis11437992002-04-12 09:54:03 +000011552cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011553#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011554_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011555
Michael W. Hudson54241132001-12-07 15:38:26 +000011556
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011557fi
11558
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011559{ echo "$as_me:$LINENO: checking for long double support" >&5
11560echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011561have_long_double=no
11562cat >conftest.$ac_ext <<_ACEOF
11563/* confdefs.h. */
11564_ACEOF
11565cat confdefs.h >>conftest.$ac_ext
11566cat >>conftest.$ac_ext <<_ACEOF
11567/* end confdefs.h. */
11568
11569int
11570main ()
11571{
11572long double x; x = (long double)0;
11573 ;
11574 return 0;
11575}
11576_ACEOF
11577rm -f conftest.$ac_objext
11578if { (ac_try="$ac_compile"
11579case "(($ac_try" in
11580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11581 *) ac_try_echo=$ac_try;;
11582esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011584 (eval "$ac_compile") 2>conftest.er1
11585 ac_status=$?
11586 grep -v '^ *+' conftest.er1 >conftest.err
11587 rm -f conftest.er1
11588 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011590 (exit $ac_status); } && {
11591 test -z "$ac_c_werror_flag" ||
11592 test ! -s conftest.err
11593 } && test -s conftest.$ac_objext; then
11594
11595
11596cat >>confdefs.h <<\_ACEOF
11597#define HAVE_LONG_DOUBLE 1
11598_ACEOF
11599
11600 have_long_double=yes
11601
11602else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011603 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011604sed 's/^/| /' conftest.$ac_ext >&5
11605
11606
11607fi
11608
11609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011610{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11611echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011612if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011613{ echo "$as_me:$LINENO: checking for long double" >&5
11614echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11615if test "${ac_cv_type_long_double+set}" = set; then
11616 echo $ECHO_N "(cached) $ECHO_C" >&6
11617else
11618 cat >conftest.$ac_ext <<_ACEOF
11619/* confdefs.h. */
11620_ACEOF
11621cat confdefs.h >>conftest.$ac_ext
11622cat >>conftest.$ac_ext <<_ACEOF
11623/* end confdefs.h. */
11624$ac_includes_default
11625typedef long double ac__type_new_;
11626int
11627main ()
11628{
11629if ((ac__type_new_ *) 0)
11630 return 0;
11631if (sizeof (ac__type_new_))
11632 return 0;
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637rm -f conftest.$ac_objext
11638if { (ac_try="$ac_compile"
11639case "(($ac_try" in
11640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11641 *) ac_try_echo=$ac_try;;
11642esac
11643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11644 (eval "$ac_compile") 2>conftest.er1
11645 ac_status=$?
11646 grep -v '^ *+' conftest.er1 >conftest.err
11647 rm -f conftest.er1
11648 cat conftest.err >&5
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); } && {
11651 test -z "$ac_c_werror_flag" ||
11652 test ! -s conftest.err
11653 } && test -s conftest.$ac_objext; then
11654 ac_cv_type_long_double=yes
11655else
11656 echo "$as_me: failed program was:" >&5
11657sed 's/^/| /' conftest.$ac_ext >&5
11658
11659 ac_cv_type_long_double=no
11660fi
11661
11662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11663fi
11664{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11665echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11666
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011667# The cast to long int works around a bug in the HP C Compiler
11668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11670# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011671{ echo "$as_me:$LINENO: checking size of long double" >&5
11672echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011673if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011674 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011675else
11676 if test "$cross_compiling" = yes; then
11677 # Depending upon the size, compute the lo and hi bounds.
11678cat >conftest.$ac_ext <<_ACEOF
11679/* confdefs.h. */
11680_ACEOF
11681cat confdefs.h >>conftest.$ac_ext
11682cat >>conftest.$ac_ext <<_ACEOF
11683/* end confdefs.h. */
11684$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011685 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011686int
11687main ()
11688{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011690test_array [0] = 0
11691
11692 ;
11693 return 0;
11694}
11695_ACEOF
11696rm -f conftest.$ac_objext
11697if { (ac_try="$ac_compile"
11698case "(($ac_try" in
11699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11700 *) ac_try_echo=$ac_try;;
11701esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011703 (eval "$ac_compile") 2>conftest.er1
11704 ac_status=$?
11705 grep -v '^ *+' conftest.er1 >conftest.err
11706 rm -f conftest.er1
11707 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011709 (exit $ac_status); } && {
11710 test -z "$ac_c_werror_flag" ||
11711 test ! -s conftest.err
11712 } && test -s conftest.$ac_objext; then
11713 ac_lo=0 ac_mid=0
11714 while :; do
11715 cat >conftest.$ac_ext <<_ACEOF
11716/* confdefs.h. */
11717_ACEOF
11718cat confdefs.h >>conftest.$ac_ext
11719cat >>conftest.$ac_ext <<_ACEOF
11720/* end confdefs.h. */
11721$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011722 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011723int
11724main ()
11725{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011727test_array [0] = 0
11728
11729 ;
11730 return 0;
11731}
11732_ACEOF
11733rm -f conftest.$ac_objext
11734if { (ac_try="$ac_compile"
11735case "(($ac_try" in
11736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11737 *) ac_try_echo=$ac_try;;
11738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011740 (eval "$ac_compile") 2>conftest.er1
11741 ac_status=$?
11742 grep -v '^ *+' conftest.er1 >conftest.err
11743 rm -f conftest.er1
11744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011746 (exit $ac_status); } && {
11747 test -z "$ac_c_werror_flag" ||
11748 test ! -s conftest.err
11749 } && test -s conftest.$ac_objext; then
11750 ac_hi=$ac_mid; break
11751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011752 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011753sed 's/^/| /' conftest.$ac_ext >&5
11754
11755 ac_lo=`expr $ac_mid + 1`
11756 if test $ac_lo -le $ac_mid; then
11757 ac_lo= ac_hi=
11758 break
11759 fi
11760 ac_mid=`expr 2 '*' $ac_mid + 1`
11761fi
11762
11763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11764 done
11765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011766 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011767sed 's/^/| /' conftest.$ac_ext >&5
11768
11769 cat >conftest.$ac_ext <<_ACEOF
11770/* confdefs.h. */
11771_ACEOF
11772cat confdefs.h >>conftest.$ac_ext
11773cat >>conftest.$ac_ext <<_ACEOF
11774/* end confdefs.h. */
11775$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011776 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011777int
11778main ()
11779{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011781test_array [0] = 0
11782
11783 ;
11784 return 0;
11785}
11786_ACEOF
11787rm -f conftest.$ac_objext
11788if { (ac_try="$ac_compile"
11789case "(($ac_try" in
11790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11791 *) ac_try_echo=$ac_try;;
11792esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011794 (eval "$ac_compile") 2>conftest.er1
11795 ac_status=$?
11796 grep -v '^ *+' conftest.er1 >conftest.err
11797 rm -f conftest.er1
11798 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011800 (exit $ac_status); } && {
11801 test -z "$ac_c_werror_flag" ||
11802 test ! -s conftest.err
11803 } && test -s conftest.$ac_objext; then
11804 ac_hi=-1 ac_mid=-1
11805 while :; do
11806 cat >conftest.$ac_ext <<_ACEOF
11807/* confdefs.h. */
11808_ACEOF
11809cat confdefs.h >>conftest.$ac_ext
11810cat >>conftest.$ac_ext <<_ACEOF
11811/* end confdefs.h. */
11812$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011813 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011814int
11815main ()
11816{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011818test_array [0] = 0
11819
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824rm -f conftest.$ac_objext
11825if { (ac_try="$ac_compile"
11826case "(($ac_try" in
11827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11828 *) ac_try_echo=$ac_try;;
11829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011831 (eval "$ac_compile") 2>conftest.er1
11832 ac_status=$?
11833 grep -v '^ *+' conftest.er1 >conftest.err
11834 rm -f conftest.er1
11835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011837 (exit $ac_status); } && {
11838 test -z "$ac_c_werror_flag" ||
11839 test ! -s conftest.err
11840 } && test -s conftest.$ac_objext; then
11841 ac_lo=$ac_mid; break
11842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011843 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011844sed 's/^/| /' conftest.$ac_ext >&5
11845
11846 ac_hi=`expr '(' $ac_mid ')' - 1`
11847 if test $ac_mid -le $ac_hi; then
11848 ac_lo= ac_hi=
11849 break
11850 fi
11851 ac_mid=`expr 2 '*' $ac_mid`
11852fi
11853
11854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855 done
11856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011857 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011858sed 's/^/| /' conftest.$ac_ext >&5
11859
11860 ac_lo= ac_hi=
11861fi
11862
11863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11864fi
11865
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867# Binary search between lo and hi bounds.
11868while test "x$ac_lo" != "x$ac_hi"; do
11869 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11870 cat >conftest.$ac_ext <<_ACEOF
11871/* confdefs.h. */
11872_ACEOF
11873cat confdefs.h >>conftest.$ac_ext
11874cat >>conftest.$ac_ext <<_ACEOF
11875/* end confdefs.h. */
11876$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011877 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011878int
11879main ()
11880{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011882test_array [0] = 0
11883
11884 ;
11885 return 0;
11886}
11887_ACEOF
11888rm -f conftest.$ac_objext
11889if { (ac_try="$ac_compile"
11890case "(($ac_try" in
11891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11892 *) ac_try_echo=$ac_try;;
11893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011895 (eval "$ac_compile") 2>conftest.er1
11896 ac_status=$?
11897 grep -v '^ *+' conftest.er1 >conftest.err
11898 rm -f conftest.er1
11899 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011901 (exit $ac_status); } && {
11902 test -z "$ac_c_werror_flag" ||
11903 test ! -s conftest.err
11904 } && test -s conftest.$ac_objext; then
11905 ac_hi=$ac_mid
11906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011907 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011908sed 's/^/| /' conftest.$ac_ext >&5
11909
11910 ac_lo=`expr '(' $ac_mid ')' + 1`
11911fi
11912
11913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914done
11915case $ac_lo in
11916?*) ac_cv_sizeof_long_double=$ac_lo;;
11917'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011918 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011919See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011920echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011921See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011922 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011923 else
11924 ac_cv_sizeof_long_double=0
11925 fi ;;
11926esac
11927else
11928 cat >conftest.$ac_ext <<_ACEOF
11929/* confdefs.h. */
11930_ACEOF
11931cat confdefs.h >>conftest.$ac_ext
11932cat >>conftest.$ac_ext <<_ACEOF
11933/* end confdefs.h. */
11934$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011935 typedef long double ac__type_sizeof_;
11936static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11937static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011938#include <stdio.h>
11939#include <stdlib.h>
11940int
11941main ()
11942{
11943
11944 FILE *f = fopen ("conftest.val", "w");
11945 if (! f)
11946 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011947 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948 {
11949 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011950 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011951 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011952 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011953 }
11954 else
11955 {
11956 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011957 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011958 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011959 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960 }
11961 return ferror (f) || fclose (f) != 0;
11962
11963 ;
11964 return 0;
11965}
11966_ACEOF
11967rm -f conftest$ac_exeext
11968if { (ac_try="$ac_link"
11969case "(($ac_try" in
11970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11971 *) ac_try_echo=$ac_try;;
11972esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011974 (eval "$ac_link") 2>&5
11975 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11978 { (case "(($ac_try" in
11979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11980 *) ac_try_echo=$ac_try;;
11981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011983 (eval "$ac_try") 2>&5
11984 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (exit $ac_status); }; }; then
11987 ac_cv_sizeof_long_double=`cat conftest.val`
11988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011989 echo "$as_me: program exited with status $ac_status" >&5
11990echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991sed 's/^/| /' conftest.$ac_ext >&5
11992
11993( exit $ac_status )
11994if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011995 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011996See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011997echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011998See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011999 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012000 else
12001 ac_cv_sizeof_long_double=0
12002 fi
12003fi
12004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12005fi
12006rm -f conftest.val
12007fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012008{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12009echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010
12011
12012
12013cat >>confdefs.h <<_ACEOF
12014#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12015_ACEOF
12016
12017
12018fi
12019
12020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012021{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12022echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012023have_c99_bool=no
12024cat >conftest.$ac_ext <<_ACEOF
12025/* confdefs.h. */
12026_ACEOF
12027cat confdefs.h >>conftest.$ac_ext
12028cat >>conftest.$ac_ext <<_ACEOF
12029/* end confdefs.h. */
12030
12031int
12032main ()
12033{
12034_Bool x; x = (_Bool)0;
12035 ;
12036 return 0;
12037}
12038_ACEOF
12039rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012040if { (ac_try="$ac_compile"
12041case "(($ac_try" in
12042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12043 *) ac_try_echo=$ac_try;;
12044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012047 ac_status=$?
12048 grep -v '^ *+' conftest.er1 >conftest.err
12049 rm -f conftest.er1
12050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052 (exit $ac_status); } && {
12053 test -z "$ac_c_werror_flag" ||
12054 test ! -s conftest.err
12055 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012056
12057
12058cat >>confdefs.h <<\_ACEOF
12059#define HAVE_C99_BOOL 1
12060_ACEOF
12061
12062 have_c99_bool=yes
12063
12064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012065 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012066sed 's/^/| /' conftest.$ac_ext >&5
12067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068
Thomas Woutersb2137042007-02-01 18:02:27 +000012069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070
12071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012072{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12073echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012074if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012075{ echo "$as_me:$LINENO: checking for _Bool" >&5
12076echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12077if test "${ac_cv_type__Bool+set}" = set; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
12079else
12080 cat >conftest.$ac_ext <<_ACEOF
12081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
12086$ac_includes_default
12087typedef _Bool ac__type_new_;
12088int
12089main ()
12090{
12091if ((ac__type_new_ *) 0)
12092 return 0;
12093if (sizeof (ac__type_new_))
12094 return 0;
12095 ;
12096 return 0;
12097}
12098_ACEOF
12099rm -f conftest.$ac_objext
12100if { (ac_try="$ac_compile"
12101case "(($ac_try" in
12102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12103 *) ac_try_echo=$ac_try;;
12104esac
12105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12106 (eval "$ac_compile") 2>conftest.er1
12107 ac_status=$?
12108 grep -v '^ *+' conftest.er1 >conftest.err
12109 rm -f conftest.er1
12110 cat conftest.err >&5
12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112 (exit $ac_status); } && {
12113 test -z "$ac_c_werror_flag" ||
12114 test ! -s conftest.err
12115 } && test -s conftest.$ac_objext; then
12116 ac_cv_type__Bool=yes
12117else
12118 echo "$as_me: failed program was:" >&5
12119sed 's/^/| /' conftest.$ac_ext >&5
12120
12121 ac_cv_type__Bool=no
12122fi
12123
12124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12125fi
12126{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12127echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129# The cast to long int works around a bug in the HP C Compiler
12130# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12131# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12132# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012133{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12134echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012135if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012136 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012137else
12138 if test "$cross_compiling" = yes; then
12139 # Depending upon the size, compute the lo and hi bounds.
12140cat >conftest.$ac_ext <<_ACEOF
12141/* confdefs.h. */
12142_ACEOF
12143cat confdefs.h >>conftest.$ac_ext
12144cat >>conftest.$ac_ext <<_ACEOF
12145/* end confdefs.h. */
12146$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012147 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012148int
12149main ()
12150{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012152test_array [0] = 0
12153
12154 ;
12155 return 0;
12156}
12157_ACEOF
12158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159if { (ac_try="$ac_compile"
12160case "(($ac_try" in
12161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12162 *) ac_try_echo=$ac_try;;
12163esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012166 ac_status=$?
12167 grep -v '^ *+' conftest.er1 >conftest.err
12168 rm -f conftest.er1
12169 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171 (exit $ac_status); } && {
12172 test -z "$ac_c_werror_flag" ||
12173 test ! -s conftest.err
12174 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012175 ac_lo=0 ac_mid=0
12176 while :; do
12177 cat >conftest.$ac_ext <<_ACEOF
12178/* confdefs.h. */
12179_ACEOF
12180cat confdefs.h >>conftest.$ac_ext
12181cat >>conftest.$ac_ext <<_ACEOF
12182/* end confdefs.h. */
12183$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012184 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012185int
12186main ()
12187{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012188static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012189test_array [0] = 0
12190
12191 ;
12192 return 0;
12193}
12194_ACEOF
12195rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196if { (ac_try="$ac_compile"
12197case "(($ac_try" in
12198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12199 *) ac_try_echo=$ac_try;;
12200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012203 ac_status=$?
12204 grep -v '^ *+' conftest.er1 >conftest.err
12205 rm -f conftest.er1
12206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208 (exit $ac_status); } && {
12209 test -z "$ac_c_werror_flag" ||
12210 test ! -s conftest.err
12211 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012212 ac_hi=$ac_mid; break
12213else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012214 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012215sed 's/^/| /' conftest.$ac_ext >&5
12216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217 ac_lo=`expr $ac_mid + 1`
12218 if test $ac_lo -le $ac_mid; then
12219 ac_lo= ac_hi=
12220 break
12221 fi
12222 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224
12225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012226 done
12227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012228 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012229sed 's/^/| /' conftest.$ac_ext >&5
12230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012232/* confdefs.h. */
12233_ACEOF
12234cat confdefs.h >>conftest.$ac_ext
12235cat >>conftest.$ac_ext <<_ACEOF
12236/* end confdefs.h. */
12237$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012238 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012239int
12240main ()
12241{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012243test_array [0] = 0
12244
12245 ;
12246 return 0;
12247}
12248_ACEOF
12249rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250if { (ac_try="$ac_compile"
12251case "(($ac_try" in
12252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12253 *) ac_try_echo=$ac_try;;
12254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012257 ac_status=$?
12258 grep -v '^ *+' conftest.er1 >conftest.err
12259 rm -f conftest.er1
12260 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262 (exit $ac_status); } && {
12263 test -z "$ac_c_werror_flag" ||
12264 test ! -s conftest.err
12265 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012266 ac_hi=-1 ac_mid=-1
12267 while :; do
12268 cat >conftest.$ac_ext <<_ACEOF
12269/* confdefs.h. */
12270_ACEOF
12271cat confdefs.h >>conftest.$ac_ext
12272cat >>conftest.$ac_ext <<_ACEOF
12273/* end confdefs.h. */
12274$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012275 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012276int
12277main ()
12278{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012280test_array [0] = 0
12281
12282 ;
12283 return 0;
12284}
12285_ACEOF
12286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287if { (ac_try="$ac_compile"
12288case "(($ac_try" in
12289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12290 *) ac_try_echo=$ac_try;;
12291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012294 ac_status=$?
12295 grep -v '^ *+' conftest.er1 >conftest.err
12296 rm -f conftest.er1
12297 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299 (exit $ac_status); } && {
12300 test -z "$ac_c_werror_flag" ||
12301 test ! -s conftest.err
12302 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012303 ac_lo=$ac_mid; break
12304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012305 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012306sed 's/^/| /' conftest.$ac_ext >&5
12307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308 ac_hi=`expr '(' $ac_mid ')' - 1`
12309 if test $ac_mid -le $ac_hi; then
12310 ac_lo= ac_hi=
12311 break
12312 fi
12313 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315
12316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012317 done
12318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012319 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012320sed 's/^/| /' conftest.$ac_ext >&5
12321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324
12325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012329# Binary search between lo and hi bounds.
12330while test "x$ac_lo" != "x$ac_hi"; do
12331 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12332 cat >conftest.$ac_ext <<_ACEOF
12333/* confdefs.h. */
12334_ACEOF
12335cat confdefs.h >>conftest.$ac_ext
12336cat >>conftest.$ac_ext <<_ACEOF
12337/* end confdefs.h. */
12338$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012339 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012340int
12341main ()
12342{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012344test_array [0] = 0
12345
12346 ;
12347 return 0;
12348}
12349_ACEOF
12350rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351if { (ac_try="$ac_compile"
12352case "(($ac_try" in
12353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12354 *) ac_try_echo=$ac_try;;
12355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012358 ac_status=$?
12359 grep -v '^ *+' conftest.er1 >conftest.err
12360 rm -f conftest.er1
12361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363 (exit $ac_status); } && {
12364 test -z "$ac_c_werror_flag" ||
12365 test ! -s conftest.err
12366 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012367 ac_hi=$ac_mid
12368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012369 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012370sed 's/^/| /' conftest.$ac_ext >&5
12371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374
12375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012376done
12377case $ac_lo in
12378?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012380 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012381See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012382echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012383See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012384 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385 else
12386 ac_cv_sizeof__Bool=0
12387 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012388esac
12389else
12390 cat >conftest.$ac_ext <<_ACEOF
12391/* confdefs.h. */
12392_ACEOF
12393cat confdefs.h >>conftest.$ac_ext
12394cat >>conftest.$ac_ext <<_ACEOF
12395/* end confdefs.h. */
12396$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012397 typedef _Bool ac__type_sizeof_;
12398static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12399static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012400#include <stdio.h>
12401#include <stdlib.h>
12402int
12403main ()
12404{
12405
12406 FILE *f = fopen ("conftest.val", "w");
12407 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012409 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012410 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012412 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012414 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012415 }
12416 else
12417 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012419 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012421 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012422 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012424
12425 ;
12426 return 0;
12427}
12428_ACEOF
12429rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430if { (ac_try="$ac_link"
12431case "(($ac_try" in
12432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12433 *) ac_try_echo=$ac_try;;
12434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012437 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440 { (case "(($ac_try" in
12441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12442 *) ac_try_echo=$ac_try;;
12443esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012446 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012448 (exit $ac_status); }; }; then
12449 ac_cv_sizeof__Bool=`cat conftest.val`
12450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012451 echo "$as_me: program exited with status $ac_status" >&5
12452echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012453sed 's/^/| /' conftest.$ac_ext >&5
12454
12455( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012458See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012459echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012460See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012461 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462 else
12463 ac_cv_sizeof__Bool=0
12464 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012467fi
12468rm -f conftest.val
12469fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012470{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12471echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472
12473
12474
Thomas Woutersb2137042007-02-01 18:02:27 +000012475cat >>confdefs.h <<_ACEOF
12476#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12477_ACEOF
12478
12479
12480fi
12481
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012482{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12483echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012484if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012485 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012486else
12487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* confdefs.h. */
12489_ACEOF
12490cat confdefs.h >>conftest.$ac_ext
12491cat >>conftest.$ac_ext <<_ACEOF
12492/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012493#ifdef HAVE_STDINT_H
12494 #include <stdint.h>
12495 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012497typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012501if ((ac__type_new_ *) 0)
12502 return 0;
12503if (sizeof (ac__type_new_))
12504 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ;
12506 return 0;
12507}
12508_ACEOF
12509rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510if { (ac_try="$ac_compile"
12511case "(($ac_try" in
12512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12513 *) ac_try_echo=$ac_try;;
12514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012518 grep -v '^ *+' conftest.er1 >conftest.err
12519 rm -f conftest.er1
12520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522 (exit $ac_status); } && {
12523 test -z "$ac_c_werror_flag" ||
12524 test ! -s conftest.err
12525 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012526 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012527else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012529sed 's/^/| /' conftest.$ac_ext >&5
12530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012531 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533
12534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012535fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012536{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12537echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12538if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012539
12540cat >>confdefs.h <<_ACEOF
12541#define HAVE_UINTPTR_T 1
12542_ACEOF
12543
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012544{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12545echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12546if test "${ac_cv_type_uintptr_t+set}" = set; then
12547 echo $ECHO_N "(cached) $ECHO_C" >&6
12548else
12549 cat >conftest.$ac_ext <<_ACEOF
12550/* confdefs.h. */
12551_ACEOF
12552cat confdefs.h >>conftest.$ac_ext
12553cat >>conftest.$ac_ext <<_ACEOF
12554/* end confdefs.h. */
12555$ac_includes_default
12556typedef uintptr_t ac__type_new_;
12557int
12558main ()
12559{
12560if ((ac__type_new_ *) 0)
12561 return 0;
12562if (sizeof (ac__type_new_))
12563 return 0;
12564 ;
12565 return 0;
12566}
12567_ACEOF
12568rm -f conftest.$ac_objext
12569if { (ac_try="$ac_compile"
12570case "(($ac_try" in
12571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12572 *) ac_try_echo=$ac_try;;
12573esac
12574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12575 (eval "$ac_compile") 2>conftest.er1
12576 ac_status=$?
12577 grep -v '^ *+' conftest.er1 >conftest.err
12578 rm -f conftest.er1
12579 cat conftest.err >&5
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); } && {
12582 test -z "$ac_c_werror_flag" ||
12583 test ! -s conftest.err
12584 } && test -s conftest.$ac_objext; then
12585 ac_cv_type_uintptr_t=yes
12586else
12587 echo "$as_me: failed program was:" >&5
12588sed 's/^/| /' conftest.$ac_ext >&5
12589
12590 ac_cv_type_uintptr_t=no
12591fi
12592
12593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12594fi
12595{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12596echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598# The cast to long int works around a bug in the HP C Compiler
12599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12601# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012602{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12603echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012604if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012605 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 if test "$cross_compiling" = yes; then
12608 # Depending upon the size, compute the lo and hi bounds.
12609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012610/* confdefs.h. */
12611_ACEOF
12612cat confdefs.h >>conftest.$ac_ext
12613cat >>conftest.$ac_ext <<_ACEOF
12614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012615$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012616 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012617int
12618main ()
12619{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012621test_array [0] = 0
12622
12623 ;
12624 return 0;
12625}
12626_ACEOF
12627rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628if { (ac_try="$ac_compile"
12629case "(($ac_try" in
12630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12631 *) ac_try_echo=$ac_try;;
12632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012636 grep -v '^ *+' conftest.er1 >conftest.err
12637 rm -f conftest.er1
12638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012640 (exit $ac_status); } && {
12641 test -z "$ac_c_werror_flag" ||
12642 test ! -s conftest.err
12643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ac_lo=0 ac_mid=0
12645 while :; do
12646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* confdefs.h. */
12648_ACEOF
12649cat confdefs.h >>conftest.$ac_ext
12650cat >>conftest.$ac_ext <<_ACEOF
12651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012652$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012653 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012654int
12655main ()
12656{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012658test_array [0] = 0
12659
12660 ;
12661 return 0;
12662}
12663_ACEOF
12664rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665if { (ac_try="$ac_compile"
12666case "(($ac_try" in
12667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12668 *) ac_try_echo=$ac_try;;
12669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012673 grep -v '^ *+' conftest.er1 >conftest.err
12674 rm -f conftest.er1
12675 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677 (exit $ac_status); } && {
12678 test -z "$ac_c_werror_flag" ||
12679 test ! -s conftest.err
12680 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ac_hi=$ac_mid; break
12682else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012684sed 's/^/| /' conftest.$ac_ext >&5
12685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686 ac_lo=`expr $ac_mid + 1`
12687 if test $ac_lo -le $ac_mid; then
12688 ac_lo= ac_hi=
12689 break
12690 fi
12691 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693
12694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 done
12696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012698sed 's/^/| /' conftest.$ac_ext >&5
12699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012701/* confdefs.h. */
12702_ACEOF
12703cat confdefs.h >>conftest.$ac_ext
12704cat >>conftest.$ac_ext <<_ACEOF
12705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012706$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012707 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012708int
12709main ()
12710{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012712test_array [0] = 0
12713
12714 ;
12715 return 0;
12716}
12717_ACEOF
12718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719if { (ac_try="$ac_compile"
12720case "(($ac_try" in
12721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12722 *) ac_try_echo=$ac_try;;
12723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012727 grep -v '^ *+' conftest.er1 >conftest.err
12728 rm -f conftest.er1
12729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731 (exit $ac_status); } && {
12732 test -z "$ac_c_werror_flag" ||
12733 test ! -s conftest.err
12734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ac_hi=-1 ac_mid=-1
12736 while :; do
12737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* confdefs.h. */
12739_ACEOF
12740cat confdefs.h >>conftest.$ac_ext
12741cat >>conftest.$ac_ext <<_ACEOF
12742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012743$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012744 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012745int
12746main ()
12747{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012749test_array [0] = 0
12750
12751 ;
12752 return 0;
12753}
12754_ACEOF
12755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756if { (ac_try="$ac_compile"
12757case "(($ac_try" in
12758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12759 *) ac_try_echo=$ac_try;;
12760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012764 grep -v '^ *+' conftest.er1 >conftest.err
12765 rm -f conftest.er1
12766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768 (exit $ac_status); } && {
12769 test -z "$ac_c_werror_flag" ||
12770 test ! -s conftest.err
12771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 ac_lo=$ac_mid; break
12773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012775sed 's/^/| /' conftest.$ac_ext >&5
12776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777 ac_hi=`expr '(' $ac_mid ')' - 1`
12778 if test $ac_mid -le $ac_hi; then
12779 ac_lo= ac_hi=
12780 break
12781 fi
12782 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784
12785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 done
12787else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012789sed 's/^/| /' conftest.$ac_ext >&5
12790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793
12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798# Binary search between lo and hi bounds.
12799while test "x$ac_lo" != "x$ac_hi"; do
12800 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* confdefs.h. */
12803_ACEOF
12804cat confdefs.h >>conftest.$ac_ext
12805cat >>conftest.$ac_ext <<_ACEOF
12806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012807$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012808 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012809int
12810main ()
12811{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012813test_array [0] = 0
12814
12815 ;
12816 return 0;
12817}
12818_ACEOF
12819rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820if { (ac_try="$ac_compile"
12821case "(($ac_try" in
12822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12823 *) ac_try_echo=$ac_try;;
12824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012828 grep -v '^ *+' conftest.er1 >conftest.err
12829 rm -f conftest.er1
12830 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832 (exit $ac_status); } && {
12833 test -z "$ac_c_werror_flag" ||
12834 test ! -s conftest.err
12835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 ac_hi=$ac_mid
12837else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012839sed 's/^/| /' conftest.$ac_ext >&5
12840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843
12844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012845done
12846case $ac_lo in
12847?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012849 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012850See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012851echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012852See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012853 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854 else
12855 ac_cv_sizeof_uintptr_t=0
12856 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012857esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012860/* confdefs.h. */
12861_ACEOF
12862cat confdefs.h >>conftest.$ac_ext
12863cat >>conftest.$ac_ext <<_ACEOF
12864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012866 typedef uintptr_t ac__type_sizeof_;
12867static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12868static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012869#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012871int
12872main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012873{
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
12875 FILE *f = fopen ("conftest.val", "w");
12876 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012878 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012882 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012883 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 }
12885 else
12886 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012888 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012890 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
12894 ;
12895 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012896}
Martin v. Löwis11437992002-04-12 09:54:03 +000012897_ACEOF
12898rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899if { (ac_try="$ac_link"
12900case "(($ac_try" in
12901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12902 *) ac_try_echo=$ac_try;;
12903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 { (case "(($ac_try" in
12910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12911 *) ac_try_echo=$ac_try;;
12912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 (exit $ac_status); }; }; then
12918 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012920 echo "$as_me: program exited with status $ac_status" >&5
12921echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012922sed 's/^/| /' conftest.$ac_ext >&5
12923
Martin v. Löwis11437992002-04-12 09:54:03 +000012924( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012926 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012927See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012928echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012929See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012930 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931 else
12932 ac_cv_sizeof_uintptr_t=0
12933 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012936fi
12937rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012938fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012939{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12940echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941
12942
12943
Martin v. Löwis11437992002-04-12 09:54:03 +000012944cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012945#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012946_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012947
Michael W. Hudson54241132001-12-07 15:38:26 +000012948
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012949fi
12950
Thomas Wouters89f507f2006-12-13 04:49:30 +000012951
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012952{ echo "$as_me:$LINENO: checking for off_t" >&5
12953echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12954if test "${ac_cv_type_off_t+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12956else
12957 cat >conftest.$ac_ext <<_ACEOF
12958/* confdefs.h. */
12959_ACEOF
12960cat confdefs.h >>conftest.$ac_ext
12961cat >>conftest.$ac_ext <<_ACEOF
12962/* end confdefs.h. */
12963
12964#ifdef HAVE_SYS_TYPES_H
12965#include <sys/types.h>
12966#endif
12967
12968
12969typedef off_t ac__type_new_;
12970int
12971main ()
12972{
12973if ((ac__type_new_ *) 0)
12974 return 0;
12975if (sizeof (ac__type_new_))
12976 return 0;
12977 ;
12978 return 0;
12979}
12980_ACEOF
12981rm -f conftest.$ac_objext
12982if { (ac_try="$ac_compile"
12983case "(($ac_try" in
12984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12985 *) ac_try_echo=$ac_try;;
12986esac
12987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12988 (eval "$ac_compile") 2>conftest.er1
12989 ac_status=$?
12990 grep -v '^ *+' conftest.er1 >conftest.err
12991 rm -f conftest.er1
12992 cat conftest.err >&5
12993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994 (exit $ac_status); } && {
12995 test -z "$ac_c_werror_flag" ||
12996 test ! -s conftest.err
12997 } && test -s conftest.$ac_objext; then
12998 ac_cv_type_off_t=yes
12999else
13000 echo "$as_me: failed program was:" >&5
13001sed 's/^/| /' conftest.$ac_ext >&5
13002
13003 ac_cv_type_off_t=no
13004fi
13005
13006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13007fi
13008{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13009echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013011# The cast to long int works around a bug in the HP C Compiler
13012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13014# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013015{ echo "$as_me:$LINENO: checking size of off_t" >&5
13016echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013017if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013018 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013019else
13020 if test "$cross_compiling" = yes; then
13021 # Depending upon the size, compute the lo and hi bounds.
13022cat >conftest.$ac_ext <<_ACEOF
13023/* confdefs.h. */
13024_ACEOF
13025cat confdefs.h >>conftest.$ac_ext
13026cat >>conftest.$ac_ext <<_ACEOF
13027/* end confdefs.h. */
13028
13029#ifdef HAVE_SYS_TYPES_H
13030#include <sys/types.h>
13031#endif
13032
13033
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013034 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013035int
13036main ()
13037{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013039test_array [0] = 0
13040
13041 ;
13042 return 0;
13043}
13044_ACEOF
13045rm -f conftest.$ac_objext
13046if { (ac_try="$ac_compile"
13047case "(($ac_try" in
13048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13049 *) ac_try_echo=$ac_try;;
13050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013052 (eval "$ac_compile") 2>conftest.er1
13053 ac_status=$?
13054 grep -v '^ *+' conftest.er1 >conftest.err
13055 rm -f conftest.er1
13056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013058 (exit $ac_status); } && {
13059 test -z "$ac_c_werror_flag" ||
13060 test ! -s conftest.err
13061 } && test -s conftest.$ac_objext; then
13062 ac_lo=0 ac_mid=0
13063 while :; do
13064 cat >conftest.$ac_ext <<_ACEOF
13065/* confdefs.h. */
13066_ACEOF
13067cat confdefs.h >>conftest.$ac_ext
13068cat >>conftest.$ac_ext <<_ACEOF
13069/* end confdefs.h. */
13070
13071#ifdef HAVE_SYS_TYPES_H
13072#include <sys/types.h>
13073#endif
13074
13075
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013076 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077int
13078main ()
13079{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013080static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013081test_array [0] = 0
13082
13083 ;
13084 return 0;
13085}
13086_ACEOF
13087rm -f conftest.$ac_objext
13088if { (ac_try="$ac_compile"
13089case "(($ac_try" in
13090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13091 *) ac_try_echo=$ac_try;;
13092esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013094 (eval "$ac_compile") 2>conftest.er1
13095 ac_status=$?
13096 grep -v '^ *+' conftest.er1 >conftest.err
13097 rm -f conftest.er1
13098 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013100 (exit $ac_status); } && {
13101 test -z "$ac_c_werror_flag" ||
13102 test ! -s conftest.err
13103 } && test -s conftest.$ac_objext; then
13104 ac_hi=$ac_mid; break
13105else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013106 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013107sed 's/^/| /' conftest.$ac_ext >&5
13108
13109 ac_lo=`expr $ac_mid + 1`
13110 if test $ac_lo -le $ac_mid; then
13111 ac_lo= ac_hi=
13112 break
13113 fi
13114 ac_mid=`expr 2 '*' $ac_mid + 1`
13115fi
13116
13117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13118 done
13119else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013120 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121sed 's/^/| /' conftest.$ac_ext >&5
13122
13123 cat >conftest.$ac_ext <<_ACEOF
13124/* confdefs.h. */
13125_ACEOF
13126cat confdefs.h >>conftest.$ac_ext
13127cat >>conftest.$ac_ext <<_ACEOF
13128/* end confdefs.h. */
13129
13130#ifdef HAVE_SYS_TYPES_H
13131#include <sys/types.h>
13132#endif
13133
13134
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013135 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136int
13137main ()
13138{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013139static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013140test_array [0] = 0
13141
13142 ;
13143 return 0;
13144}
13145_ACEOF
13146rm -f conftest.$ac_objext
13147if { (ac_try="$ac_compile"
13148case "(($ac_try" in
13149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13150 *) ac_try_echo=$ac_try;;
13151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013153 (eval "$ac_compile") 2>conftest.er1
13154 ac_status=$?
13155 grep -v '^ *+' conftest.er1 >conftest.err
13156 rm -f conftest.er1
13157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013159 (exit $ac_status); } && {
13160 test -z "$ac_c_werror_flag" ||
13161 test ! -s conftest.err
13162 } && test -s conftest.$ac_objext; then
13163 ac_hi=-1 ac_mid=-1
13164 while :; do
13165 cat >conftest.$ac_ext <<_ACEOF
13166/* confdefs.h. */
13167_ACEOF
13168cat confdefs.h >>conftest.$ac_ext
13169cat >>conftest.$ac_ext <<_ACEOF
13170/* end confdefs.h. */
13171
13172#ifdef HAVE_SYS_TYPES_H
13173#include <sys/types.h>
13174#endif
13175
13176
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013177 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013178int
13179main ()
13180{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013182test_array [0] = 0
13183
13184 ;
13185 return 0;
13186}
13187_ACEOF
13188rm -f conftest.$ac_objext
13189if { (ac_try="$ac_compile"
13190case "(($ac_try" in
13191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13192 *) ac_try_echo=$ac_try;;
13193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013195 (eval "$ac_compile") 2>conftest.er1
13196 ac_status=$?
13197 grep -v '^ *+' conftest.er1 >conftest.err
13198 rm -f conftest.er1
13199 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013201 (exit $ac_status); } && {
13202 test -z "$ac_c_werror_flag" ||
13203 test ! -s conftest.err
13204 } && test -s conftest.$ac_objext; then
13205 ac_lo=$ac_mid; break
13206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013207 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013208sed 's/^/| /' conftest.$ac_ext >&5
13209
13210 ac_hi=`expr '(' $ac_mid ')' - 1`
13211 if test $ac_mid -le $ac_hi; then
13212 ac_lo= ac_hi=
13213 break
13214 fi
13215 ac_mid=`expr 2 '*' $ac_mid`
13216fi
13217
13218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13219 done
13220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013221 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013222sed 's/^/| /' conftest.$ac_ext >&5
13223
13224 ac_lo= ac_hi=
13225fi
13226
13227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13228fi
13229
13230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13231# Binary search between lo and hi bounds.
13232while test "x$ac_lo" != "x$ac_hi"; do
13233 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13234 cat >conftest.$ac_ext <<_ACEOF
13235/* confdefs.h. */
13236_ACEOF
13237cat confdefs.h >>conftest.$ac_ext
13238cat >>conftest.$ac_ext <<_ACEOF
13239/* end confdefs.h. */
13240
13241#ifdef HAVE_SYS_TYPES_H
13242#include <sys/types.h>
13243#endif
13244
13245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013246 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013247int
13248main ()
13249{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013251test_array [0] = 0
13252
13253 ;
13254 return 0;
13255}
13256_ACEOF
13257rm -f conftest.$ac_objext
13258if { (ac_try="$ac_compile"
13259case "(($ac_try" in
13260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13261 *) ac_try_echo=$ac_try;;
13262esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264 (eval "$ac_compile") 2>conftest.er1
13265 ac_status=$?
13266 grep -v '^ *+' conftest.er1 >conftest.err
13267 rm -f conftest.er1
13268 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013270 (exit $ac_status); } && {
13271 test -z "$ac_c_werror_flag" ||
13272 test ! -s conftest.err
13273 } && test -s conftest.$ac_objext; then
13274 ac_hi=$ac_mid
13275else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013276 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013277sed 's/^/| /' conftest.$ac_ext >&5
13278
13279 ac_lo=`expr '(' $ac_mid ')' + 1`
13280fi
13281
13282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13283done
13284case $ac_lo in
13285?*) ac_cv_sizeof_off_t=$ac_lo;;
13286'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013287 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013288See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013289echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013290See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013291 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013292 else
13293 ac_cv_sizeof_off_t=0
13294 fi ;;
13295esac
13296else
13297 cat >conftest.$ac_ext <<_ACEOF
13298/* confdefs.h. */
13299_ACEOF
13300cat confdefs.h >>conftest.$ac_ext
13301cat >>conftest.$ac_ext <<_ACEOF
13302/* end confdefs.h. */
13303
13304#ifdef HAVE_SYS_TYPES_H
13305#include <sys/types.h>
13306#endif
13307
13308
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013309 typedef off_t ac__type_sizeof_;
13310static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13311static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013312#include <stdio.h>
13313#include <stdlib.h>
13314int
13315main ()
13316{
13317
13318 FILE *f = fopen ("conftest.val", "w");
13319 if (! f)
13320 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013321 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013322 {
13323 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013324 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013325 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013326 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013327 }
13328 else
13329 {
13330 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013331 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013332 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013333 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013334 }
13335 return ferror (f) || fclose (f) != 0;
13336
13337 ;
13338 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013339}
Martin v. Löwis11437992002-04-12 09:54:03 +000013340_ACEOF
13341rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342if { (ac_try="$ac_link"
13343case "(($ac_try" in
13344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13345 *) ac_try_echo=$ac_try;;
13346esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352 { (case "(($ac_try" in
13353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13354 *) ac_try_echo=$ac_try;;
13355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013361 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013363 echo "$as_me: program exited with status $ac_status" >&5
13364echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013365sed 's/^/| /' conftest.$ac_ext >&5
13366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013368if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013369 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013370See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013371echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013372See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013373 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013374 else
13375 ac_cv_sizeof_off_t=0
13376 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013379fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013380rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013381fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013382{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13383echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013385
13386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013388#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013389_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013390
Michael W. Hudson54241132001-12-07 15:38:26 +000013391
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013392
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013393{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13394echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013395if test "$have_long_long" = yes -a \
13396 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13397 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399cat >>confdefs.h <<\_ACEOF
13400#define HAVE_LARGEFILE_SUPPORT 1
13401_ACEOF
13402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403 { echo "$as_me:$LINENO: result: yes" >&5
13404echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013406 { echo "$as_me:$LINENO: result: no" >&5
13407echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013408fi
13409
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013410{ echo "$as_me:$LINENO: checking for time_t" >&5
13411echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13412if test "${ac_cv_type_time_t+set}" = set; then
13413 echo $ECHO_N "(cached) $ECHO_C" >&6
13414else
13415 cat >conftest.$ac_ext <<_ACEOF
13416/* confdefs.h. */
13417_ACEOF
13418cat confdefs.h >>conftest.$ac_ext
13419cat >>conftest.$ac_ext <<_ACEOF
13420/* end confdefs.h. */
13421
13422#ifdef HAVE_SYS_TYPES_H
13423#include <sys/types.h>
13424#endif
13425#ifdef HAVE_TIME_H
13426#include <time.h>
13427#endif
13428
13429
13430typedef time_t ac__type_new_;
13431int
13432main ()
13433{
13434if ((ac__type_new_ *) 0)
13435 return 0;
13436if (sizeof (ac__type_new_))
13437 return 0;
13438 ;
13439 return 0;
13440}
13441_ACEOF
13442rm -f conftest.$ac_objext
13443if { (ac_try="$ac_compile"
13444case "(($ac_try" in
13445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13446 *) ac_try_echo=$ac_try;;
13447esac
13448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13449 (eval "$ac_compile") 2>conftest.er1
13450 ac_status=$?
13451 grep -v '^ *+' conftest.er1 >conftest.err
13452 rm -f conftest.er1
13453 cat conftest.err >&5
13454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455 (exit $ac_status); } && {
13456 test -z "$ac_c_werror_flag" ||
13457 test ! -s conftest.err
13458 } && test -s conftest.$ac_objext; then
13459 ac_cv_type_time_t=yes
13460else
13461 echo "$as_me: failed program was:" >&5
13462sed 's/^/| /' conftest.$ac_ext >&5
13463
13464 ac_cv_type_time_t=no
13465fi
13466
13467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13468fi
13469{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13470echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13471
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013472# The cast to long int works around a bug in the HP C Compiler
13473# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13474# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13475# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013476{ echo "$as_me:$LINENO: checking size of time_t" >&5
13477echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013478if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013479 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013480else
13481 if test "$cross_compiling" = yes; then
13482 # Depending upon the size, compute the lo and hi bounds.
13483cat >conftest.$ac_ext <<_ACEOF
13484/* confdefs.h. */
13485_ACEOF
13486cat confdefs.h >>conftest.$ac_ext
13487cat >>conftest.$ac_ext <<_ACEOF
13488/* end confdefs.h. */
13489
13490#ifdef HAVE_SYS_TYPES_H
13491#include <sys/types.h>
13492#endif
13493#ifdef HAVE_TIME_H
13494#include <time.h>
13495#endif
13496
13497
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013498 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013499int
13500main ()
13501{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013502static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013503test_array [0] = 0
13504
13505 ;
13506 return 0;
13507}
13508_ACEOF
13509rm -f conftest.$ac_objext
13510if { (ac_try="$ac_compile"
13511case "(($ac_try" in
13512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13513 *) ac_try_echo=$ac_try;;
13514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013516 (eval "$ac_compile") 2>conftest.er1
13517 ac_status=$?
13518 grep -v '^ *+' conftest.er1 >conftest.err
13519 rm -f conftest.er1
13520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013522 (exit $ac_status); } && {
13523 test -z "$ac_c_werror_flag" ||
13524 test ! -s conftest.err
13525 } && test -s conftest.$ac_objext; then
13526 ac_lo=0 ac_mid=0
13527 while :; do
13528 cat >conftest.$ac_ext <<_ACEOF
13529/* confdefs.h. */
13530_ACEOF
13531cat confdefs.h >>conftest.$ac_ext
13532cat >>conftest.$ac_ext <<_ACEOF
13533/* end confdefs.h. */
13534
13535#ifdef HAVE_SYS_TYPES_H
13536#include <sys/types.h>
13537#endif
13538#ifdef HAVE_TIME_H
13539#include <time.h>
13540#endif
13541
13542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013543 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013544int
13545main ()
13546{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013547static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013548test_array [0] = 0
13549
13550 ;
13551 return 0;
13552}
13553_ACEOF
13554rm -f conftest.$ac_objext
13555if { (ac_try="$ac_compile"
13556case "(($ac_try" in
13557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13558 *) ac_try_echo=$ac_try;;
13559esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013561 (eval "$ac_compile") 2>conftest.er1
13562 ac_status=$?
13563 grep -v '^ *+' conftest.er1 >conftest.err
13564 rm -f conftest.er1
13565 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567 (exit $ac_status); } && {
13568 test -z "$ac_c_werror_flag" ||
13569 test ! -s conftest.err
13570 } && test -s conftest.$ac_objext; then
13571 ac_hi=$ac_mid; break
13572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013573 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013574sed 's/^/| /' conftest.$ac_ext >&5
13575
13576 ac_lo=`expr $ac_mid + 1`
13577 if test $ac_lo -le $ac_mid; then
13578 ac_lo= ac_hi=
13579 break
13580 fi
13581 ac_mid=`expr 2 '*' $ac_mid + 1`
13582fi
13583
13584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585 done
13586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013587 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013588sed 's/^/| /' conftest.$ac_ext >&5
13589
13590 cat >conftest.$ac_ext <<_ACEOF
13591/* confdefs.h. */
13592_ACEOF
13593cat confdefs.h >>conftest.$ac_ext
13594cat >>conftest.$ac_ext <<_ACEOF
13595/* end confdefs.h. */
13596
13597#ifdef HAVE_SYS_TYPES_H
13598#include <sys/types.h>
13599#endif
13600#ifdef HAVE_TIME_H
13601#include <time.h>
13602#endif
13603
13604
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013605 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013606int
13607main ()
13608{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013609static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013610test_array [0] = 0
13611
13612 ;
13613 return 0;
13614}
13615_ACEOF
13616rm -f conftest.$ac_objext
13617if { (ac_try="$ac_compile"
13618case "(($ac_try" in
13619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13620 *) ac_try_echo=$ac_try;;
13621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013623 (eval "$ac_compile") 2>conftest.er1
13624 ac_status=$?
13625 grep -v '^ *+' conftest.er1 >conftest.err
13626 rm -f conftest.er1
13627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013629 (exit $ac_status); } && {
13630 test -z "$ac_c_werror_flag" ||
13631 test ! -s conftest.err
13632 } && test -s conftest.$ac_objext; then
13633 ac_hi=-1 ac_mid=-1
13634 while :; do
13635 cat >conftest.$ac_ext <<_ACEOF
13636/* confdefs.h. */
13637_ACEOF
13638cat confdefs.h >>conftest.$ac_ext
13639cat >>conftest.$ac_ext <<_ACEOF
13640/* end confdefs.h. */
13641
13642#ifdef HAVE_SYS_TYPES_H
13643#include <sys/types.h>
13644#endif
13645#ifdef HAVE_TIME_H
13646#include <time.h>
13647#endif
13648
13649
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013650 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651int
13652main ()
13653{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013654static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655test_array [0] = 0
13656
13657 ;
13658 return 0;
13659}
13660_ACEOF
13661rm -f conftest.$ac_objext
13662if { (ac_try="$ac_compile"
13663case "(($ac_try" in
13664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13665 *) ac_try_echo=$ac_try;;
13666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013668 (eval "$ac_compile") 2>conftest.er1
13669 ac_status=$?
13670 grep -v '^ *+' conftest.er1 >conftest.err
13671 rm -f conftest.er1
13672 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013674 (exit $ac_status); } && {
13675 test -z "$ac_c_werror_flag" ||
13676 test ! -s conftest.err
13677 } && test -s conftest.$ac_objext; then
13678 ac_lo=$ac_mid; break
13679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013680 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013681sed 's/^/| /' conftest.$ac_ext >&5
13682
13683 ac_hi=`expr '(' $ac_mid ')' - 1`
13684 if test $ac_mid -le $ac_hi; then
13685 ac_lo= ac_hi=
13686 break
13687 fi
13688 ac_mid=`expr 2 '*' $ac_mid`
13689fi
13690
13691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13692 done
13693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013694 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013695sed 's/^/| /' conftest.$ac_ext >&5
13696
13697 ac_lo= ac_hi=
13698fi
13699
13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701fi
13702
13703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13704# Binary search between lo and hi bounds.
13705while test "x$ac_lo" != "x$ac_hi"; do
13706 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13707 cat >conftest.$ac_ext <<_ACEOF
13708/* confdefs.h. */
13709_ACEOF
13710cat confdefs.h >>conftest.$ac_ext
13711cat >>conftest.$ac_ext <<_ACEOF
13712/* end confdefs.h. */
13713
13714#ifdef HAVE_SYS_TYPES_H
13715#include <sys/types.h>
13716#endif
13717#ifdef HAVE_TIME_H
13718#include <time.h>
13719#endif
13720
13721
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013722 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013723int
13724main ()
13725{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013727test_array [0] = 0
13728
13729 ;
13730 return 0;
13731}
13732_ACEOF
13733rm -f conftest.$ac_objext
13734if { (ac_try="$ac_compile"
13735case "(($ac_try" in
13736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13737 *) ac_try_echo=$ac_try;;
13738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013740 (eval "$ac_compile") 2>conftest.er1
13741 ac_status=$?
13742 grep -v '^ *+' conftest.er1 >conftest.err
13743 rm -f conftest.er1
13744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013746 (exit $ac_status); } && {
13747 test -z "$ac_c_werror_flag" ||
13748 test ! -s conftest.err
13749 } && test -s conftest.$ac_objext; then
13750 ac_hi=$ac_mid
13751else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013752 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013753sed 's/^/| /' conftest.$ac_ext >&5
13754
13755 ac_lo=`expr '(' $ac_mid ')' + 1`
13756fi
13757
13758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13759done
13760case $ac_lo in
13761?*) ac_cv_sizeof_time_t=$ac_lo;;
13762'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013763 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013764See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013765echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013766See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013767 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013768 else
13769 ac_cv_sizeof_time_t=0
13770 fi ;;
13771esac
13772else
13773 cat >conftest.$ac_ext <<_ACEOF
13774/* confdefs.h. */
13775_ACEOF
13776cat confdefs.h >>conftest.$ac_ext
13777cat >>conftest.$ac_ext <<_ACEOF
13778/* end confdefs.h. */
13779
13780#ifdef HAVE_SYS_TYPES_H
13781#include <sys/types.h>
13782#endif
13783#ifdef HAVE_TIME_H
13784#include <time.h>
13785#endif
13786
13787
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013788 typedef time_t ac__type_sizeof_;
13789static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13790static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013791#include <stdio.h>
13792#include <stdlib.h>
13793int
13794main ()
13795{
13796
13797 FILE *f = fopen ("conftest.val", "w");
13798 if (! f)
13799 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013800 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013801 {
13802 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013803 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013804 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013805 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013806 }
13807 else
13808 {
13809 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013810 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013811 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013812 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013813 }
13814 return ferror (f) || fclose (f) != 0;
13815
13816 ;
13817 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013818}
Martin v. Löwis11437992002-04-12 09:54:03 +000013819_ACEOF
13820rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821if { (ac_try="$ac_link"
13822case "(($ac_try" in
13823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13824 *) ac_try_echo=$ac_try;;
13825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831 { (case "(($ac_try" in
13832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13833 *) ac_try_echo=$ac_try;;
13834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013840 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013842 echo "$as_me: program exited with status $ac_status" >&5
13843echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013844sed 's/^/| /' conftest.$ac_ext >&5
13845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013847if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013849See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013850echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013851See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013852 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013853 else
13854 ac_cv_sizeof_time_t=0
13855 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013858fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013859rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013860fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013861{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13862echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013864
13865
Martin v. Löwis11437992002-04-12 09:54:03 +000013866cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013867#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013868_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013869
Michael W. Hudson54241132001-12-07 15:38:26 +000013870
13871
Trent Mick635f6fb2000-08-23 21:33:05 +000013872# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013873ac_save_cc="$CC"
13874if test "$ac_cv_kpthread" = "yes"
13875then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013876elif test "$ac_cv_kthread" = "yes"
13877then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013878elif test "$ac_cv_pthread" = "yes"
13879then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013880fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013881
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013882{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13883echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013884have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013886/* confdefs.h. */
13887_ACEOF
13888cat confdefs.h >>conftest.$ac_ext
13889cat >>conftest.$ac_ext <<_ACEOF
13890/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013891#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013892int
13893main ()
13894{
Guido van Rossum12580492000-09-24 16:47:19 +000013895pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 ;
13897 return 0;
13898}
13899_ACEOF
13900rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013901if { (ac_try="$ac_compile"
13902case "(($ac_try" in
13903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13904 *) ac_try_echo=$ac_try;;
13905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013909 grep -v '^ *+' conftest.er1 >conftest.err
13910 rm -f conftest.er1
13911 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913 (exit $ac_status); } && {
13914 test -z "$ac_c_werror_flag" ||
13915 test ! -s conftest.err
13916 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013917 have_pthread_t=yes
13918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013920sed 's/^/| /' conftest.$ac_ext >&5
13921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922
Trent Mick635f6fb2000-08-23 21:33:05 +000013923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013924
13925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013926{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13927echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013928if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013929 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13930echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13931if test "${ac_cv_type_pthread_t+set}" = set; then
13932 echo $ECHO_N "(cached) $ECHO_C" >&6
13933else
13934 cat >conftest.$ac_ext <<_ACEOF
13935/* confdefs.h. */
13936_ACEOF
13937cat confdefs.h >>conftest.$ac_ext
13938cat >>conftest.$ac_ext <<_ACEOF
13939/* end confdefs.h. */
13940
13941#ifdef HAVE_PTHREAD_H
13942#include <pthread.h>
13943#endif
13944
13945
13946typedef pthread_t ac__type_new_;
13947int
13948main ()
13949{
13950if ((ac__type_new_ *) 0)
13951 return 0;
13952if (sizeof (ac__type_new_))
13953 return 0;
13954 ;
13955 return 0;
13956}
13957_ACEOF
13958rm -f conftest.$ac_objext
13959if { (ac_try="$ac_compile"
13960case "(($ac_try" in
13961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13962 *) ac_try_echo=$ac_try;;
13963esac
13964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13965 (eval "$ac_compile") 2>conftest.er1
13966 ac_status=$?
13967 grep -v '^ *+' conftest.er1 >conftest.err
13968 rm -f conftest.er1
13969 cat conftest.err >&5
13970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13971 (exit $ac_status); } && {
13972 test -z "$ac_c_werror_flag" ||
13973 test ! -s conftest.err
13974 } && test -s conftest.$ac_objext; then
13975 ac_cv_type_pthread_t=yes
13976else
13977 echo "$as_me: failed program was:" >&5
13978sed 's/^/| /' conftest.$ac_ext >&5
13979
13980 ac_cv_type_pthread_t=no
13981fi
13982
13983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13984fi
13985{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13986echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13987
13988# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13991# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013992{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13993echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013994if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013995 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013996else
13997 if test "$cross_compiling" = yes; then
13998 # Depending upon the size, compute the lo and hi bounds.
13999cat >conftest.$ac_ext <<_ACEOF
14000/* confdefs.h. */
14001_ACEOF
14002cat confdefs.h >>conftest.$ac_ext
14003cat >>conftest.$ac_ext <<_ACEOF
14004/* end confdefs.h. */
14005
14006#ifdef HAVE_PTHREAD_H
14007#include <pthread.h>
14008#endif
14009
14010
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014011 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014012int
14013main ()
14014{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014015static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014016test_array [0] = 0
14017
14018 ;
14019 return 0;
14020}
14021_ACEOF
14022rm -f conftest.$ac_objext
14023if { (ac_try="$ac_compile"
14024case "(($ac_try" in
14025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14026 *) ac_try_echo=$ac_try;;
14027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014029 (eval "$ac_compile") 2>conftest.er1
14030 ac_status=$?
14031 grep -v '^ *+' conftest.er1 >conftest.err
14032 rm -f conftest.er1
14033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014035 (exit $ac_status); } && {
14036 test -z "$ac_c_werror_flag" ||
14037 test ! -s conftest.err
14038 } && test -s conftest.$ac_objext; then
14039 ac_lo=0 ac_mid=0
14040 while :; do
14041 cat >conftest.$ac_ext <<_ACEOF
14042/* confdefs.h. */
14043_ACEOF
14044cat confdefs.h >>conftest.$ac_ext
14045cat >>conftest.$ac_ext <<_ACEOF
14046/* end confdefs.h. */
14047
14048#ifdef HAVE_PTHREAD_H
14049#include <pthread.h>
14050#endif
14051
14052
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014053 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014054int
14055main ()
14056{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014057static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014058test_array [0] = 0
14059
14060 ;
14061 return 0;
14062}
14063_ACEOF
14064rm -f conftest.$ac_objext
14065if { (ac_try="$ac_compile"
14066case "(($ac_try" in
14067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14068 *) ac_try_echo=$ac_try;;
14069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014071 (eval "$ac_compile") 2>conftest.er1
14072 ac_status=$?
14073 grep -v '^ *+' conftest.er1 >conftest.err
14074 rm -f conftest.er1
14075 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014077 (exit $ac_status); } && {
14078 test -z "$ac_c_werror_flag" ||
14079 test ! -s conftest.err
14080 } && test -s conftest.$ac_objext; then
14081 ac_hi=$ac_mid; break
14082else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014083 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014084sed 's/^/| /' conftest.$ac_ext >&5
14085
14086 ac_lo=`expr $ac_mid + 1`
14087 if test $ac_lo -le $ac_mid; then
14088 ac_lo= ac_hi=
14089 break
14090 fi
14091 ac_mid=`expr 2 '*' $ac_mid + 1`
14092fi
14093
14094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14095 done
14096else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014097 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014098sed 's/^/| /' conftest.$ac_ext >&5
14099
14100 cat >conftest.$ac_ext <<_ACEOF
14101/* confdefs.h. */
14102_ACEOF
14103cat confdefs.h >>conftest.$ac_ext
14104cat >>conftest.$ac_ext <<_ACEOF
14105/* end confdefs.h. */
14106
14107#ifdef HAVE_PTHREAD_H
14108#include <pthread.h>
14109#endif
14110
14111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014112 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014113int
14114main ()
14115{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014117test_array [0] = 0
14118
14119 ;
14120 return 0;
14121}
14122_ACEOF
14123rm -f conftest.$ac_objext
14124if { (ac_try="$ac_compile"
14125case "(($ac_try" in
14126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14127 *) ac_try_echo=$ac_try;;
14128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014130 (eval "$ac_compile") 2>conftest.er1
14131 ac_status=$?
14132 grep -v '^ *+' conftest.er1 >conftest.err
14133 rm -f conftest.er1
14134 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014136 (exit $ac_status); } && {
14137 test -z "$ac_c_werror_flag" ||
14138 test ! -s conftest.err
14139 } && test -s conftest.$ac_objext; then
14140 ac_hi=-1 ac_mid=-1
14141 while :; do
14142 cat >conftest.$ac_ext <<_ACEOF
14143/* confdefs.h. */
14144_ACEOF
14145cat confdefs.h >>conftest.$ac_ext
14146cat >>conftest.$ac_ext <<_ACEOF
14147/* end confdefs.h. */
14148
14149#ifdef HAVE_PTHREAD_H
14150#include <pthread.h>
14151#endif
14152
14153
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014154 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014155int
14156main ()
14157{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014159test_array [0] = 0
14160
14161 ;
14162 return 0;
14163}
14164_ACEOF
14165rm -f conftest.$ac_objext
14166if { (ac_try="$ac_compile"
14167case "(($ac_try" in
14168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14169 *) ac_try_echo=$ac_try;;
14170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014172 (eval "$ac_compile") 2>conftest.er1
14173 ac_status=$?
14174 grep -v '^ *+' conftest.er1 >conftest.err
14175 rm -f conftest.er1
14176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 (exit $ac_status); } && {
14179 test -z "$ac_c_werror_flag" ||
14180 test ! -s conftest.err
14181 } && test -s conftest.$ac_objext; then
14182 ac_lo=$ac_mid; break
14183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014184 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014185sed 's/^/| /' conftest.$ac_ext >&5
14186
14187 ac_hi=`expr '(' $ac_mid ')' - 1`
14188 if test $ac_mid -le $ac_hi; then
14189 ac_lo= ac_hi=
14190 break
14191 fi
14192 ac_mid=`expr 2 '*' $ac_mid`
14193fi
14194
14195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14196 done
14197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014198 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014199sed 's/^/| /' conftest.$ac_ext >&5
14200
14201 ac_lo= ac_hi=
14202fi
14203
14204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205fi
14206
14207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14208# Binary search between lo and hi bounds.
14209while test "x$ac_lo" != "x$ac_hi"; do
14210 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14211 cat >conftest.$ac_ext <<_ACEOF
14212/* confdefs.h. */
14213_ACEOF
14214cat confdefs.h >>conftest.$ac_ext
14215cat >>conftest.$ac_ext <<_ACEOF
14216/* end confdefs.h. */
14217
14218#ifdef HAVE_PTHREAD_H
14219#include <pthread.h>
14220#endif
14221
14222
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014223 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014224int
14225main ()
14226{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014228test_array [0] = 0
14229
14230 ;
14231 return 0;
14232}
14233_ACEOF
14234rm -f conftest.$ac_objext
14235if { (ac_try="$ac_compile"
14236case "(($ac_try" in
14237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14238 *) ac_try_echo=$ac_try;;
14239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014241 (eval "$ac_compile") 2>conftest.er1
14242 ac_status=$?
14243 grep -v '^ *+' conftest.er1 >conftest.err
14244 rm -f conftest.er1
14245 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 (exit $ac_status); } && {
14248 test -z "$ac_c_werror_flag" ||
14249 test ! -s conftest.err
14250 } && test -s conftest.$ac_objext; then
14251 ac_hi=$ac_mid
14252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014253 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014254sed 's/^/| /' conftest.$ac_ext >&5
14255
14256 ac_lo=`expr '(' $ac_mid ')' + 1`
14257fi
14258
14259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14260done
14261case $ac_lo in
14262?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14263'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014265See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014266echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014267See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014268 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014269 else
14270 ac_cv_sizeof_pthread_t=0
14271 fi ;;
14272esac
14273else
14274 cat >conftest.$ac_ext <<_ACEOF
14275/* confdefs.h. */
14276_ACEOF
14277cat confdefs.h >>conftest.$ac_ext
14278cat >>conftest.$ac_ext <<_ACEOF
14279/* end confdefs.h. */
14280
14281#ifdef HAVE_PTHREAD_H
14282#include <pthread.h>
14283#endif
14284
14285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014286 typedef pthread_t ac__type_sizeof_;
14287static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14288static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014289#include <stdio.h>
14290#include <stdlib.h>
14291int
14292main ()
14293{
14294
14295 FILE *f = fopen ("conftest.val", "w");
14296 if (! f)
14297 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014298 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014299 {
14300 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014301 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014302 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014303 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014304 }
14305 else
14306 {
14307 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014308 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014309 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014310 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014311 }
14312 return ferror (f) || fclose (f) != 0;
14313
14314 ;
14315 return 0;
14316}
Martin v. Löwis11437992002-04-12 09:54:03 +000014317_ACEOF
14318rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319if { (ac_try="$ac_link"
14320case "(($ac_try" in
14321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14322 *) ac_try_echo=$ac_try;;
14323esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014326 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014328 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329 { (case "(($ac_try" in
14330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14331 *) ac_try_echo=$ac_try;;
14332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014337 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014340 echo "$as_me: program exited with status $ac_status" >&5
14341echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014342sed 's/^/| /' conftest.$ac_ext >&5
14343
Martin v. Löwis11437992002-04-12 09:54:03 +000014344( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014345if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014346 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014347See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014348echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014349See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014350 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014351 else
14352 ac_cv_sizeof_pthread_t=0
14353 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000014356fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014359{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14360echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014362
14363
Martin v. Löwis11437992002-04-12 09:54:03 +000014364cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014365#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014366_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014367
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014368
Trent Mick635f6fb2000-08-23 21:33:05 +000014369fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014370CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014371
Michael W. Hudson54241132001-12-07 15:38:26 +000014372
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014373case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014374 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014375 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14376 ;;
14377 Darwin/*)
14378 OTHER_LIBTOOL_OPT=""
14379 ;;
14380esac
14381
14382
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014383ARCH_RUN_32BIT=""
14384
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014385case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014386 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014387 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14388 if test "${enable_universalsdk}"; then
14389 :
14390 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014391 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014392 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014393 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014394 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014395 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014396 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14397 if test ${gcc_version} '<' 4.0
14398 then
14399 LIBTOOL_CRUFT="-lcc_dynamic"
14400 else
14401 LIBTOOL_CRUFT=""
14402 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014403 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014404 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014405else
14406 cat >conftest.$ac_ext <<_ACEOF
14407/* confdefs.h. */
14408_ACEOF
14409cat confdefs.h >>conftest.$ac_ext
14410cat >>conftest.$ac_ext <<_ACEOF
14411/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014412
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014413 #include <unistd.h>
14414 int main(int argc, char*argv[])
14415 {
14416 if (sizeof(long) == 4) {
14417 return 0;
14418 } else {
14419 return 1;
14420 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014421 }
14422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014423_ACEOF
14424rm -f conftest$ac_exeext
14425if { (ac_try="$ac_link"
14426case "(($ac_try" in
14427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14428 *) ac_try_echo=$ac_try;;
14429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014431 (eval "$ac_link") 2>&5
14432 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14435 { (case "(($ac_try" in
14436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14437 *) ac_try_echo=$ac_try;;
14438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014440 (eval "$ac_try") 2>&5
14441 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014443 (exit $ac_status); }; }; then
14444 ac_osx_32bit=yes
14445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014446 echo "$as_me: program exited with status $ac_status" >&5
14447echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014448sed 's/^/| /' conftest.$ac_ext >&5
14449
14450( exit $ac_status )
14451ac_osx_32bit=no
14452fi
14453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14454fi
14455
14456
14457
14458 if test "${ac_osx_32bit}" = "yes"; then
14459 case `arch` in
14460 i386)
14461 MACOSX_DEFAULT_ARCH="i386"
14462 ;;
14463 ppc)
14464 MACOSX_DEFAULT_ARCH="ppc"
14465 ;;
14466 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014467 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14468echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014469 { (exit 1); exit 1; }; }
14470 ;;
14471 esac
14472 else
14473 case `arch` in
14474 i386)
14475 MACOSX_DEFAULT_ARCH="x86_64"
14476 ;;
14477 ppc)
14478 MACOSX_DEFAULT_ARCH="ppc64"
14479 ;;
14480 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014481 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14482echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014483 { (exit 1); exit 1; }; }
14484 ;;
14485 esac
14486
14487 #ARCH_RUN_32BIT="true"
14488 fi
14489
14490 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014491 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014492 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014493esac
14494
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014495{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14496echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014497if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014498then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014499 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014501 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503cat >>confdefs.h <<\_ACEOF
14504#define WITH_NEXT_FRAMEWORK 1
14505_ACEOF
14506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014507 { echo "$as_me:$LINENO: result: yes" >&5
14508echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014509 if test $enable_shared = "yes"
14510 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014511 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14512echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren99aab652009-06-08 21:22:57 +000014513 { (exit 1); exit 1; }; }
14514 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014516 { echo "$as_me:$LINENO: result: no" >&5
14517echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014518fi
14519
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014520{ echo "$as_me:$LINENO: checking for dyld" >&5
14521echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014522case $ac_sys_system/$ac_sys_release in
14523 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014524
Martin v. Löwis11437992002-04-12 09:54:03 +000014525cat >>confdefs.h <<\_ACEOF
14526#define WITH_DYLD 1
14527_ACEOF
14528
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014529 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14530echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014531 ;;
14532 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014533 { echo "$as_me:$LINENO: result: no" >&5
14534echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014535 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014536esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014537
Guido van Rossum0a516c91994-09-12 10:58:40 +000014538# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014539
Michael W. Hudson54241132001-12-07 15:38:26 +000014540
14541
14542
14543
Guido van Rossum0a516c91994-09-12 10:58:40 +000014544# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014545# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014546{ echo "$as_me:$LINENO: checking SO" >&5
14547echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014548if test -z "$SO"
14549then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014550 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014551 hp*|HP*)
14552 case `uname -m` in
14553 ia64) SO=.so;;
14554 *) SO=.sl;;
14555 esac
14556 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014557 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014558 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014559 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014560else
14561 # this might also be a termcap variable, see #610332
14562 echo
14563 echo '====================================================================='
14564 echo '+ +'
14565 echo '+ WARNING: You have set SO in your environment. +'
14566 echo '+ Do you really mean to change the extension for shared libraries? +'
14567 echo '+ Continuing in 10 seconds to let you to ponder. +'
14568 echo '+ +'
14569 echo '====================================================================='
14570 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014571fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014572{ echo "$as_me:$LINENO: result: $SO" >&5
14573echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014574
Georg Brandlb1441c72009-01-03 22:33:39 +000014575
Thomas Wouters477c8d52006-05-27 19:21:47 +000014576cat >>confdefs.h <<_ACEOF
14577#define SHLIB_EXT "$SO"
14578_ACEOF
14579
Guido van Rossum0a516c91994-09-12 10:58:40 +000014580# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014581# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014582# (Shared libraries in this instance are shared modules to be loaded into
14583# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014584{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14585echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014586if test -z "$LDSHARED"
14587then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014588 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014589 AIX*)
14590 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014591 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014592 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014593 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014594 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014596 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014597 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014598 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014599 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014600 hp*|HP*)
14601 if test "$GCC" = "yes"
14602 then LDSHARED='$(CC) -shared'
14603 else LDSHARED='ld -b';
14604 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014605 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014606 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014607 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14608 if test "$enable_framework" ; then
14609 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014610 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14611 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014612 else
14613 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014614 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014615 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014616 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014617 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14618 if test "$enable_framework" ; then
14619 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014620 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14621 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014622 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014623 # No framework, use the Python app as bundle-loader
14624 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014625 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014626 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014627 Darwin/*)
14628 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14629 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014630
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014631 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014632 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014633 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014634 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014635 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014636 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14637 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014638 else
14639 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14640 if test "$enable_framework" ; then
14641 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014642 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14643 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014644 else
14645 # No framework, use the Python app as bundle-loader
14646 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14647 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14648 fi
14649 fi
14650 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014651 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014652 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014653 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014654 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014655 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014656 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014657 else
14658 LDSHARED="ld -Bshareable ${LDFLAGS}"
14659 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014660 OpenBSD*)
14661 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14662 then
14663 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14664 else
14665 case `uname -r` in
14666 [01].* | 2.[0-7] | 2.[0-7].*)
14667 LDSHARED="ld -Bshareable ${LDFLAGS}"
14668 ;;
14669 *)
14670 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14671 ;;
14672 esac
14673 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014674 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014675 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014676 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014677 then LDSHARED='$(CC) -shared'
14678 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014679 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014680 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014681 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014682 *) LDSHARED="ld";;
14683 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014684fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014685{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14686echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014687BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014688# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014689# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014690{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14691echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014692if test -z "$CCSHARED"
14693then
Guido van Rossum07397971997-04-29 21:49:50 +000014694 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014695 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014696 then CCSHARED="-fPIC";
14697 elif test `uname -p` = sparc;
14698 then CCSHARED="-xcode=pic32";
14699 else CCSHARED="-Kpic";
14700 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014701 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014702 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014703 else CCSHARED="+z";
14704 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014705 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014706 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014708 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014709 if test "$GCC" = "yes"
14710 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014711 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014712 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014713 SCO_SV*)
14714 if test "$GCC" = "yes"
14715 then CCSHARED="-fPIC"
14716 else CCSHARED="-Kpic -belf"
14717 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014718 IRIX*/6*) case $CC in
14719 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014720 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014721 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014722 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014723fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014724{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14725echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014726# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014727# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014728{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14729echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014730if test -z "$LINKFORSHARED"
14731then
Guido van Rossum07397971997-04-29 21:49:50 +000014732 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014733 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014734 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014735 LINKFORSHARED="-Wl,-E -Wl,+s";;
14736# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014737 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014738 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014739 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014741 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014742 if test "$enable_framework"
14743 then
Jack Jansenda49e192005-01-07 13:08:22 +000014744 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014745 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014746 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014747 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014748 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014749 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014750 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014751 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14752 then
14753 LINKFORSHARED="-Wl,--export-dynamic"
14754 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014755 SunOS/5*) case $CC in
14756 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014757 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014758 then
14759 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014760 fi;;
14761 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014762 CYGWIN*)
14763 if test $enable_shared = "no"
14764 then
14765 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14766 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014767 QNX*)
14768 # -Wl,-E causes the symbols to be added to the dynamic
14769 # symbol table so that they can be found when a module
14770 # is loaded. -N 2048K causes the stack size to be set
14771 # to 2048 kilobytes so that the stack doesn't overflow
14772 # when running test_compile.py.
14773 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014774 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014775fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014776{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14777echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014778
Michael W. Hudson54241132001-12-07 15:38:26 +000014779
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014780
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014781{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14782echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014783if test ! "$LIBRARY" = "$LDLIBRARY"
14784then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014785 case $ac_sys_system in
14786 CYGWIN*)
14787 # Cygwin needs CCSHARED when building extension DLLs
14788 # but not when building the interpreter DLL.
14789 CFLAGSFORSHARED='';;
14790 *)
14791 CFLAGSFORSHARED='$(CCSHARED)'
14792 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014793fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014794{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14795echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014796
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014797# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14798# library (with --enable-shared).
14799# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014800# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14801# if it is not required, since it creates a dependency of the shared library
14802# to LIBS. This, in turn, means that applications linking the shared libpython
14803# don't need to link LIBS explicitly. The default should be only changed
14804# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014805
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014806{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14807echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014808case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014809 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014810 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014812{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14813echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014814
14815
Guido van Rossum627b2d71993-12-24 10:39:16 +000014816# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014818{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14819echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014820if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014822else
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014824LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014826/* confdefs.h. */
14827_ACEOF
14828cat confdefs.h >>conftest.$ac_ext
14829cat >>conftest.$ac_ext <<_ACEOF
14830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832/* Override any GCC internal prototype to avoid an error.
14833 Use char because int might match the return type of a GCC
14834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014835#ifdef __cplusplus
14836extern "C"
14837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014838char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014839int
14840main ()
14841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ;
14844 return 0;
14845}
14846_ACEOF
14847rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848if { (ac_try="$ac_link"
14849case "(($ac_try" in
14850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14851 *) ac_try_echo=$ac_try;;
14852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014856 grep -v '^ *+' conftest.er1 >conftest.err
14857 rm -f conftest.er1
14858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860 (exit $ac_status); } && {
14861 test -z "$ac_c_werror_flag" ||
14862 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014863 } && test -s conftest$ac_exeext &&
14864 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014866else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014868sed 's/^/| /' conftest.$ac_ext >&5
14869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872
14873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014875LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014876fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014877{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14878echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14879if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 cat >>confdefs.h <<_ACEOF
14881#define HAVE_LIBDL 1
14882_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014883
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014884 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014885
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014886fi
14887 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014889{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14890echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014891if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014892 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014893else
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014895LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014897/* confdefs.h. */
14898_ACEOF
14899cat confdefs.h >>conftest.$ac_ext
14900cat >>conftest.$ac_ext <<_ACEOF
14901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903/* Override any GCC internal prototype to avoid an error.
14904 Use char because int might match the return type of a GCC
14905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014906#ifdef __cplusplus
14907extern "C"
14908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014909char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014910int
14911main ()
14912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 ;
14915 return 0;
14916}
14917_ACEOF
14918rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919if { (ac_try="$ac_link"
14920case "(($ac_try" in
14921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14922 *) ac_try_echo=$ac_try;;
14923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014927 grep -v '^ *+' conftest.er1 >conftest.err
14928 rm -f conftest.er1
14929 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 (exit $ac_status); } && {
14932 test -z "$ac_c_werror_flag" ||
14933 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014934 } && test -s conftest$ac_exeext &&
14935 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014939sed 's/^/| /' conftest.$ac_ext >&5
14940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943
14944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014946LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014947fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014948{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14949echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14950if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 cat >>confdefs.h <<_ACEOF
14952#define HAVE_LIBDLD 1
14953_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014954
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014955 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014957fi
14958 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014959
Georg Brandlb1441c72009-01-03 22:33:39 +000014960# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014961if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014962 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14963echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014964if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014966else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014967 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014969/* confdefs.h. */
14970_ACEOF
14971cat confdefs.h >>conftest.$ac_ext
14972cat >>conftest.$ac_ext <<_ACEOF
14973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975/* Override any GCC internal prototype to avoid an error.
14976 Use char because int might match the return type of a GCC
14977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014978#ifdef __cplusplus
14979extern "C"
14980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014981char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014982int
14983main ()
14984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 ;
14987 return 0;
14988}
14989_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990for ac_lib in '' pthread rt posix4; do
14991 if test -z "$ac_lib"; then
14992 ac_res="none required"
14993 else
14994 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014995 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996 fi
14997 rm -f conftest.$ac_objext conftest$ac_exeext
14998if { (ac_try="$ac_link"
14999case "(($ac_try" in
15000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15001 *) ac_try_echo=$ac_try;;
15002esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015005 ac_status=$?
15006 grep -v '^ *+' conftest.er1 >conftest.err
15007 rm -f conftest.er1
15008 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 (exit $ac_status); } && {
15011 test -z "$ac_c_werror_flag" ||
15012 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015013 } && test -s conftest$ac_exeext &&
15014 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015017 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015018sed 's/^/| /' conftest.$ac_ext >&5
15019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020
Thomas Wouters477c8d52006-05-27 19:21:47 +000015021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022
15023rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15024 conftest$ac_exeext
15025 if test "${ac_cv_search_sem_init+set}" = set; then
15026 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028done
15029if test "${ac_cv_search_sem_init+set}" = set; then
15030 :
15031else
15032 ac_cv_search_sem_init=no
15033fi
15034rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015035LIBS=$ac_func_search_save_LIBS
15036fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015037{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15038echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039ac_res=$ac_cv_search_sem_init
15040if test "$ac_res" != no; then
15041 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015042
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015043fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015044 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015045 # posix4 on Solaris 2.6
15046 # pthread (first!) on Linux
15047fi
15048
Martin v. Löwis19d17342003-06-14 21:03:05 +000015049# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015050{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15051echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015052if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015053 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015054else
15055 ac_check_lib_save_LIBS=$LIBS
15056LIBS="-lintl $LIBS"
15057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015058/* confdefs.h. */
15059_ACEOF
15060cat confdefs.h >>conftest.$ac_ext
15061cat >>conftest.$ac_ext <<_ACEOF
15062/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064/* Override any GCC internal prototype to avoid an error.
15065 Use char because int might match the return type of a GCC
15066 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015067#ifdef __cplusplus
15068extern "C"
15069#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015070char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015071int
15072main ()
15073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080if { (ac_try="$ac_link"
15081case "(($ac_try" in
15082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15083 *) ac_try_echo=$ac_try;;
15084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015088 grep -v '^ *+' conftest.er1 >conftest.err
15089 rm -f conftest.er1
15090 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 (exit $ac_status); } && {
15093 test -z "$ac_c_werror_flag" ||
15094 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015095 } && test -s conftest$ac_exeext &&
15096 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015097 ac_cv_lib_intl_textdomain=yes
15098else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015100sed 's/^/| /' conftest.$ac_ext >&5
15101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104
15105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015107LIBS=$ac_check_lib_save_LIBS
15108fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015109{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15110echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15111if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015112
15113cat >>confdefs.h <<\_ACEOF
15114#define WITH_LIBINTL 1
15115_ACEOF
15116
Brett Cannonc6d936e2009-06-07 20:09:53 +000015117 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015118fi
15119
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015120
15121# checks for system dependent C++ extensions support
15122case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015123 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15124echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015126/* confdefs.h. */
15127_ACEOF
15128cat confdefs.h >>conftest.$ac_ext
15129cat >>conftest.$ac_ext <<_ACEOF
15130/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015131#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015132int
15133main ()
15134{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015135loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141if { (ac_try="$ac_link"
15142case "(($ac_try" in
15143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15144 *) ac_try_echo=$ac_try;;
15145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015147 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015149 grep -v '^ *+' conftest.er1 >conftest.err
15150 rm -f conftest.er1
15151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015153 (exit $ac_status); } && {
15154 test -z "$ac_c_werror_flag" ||
15155 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015156 } && test -s conftest$ac_exeext &&
15157 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015158
Martin v. Löwis11437992002-04-12 09:54:03 +000015159cat >>confdefs.h <<\_ACEOF
15160#define AIX_GENUINE_CPLUSPLUS 1
15161_ACEOF
15162
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015163 { echo "$as_me:$LINENO: result: yes" >&5
15164echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015167sed 's/^/| /' conftest.$ac_ext >&5
15168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015169 { echo "$as_me:$LINENO: result: no" >&5
15170echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172
15173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015175 *) ;;
15176esac
15177
Guido van Rossum70c7f481998-03-26 18:44:10 +000015178# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015179{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15180echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015181if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015183else
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015185LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* confdefs.h. */
15188_ACEOF
15189cat confdefs.h >>conftest.$ac_ext
15190cat >>conftest.$ac_ext <<_ACEOF
15191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193/* Override any GCC internal prototype to avoid an error.
15194 Use char because int might match the return type of a GCC
15195 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015196#ifdef __cplusplus
15197extern "C"
15198#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015199char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015200int
15201main ()
15202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 ;
15205 return 0;
15206}
15207_ACEOF
15208rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209if { (ac_try="$ac_link"
15210case "(($ac_try" in
15211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15212 *) ac_try_echo=$ac_try;;
15213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015217 grep -v '^ *+' conftest.er1 >conftest.err
15218 rm -f conftest.er1
15219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221 (exit $ac_status); } && {
15222 test -z "$ac_c_werror_flag" ||
15223 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015224 } && test -s conftest$ac_exeext &&
15225 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015229sed 's/^/| /' conftest.$ac_ext >&5
15230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233
15234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015236LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015237fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015238{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15239echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15240if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015241 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015242fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015243 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015244{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15245echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015246if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015248else
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015250LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015251cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015252/* confdefs.h. */
15253_ACEOF
15254cat confdefs.h >>conftest.$ac_ext
15255cat >>conftest.$ac_ext <<_ACEOF
15256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015258/* Override any GCC internal prototype to avoid an error.
15259 Use char because int might match the return type of a GCC
15260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015261#ifdef __cplusplus
15262extern "C"
15263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015264char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015265int
15266main ()
15267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 ;
15270 return 0;
15271}
15272_ACEOF
15273rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274if { (ac_try="$ac_link"
15275case "(($ac_try" in
15276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15277 *) ac_try_echo=$ac_try;;
15278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015282 grep -v '^ *+' conftest.er1 >conftest.err
15283 rm -f conftest.er1
15284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286 (exit $ac_status); } && {
15287 test -z "$ac_c_werror_flag" ||
15288 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289 } && test -s conftest$ac_exeext &&
15290 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015294sed 's/^/| /' conftest.$ac_ext >&5
15295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298
15299rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015301LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015302fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015303{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15304echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15305if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015306 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015307fi
15308 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015310{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15311echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015313# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015314if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015316{ echo "$as_me:$LINENO: result: $withval" >&5
15317echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015318LIBS="$withval $LIBS"
15319
15320else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015321 { echo "$as_me:$LINENO: result: no" >&5
15322echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323fi
15324
Guido van Rossum7f43da71994-08-01 12:15:30 +000015325
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015326# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015327{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15328echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015331if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332 withval=$with_system_ffi;
15333fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015334
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015335
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015336{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15337echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015338
Matthias Klose55708cc2009-04-30 08:06:49 +000015339# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015340{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15341echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015342
15343# Check whether --with-dbmliborder was given.
15344if test "${with_dbmliborder+set}" = set; then
15345 withval=$with_dbmliborder;
15346if test x$with_dbmliborder = xyes
15347then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015348{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15349echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015350 { (exit 1); exit 1; }; }
15351else
15352 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15353 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15354 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015355 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15356echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015357 { (exit 1); exit 1; }; }
15358 fi
15359 done
15360fi
15361fi
15362
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015363{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15364echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015365
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015366# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015367
15368
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015369{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15370echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015373if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374 withval=$with_signal_module;
15375fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015376
15377
15378if test -z "$with_signal_module"
15379then with_signal_module="yes"
15380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015381{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15382echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015383
15384if test "${with_signal_module}" = "yes"; then
15385 USE_SIGNAL_MODULE=""
15386 SIGNAL_OBJS=""
15387else
15388 USE_SIGNAL_MODULE="#"
15389 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15390fi
15391
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015392# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015393
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015394USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015395
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015396{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15397echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015398
Guido van Rossumec2f0731997-01-22 20:54:01 +000015399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015401if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015403{ echo "$as_me:$LINENO: result: $withval" >&5
15404echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015405LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015406if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015407 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015408fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015410 { echo "$as_me:$LINENO: result: no" >&5
15411echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015412fi
15413
Martin v. Löwis11437992002-04-12 09:54:03 +000015414
15415# Templates for things AC_DEFINEd more than once.
15416# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015417
15418
Martin v. Löwis11437992002-04-12 09:54:03 +000015419
15420
15421
15422
15423
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015424{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15425echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015428if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429 withval=$with_threads;
15430fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015431
15432
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015433# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015436if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437 withval=$with_thread; with_threads=$with_thread
15438fi
15439
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015440
15441if test -z "$with_threads"
15442then with_threads="yes"
15443fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015444{ echo "$as_me:$LINENO: result: $with_threads" >&5
15445echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015446
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015447
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015448if test "$with_threads" = "no"
15449then
15450 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015451elif test "$ac_cv_pthread_is_default" = yes
15452then
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015454#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015455_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015456
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015457 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015459#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015460_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015461
15462 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015463 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015464elif test "$ac_cv_kpthread" = "yes"
15465then
15466 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015467 if test "$ac_cv_cxx_thread" = "yes"; then
15468 CXX="$CXX -Kpthread"
15469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015471#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015474 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015475 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015476elif test "$ac_cv_kthread" = "yes"
15477then
15478 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015479 if test "$ac_cv_cxx_thread" = "yes"; then
15480 CXX="$CXX -Kthread"
15481 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015482 cat >>confdefs.h <<\_ACEOF
15483#define WITH_THREAD 1
15484_ACEOF
15485
15486 posix_threads=yes
15487 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015488elif test "$ac_cv_pthread" = "yes"
15489then
15490 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015491 if test "$ac_cv_cxx_thread" = "yes"; then
15492 CXX="$CXX -pthread"
15493 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015494 cat >>confdefs.h <<\_ACEOF
15495#define WITH_THREAD 1
15496_ACEOF
15497
15498 posix_threads=yes
15499 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015500else
15501 if test ! -z "$with_threads" -a -d "$with_threads"
15502 then LDFLAGS="$LDFLAGS -L$with_threads"
15503 fi
15504 if test ! -z "$withval" -a -d "$withval"
15505 then LDFLAGS="$LDFLAGS -L$withval"
15506 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015507
15508 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015509 # define _POSIX_THREADS in unistd.h. Some apparently don't
15510 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015511 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15512echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* confdefs.h. */
15515_ACEOF
15516cat confdefs.h >>conftest.$ac_ext
15517cat >>conftest.$ac_ext <<_ACEOF
15518/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015519
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015520#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015521#ifdef _POSIX_THREADS
15522yes
15523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015524
15525_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015527 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015528 unistd_defines_pthreads=yes
15529else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015530 unistd_defines_pthreads=no
15531fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000015532rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015533
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015534 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15535echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015536
Martin v. Löwis11437992002-04-12 09:54:03 +000015537 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015538#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015539_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015540
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015542 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15543echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015544if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015545 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015546fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015547{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15548echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015549else
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015551{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15552echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015553cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015554/* confdefs.h. */
15555_ACEOF
15556cat confdefs.h >>conftest.$ac_ext
15557cat >>conftest.$ac_ext <<_ACEOF
15558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015559$ac_includes_default
15560#include <cthreads.h>
15561_ACEOF
15562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563if { (ac_try="$ac_compile"
15564case "(($ac_try" in
15565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15566 *) ac_try_echo=$ac_try;;
15567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015571 grep -v '^ *+' conftest.er1 >conftest.err
15572 rm -f conftest.er1
15573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575 (exit $ac_status); } && {
15576 test -z "$ac_c_werror_flag" ||
15577 test ! -s conftest.err
15578 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 ac_header_compiler=yes
15580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015582sed 's/^/| /' conftest.$ac_ext >&5
15583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586
15587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015588{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15589echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015590
15591# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015592{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15593echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015595/* confdefs.h. */
15596_ACEOF
15597cat confdefs.h >>conftest.$ac_ext
15598cat >>conftest.$ac_ext <<_ACEOF
15599/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015600#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015601_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602if { (ac_try="$ac_cpp conftest.$ac_ext"
15603case "(($ac_try" in
15604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15605 *) ac_try_echo=$ac_try;;
15606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015610 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 rm -f conftest.er1
15612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614 (exit $ac_status); } >/dev/null && {
15615 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15616 test ! -s conftest.err
15617 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 ac_header_preproc=yes
15619else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015621sed 's/^/| /' conftest.$ac_ext >&5
15622
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625
Martin v. Löwis11437992002-04-12 09:54:03 +000015626rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015627{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15628echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015631case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15632 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015633 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15634echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15635 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15636echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015637 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015638 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015639 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015640 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15641echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15642 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15643echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15644 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15645echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15646 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15647echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15648 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15649echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15650 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15651echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015653## -------------------------------------- ##
15654## Report this to http://bugs.python.org/ ##
15655## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015656_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015658 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015659esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015660{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15661echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015662if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015664else
15665 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015666fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015667{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15668echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015669
15670fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015671if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015673#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015674_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015675
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015677#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015678_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015679
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
15681cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015682#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015683_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015684
15685 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015686 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015687else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015688
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015690 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15691echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015692if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015693 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015694fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015695{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15696echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015697else
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015699{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15700echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015702/* confdefs.h. */
15703_ACEOF
15704cat confdefs.h >>conftest.$ac_ext
15705cat >>conftest.$ac_ext <<_ACEOF
15706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015707$ac_includes_default
15708#include <mach/cthreads.h>
15709_ACEOF
15710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711if { (ac_try="$ac_compile"
15712case "(($ac_try" in
15713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15714 *) ac_try_echo=$ac_try;;
15715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015719 grep -v '^ *+' conftest.er1 >conftest.err
15720 rm -f conftest.er1
15721 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723 (exit $ac_status); } && {
15724 test -z "$ac_c_werror_flag" ||
15725 test ! -s conftest.err
15726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015727 ac_header_compiler=yes
15728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015730sed 's/^/| /' conftest.$ac_ext >&5
15731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734
15735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015736{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15737echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
15739# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015740{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15741echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015743/* confdefs.h. */
15744_ACEOF
15745cat confdefs.h >>conftest.$ac_ext
15746cat >>conftest.$ac_ext <<_ACEOF
15747/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015748#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750if { (ac_try="$ac_cpp conftest.$ac_ext"
15751case "(($ac_try" in
15752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15753 *) ac_try_echo=$ac_try;;
15754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015758 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 rm -f conftest.er1
15760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762 (exit $ac_status); } >/dev/null && {
15763 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15764 test ! -s conftest.err
15765 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_header_preproc=yes
15767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015769sed 's/^/| /' conftest.$ac_ext >&5
15770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015775{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15776echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015779case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15780 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015781 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15782echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15783 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15784echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015785 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015786 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015787 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015788 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15789echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15790 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15791echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15792 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15793echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15794 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15795echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15796 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15797echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15798 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15799echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015801## -------------------------------------- ##
15802## Report this to http://bugs.python.org/ ##
15803## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015804_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015806 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015807esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015808{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15809echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015810if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015812else
15813 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015814fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015815{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15816echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
15818fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015819if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015821#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015823
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015825#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015826_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828
15829cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015830#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015831_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015832
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015833 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015834else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015835
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015836 # Just looking for pthread_create in libpthread is not enough:
15837 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15838 # So we really have to include pthread.h, and then link.
15839 _libs=$LIBS
15840 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015841 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15842echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015844/* confdefs.h. */
15845_ACEOF
15846cat confdefs.h >>conftest.$ac_ext
15847cat >>conftest.$ac_ext <<_ACEOF
15848/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015849#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015850
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015851void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015852int
15853main ()
15854{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015855
15856pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 ;
15858 return 0;
15859}
15860_ACEOF
15861rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862if { (ac_try="$ac_link"
15863case "(($ac_try" in
15864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15865 *) ac_try_echo=$ac_try;;
15866esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015870 grep -v '^ *+' conftest.er1 >conftest.err
15871 rm -f conftest.er1
15872 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874 (exit $ac_status); } && {
15875 test -z "$ac_c_werror_flag" ||
15876 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015877 } && test -s conftest$ac_exeext &&
15878 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015880 { echo "$as_me:$LINENO: result: yes" >&5
15881echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015883#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015884_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015885
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015886 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015887 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015888else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015890sed 's/^/| /' conftest.$ac_ext >&5
15891
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015893 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015894 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15895echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015896if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015898else
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015900/* confdefs.h. */
15901_ACEOF
15902cat confdefs.h >>conftest.$ac_ext
15903cat >>conftest.$ac_ext <<_ACEOF
15904/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015905/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15906 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15907#define pthread_detach innocuous_pthread_detach
15908
Guido van Rossumad678af1998-10-02 14:42:15 +000015909/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015910 which can conflict with char pthread_detach (); below.
15911 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015912 <limits.h> exists even on freestanding compilers. */
15913
15914#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015915# include <limits.h>
15916#else
15917# include <assert.h>
15918#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015919
15920#undef pthread_detach
15921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015922/* Override any GCC internal prototype to avoid an error.
15923 Use char because int might match the return type of a GCC
15924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015925#ifdef __cplusplus
15926extern "C"
15927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015928char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015929/* The GNU C library defines this for functions which it implements
15930 to always fail with ENOSYS. Some functions are actually named
15931 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015933choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015934#endif
15935
Skip Montanaro6dead952003-09-25 14:50:04 +000015936int
15937main ()
15938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 ;
15941 return 0;
15942}
15943_ACEOF
15944rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945if { (ac_try="$ac_link"
15946case "(($ac_try" in
15947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15948 *) ac_try_echo=$ac_try;;
15949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015953 grep -v '^ *+' conftest.er1 >conftest.err
15954 rm -f conftest.er1
15955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957 (exit $ac_status); } && {
15958 test -z "$ac_c_werror_flag" ||
15959 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015960 } && test -s conftest$ac_exeext &&
15961 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015963else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015965sed 's/^/| /' conftest.$ac_ext >&5
15966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969
15970rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015971 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015972fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015973{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15974echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15975if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015977#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015978_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015979
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015980 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015981 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015982else
Guido van Rossumad678af1998-10-02 14:42:15 +000015983
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015984 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15985echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015986if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015988else
Martin v. Löwis11437992002-04-12 09:54:03 +000015989 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015990LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015992/* confdefs.h. */
15993_ACEOF
15994cat confdefs.h >>conftest.$ac_ext
15995cat >>conftest.$ac_ext <<_ACEOF
15996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998/* Override any GCC internal prototype to avoid an error.
15999 Use char because int might match the return type of a GCC
16000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016001#ifdef __cplusplus
16002extern "C"
16003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016004char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016005int
16006main ()
16007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 ;
16010 return 0;
16011}
16012_ACEOF
16013rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014if { (ac_try="$ac_link"
16015case "(($ac_try" in
16016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16017 *) ac_try_echo=$ac_try;;
16018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016022 grep -v '^ *+' conftest.er1 >conftest.err
16023 rm -f conftest.er1
16024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 (exit $ac_status); } && {
16027 test -z "$ac_c_werror_flag" ||
16028 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016029 } && test -s conftest$ac_exeext &&
16030 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016032else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016034sed 's/^/| /' conftest.$ac_ext >&5
16035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016036 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038
16039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016041LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016042fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016043{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16044echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16045if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016047#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016048_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016050 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016051 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016052 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016053else
Greg Steinadf63d62000-07-05 10:38:09 +000016054
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016055 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16056echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016057if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016058 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016059else
Martin v. Löwis11437992002-04-12 09:54:03 +000016060 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016061LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016063/* confdefs.h. */
16064_ACEOF
16065cat confdefs.h >>conftest.$ac_ext
16066cat >>conftest.$ac_ext <<_ACEOF
16067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069/* Override any GCC internal prototype to avoid an error.
16070 Use char because int might match the return type of a GCC
16071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016072#ifdef __cplusplus
16073extern "C"
16074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016075char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016076int
16077main ()
16078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016079return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 ;
16081 return 0;
16082}
16083_ACEOF
16084rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085if { (ac_try="$ac_link"
16086case "(($ac_try" in
16087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16088 *) ac_try_echo=$ac_try;;
16089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016093 grep -v '^ *+' conftest.er1 >conftest.err
16094 rm -f conftest.er1
16095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097 (exit $ac_status); } && {
16098 test -z "$ac_c_werror_flag" ||
16099 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016100 } && test -s conftest$ac_exeext &&
16101 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016102 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016103else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016105sed 's/^/| /' conftest.$ac_ext >&5
16106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016109
16110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016112LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016113fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016114{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16115echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16116if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016118#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016119_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016121 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016122 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016123 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016124else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016126 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16127echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016128if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016130else
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016132LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016134/* confdefs.h. */
16135_ACEOF
16136cat confdefs.h >>conftest.$ac_ext
16137cat >>conftest.$ac_ext <<_ACEOF
16138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140/* Override any GCC internal prototype to avoid an error.
16141 Use char because int might match the return type of a GCC
16142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016143#ifdef __cplusplus
16144extern "C"
16145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016146char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016147int
16148main ()
16149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016151 ;
16152 return 0;
16153}
16154_ACEOF
16155rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156if { (ac_try="$ac_link"
16157case "(($ac_try" in
16158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16159 *) ac_try_echo=$ac_try;;
16160esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016164 grep -v '^ *+' conftest.er1 >conftest.err
16165 rm -f conftest.er1
16166 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168 (exit $ac_status); } && {
16169 test -z "$ac_c_werror_flag" ||
16170 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016171 } && test -s conftest$ac_exeext &&
16172 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016176sed 's/^/| /' conftest.$ac_ext >&5
16177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180
16181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016183LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016184fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016185{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16186echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16187if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016189#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016190_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016192 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016193 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016194 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016195else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016196
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016197 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16198echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016199if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016200 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016201else
Martin v. Löwis11437992002-04-12 09:54:03 +000016202 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016203LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016205/* confdefs.h. */
16206_ACEOF
16207cat confdefs.h >>conftest.$ac_ext
16208cat >>conftest.$ac_ext <<_ACEOF
16209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211/* Override any GCC internal prototype to avoid an error.
16212 Use char because int might match the return type of a GCC
16213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016214#ifdef __cplusplus
16215extern "C"
16216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016217char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016218int
16219main ()
16220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 ;
16223 return 0;
16224}
16225_ACEOF
16226rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227if { (ac_try="$ac_link"
16228case "(($ac_try" in
16229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16230 *) ac_try_echo=$ac_try;;
16231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016235 grep -v '^ *+' conftest.er1 >conftest.err
16236 rm -f conftest.er1
16237 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 (exit $ac_status); } && {
16240 test -z "$ac_c_werror_flag" ||
16241 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016242 } && test -s conftest$ac_exeext &&
16243 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016245else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016247sed 's/^/| /' conftest.$ac_ext >&5
16248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251
16252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016254LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016255fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016256{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16257echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16258if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016260#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016261_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016262
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016263 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016264 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016265 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016266else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016267
Martin v. Löwis130fb172001-07-19 11:00:41 +000016268 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016269fi
16270
Guido van Rossum627b2d71993-12-24 10:39:16 +000016271
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016272fi
16273
Guido van Rossum0be3e491997-05-22 20:33:33 +000016274fi
16275
Guido van Rossum49545951997-12-02 19:28:29 +000016276fi
16277
Guido van Rossumb93a8621998-05-07 13:27:32 +000016278fi
16279
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281
16282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016283 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284fi
16285
Martin v. Löwis11437992002-04-12 09:54:03 +000016286
16287fi
16288
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016289
Michael W. Hudson54241132001-12-07 15:38:26 +000016290
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016291 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16292echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016293if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016294 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016295else
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016297LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016299/* confdefs.h. */
16300_ACEOF
16301cat confdefs.h >>conftest.$ac_ext
16302cat >>conftest.$ac_ext <<_ACEOF
16303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305/* Override any GCC internal prototype to avoid an error.
16306 Use char because int might match the return type of a GCC
16307 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016308#ifdef __cplusplus
16309extern "C"
16310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016311char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016312int
16313main ()
16314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 ;
16317 return 0;
16318}
16319_ACEOF
16320rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321if { (ac_try="$ac_link"
16322case "(($ac_try" in
16323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16324 *) ac_try_echo=$ac_try;;
16325esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016329 grep -v '^ *+' conftest.er1 >conftest.err
16330 rm -f conftest.er1
16331 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333 (exit $ac_status); } && {
16334 test -z "$ac_c_werror_flag" ||
16335 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016336 } && test -s conftest$ac_exeext &&
16337 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016341sed 's/^/| /' conftest.$ac_ext >&5
16342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345
16346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016347 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016348LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016349fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016350{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16351echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16352if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016353 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016354#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016355_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016356
Martin v. Löwis130fb172001-07-19 11:00:41 +000016357 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016358 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016359 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016360fi
16361
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016362
Neal Norwitza978ab02002-11-02 16:58:05 +000016363 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016364 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16365echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016366if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016368else
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016370LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016372/* confdefs.h. */
16373_ACEOF
16374cat confdefs.h >>conftest.$ac_ext
16375cat >>conftest.$ac_ext <<_ACEOF
16376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378/* Override any GCC internal prototype to avoid an error.
16379 Use char because int might match the return type of a GCC
16380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016381#ifdef __cplusplus
16382extern "C"
16383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016384char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016385int
16386main ()
16387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ;
16390 return 0;
16391}
16392_ACEOF
16393rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394if { (ac_try="$ac_link"
16395case "(($ac_try" in
16396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16397 *) ac_try_echo=$ac_try;;
16398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016402 grep -v '^ *+' conftest.er1 >conftest.err
16403 rm -f conftest.er1
16404 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 (exit $ac_status); } && {
16407 test -z "$ac_c_werror_flag" ||
16408 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016409 } && test -s conftest$ac_exeext &&
16410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016414sed 's/^/| /' conftest.$ac_ext >&5
16415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418
16419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016421LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016422fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016423{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16424echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16425if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016427#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016428_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016429
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016430 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016431 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016432 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016433fi
16434
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016435 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016436
Martin v. Löwis130fb172001-07-19 11:00:41 +000016437 if test "$USE_THREAD_MODULE" != "#"
16438 then
16439 # If the above checks didn't disable threads, (at least) OSF1
16440 # needs this '-threads' argument during linking.
16441 case $ac_sys_system in
16442 OSF1) LDLAST=-threads;;
16443 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016444 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016445fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016446
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016447if test "$posix_threads" = "yes"; then
16448 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016449
16450cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016451#define _POSIX_THREADS 1
16452_ACEOF
16453
16454 fi
16455
16456 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16457 case $ac_sys_system/$ac_sys_release in
16458 SunOS/5.6)
16459cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016460#define HAVE_PTHREAD_DESTRUCTOR 1
16461_ACEOF
16462
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016463 ;;
16464 SunOS/5.8)
16465cat >>confdefs.h <<\_ACEOF
16466#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16467_ACEOF
16468
16469 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016470 AIX/5)
16471cat >>confdefs.h <<\_ACEOF
16472#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16473_ACEOF
16474
16475 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016476 esac
16477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016478 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16479echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016480 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016482else
16483 if test "$cross_compiling" = yes; then
16484 ac_cv_pthread_system_supported=no
16485else
16486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016487/* confdefs.h. */
16488_ACEOF
16489cat confdefs.h >>conftest.$ac_ext
16490cat >>conftest.$ac_ext <<_ACEOF
16491/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016492#include <pthread.h>
16493 void *foo(void *parm) {
16494 return NULL;
16495 }
16496 main() {
16497 pthread_attr_t attr;
16498 pthread_t id;
16499 if (pthread_attr_init(&attr)) exit(-1);
16500 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16501 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16502 exit(0);
16503 }
16504_ACEOF
16505rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506if { (ac_try="$ac_link"
16507case "(($ac_try" in
16508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16509 *) ac_try_echo=$ac_try;;
16510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016513 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016516 { (case "(($ac_try" in
16517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16518 *) ac_try_echo=$ac_try;;
16519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016522 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016524 (exit $ac_status); }; }; then
16525 ac_cv_pthread_system_supported=yes
16526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016527 echo "$as_me: program exited with status $ac_status" >&5
16528echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016529sed 's/^/| /' conftest.$ac_ext >&5
16530
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016531( exit $ac_status )
16532ac_cv_pthread_system_supported=no
16533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016535fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537
16538
Guido van Rossum627b2d71993-12-24 10:39:16 +000016539fi
16540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016541 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16542echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016543 if test "$ac_cv_pthread_system_supported" = "yes"; then
16544
16545cat >>confdefs.h <<\_ACEOF
16546#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16547_ACEOF
16548
16549 fi
16550
16551for ac_func in pthread_sigmask
16552do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16554{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016558else
16559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016560/* confdefs.h. */
16561_ACEOF
16562cat confdefs.h >>conftest.$ac_ext
16563cat >>conftest.$ac_ext <<_ACEOF
16564/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16566 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16567#define $ac_func innocuous_$ac_func
16568
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016569/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016570 which can conflict with char $ac_func (); below.
16571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016572 <limits.h> exists even on freestanding compilers. */
16573
16574#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016575# include <limits.h>
16576#else
16577# include <assert.h>
16578#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016579
16580#undef $ac_func
16581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016582/* Override any GCC internal prototype to avoid an error.
16583 Use char because int might match the return type of a GCC
16584 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016585#ifdef __cplusplus
16586extern "C"
16587#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016588char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016589/* The GNU C library defines this for functions which it implements
16590 to always fail with ENOSYS. Some functions are actually named
16591 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016593choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016594#endif
16595
Skip Montanaro6dead952003-09-25 14:50:04 +000016596int
16597main ()
16598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016600 ;
16601 return 0;
16602}
16603_ACEOF
16604rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605if { (ac_try="$ac_link"
16606case "(($ac_try" in
16607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16608 *) ac_try_echo=$ac_try;;
16609esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613 grep -v '^ *+' conftest.er1 >conftest.err
16614 rm -f conftest.er1
16615 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016617 (exit $ac_status); } && {
16618 test -z "$ac_c_werror_flag" ||
16619 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016620 } && test -s conftest$ac_exeext &&
16621 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016622 eval "$as_ac_var=yes"
16623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016625sed 's/^/| /' conftest.$ac_ext >&5
16626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629
16630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016632fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016633ac_res=`eval echo '${'$as_ac_var'}'`
16634 { echo "$as_me:$LINENO: result: $ac_res" >&5
16635echo "${ECHO_T}$ac_res" >&6; }
16636if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016637 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016639_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016640 case $ac_sys_system in
16641 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016642
Jason Tishlerfac083d2003-07-22 15:20:49 +000016643cat >>confdefs.h <<\_ACEOF
16644#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16645_ACEOF
16646
16647 ;;
16648 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016649fi
16650done
16651
16652fi
16653
16654
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016655# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016656
16657
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016658{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16659echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016661if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016663 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016664 { echo "$as_me:$LINENO: result: no" >&5
16665echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016666 ipv6=no
16667 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016668 *) { echo "$as_me:$LINENO: result: yes" >&5
16669echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016671#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016672_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016673
16674 ipv6=yes
16675 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016677else
Martin v. Löwis11437992002-04-12 09:54:03 +000016678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016679 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016680 { echo "$as_me:$LINENO: result: no" >&5
16681echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016682 ipv6=no
16683
16684else
Martin v. Löwis11437992002-04-12 09:54:03 +000016685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016686/* confdefs.h. */
16687_ACEOF
16688cat confdefs.h >>conftest.$ac_ext
16689cat >>conftest.$ac_ext <<_ACEOF
16690/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016691 /* AF_INET6 available check */
16692#include <sys/types.h>
16693#include <sys/socket.h>
16694main()
16695{
16696 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16697 exit(1);
16698 else
16699 exit(0);
16700}
16701
Martin v. Löwis11437992002-04-12 09:54:03 +000016702_ACEOF
16703rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704if { (ac_try="$ac_link"
16705case "(($ac_try" in
16706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16707 *) ac_try_echo=$ac_try;;
16708esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016711 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016713 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714 { (case "(($ac_try" in
16715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16716 *) ac_try_echo=$ac_try;;
16717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016722 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016723 { echo "$as_me:$LINENO: result: yes" >&5
16724echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016725 ipv6=yes
16726else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016727 echo "$as_me: program exited with status $ac_status" >&5
16728echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016729sed 's/^/| /' conftest.$ac_ext >&5
16730
Martin v. Löwis11437992002-04-12 09:54:03 +000016731( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016732{ echo "$as_me:$LINENO: result: no" >&5
16733echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016734 ipv6=no
16735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016737fi
16738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739
16740
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016741if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016742 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16743echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016750#include <sys/types.h>
16751#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016752int
16753main ()
16754{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016755struct sockaddr_in6 x;
16756x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 ;
16758 return 0;
16759}
16760_ACEOF
16761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762if { (ac_try="$ac_compile"
16763case "(($ac_try" in
16764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16765 *) ac_try_echo=$ac_try;;
16766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016770 grep -v '^ *+' conftest.er1 >conftest.err
16771 rm -f conftest.er1
16772 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774 (exit $ac_status); } && {
16775 test -z "$ac_c_werror_flag" ||
16776 test ! -s conftest.err
16777 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016778 { echo "$as_me:$LINENO: result: yes" >&5
16779echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016780 ipv6=yes
16781else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016783sed 's/^/| /' conftest.$ac_ext >&5
16784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016785 { echo "$as_me:$LINENO: result: no" >&5
16786echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016787 ipv6=no
16788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789
16790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016791fi
16792
16793if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016795#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016796_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016797
16798fi
16799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016800fi
16801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016802
16803ipv6type=unknown
16804ipv6lib=none
16805ipv6trylibc=no
16806
16807if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016808 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16809echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016810 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16811 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016812 case $i in
16813 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016815/* confdefs.h. */
16816_ACEOF
16817cat confdefs.h >>conftest.$ac_ext
16818cat >>conftest.$ac_ext <<_ACEOF
16819/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016820
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016821#include <netinet/in.h>
16822#ifdef IPV6_INRIA_VERSION
16823yes
16824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016825_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016827 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016828 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016829fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016830rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016831
16832 ;;
16833 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016835/* confdefs.h. */
16836_ACEOF
16837cat confdefs.h >>conftest.$ac_ext
16838cat >>conftest.$ac_ext <<_ACEOF
16839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016841#include <netinet/in.h>
16842#ifdef __KAME__
16843yes
16844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016847 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016848 ipv6type=$i;
16849 ipv6lib=inet6
16850 ipv6libdir=/usr/local/v6/lib
16851 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016852fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016853rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016854
16855 ;;
16856 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016864#include <features.h>
16865#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16866yes
16867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016868_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016870 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016871 ipv6type=$i;
16872 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016873fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016874rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016875
16876 ;;
16877 linux-inet6)
16878 if test -d /usr/inet6; then
16879 ipv6type=$i
16880 ipv6lib=inet6
16881 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016882 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016883 fi
16884 ;;
16885 solaris)
16886 if test -f /etc/netconfig; then
16887 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16888 ipv6type=$i
16889 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016890 fi
16891 fi
16892 ;;
16893 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016895/* confdefs.h. */
16896_ACEOF
16897cat confdefs.h >>conftest.$ac_ext
16898cat >>conftest.$ac_ext <<_ACEOF
16899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016901#include <sys/param.h>
16902#ifdef _TOSHIBA_INET6
16903yes
16904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016907 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016908 ipv6type=$i;
16909 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016910 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016911fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016913
16914 ;;
16915 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016917/* confdefs.h. */
16918_ACEOF
16919cat confdefs.h >>conftest.$ac_ext
16920cat >>conftest.$ac_ext <<_ACEOF
16921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923#include </usr/local/v6/include/sys/v6config.h>
16924#ifdef __V6D__
16925yes
16926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016929 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016930 ipv6type=$i;
16931 ipv6lib=v6;
16932 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016933 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016934fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016935rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016936
16937 ;;
16938 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016940/* confdefs.h. */
16941_ACEOF
16942cat confdefs.h >>conftest.$ac_ext
16943cat >>conftest.$ac_ext <<_ACEOF
16944/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016946#include <sys/param.h>
16947#ifdef _ZETA_MINAMI_INET6
16948yes
16949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016952 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016953 ipv6type=$i;
16954 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016955 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016956fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000016957rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016958
16959 ;;
16960 esac
16961 if test "$ipv6type" != "unknown"; then
16962 break
16963 fi
16964 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016965 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16966echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016967fi
16968
16969if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16970 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16971 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16972 echo "using lib$ipv6lib"
16973 else
16974 if test $ipv6trylibc = "yes"; then
16975 echo "using libc"
16976 else
16977 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16978 echo "You need to fetch lib$ipv6lib.a from appropriate"
16979 echo 'ipv6 kit and compile beforehand.'
16980 exit 1
16981 fi
16982 fi
16983fi
16984
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016985{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16986echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016987cat >conftest.$ac_ext <<_ACEOF
16988/* confdefs.h. */
16989_ACEOF
16990cat confdefs.h >>conftest.$ac_ext
16991cat >>conftest.$ac_ext <<_ACEOF
16992/* end confdefs.h. */
16993#include <Carbon/Carbon.h>
16994int
16995main ()
16996{
16997FSIORefNum fRef = 0
16998 ;
16999 return 0;
17000}
17001_ACEOF
17002rm -f conftest.$ac_objext
17003if { (ac_try="$ac_compile"
17004case "(($ac_try" in
17005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17006 *) ac_try_echo=$ac_try;;
17007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017009 (eval "$ac_compile") 2>conftest.er1
17010 ac_status=$?
17011 grep -v '^ *+' conftest.er1 >conftest.err
17012 rm -f conftest.er1
17013 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017015 (exit $ac_status); } && {
17016 test -z "$ac_c_werror_flag" ||
17017 test ! -s conftest.err
17018 } && test -s conftest.$ac_objext; then
17019
17020cat >>confdefs.h <<\_ACEOF
17021#define HAVE_OSX105_SDK 1
17022_ACEOF
17023
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017024 { echo "$as_me:$LINENO: result: yes" >&5
17025echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017027 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017028sed 's/^/| /' conftest.$ac_ext >&5
17029
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017030 { echo "$as_me:$LINENO: result: no" >&5
17031echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017032
17033fi
17034
17035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17036
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017037# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017038{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17039echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017041# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017042if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 withval=$with_doc_strings;
17044fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017045
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017046
17047if test -z "$with_doc_strings"
17048then with_doc_strings="yes"
17049fi
17050if test "$with_doc_strings" != "no"
17051then
17052
17053cat >>confdefs.h <<\_ACEOF
17054#define WITH_DOC_STRINGS 1
17055_ACEOF
17056
17057fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017058{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17059echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017060
Neil Schemenauera35c6882001-02-27 04:45:05 +000017061# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017062{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17063echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017066if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017068if test "$withval" != no
17069then
17070
17071cat >>confdefs.h <<\_ACEOF
17072#define WITH_TSC 1
17073_ACEOF
17074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017075 { echo "$as_me:$LINENO: result: yes" >&5
17076echo "${ECHO_T}yes" >&6; }
17077else { echo "$as_me:$LINENO: result: no" >&5
17078echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017079fi
17080else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017081 { echo "$as_me:$LINENO: result: no" >&5
17082echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083fi
17084
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017085
17086# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017087{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17088echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017091if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092 withval=$with_pymalloc;
17093fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017094
Neil Schemenauera35c6882001-02-27 04:45:05 +000017095
Neil Schemenauer16c22972002-03-22 15:34:49 +000017096if test -z "$with_pymalloc"
17097then with_pymalloc="yes"
17098fi
17099if test "$with_pymalloc" != "no"
17100then
Martin v. Löwis11437992002-04-12 09:54:03 +000017101
17102cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017103#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017104_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017105
17106fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017107{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17108echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017109
Barry Warsawef82cd72000-06-30 16:21:01 +000017110# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017111{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17112echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017115if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017116 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017117if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017118then
17119
17120cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017121#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017122_ACEOF
17123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017124 { echo "$as_me:$LINENO: result: yes" >&5
17125echo "${ECHO_T}yes" >&6; }
17126else { echo "$as_me:$LINENO: result: no" >&5
17127echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017128fi
17129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017130 { echo "$as_me:$LINENO: result: no" >&5
17131echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132fi
17133
Barry Warsawef82cd72000-06-30 16:21:01 +000017134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017135# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017136
Guido van Rossum98935bf2001-09-05 19:13:16 +000017137DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017138
Guido van Rossume97ee181999-12-20 21:27:22 +000017139# the dlopen() function means we might want to use dynload_shlib.o. some
17140# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017141
Thomas Wouters3a584202000-08-05 23:28:51 +000017142for ac_func in dlopen
17143do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017144as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17145{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17146echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017149else
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017151/* confdefs.h. */
17152_ACEOF
17153cat confdefs.h >>conftest.$ac_ext
17154cat >>conftest.$ac_ext <<_ACEOF
17155/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017156/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17157 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17158#define $ac_func innocuous_$ac_func
17159
Guido van Rossume97ee181999-12-20 21:27:22 +000017160/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017161 which can conflict with char $ac_func (); below.
17162 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017163 <limits.h> exists even on freestanding compilers. */
17164
17165#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017166# include <limits.h>
17167#else
17168# include <assert.h>
17169#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017170
17171#undef $ac_func
17172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173/* Override any GCC internal prototype to avoid an error.
17174 Use char because int might match the return type of a GCC
17175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017176#ifdef __cplusplus
17177extern "C"
17178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017179char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017180/* The GNU C library defines this for functions which it implements
17181 to always fail with ENOSYS. Some functions are actually named
17182 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017184choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017185#endif
17186
Skip Montanaro6dead952003-09-25 14:50:04 +000017187int
17188main ()
17189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 ;
17192 return 0;
17193}
17194_ACEOF
17195rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196if { (ac_try="$ac_link"
17197case "(($ac_try" in
17198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17199 *) ac_try_echo=$ac_try;;
17200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017202 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017204 grep -v '^ *+' conftest.er1 >conftest.err
17205 rm -f conftest.er1
17206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017208 (exit $ac_status); } && {
17209 test -z "$ac_c_werror_flag" ||
17210 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017211 } && test -s conftest$ac_exeext &&
17212 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017214else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017216sed 's/^/| /' conftest.$ac_ext >&5
17217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220
17221rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017222 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017223fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017224ac_res=`eval echo '${'$as_ac_var'}'`
17225 { echo "$as_me:$LINENO: result: $ac_res" >&5
17226echo "${ECHO_T}$ac_res" >&6; }
17227if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017228 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017229#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017230_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017231
Guido van Rossume97ee181999-12-20 21:27:22 +000017232fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017233done
Guido van Rossume97ee181999-12-20 21:27:22 +000017234
Michael W. Hudson54241132001-12-07 15:38:26 +000017235
Guido van Rossume97ee181999-12-20 21:27:22 +000017236# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17237# loading of modules.
17238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017239{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17240echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017241if test -z "$DYNLOADFILE"
17242then
17243 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017244 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17245 if test "$ac_cv_func_dlopen" = yes
17246 then DYNLOADFILE="dynload_shlib.o"
17247 else DYNLOADFILE="dynload_aix.o"
17248 fi
17249 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017250 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017251 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17252 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017253 *)
17254 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17255 # out any dynamic loading
17256 if test "$ac_cv_func_dlopen" = yes
17257 then DYNLOADFILE="dynload_shlib.o"
17258 else DYNLOADFILE="dynload_stub.o"
17259 fi
17260 ;;
17261 esac
17262fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017263{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17264echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017265if test "$DYNLOADFILE" != "dynload_stub.o"
17266then
Martin v. Löwis11437992002-04-12 09:54:03 +000017267
17268cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017269#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017270_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017271
17272fi
17273
Neil Schemenauer4e425612001-06-19 15:44:15 +000017274# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17275
Michael W. Hudson54241132001-12-07 15:38:26 +000017276
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017277{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17278echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017279if test -z "$MACHDEP_OBJS"
17280then
Jack Jansene578a632001-08-15 01:27:14 +000017281 MACHDEP_OBJS=$extra_machdep_objs
17282else
17283 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017284fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017285{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17286echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017287
Guido van Rossum627b2d71993-12-24 10:39:16 +000017288# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
Martin v. Löwisd6320502004-08-12 13:45:08 +000017360
Martin v. Löwisc3001752005-01-23 09:27:24 +000017361
17362
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017363
17364
Thomas Wouterscf297e42007-02-23 15:07:44 +000017365
17366
Gregory P. Smith25523d22007-09-03 16:44:55 +000017367
Christian Heimes4e30a842007-11-30 22:12:06 +000017368
Martin v. Löwis92fab752008-03-08 10:40:41 +000017369
Martin v. Löwis823725e2008-03-24 13:39:54 +000017370
17371
Benjamin Peterson965ce872009-04-05 21:24:58 +000017372
17373
17374
17375
Martin v. Löwis011e8422009-05-05 04:43:17 +000017376
Martin v. Löwis113a0852009-05-29 17:25:39 +000017377
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017378
17379
17380
17381
Antoine Pitroub7572f02009-12-02 20:46:48 +000017382
Martin v. Löwis823725e2008-03-24 13:39:54 +000017383for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17384 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017385 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017386 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017387 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017388 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017389 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017390 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17391 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017392 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17393 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017394 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017395 truncate uname unsetenv utimes waitpid wait3 wait4 \
17396 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017397do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017398as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17399{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17400echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017401if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017402 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017403else
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017405/* confdefs.h. */
17406_ACEOF
17407cat confdefs.h >>conftest.$ac_ext
17408cat >>conftest.$ac_ext <<_ACEOF
17409/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017410/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17411 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17412#define $ac_func innocuous_$ac_func
17413
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017414/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017415 which can conflict with char $ac_func (); below.
17416 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017417 <limits.h> exists even on freestanding compilers. */
17418
17419#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017420# include <limits.h>
17421#else
17422# include <assert.h>
17423#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017424
17425#undef $ac_func
17426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427/* Override any GCC internal prototype to avoid an error.
17428 Use char because int might match the return type of a GCC
17429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017430#ifdef __cplusplus
17431extern "C"
17432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017433char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017434/* The GNU C library defines this for functions which it implements
17435 to always fail with ENOSYS. Some functions are actually named
17436 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017438choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017439#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017440
Skip Montanaro6dead952003-09-25 14:50:04 +000017441int
17442main ()
17443{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 ;
17446 return 0;
17447}
17448_ACEOF
17449rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017450if { (ac_try="$ac_link"
17451case "(($ac_try" in
17452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17453 *) ac_try_echo=$ac_try;;
17454esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017456 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017458 grep -v '^ *+' conftest.er1 >conftest.err
17459 rm -f conftest.er1
17460 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462 (exit $ac_status); } && {
17463 test -z "$ac_c_werror_flag" ||
17464 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017465 } && test -s conftest$ac_exeext &&
17466 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017470sed 's/^/| /' conftest.$ac_ext >&5
17471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474
17475rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017476 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017477fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017478ac_res=`eval echo '${'$as_ac_var'}'`
17479 { echo "$as_me:$LINENO: result: $ac_res" >&5
17480echo "${ECHO_T}$ac_res" >&6; }
17481if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017483#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017484_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017485
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017486fi
17487done
17488
Michael W. Hudson54241132001-12-07 15:38:26 +000017489
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017490# For some functions, having a definition is not sufficient, since
17491# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017492{ echo "$as_me:$LINENO: checking for chroot" >&5
17493echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017494cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017495/* confdefs.h. */
17496_ACEOF
17497cat confdefs.h >>conftest.$ac_ext
17498cat >>conftest.$ac_ext <<_ACEOF
17499/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017500#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017501int
17502main ()
17503{
17504void *x=chroot
17505 ;
17506 return 0;
17507}
17508_ACEOF
17509rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510if { (ac_try="$ac_compile"
17511case "(($ac_try" in
17512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17513 *) ac_try_echo=$ac_try;;
17514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017518 grep -v '^ *+' conftest.er1 >conftest.err
17519 rm -f conftest.er1
17520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522 (exit $ac_status); } && {
17523 test -z "$ac_c_werror_flag" ||
17524 test ! -s conftest.err
17525 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017526
17527cat >>confdefs.h <<\_ACEOF
17528#define HAVE_CHROOT 1
17529_ACEOF
17530
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017531 { echo "$as_me:$LINENO: result: yes" >&5
17532echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017533else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017535sed 's/^/| /' conftest.$ac_ext >&5
17536
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017537 { echo "$as_me:$LINENO: result: no" >&5
17538echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017539
17540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017541
17542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017543{ echo "$as_me:$LINENO: checking for link" >&5
17544echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017546/* confdefs.h. */
17547_ACEOF
17548cat confdefs.h >>conftest.$ac_ext
17549cat >>conftest.$ac_ext <<_ACEOF
17550/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017551#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017552int
17553main ()
17554{
17555void *x=link
17556 ;
17557 return 0;
17558}
17559_ACEOF
17560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561if { (ac_try="$ac_compile"
17562case "(($ac_try" in
17563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17564 *) ac_try_echo=$ac_try;;
17565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017569 grep -v '^ *+' conftest.er1 >conftest.err
17570 rm -f conftest.er1
17571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 (exit $ac_status); } && {
17574 test -z "$ac_c_werror_flag" ||
17575 test ! -s conftest.err
17576 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017577
17578cat >>confdefs.h <<\_ACEOF
17579#define HAVE_LINK 1
17580_ACEOF
17581
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017582 { echo "$as_me:$LINENO: result: yes" >&5
17583echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017586sed 's/^/| /' conftest.$ac_ext >&5
17587
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017588 { echo "$as_me:$LINENO: result: no" >&5
17589echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017590
17591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017592
17593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017594{ echo "$as_me:$LINENO: checking for symlink" >&5
17595echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017597/* confdefs.h. */
17598_ACEOF
17599cat confdefs.h >>conftest.$ac_ext
17600cat >>conftest.$ac_ext <<_ACEOF
17601/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017602#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017603int
17604main ()
17605{
17606void *x=symlink
17607 ;
17608 return 0;
17609}
17610_ACEOF
17611rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612if { (ac_try="$ac_compile"
17613case "(($ac_try" in
17614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17615 *) ac_try_echo=$ac_try;;
17616esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017620 grep -v '^ *+' conftest.er1 >conftest.err
17621 rm -f conftest.er1
17622 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624 (exit $ac_status); } && {
17625 test -z "$ac_c_werror_flag" ||
17626 test ! -s conftest.err
17627 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017628
17629cat >>confdefs.h <<\_ACEOF
17630#define HAVE_SYMLINK 1
17631_ACEOF
17632
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017633 { echo "$as_me:$LINENO: result: yes" >&5
17634echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017635else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017637sed 's/^/| /' conftest.$ac_ext >&5
17638
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017639 { echo "$as_me:$LINENO: result: no" >&5
17640echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017641
17642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643
17644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017645{ echo "$as_me:$LINENO: checking for fchdir" >&5
17646echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017648/* confdefs.h. */
17649_ACEOF
17650cat confdefs.h >>conftest.$ac_ext
17651cat >>conftest.$ac_ext <<_ACEOF
17652/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017653#include <unistd.h>
17654int
17655main ()
17656{
17657void *x=fchdir
17658 ;
17659 return 0;
17660}
17661_ACEOF
17662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663if { (ac_try="$ac_compile"
17664case "(($ac_try" in
17665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17666 *) ac_try_echo=$ac_try;;
17667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017671 grep -v '^ *+' conftest.er1 >conftest.err
17672 rm -f conftest.er1
17673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675 (exit $ac_status); } && {
17676 test -z "$ac_c_werror_flag" ||
17677 test ! -s conftest.err
17678 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017679
17680cat >>confdefs.h <<\_ACEOF
17681#define HAVE_FCHDIR 1
17682_ACEOF
17683
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017684 { echo "$as_me:$LINENO: result: yes" >&5
17685echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017686else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017688sed 's/^/| /' conftest.$ac_ext >&5
17689
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017690 { echo "$as_me:$LINENO: result: no" >&5
17691echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017692
17693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694
17695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017696{ echo "$as_me:$LINENO: checking for fsync" >&5
17697echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017699/* confdefs.h. */
17700_ACEOF
17701cat confdefs.h >>conftest.$ac_ext
17702cat >>conftest.$ac_ext <<_ACEOF
17703/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017704#include <unistd.h>
17705int
17706main ()
17707{
17708void *x=fsync
17709 ;
17710 return 0;
17711}
17712_ACEOF
17713rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017714if { (ac_try="$ac_compile"
17715case "(($ac_try" in
17716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17717 *) ac_try_echo=$ac_try;;
17718esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017722 grep -v '^ *+' conftest.er1 >conftest.err
17723 rm -f conftest.er1
17724 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726 (exit $ac_status); } && {
17727 test -z "$ac_c_werror_flag" ||
17728 test ! -s conftest.err
17729 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017730
17731cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017732#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017733_ACEOF
17734
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017735 { echo "$as_me:$LINENO: result: yes" >&5
17736echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017737else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017739sed 's/^/| /' conftest.$ac_ext >&5
17740
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017741 { echo "$as_me:$LINENO: result: no" >&5
17742echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017743
17744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745
17746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017747{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17748echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017750/* confdefs.h. */
17751_ACEOF
17752cat confdefs.h >>conftest.$ac_ext
17753cat >>conftest.$ac_ext <<_ACEOF
17754/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017755#include <unistd.h>
17756int
17757main ()
17758{
17759void *x=fdatasync
17760 ;
17761 return 0;
17762}
17763_ACEOF
17764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765if { (ac_try="$ac_compile"
17766case "(($ac_try" in
17767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17768 *) ac_try_echo=$ac_try;;
17769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017773 grep -v '^ *+' conftest.er1 >conftest.err
17774 rm -f conftest.er1
17775 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 (exit $ac_status); } && {
17778 test -z "$ac_c_werror_flag" ||
17779 test ! -s conftest.err
17780 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017781
17782cat >>confdefs.h <<\_ACEOF
17783#define HAVE_FDATASYNC 1
17784_ACEOF
17785
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017786 { echo "$as_me:$LINENO: result: yes" >&5
17787echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017790sed 's/^/| /' conftest.$ac_ext >&5
17791
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017792 { echo "$as_me:$LINENO: result: no" >&5
17793echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017794
17795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796
17797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017798{ echo "$as_me:$LINENO: checking for epoll" >&5
17799echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017800cat >conftest.$ac_ext <<_ACEOF
17801/* confdefs.h. */
17802_ACEOF
17803cat confdefs.h >>conftest.$ac_ext
17804cat >>conftest.$ac_ext <<_ACEOF
17805/* end confdefs.h. */
17806#include <sys/epoll.h>
17807int
17808main ()
17809{
17810void *x=epoll_create
17811 ;
17812 return 0;
17813}
17814_ACEOF
17815rm -f conftest.$ac_objext
17816if { (ac_try="$ac_compile"
17817case "(($ac_try" in
17818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17819 *) ac_try_echo=$ac_try;;
17820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017822 (eval "$ac_compile") 2>conftest.er1
17823 ac_status=$?
17824 grep -v '^ *+' conftest.er1 >conftest.err
17825 rm -f conftest.er1
17826 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017828 (exit $ac_status); } && {
17829 test -z "$ac_c_werror_flag" ||
17830 test ! -s conftest.err
17831 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017832
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017833cat >>confdefs.h <<\_ACEOF
17834#define HAVE_EPOLL 1
17835_ACEOF
17836
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017837 { echo "$as_me:$LINENO: result: yes" >&5
17838echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017840 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017841sed 's/^/| /' conftest.$ac_ext >&5
17842
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017843 { echo "$as_me:$LINENO: result: no" >&5
17844echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017845
17846fi
17847
17848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017849{ echo "$as_me:$LINENO: checking for kqueue" >&5
17850echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017851cat >conftest.$ac_ext <<_ACEOF
17852/* confdefs.h. */
17853_ACEOF
17854cat confdefs.h >>conftest.$ac_ext
17855cat >>conftest.$ac_ext <<_ACEOF
17856/* end confdefs.h. */
17857
17858#include <sys/types.h>
17859#include <sys/event.h>
17860
17861int
17862main ()
17863{
17864int x=kqueue()
17865 ;
17866 return 0;
17867}
17868_ACEOF
17869rm -f conftest.$ac_objext
17870if { (ac_try="$ac_compile"
17871case "(($ac_try" in
17872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17873 *) ac_try_echo=$ac_try;;
17874esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017876 (eval "$ac_compile") 2>conftest.er1
17877 ac_status=$?
17878 grep -v '^ *+' conftest.er1 >conftest.err
17879 rm -f conftest.er1
17880 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017882 (exit $ac_status); } && {
17883 test -z "$ac_c_werror_flag" ||
17884 test ! -s conftest.err
17885 } && test -s conftest.$ac_objext; then
17886
17887cat >>confdefs.h <<\_ACEOF
17888#define HAVE_KQUEUE 1
17889_ACEOF
17890
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017891 { echo "$as_me:$LINENO: result: yes" >&5
17892echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017894 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017895sed 's/^/| /' conftest.$ac_ext >&5
17896
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017897 { echo "$as_me:$LINENO: result: no" >&5
17898echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017899
17900fi
17901
17902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017903# On some systems (eg. FreeBSD 5), we would find a definition of the
17904# functions ctermid_r, setgroups in the library, but no prototype
17905# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17906# address to avoid compiler warnings and potential miscompilations
17907# because of the missing prototypes.
17908
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017909{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17910echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017911cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017912/* confdefs.h. */
17913_ACEOF
17914cat confdefs.h >>conftest.$ac_ext
17915cat >>conftest.$ac_ext <<_ACEOF
17916/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017917
17918#include "confdefs.h"
17919#include <stdio.h>
17920
Martin v. Löwisd5843682002-11-21 20:41:28 +000017921int
17922main ()
17923{
17924void* p = ctermid_r
17925 ;
17926 return 0;
17927}
17928_ACEOF
17929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930if { (ac_try="$ac_compile"
17931case "(($ac_try" in
17932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17933 *) ac_try_echo=$ac_try;;
17934esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017938 grep -v '^ *+' conftest.er1 >conftest.err
17939 rm -f conftest.er1
17940 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942 (exit $ac_status); } && {
17943 test -z "$ac_c_werror_flag" ||
17944 test ! -s conftest.err
17945 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017946
17947cat >>confdefs.h <<\_ACEOF
17948#define HAVE_CTERMID_R 1
17949_ACEOF
17950
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017951 { echo "$as_me:$LINENO: result: yes" >&5
17952echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017953else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017955sed 's/^/| /' conftest.$ac_ext >&5
17956
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017957 { echo "$as_me:$LINENO: result: no" >&5
17958echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017959
17960fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17963
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017964{ echo "$as_me:$LINENO: checking for flock" >&5
17965echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017966cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017967/* confdefs.h. */
17968_ACEOF
17969cat confdefs.h >>conftest.$ac_ext
17970cat >>conftest.$ac_ext <<_ACEOF
17971/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017972
17973#include "confdefs.h"
17974#include <sys/file.h>
17975
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017976int
17977main ()
17978{
17979void* p = flock
17980 ;
17981 return 0;
17982}
17983_ACEOF
17984rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017985if { (ac_try="$ac_compile"
17986case "(($ac_try" in
17987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17988 *) ac_try_echo=$ac_try;;
17989esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017993 grep -v '^ *+' conftest.er1 >conftest.err
17994 rm -f conftest.er1
17995 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997 (exit $ac_status); } && {
17998 test -z "$ac_c_werror_flag" ||
17999 test ! -s conftest.err
18000 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018001
18002cat >>confdefs.h <<\_ACEOF
18003#define HAVE_FLOCK 1
18004_ACEOF
18005
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018006 { echo "$as_me:$LINENO: result: yes" >&5
18007echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018010sed 's/^/| /' conftest.$ac_ext >&5
18011
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018012 { echo "$as_me:$LINENO: result: no" >&5
18013echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018014
18015fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18018
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018019{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18020echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018022/* confdefs.h. */
18023_ACEOF
18024cat confdefs.h >>conftest.$ac_ext
18025cat >>conftest.$ac_ext <<_ACEOF
18026/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018027
18028#include "confdefs.h"
18029#include <unistd.h>
18030
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018031int
18032main ()
18033{
18034void* p = getpagesize
18035 ;
18036 return 0;
18037}
18038_ACEOF
18039rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018040if { (ac_try="$ac_compile"
18041case "(($ac_try" in
18042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18043 *) ac_try_echo=$ac_try;;
18044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018048 grep -v '^ *+' conftest.er1 >conftest.err
18049 rm -f conftest.er1
18050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052 (exit $ac_status); } && {
18053 test -z "$ac_c_werror_flag" ||
18054 test ! -s conftest.err
18055 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018056
18057cat >>confdefs.h <<\_ACEOF
18058#define HAVE_GETPAGESIZE 1
18059_ACEOF
18060
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018061 { echo "$as_me:$LINENO: result: yes" >&5
18062echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018063else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018065sed 's/^/| /' conftest.$ac_ext >&5
18066
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018067 { echo "$as_me:$LINENO: result: no" >&5
18068echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018069
18070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071
18072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018073
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018074for ac_prog in true
18075do
18076 # Extract the first word of "$ac_prog", so it can be a program name with args.
18077set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018078{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18079echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018080if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018081 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018082else
18083 if test -n "$TRUE"; then
18084 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18085else
18086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18087for as_dir in $PATH
18088do
18089 IFS=$as_save_IFS
18090 test -z "$as_dir" && as_dir=.
18091 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092 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 +000018093 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018094 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018095 break 2
18096 fi
18097done
18098done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018100
18101fi
18102fi
18103TRUE=$ac_cv_prog_TRUE
18104if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018105 { echo "$as_me:$LINENO: result: $TRUE" >&5
18106echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018107else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018108 { echo "$as_me:$LINENO: result: no" >&5
18109echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018110fi
18111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018113 test -n "$TRUE" && break
18114done
18115test -n "$TRUE" || TRUE="/bin/true"
18116
18117
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018118{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18119echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018120if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018121 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018122else
18123 ac_check_lib_save_LIBS=$LIBS
18124LIBS="-lc $LIBS"
18125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018126/* confdefs.h. */
18127_ACEOF
18128cat confdefs.h >>conftest.$ac_ext
18129cat >>conftest.$ac_ext <<_ACEOF
18130/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018132/* Override any GCC internal prototype to avoid an error.
18133 Use char because int might match the return type of a GCC
18134 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018135#ifdef __cplusplus
18136extern "C"
18137#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018138char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018139int
18140main ()
18141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018143 ;
18144 return 0;
18145}
18146_ACEOF
18147rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148if { (ac_try="$ac_link"
18149case "(($ac_try" in
18150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18151 *) ac_try_echo=$ac_try;;
18152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018156 grep -v '^ *+' conftest.er1 >conftest.err
18157 rm -f conftest.er1
18158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160 (exit $ac_status); } && {
18161 test -z "$ac_c_werror_flag" ||
18162 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018163 } && test -s conftest$ac_exeext &&
18164 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018165 ac_cv_lib_c_inet_aton=yes
18166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018168sed 's/^/| /' conftest.$ac_ext >&5
18169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018172
18173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018174 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018175LIBS=$ac_check_lib_save_LIBS
18176fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018177{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18178echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18179if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018180 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018181else
18182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018183{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18184echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018185if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018186 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018187else
18188 ac_check_lib_save_LIBS=$LIBS
18189LIBS="-lresolv $LIBS"
18190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018191/* confdefs.h. */
18192_ACEOF
18193cat confdefs.h >>conftest.$ac_ext
18194cat >>conftest.$ac_ext <<_ACEOF
18195/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197/* Override any GCC internal prototype to avoid an error.
18198 Use char because int might match the return type of a GCC
18199 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018200#ifdef __cplusplus
18201extern "C"
18202#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018203char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018204int
18205main ()
18206{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018207return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018208 ;
18209 return 0;
18210}
18211_ACEOF
18212rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018213if { (ac_try="$ac_link"
18214case "(($ac_try" in
18215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18216 *) ac_try_echo=$ac_try;;
18217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018219 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018221 grep -v '^ *+' conftest.er1 >conftest.err
18222 rm -f conftest.er1
18223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018225 (exit $ac_status); } && {
18226 test -z "$ac_c_werror_flag" ||
18227 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018228 } && test -s conftest$ac_exeext &&
18229 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018230 ac_cv_lib_resolv_inet_aton=yes
18231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018233sed 's/^/| /' conftest.$ac_ext >&5
18234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237
18238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018240LIBS=$ac_check_lib_save_LIBS
18241fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018242{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18243echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18244if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018245 cat >>confdefs.h <<_ACEOF
18246#define HAVE_LIBRESOLV 1
18247_ACEOF
18248
18249 LIBS="-lresolv $LIBS"
18250
18251fi
18252
18253
18254fi
18255
18256
Christian Heimesd0764e22007-12-04 15:00:33 +000018257# On Tru64, chflags seems to be present, but calling it will
18258# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018259{ echo "$as_me:$LINENO: checking for chflags" >&5
18260echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018261if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018262 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018263else
18264 if test "$cross_compiling" = yes; then
18265 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018266else
18267 cat >conftest.$ac_ext <<_ACEOF
18268/* confdefs.h. */
18269_ACEOF
18270cat confdefs.h >>conftest.$ac_ext
18271cat >>conftest.$ac_ext <<_ACEOF
18272/* end confdefs.h. */
18273
18274#include <sys/stat.h>
18275#include <unistd.h>
18276int main(int argc, char*argv[])
18277{
18278 if(chflags(argv[0], 0) != 0)
18279 return 1;
18280 return 0;
18281}
18282
18283_ACEOF
18284rm -f conftest$ac_exeext
18285if { (ac_try="$ac_link"
18286case "(($ac_try" in
18287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18288 *) ac_try_echo=$ac_try;;
18289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018291 (eval "$ac_link") 2>&5
18292 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018294 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18295 { (case "(($ac_try" in
18296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18297 *) ac_try_echo=$ac_try;;
18298esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018300 (eval "$ac_try") 2>&5
18301 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018303 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018304 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018306 echo "$as_me: program exited with status $ac_status" >&5
18307echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018308sed 's/^/| /' conftest.$ac_ext >&5
18309
18310( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018311ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018312fi
18313rm -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 +000018314fi
18315
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018316
18317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018318fi
18319
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018320{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18321echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018322if test $ac_cv_have_chflags = yes
18323then
18324
18325cat >>confdefs.h <<\_ACEOF
18326#define HAVE_CHFLAGS 1
18327_ACEOF
18328
18329fi
18330
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018331{ echo "$as_me:$LINENO: checking for lchflags" >&5
18332echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018333if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018334 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018335else
18336 if test "$cross_compiling" = yes; then
18337 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018338else
18339 cat >conftest.$ac_ext <<_ACEOF
18340/* confdefs.h. */
18341_ACEOF
18342cat confdefs.h >>conftest.$ac_ext
18343cat >>conftest.$ac_ext <<_ACEOF
18344/* end confdefs.h. */
18345
18346#include <sys/stat.h>
18347#include <unistd.h>
18348int main(int argc, char*argv[])
18349{
18350 if(lchflags(argv[0], 0) != 0)
18351 return 1;
18352 return 0;
18353}
18354
18355_ACEOF
18356rm -f conftest$ac_exeext
18357if { (ac_try="$ac_link"
18358case "(($ac_try" in
18359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18360 *) ac_try_echo=$ac_try;;
18361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018363 (eval "$ac_link") 2>&5
18364 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18367 { (case "(($ac_try" in
18368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18369 *) ac_try_echo=$ac_try;;
18370esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018372 (eval "$ac_try") 2>&5
18373 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018375 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018376 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018377else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018378 echo "$as_me: program exited with status $ac_status" >&5
18379echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018380sed 's/^/| /' conftest.$ac_ext >&5
18381
18382( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018383ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018384fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18386fi
18387
18388
Christian Heimesd0764e22007-12-04 15:00:33 +000018389
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018390fi
18391
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018392{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18393echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018394if test $ac_cv_have_lchflags = yes
18395then
18396
18397cat >>confdefs.h <<\_ACEOF
18398#define HAVE_LCHFLAGS 1
18399_ACEOF
18400
18401fi
18402
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018403case $ac_sys_system/$ac_sys_release in
18404Darwin/*)
18405 _CUR_CFLAGS="${CFLAGS}"
18406 _CUR_LDFLAGS="${LDFLAGS}"
18407 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18408 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18409 ;;
18410esac
18411
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018412{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18413echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018414if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018415 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018416else
18417 ac_check_lib_save_LIBS=$LIBS
18418LIBS="-lz $LIBS"
18419cat >conftest.$ac_ext <<_ACEOF
18420/* confdefs.h. */
18421_ACEOF
18422cat confdefs.h >>conftest.$ac_ext
18423cat >>conftest.$ac_ext <<_ACEOF
18424/* end confdefs.h. */
18425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018426/* Override any GCC internal prototype to avoid an error.
18427 Use char because int might match the return type of a GCC
18428 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018429#ifdef __cplusplus
18430extern "C"
18431#endif
18432char inflateCopy ();
18433int
18434main ()
18435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018436return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018437 ;
18438 return 0;
18439}
18440_ACEOF
18441rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442if { (ac_try="$ac_link"
18443case "(($ac_try" in
18444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18445 *) ac_try_echo=$ac_try;;
18446esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018449 ac_status=$?
18450 grep -v '^ *+' conftest.er1 >conftest.err
18451 rm -f conftest.er1
18452 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454 (exit $ac_status); } && {
18455 test -z "$ac_c_werror_flag" ||
18456 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018457 } && test -s conftest$ac_exeext &&
18458 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018459 ac_cv_lib_z_inflateCopy=yes
18460else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018461 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018462sed 's/^/| /' conftest.$ac_ext >&5
18463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018466
18467rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018468 conftest$ac_exeext conftest.$ac_ext
18469LIBS=$ac_check_lib_save_LIBS
18470fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018471{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18472echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18473if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018474
18475cat >>confdefs.h <<\_ACEOF
18476#define HAVE_ZLIB_COPY 1
18477_ACEOF
18478
18479fi
18480
18481
18482case $ac_sys_system/$ac_sys_release in
18483Darwin/*)
18484 CFLAGS="${_CUR_CFLAGS}"
18485 LDFLAGS="${_CUR_LDFLAGS}"
18486 ;;
18487esac
18488
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018489{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18490echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018492/* confdefs.h. */
18493_ACEOF
18494cat confdefs.h >>conftest.$ac_ext
18495cat >>conftest.$ac_ext <<_ACEOF
18496/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018497
18498#include "confdefs.h"
18499#include <netdb.h>
18500
Martin v. Löwise9416172003-05-03 10:12:45 +000018501int
18502main ()
18503{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018504void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018505 ;
18506 return 0;
18507}
18508_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018509rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510if { (ac_try="$ac_link"
18511case "(($ac_try" in
18512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18513 *) ac_try_echo=$ac_try;;
18514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018518 grep -v '^ *+' conftest.er1 >conftest.err
18519 rm -f conftest.er1
18520 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018522 (exit $ac_status); } && {
18523 test -z "$ac_c_werror_flag" ||
18524 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018525 } && test -s conftest$ac_exeext &&
18526 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018527
18528cat >>confdefs.h <<\_ACEOF
18529#define HAVE_HSTRERROR 1
18530_ACEOF
18531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018532 { echo "$as_me:$LINENO: result: yes" >&5
18533echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018534else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018536sed 's/^/| /' conftest.$ac_ext >&5
18537
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018538 { echo "$as_me:$LINENO: result: no" >&5
18539echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018540
18541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542
18543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018545
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018546{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18547echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018548cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018549/* confdefs.h. */
18550_ACEOF
18551cat confdefs.h >>conftest.$ac_ext
18552cat >>conftest.$ac_ext <<_ACEOF
18553/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018554
18555#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018556#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018557#include <sys/socket.h>
18558#include <netinet/in.h>
18559#include <arpa/inet.h>
18560
Martin v. Löwise9416172003-05-03 10:12:45 +000018561int
18562main ()
18563{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018564void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018565 ;
18566 return 0;
18567}
18568_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018569rm -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öwise9416172003-05-03 10:12:45 +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öwise9416172003-05-03 10:12:45 +000018587
18588cat >>confdefs.h <<\_ACEOF
18589#define HAVE_INET_ATON 1
18590_ACEOF
18591
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018592 { echo "$as_me:$LINENO: result: yes" >&5
18593echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018594else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018596sed 's/^/| /' conftest.$ac_ext >&5
18597
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018598 { echo "$as_me:$LINENO: result: no" >&5
18599echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018600
18601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018602
18603rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018604 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018606{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18607echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018609/* confdefs.h. */
18610_ACEOF
18611cat confdefs.h >>conftest.$ac_ext
18612cat >>conftest.$ac_ext <<_ACEOF
18613/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018614
18615#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018616#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018617#include <sys/socket.h>
18618#include <netinet/in.h>
18619#include <arpa/inet.h>
18620
Martin v. Löwise9416172003-05-03 10:12:45 +000018621int
18622main ()
18623{
18624void* p = inet_pton
18625 ;
18626 return 0;
18627}
18628_ACEOF
18629rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018630if { (ac_try="$ac_compile"
18631case "(($ac_try" in
18632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18633 *) ac_try_echo=$ac_try;;
18634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018638 grep -v '^ *+' conftest.er1 >conftest.err
18639 rm -f conftest.er1
18640 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018642 (exit $ac_status); } && {
18643 test -z "$ac_c_werror_flag" ||
18644 test ! -s conftest.err
18645 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018646
18647cat >>confdefs.h <<\_ACEOF
18648#define HAVE_INET_PTON 1
18649_ACEOF
18650
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018651 { echo "$as_me:$LINENO: result: yes" >&5
18652echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018653else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018655sed 's/^/| /' conftest.$ac_ext >&5
18656
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018657 { echo "$as_me:$LINENO: result: no" >&5
18658echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018659
18660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018661
18662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018663
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018664# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018665{ echo "$as_me:$LINENO: checking for setgroups" >&5
18666echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018668/* confdefs.h. */
18669_ACEOF
18670cat confdefs.h >>conftest.$ac_ext
18671cat >>conftest.$ac_ext <<_ACEOF
18672/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018673
18674#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018675#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018676#ifdef HAVE_GRP_H
18677#include <grp.h>
18678#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018679
Martin v. Löwisd5843682002-11-21 20:41:28 +000018680int
18681main ()
18682{
18683void* p = setgroups
18684 ;
18685 return 0;
18686}
18687_ACEOF
18688rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018689if { (ac_try="$ac_compile"
18690case "(($ac_try" in
18691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18692 *) ac_try_echo=$ac_try;;
18693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018695 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018697 grep -v '^ *+' conftest.er1 >conftest.err
18698 rm -f conftest.er1
18699 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018701 (exit $ac_status); } && {
18702 test -z "$ac_c_werror_flag" ||
18703 test ! -s conftest.err
18704 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018705
18706cat >>confdefs.h <<\_ACEOF
18707#define HAVE_SETGROUPS 1
18708_ACEOF
18709
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018710 { echo "$as_me:$LINENO: result: yes" >&5
18711echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018712else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018714sed 's/^/| /' conftest.$ac_ext >&5
18715
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018716 { echo "$as_me:$LINENO: result: no" >&5
18717echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018718
18719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018720
18721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018722
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018723# check for openpty and forkpty
18724
Martin v. Löwis11437992002-04-12 09:54:03 +000018725
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018726for ac_func in openpty
18727do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018728as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18729{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18730echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018731if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018733else
Martin v. Löwis11437992002-04-12 09:54:03 +000018734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018735/* confdefs.h. */
18736_ACEOF
18737cat confdefs.h >>conftest.$ac_ext
18738cat >>conftest.$ac_ext <<_ACEOF
18739/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018740/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18741 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18742#define $ac_func innocuous_$ac_func
18743
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018744/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018745 which can conflict with char $ac_func (); below.
18746 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018747 <limits.h> exists even on freestanding compilers. */
18748
18749#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018750# include <limits.h>
18751#else
18752# include <assert.h>
18753#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018754
18755#undef $ac_func
18756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018757/* Override any GCC internal prototype to avoid an error.
18758 Use char because int might match the return type of a GCC
18759 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018760#ifdef __cplusplus
18761extern "C"
18762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018763char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018764/* The GNU C library defines this for functions which it implements
18765 to always fail with ENOSYS. Some functions are actually named
18766 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018767#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018768choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018769#endif
18770
Skip Montanaro6dead952003-09-25 14:50:04 +000018771int
18772main ()
18773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018774return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018775 ;
18776 return 0;
18777}
18778_ACEOF
18779rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018780if { (ac_try="$ac_link"
18781case "(($ac_try" in
18782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18783 *) ac_try_echo=$ac_try;;
18784esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018786 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018788 grep -v '^ *+' conftest.er1 >conftest.err
18789 rm -f conftest.er1
18790 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018792 (exit $ac_status); } && {
18793 test -z "$ac_c_werror_flag" ||
18794 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018795 } && test -s conftest$ac_exeext &&
18796 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018797 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018798else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018800sed 's/^/| /' conftest.$ac_ext >&5
18801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018802 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018804
18805rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018806 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018807fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018808ac_res=`eval echo '${'$as_ac_var'}'`
18809 { echo "$as_me:$LINENO: result: $ac_res" >&5
18810echo "${ECHO_T}$ac_res" >&6; }
18811if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018812 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018813#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018814_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018815
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018816else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018817 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18818echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018819if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018820 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018821else
Martin v. Löwis11437992002-04-12 09:54:03 +000018822 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018823LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018825/* confdefs.h. */
18826_ACEOF
18827cat confdefs.h >>conftest.$ac_ext
18828cat >>conftest.$ac_ext <<_ACEOF
18829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018831/* Override any GCC internal prototype to avoid an error.
18832 Use char because int might match the return type of a GCC
18833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018834#ifdef __cplusplus
18835extern "C"
18836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018837char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018838int
18839main ()
18840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018841return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018842 ;
18843 return 0;
18844}
18845_ACEOF
18846rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018847if { (ac_try="$ac_link"
18848case "(($ac_try" in
18849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18850 *) ac_try_echo=$ac_try;;
18851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018855 grep -v '^ *+' conftest.er1 >conftest.err
18856 rm -f conftest.er1
18857 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018859 (exit $ac_status); } && {
18860 test -z "$ac_c_werror_flag" ||
18861 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018862 } && test -s conftest$ac_exeext &&
18863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018864 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018867sed 's/^/| /' conftest.$ac_ext >&5
18868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018871
18872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018874LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018875fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018876{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18877echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18878if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018879 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018880#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018881_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018882 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018883else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018884 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18885echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018886if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018888else
18889 ac_check_lib_save_LIBS=$LIBS
18890LIBS="-lbsd $LIBS"
18891cat >conftest.$ac_ext <<_ACEOF
18892/* confdefs.h. */
18893_ACEOF
18894cat confdefs.h >>conftest.$ac_ext
18895cat >>conftest.$ac_ext <<_ACEOF
18896/* end confdefs.h. */
18897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018898/* Override any GCC internal prototype to avoid an error.
18899 Use char because int might match the return type of a GCC
18900 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018901#ifdef __cplusplus
18902extern "C"
18903#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018904char openpty ();
18905int
18906main ()
18907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018908return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018909 ;
18910 return 0;
18911}
18912_ACEOF
18913rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018914if { (ac_try="$ac_link"
18915case "(($ac_try" in
18916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18917 *) ac_try_echo=$ac_try;;
18918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018920 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018921 ac_status=$?
18922 grep -v '^ *+' conftest.er1 >conftest.err
18923 rm -f conftest.er1
18924 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018926 (exit $ac_status); } && {
18927 test -z "$ac_c_werror_flag" ||
18928 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018929 } && test -s conftest$ac_exeext &&
18930 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018931 ac_cv_lib_bsd_openpty=yes
18932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018933 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018934sed 's/^/| /' conftest.$ac_ext >&5
18935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018936 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018938
18939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018940 conftest$ac_exeext conftest.$ac_ext
18941LIBS=$ac_check_lib_save_LIBS
18942fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018943{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18944echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18945if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018946 cat >>confdefs.h <<\_ACEOF
18947#define HAVE_OPENPTY 1
18948_ACEOF
18949 LIBS="$LIBS -lbsd"
18950fi
18951
18952
18953fi
18954
Fred Drake8cef4cf2000-06-28 16:40:38 +000018955
18956fi
18957done
18958
Martin v. Löwis11437992002-04-12 09:54:03 +000018959
Fred Drake8cef4cf2000-06-28 16:40:38 +000018960for ac_func in forkpty
18961do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018962as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18963{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18964echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018965if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018966 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018967else
Martin v. Löwis11437992002-04-12 09:54:03 +000018968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018969/* confdefs.h. */
18970_ACEOF
18971cat confdefs.h >>conftest.$ac_ext
18972cat >>conftest.$ac_ext <<_ACEOF
18973/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018974/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18975 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18976#define $ac_func innocuous_$ac_func
18977
Fred Drake8cef4cf2000-06-28 16:40:38 +000018978/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018979 which can conflict with char $ac_func (); below.
18980 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018981 <limits.h> exists even on freestanding compilers. */
18982
18983#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018984# include <limits.h>
18985#else
18986# include <assert.h>
18987#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018988
18989#undef $ac_func
18990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018991/* Override any GCC internal prototype to avoid an error.
18992 Use char because int might match the return type of a GCC
18993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018994#ifdef __cplusplus
18995extern "C"
18996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018997char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018998/* The GNU C library defines this for functions which it implements
18999 to always fail with ENOSYS. Some functions are actually named
19000 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019001#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019002choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019003#endif
19004
Skip Montanaro6dead952003-09-25 14:50:04 +000019005int
19006main ()
19007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019008return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019009 ;
19010 return 0;
19011}
19012_ACEOF
19013rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019014if { (ac_try="$ac_link"
19015case "(($ac_try" in
19016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19017 *) ac_try_echo=$ac_try;;
19018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019020 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019022 grep -v '^ *+' conftest.er1 >conftest.err
19023 rm -f conftest.er1
19024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019026 (exit $ac_status); } && {
19027 test -z "$ac_c_werror_flag" ||
19028 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019029 } && test -s conftest$ac_exeext &&
19030 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019031 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019032else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019034sed 's/^/| /' conftest.$ac_ext >&5
19035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019036 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019038
19039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019040 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019041fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019042ac_res=`eval echo '${'$as_ac_var'}'`
19043 { echo "$as_me:$LINENO: result: $ac_res" >&5
19044echo "${ECHO_T}$ac_res" >&6; }
19045if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019046 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019047#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019048_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019049
Fred Drake8cef4cf2000-06-28 16:40:38 +000019050else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019051 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19052echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019053if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019054 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019055else
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019057LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019059/* confdefs.h. */
19060_ACEOF
19061cat confdefs.h >>conftest.$ac_ext
19062cat >>conftest.$ac_ext <<_ACEOF
19063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019065/* Override any GCC internal prototype to avoid an error.
19066 Use char because int might match the return type of a GCC
19067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019068#ifdef __cplusplus
19069extern "C"
19070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019071char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019072int
19073main ()
19074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019075return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019076 ;
19077 return 0;
19078}
19079_ACEOF
19080rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019081if { (ac_try="$ac_link"
19082case "(($ac_try" in
19083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19084 *) ac_try_echo=$ac_try;;
19085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019087 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019089 grep -v '^ *+' conftest.er1 >conftest.err
19090 rm -f conftest.er1
19091 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019093 (exit $ac_status); } && {
19094 test -z "$ac_c_werror_flag" ||
19095 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019096 } && test -s conftest$ac_exeext &&
19097 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019098 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019101sed 's/^/| /' conftest.$ac_ext >&5
19102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019103 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019105
19106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019107 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019108LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019109fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019110{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19111echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19112if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019113 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019114#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019115_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019116 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019117else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019118 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19119echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019120if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019121 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019122else
19123 ac_check_lib_save_LIBS=$LIBS
19124LIBS="-lbsd $LIBS"
19125cat >conftest.$ac_ext <<_ACEOF
19126/* confdefs.h. */
19127_ACEOF
19128cat confdefs.h >>conftest.$ac_ext
19129cat >>conftest.$ac_ext <<_ACEOF
19130/* end confdefs.h. */
19131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019132/* Override any GCC internal prototype to avoid an error.
19133 Use char because int might match the return type of a GCC
19134 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019135#ifdef __cplusplus
19136extern "C"
19137#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019138char forkpty ();
19139int
19140main ()
19141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019142return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019143 ;
19144 return 0;
19145}
19146_ACEOF
19147rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019148if { (ac_try="$ac_link"
19149case "(($ac_try" in
19150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19151 *) ac_try_echo=$ac_try;;
19152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019154 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019155 ac_status=$?
19156 grep -v '^ *+' conftest.er1 >conftest.err
19157 rm -f conftest.er1
19158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019160 (exit $ac_status); } && {
19161 test -z "$ac_c_werror_flag" ||
19162 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019163 } && test -s conftest$ac_exeext &&
19164 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019165 ac_cv_lib_bsd_forkpty=yes
19166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019167 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019168sed 's/^/| /' conftest.$ac_ext >&5
19169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019170 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019172
19173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019174 conftest$ac_exeext conftest.$ac_ext
19175LIBS=$ac_check_lib_save_LIBS
19176fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019177{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19178echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19179if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019180 cat >>confdefs.h <<\_ACEOF
19181#define HAVE_FORKPTY 1
19182_ACEOF
19183 LIBS="$LIBS -lbsd"
19184fi
19185
19186
19187fi
19188
Fred Drake8cef4cf2000-06-28 16:40:38 +000019189
19190fi
19191done
19192
Jack Jansendd19cf82001-12-06 22:36:17 +000019193
Christian Heimesb186d002008-03-18 15:15:01 +000019194# Stuff for expat.
19195
19196for ac_func in memmove
19197do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019198as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19199{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19200echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019201if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019202 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019203else
19204 cat >conftest.$ac_ext <<_ACEOF
19205/* confdefs.h. */
19206_ACEOF
19207cat confdefs.h >>conftest.$ac_ext
19208cat >>conftest.$ac_ext <<_ACEOF
19209/* end confdefs.h. */
19210/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19211 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19212#define $ac_func innocuous_$ac_func
19213
19214/* System header to define __stub macros and hopefully few prototypes,
19215 which can conflict with char $ac_func (); below.
19216 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19217 <limits.h> exists even on freestanding compilers. */
19218
19219#ifdef __STDC__
19220# include <limits.h>
19221#else
19222# include <assert.h>
19223#endif
19224
19225#undef $ac_func
19226
19227/* Override any GCC internal prototype to avoid an error.
19228 Use char because int might match the return type of a GCC
19229 builtin and then its argument prototype would still apply. */
19230#ifdef __cplusplus
19231extern "C"
19232#endif
19233char $ac_func ();
19234/* The GNU C library defines this for functions which it implements
19235 to always fail with ENOSYS. Some functions are actually named
19236 something starting with __ and the normal name is an alias. */
19237#if defined __stub_$ac_func || defined __stub___$ac_func
19238choke me
19239#endif
19240
19241int
19242main ()
19243{
19244return $ac_func ();
19245 ;
19246 return 0;
19247}
19248_ACEOF
19249rm -f conftest.$ac_objext conftest$ac_exeext
19250if { (ac_try="$ac_link"
19251case "(($ac_try" in
19252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19253 *) ac_try_echo=$ac_try;;
19254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019256 (eval "$ac_link") 2>conftest.er1
19257 ac_status=$?
19258 grep -v '^ *+' conftest.er1 >conftest.err
19259 rm -f conftest.er1
19260 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019262 (exit $ac_status); } && {
19263 test -z "$ac_c_werror_flag" ||
19264 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019265 } && test -s conftest$ac_exeext &&
19266 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019267 eval "$as_ac_var=yes"
19268else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019269 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019270sed 's/^/| /' conftest.$ac_ext >&5
19271
19272 eval "$as_ac_var=no"
19273fi
19274
19275rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19276 conftest$ac_exeext conftest.$ac_ext
19277fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019278ac_res=`eval echo '${'$as_ac_var'}'`
19279 { echo "$as_me:$LINENO: result: $ac_res" >&5
19280echo "${ECHO_T}$ac_res" >&6; }
19281if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019282 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019283#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019284_ACEOF
19285
19286fi
19287done
19288
19289
Michael W. Hudson54241132001-12-07 15:38:26 +000019290# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019291
19292
19293
19294
19295
19296
Fred Drake8cef4cf2000-06-28 16:40:38 +000019297for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19298do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019299as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19300{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19301echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019302if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019303 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019304else
Martin v. Löwis11437992002-04-12 09:54:03 +000019305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019306/* confdefs.h. */
19307_ACEOF
19308cat confdefs.h >>conftest.$ac_ext
19309cat >>conftest.$ac_ext <<_ACEOF
19310/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019311/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19312 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19313#define $ac_func innocuous_$ac_func
19314
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019315/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019316 which can conflict with char $ac_func (); below.
19317 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019318 <limits.h> exists even on freestanding compilers. */
19319
19320#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019321# include <limits.h>
19322#else
19323# include <assert.h>
19324#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019325
19326#undef $ac_func
19327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019328/* Override any GCC internal prototype to avoid an error.
19329 Use char because int might match the return type of a GCC
19330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019331#ifdef __cplusplus
19332extern "C"
19333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019334char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019335/* The GNU C library defines this for functions which it implements
19336 to always fail with ENOSYS. Some functions are actually named
19337 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019338#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019339choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019340#endif
19341
Skip Montanaro6dead952003-09-25 14:50:04 +000019342int
19343main ()
19344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019345return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019346 ;
19347 return 0;
19348}
19349_ACEOF
19350rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019351if { (ac_try="$ac_link"
19352case "(($ac_try" in
19353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19354 *) ac_try_echo=$ac_try;;
19355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019357 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019359 grep -v '^ *+' conftest.er1 >conftest.err
19360 rm -f conftest.er1
19361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019363 (exit $ac_status); } && {
19364 test -z "$ac_c_werror_flag" ||
19365 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019366 } && test -s conftest$ac_exeext &&
19367 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019368 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019371sed 's/^/| /' conftest.$ac_ext >&5
19372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019373 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019375
19376rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019377 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019378fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019379ac_res=`eval echo '${'$as_ac_var'}'`
19380 { echo "$as_me:$LINENO: result: $ac_res" >&5
19381echo "${ECHO_T}$ac_res" >&6; }
19382if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019383 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019384#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019385_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019386
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019387fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019388done
19389
Michael W. Hudson54241132001-12-07 15:38:26 +000019390
Martin v. Löwis11437992002-04-12 09:54:03 +000019391
19392
19393
Christian Heimesb186d002008-03-18 15:15:01 +000019394for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019395do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019396as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19397{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19398echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019399if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019400 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019401else
Martin v. Löwis11437992002-04-12 09:54:03 +000019402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019403/* confdefs.h. */
19404_ACEOF
19405cat confdefs.h >>conftest.$ac_ext
19406cat >>conftest.$ac_ext <<_ACEOF
19407/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019408/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19409 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19410#define $ac_func innocuous_$ac_func
19411
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019412/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019413 which can conflict with char $ac_func (); below.
19414 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019415 <limits.h> exists even on freestanding compilers. */
19416
19417#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019418# include <limits.h>
19419#else
19420# include <assert.h>
19421#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019422
19423#undef $ac_func
19424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019425/* Override any GCC internal prototype to avoid an error.
19426 Use char because int might match the return type of a GCC
19427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019428#ifdef __cplusplus
19429extern "C"
19430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019431char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019432/* The GNU C library defines this for functions which it implements
19433 to always fail with ENOSYS. Some functions are actually named
19434 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019435#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019436choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019437#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019438
Skip Montanaro6dead952003-09-25 14:50:04 +000019439int
19440main ()
19441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019442return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019443 ;
19444 return 0;
19445}
19446_ACEOF
19447rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019448if { (ac_try="$ac_link"
19449case "(($ac_try" in
19450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19451 *) ac_try_echo=$ac_try;;
19452esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019454 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019456 grep -v '^ *+' conftest.er1 >conftest.err
19457 rm -f conftest.er1
19458 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019460 (exit $ac_status); } && {
19461 test -z "$ac_c_werror_flag" ||
19462 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019463 } && test -s conftest$ac_exeext &&
19464 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019465 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019468sed 's/^/| /' conftest.$ac_ext >&5
19469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019470 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019472
19473rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019475fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019476ac_res=`eval echo '${'$as_ac_var'}'`
19477 { echo "$as_me:$LINENO: result: $ac_res" >&5
19478echo "${ECHO_T}$ac_res" >&6; }
19479if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019480 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019481#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019482_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019483
Martin v. Löwis1142de32002-03-29 16:28:31 +000019484else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019485 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019486 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019487 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19488 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019489esac
19490
Martin v. Löwis1142de32002-03-29 16:28:31 +000019491fi
19492done
19493
19494
Martin v. Löwis11437992002-04-12 09:54:03 +000019495
Martin v. Löwis1142de32002-03-29 16:28:31 +000019496for ac_func in getpgrp
19497do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019498as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19499{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19500echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019501if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019502 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019503else
Martin v. Löwis11437992002-04-12 09:54:03 +000019504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019505/* confdefs.h. */
19506_ACEOF
19507cat confdefs.h >>conftest.$ac_ext
19508cat >>conftest.$ac_ext <<_ACEOF
19509/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019510/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19511 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19512#define $ac_func innocuous_$ac_func
19513
Martin v. Löwis1142de32002-03-29 16:28:31 +000019514/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019515 which can conflict with char $ac_func (); below.
19516 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019517 <limits.h> exists even on freestanding compilers. */
19518
19519#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019520# include <limits.h>
19521#else
19522# include <assert.h>
19523#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019524
19525#undef $ac_func
19526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019527/* Override any GCC internal prototype to avoid an error.
19528 Use char because int might match the return type of a GCC
19529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019530#ifdef __cplusplus
19531extern "C"
19532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019533char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019534/* The GNU C library defines this for functions which it implements
19535 to always fail with ENOSYS. Some functions are actually named
19536 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019537#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019538choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019539#endif
19540
Skip Montanaro6dead952003-09-25 14:50:04 +000019541int
19542main ()
19543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019544return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 ;
19546 return 0;
19547}
19548_ACEOF
19549rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019550if { (ac_try="$ac_link"
19551case "(($ac_try" in
19552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19553 *) ac_try_echo=$ac_try;;
19554esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019556 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019558 grep -v '^ *+' conftest.er1 >conftest.err
19559 rm -f conftest.er1
19560 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019562 (exit $ac_status); } && {
19563 test -z "$ac_c_werror_flag" ||
19564 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019565 } && test -s conftest$ac_exeext &&
19566 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019567 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019568else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019570sed 's/^/| /' conftest.$ac_ext >&5
19571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019572 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019574
19575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019576 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019577fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019578ac_res=`eval echo '${'$as_ac_var'}'`
19579 { echo "$as_me:$LINENO: result: $ac_res" >&5
19580echo "${ECHO_T}$ac_res" >&6; }
19581if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019582 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019583#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019584_ACEOF
19585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019586/* confdefs.h. */
19587_ACEOF
19588cat confdefs.h >>conftest.$ac_ext
19589cat >>conftest.$ac_ext <<_ACEOF
19590/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019591#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019592int
19593main ()
19594{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019595getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019596 ;
19597 return 0;
19598}
19599_ACEOF
19600rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019601if { (ac_try="$ac_compile"
19602case "(($ac_try" in
19603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19604 *) ac_try_echo=$ac_try;;
19605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019609 grep -v '^ *+' conftest.er1 >conftest.err
19610 rm -f conftest.er1
19611 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019613 (exit $ac_status); } && {
19614 test -z "$ac_c_werror_flag" ||
19615 test ! -s conftest.err
19616 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019617
19618cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019619#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019620_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019621
Martin v. Löwis11437992002-04-12 09:54:03 +000019622
Guido van Rossumf78abae1997-01-21 22:02:36 +000019623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019625sed 's/^/| /' conftest.$ac_ext >&5
19626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019627
Guido van Rossum627b2d71993-12-24 10:39:16 +000019628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019629
19630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019631
Guido van Rossum627b2d71993-12-24 10:39:16 +000019632fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019633done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019634
Jack Jansen150753c2003-03-29 22:07:47 +000019635
19636for ac_func in setpgrp
19637do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019638as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19639{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19640echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019641if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019642 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019643else
Martin v. Löwis11437992002-04-12 09:54:03 +000019644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019645/* confdefs.h. */
19646_ACEOF
19647cat confdefs.h >>conftest.$ac_ext
19648cat >>conftest.$ac_ext <<_ACEOF
19649/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019650/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19651 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19652#define $ac_func innocuous_$ac_func
19653
Jack Jansen150753c2003-03-29 22:07:47 +000019654/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019655 which can conflict with char $ac_func (); below.
19656 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019657 <limits.h> exists even on freestanding compilers. */
19658
19659#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019660# include <limits.h>
19661#else
19662# include <assert.h>
19663#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019664
19665#undef $ac_func
19666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019667/* Override any GCC internal prototype to avoid an error.
19668 Use char because int might match the return type of a GCC
19669 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019670#ifdef __cplusplus
19671extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019672#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019673char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019674/* The GNU C library defines this for functions which it implements
19675 to always fail with ENOSYS. Some functions are actually named
19676 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019677#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019678choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019679#endif
19680
Skip Montanaro6dead952003-09-25 14:50:04 +000019681int
19682main ()
19683{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019684return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019685 ;
19686 return 0;
19687}
19688_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019689rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019690if { (ac_try="$ac_link"
19691case "(($ac_try" in
19692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19693 *) ac_try_echo=$ac_try;;
19694esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019696 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019698 grep -v '^ *+' conftest.er1 >conftest.err
19699 rm -f conftest.er1
19700 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019702 (exit $ac_status); } && {
19703 test -z "$ac_c_werror_flag" ||
19704 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019705 } && test -s conftest$ac_exeext &&
19706 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019707 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019708else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019710sed 's/^/| /' conftest.$ac_ext >&5
19711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019712 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019714
19715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019716 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019717fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019718ac_res=`eval echo '${'$as_ac_var'}'`
19719 { echo "$as_me:$LINENO: result: $ac_res" >&5
19720echo "${ECHO_T}$ac_res" >&6; }
19721if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019722 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019723#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019724_ACEOF
19725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019726/* confdefs.h. */
19727_ACEOF
19728cat confdefs.h >>conftest.$ac_ext
19729cat >>conftest.$ac_ext <<_ACEOF
19730/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019731#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019732int
19733main ()
19734{
19735setpgrp(0,0);
19736 ;
19737 return 0;
19738}
19739_ACEOF
19740rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019741if { (ac_try="$ac_compile"
19742case "(($ac_try" in
19743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19744 *) ac_try_echo=$ac_try;;
19745esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019747 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019749 grep -v '^ *+' conftest.er1 >conftest.err
19750 rm -f conftest.er1
19751 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019753 (exit $ac_status); } && {
19754 test -z "$ac_c_werror_flag" ||
19755 test ! -s conftest.err
19756 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019757
19758cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019759#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019760_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019761
Jack Jansen150753c2003-03-29 22:07:47 +000019762
19763else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019765sed 's/^/| /' conftest.$ac_ext >&5
19766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019767
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019769
19770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019771
19772fi
19773done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019774
Martin v. Löwis11437992002-04-12 09:54:03 +000019775
Thomas Wouters3a584202000-08-05 23:28:51 +000019776for ac_func in gettimeofday
19777do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019778as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19779{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19780echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019781if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019782 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019783else
Martin v. Löwis11437992002-04-12 09:54:03 +000019784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019785/* confdefs.h. */
19786_ACEOF
19787cat confdefs.h >>conftest.$ac_ext
19788cat >>conftest.$ac_ext <<_ACEOF
19789/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019790/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19791 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19792#define $ac_func innocuous_$ac_func
19793
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019794/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019795 which can conflict with char $ac_func (); below.
19796 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019797 <limits.h> exists even on freestanding compilers. */
19798
19799#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019800# include <limits.h>
19801#else
19802# include <assert.h>
19803#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019804
19805#undef $ac_func
19806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019807/* Override any GCC internal prototype to avoid an error.
19808 Use char because int might match the return type of a GCC
19809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019810#ifdef __cplusplus
19811extern "C"
19812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019813char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019814/* The GNU C library defines this for functions which it implements
19815 to always fail with ENOSYS. Some functions are actually named
19816 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019817#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019818choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019819#endif
19820
Skip Montanaro6dead952003-09-25 14:50:04 +000019821int
19822main ()
19823{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019824return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019825 ;
19826 return 0;
19827}
19828_ACEOF
19829rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019830if { (ac_try="$ac_link"
19831case "(($ac_try" in
19832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19833 *) ac_try_echo=$ac_try;;
19834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019836 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019838 grep -v '^ *+' conftest.er1 >conftest.err
19839 rm -f conftest.er1
19840 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019842 (exit $ac_status); } && {
19843 test -z "$ac_c_werror_flag" ||
19844 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019845 } && test -s conftest$ac_exeext &&
19846 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019847 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019850sed 's/^/| /' conftest.$ac_ext >&5
19851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019852 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019854
19855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019856 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019857fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019858ac_res=`eval echo '${'$as_ac_var'}'`
19859 { echo "$as_me:$LINENO: result: $ac_res" >&5
19860echo "${ECHO_T}$ac_res" >&6; }
19861if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019862 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019863#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019864_ACEOF
19865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019866/* confdefs.h. */
19867_ACEOF
19868cat confdefs.h >>conftest.$ac_ext
19869cat >>conftest.$ac_ext <<_ACEOF
19870/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019871#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019872int
19873main ()
19874{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019875gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019876 ;
19877 return 0;
19878}
19879_ACEOF
19880rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019881if { (ac_try="$ac_compile"
19882case "(($ac_try" in
19883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19884 *) ac_try_echo=$ac_try;;
19885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019889 grep -v '^ *+' conftest.er1 >conftest.err
19890 rm -f conftest.er1
19891 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019893 (exit $ac_status); } && {
19894 test -z "$ac_c_werror_flag" ||
19895 test ! -s conftest.err
19896 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019897 :
19898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019900sed 's/^/| /' conftest.$ac_ext >&5
19901
Martin v. Löwis11437992002-04-12 09:54:03 +000019902
19903cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019904#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019905_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019906
Martin v. Löwis11437992002-04-12 09:54:03 +000019907
Guido van Rossum627b2d71993-12-24 10:39:16 +000019908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019909
19910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019911
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019912fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019913done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019914
Michael W. Hudson54241132001-12-07 15:38:26 +000019915
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019916{ echo "$as_me:$LINENO: checking for major" >&5
19917echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019918cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019919/* confdefs.h. */
19920_ACEOF
19921cat confdefs.h >>conftest.$ac_ext
19922cat >>conftest.$ac_ext <<_ACEOF
19923/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019924
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019925#if defined(MAJOR_IN_MKDEV)
19926#include <sys/mkdev.h>
19927#elif defined(MAJOR_IN_SYSMACROS)
19928#include <sys/sysmacros.h>
19929#else
19930#include <sys/types.h>
19931#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019932
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019933int
19934main ()
19935{
19936
19937 makedev(major(0),minor(0));
19938
19939 ;
19940 return 0;
19941}
19942_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019943rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019944if { (ac_try="$ac_link"
19945case "(($ac_try" in
19946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19947 *) ac_try_echo=$ac_try;;
19948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019950 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019952 grep -v '^ *+' conftest.er1 >conftest.err
19953 rm -f conftest.er1
19954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019956 (exit $ac_status); } && {
19957 test -z "$ac_c_werror_flag" ||
19958 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019959 } && test -s conftest$ac_exeext &&
19960 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019961
19962
19963cat >>confdefs.h <<\_ACEOF
19964#define HAVE_DEVICE_MACROS 1
19965_ACEOF
19966
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019967 { echo "$as_me:$LINENO: result: yes" >&5
19968echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019969
19970else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019972sed 's/^/| /' conftest.$ac_ext >&5
19973
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019974
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019975 { echo "$as_me:$LINENO: result: no" >&5
19976echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019977
19978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019979
19980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019981 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019982
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019983# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019984# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019985{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19986echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019988/* confdefs.h. */
19989_ACEOF
19990cat confdefs.h >>conftest.$ac_ext
19991cat >>conftest.$ac_ext <<_ACEOF
19992/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019993
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019994#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019995#include <sys/socket.h>
19996#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019997#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019998
Martin v. Löwis11437992002-04-12 09:54:03 +000019999int
20000main ()
20001{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020002getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020003 ;
20004 return 0;
20005}
20006_ACEOF
20007rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020008if { (ac_try="$ac_link"
20009case "(($ac_try" in
20010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20011 *) ac_try_echo=$ac_try;;
20012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020014 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020016 grep -v '^ *+' conftest.er1 >conftest.err
20017 rm -f conftest.er1
20018 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020020 (exit $ac_status); } && {
20021 test -z "$ac_c_werror_flag" ||
20022 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020023 } && test -s conftest$ac_exeext &&
20024 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020025 have_getaddrinfo=yes
20026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020027 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020028sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020029
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020030 have_getaddrinfo=no
20031fi
20032
20033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20034 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020035{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20036echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020037if test $have_getaddrinfo = yes
20038then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020039 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20040echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020041 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020042 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020043else
20044 if test "$cross_compiling" = yes; then
20045 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020046else
Martin v. Löwis11437992002-04-12 09:54:03 +000020047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020048/* confdefs.h. */
20049_ACEOF
20050cat confdefs.h >>conftest.$ac_ext
20051cat >>conftest.$ac_ext <<_ACEOF
20052/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020053
20054#include <sys/types.h>
20055#include <netdb.h>
20056#include <string.h>
20057#include <sys/socket.h>
20058#include <netinet/in.h>
20059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020060int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020061{
20062 int passive, gaierr, inet4 = 0, inet6 = 0;
20063 struct addrinfo hints, *ai, *aitop;
20064 char straddr[INET6_ADDRSTRLEN], strport[16];
20065
20066 for (passive = 0; passive <= 1; passive++) {
20067 memset(&hints, 0, sizeof(hints));
20068 hints.ai_family = AF_UNSPEC;
20069 hints.ai_flags = passive ? AI_PASSIVE : 0;
20070 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020071 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020072 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20073 (void)gai_strerror(gaierr);
20074 goto bad;
20075 }
20076 for (ai = aitop; ai; ai = ai->ai_next) {
20077 if (ai->ai_addr == NULL ||
20078 ai->ai_addrlen == 0 ||
20079 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20080 straddr, sizeof(straddr), strport, sizeof(strport),
20081 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20082 goto bad;
20083 }
20084 switch (ai->ai_family) {
20085 case AF_INET:
20086 if (strcmp(strport, "54321") != 0) {
20087 goto bad;
20088 }
20089 if (passive) {
20090 if (strcmp(straddr, "0.0.0.0") != 0) {
20091 goto bad;
20092 }
20093 } else {
20094 if (strcmp(straddr, "127.0.0.1") != 0) {
20095 goto bad;
20096 }
20097 }
20098 inet4++;
20099 break;
20100 case AF_INET6:
20101 if (strcmp(strport, "54321") != 0) {
20102 goto bad;
20103 }
20104 if (passive) {
20105 if (strcmp(straddr, "::") != 0) {
20106 goto bad;
20107 }
20108 } else {
20109 if (strcmp(straddr, "::1") != 0) {
20110 goto bad;
20111 }
20112 }
20113 inet6++;
20114 break;
20115 case AF_UNSPEC:
20116 goto bad;
20117 break;
20118 default:
20119 /* another family support? */
20120 break;
20121 }
20122 }
20123 }
20124
20125 if (!(inet4 == 0 || inet4 == 2))
20126 goto bad;
20127 if (!(inet6 == 0 || inet6 == 2))
20128 goto bad;
20129
20130 if (aitop)
20131 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020132 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020133
20134 bad:
20135 if (aitop)
20136 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020137 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020138}
20139
Martin v. Löwis11437992002-04-12 09:54:03 +000020140_ACEOF
20141rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020142if { (ac_try="$ac_link"
20143case "(($ac_try" in
20144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20145 *) ac_try_echo=$ac_try;;
20146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020148 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020149 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020152 { (case "(($ac_try" in
20153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20154 *) ac_try_echo=$ac_try;;
20155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020157 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020158 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020160 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020161 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020162else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020163 echo "$as_me: program exited with status $ac_status" >&5
20164echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020165sed 's/^/| /' conftest.$ac_ext >&5
20166
Martin v. Löwis11437992002-04-12 09:54:03 +000020167( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020168ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020170rm -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 +000020171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020172
20173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020174fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020175
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020178if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20179then
20180 if test $ipv6 = yes
20181 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020182 echo 'Fatal: You must get working getaddrinfo() function.'
20183 echo ' or you can specify "--disable-ipv6"'.
20184 exit 1
20185 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020186else
Martin v. Löwis11437992002-04-12 09:54:03 +000020187
20188cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020189#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020190_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020191
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020193
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020194for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020195do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020196as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20197{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20198echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020200 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020201else
Martin v. Löwis11437992002-04-12 09:54:03 +000020202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020203/* confdefs.h. */
20204_ACEOF
20205cat confdefs.h >>conftest.$ac_ext
20206cat >>conftest.$ac_ext <<_ACEOF
20207/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020208/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20209 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20210#define $ac_func innocuous_$ac_func
20211
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020212/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020213 which can conflict with char $ac_func (); below.
20214 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020215 <limits.h> exists even on freestanding compilers. */
20216
20217#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020218# include <limits.h>
20219#else
20220# include <assert.h>
20221#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020222
20223#undef $ac_func
20224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020225/* Override any GCC internal prototype to avoid an error.
20226 Use char because int might match the return type of a GCC
20227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020228#ifdef __cplusplus
20229extern "C"
20230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020231char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020232/* The GNU C library defines this for functions which it implements
20233 to always fail with ENOSYS. Some functions are actually named
20234 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020235#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020236choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020237#endif
20238
Skip Montanaro6dead952003-09-25 14:50:04 +000020239int
20240main ()
20241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020242return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020243 ;
20244 return 0;
20245}
20246_ACEOF
20247rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020248if { (ac_try="$ac_link"
20249case "(($ac_try" in
20250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20251 *) ac_try_echo=$ac_try;;
20252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020254 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020256 grep -v '^ *+' conftest.er1 >conftest.err
20257 rm -f conftest.er1
20258 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020260 (exit $ac_status); } && {
20261 test -z "$ac_c_werror_flag" ||
20262 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020263 } && test -s conftest$ac_exeext &&
20264 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020266else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020268sed 's/^/| /' conftest.$ac_ext >&5
20269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020270 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020272
20273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020274 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020275fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020276ac_res=`eval echo '${'$as_ac_var'}'`
20277 { echo "$as_me:$LINENO: result: $ac_res" >&5
20278echo "${ECHO_T}$ac_res" >&6; }
20279if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020280 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020281#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020282_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020283
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020284fi
20285done
20286
Michael W. Hudson54241132001-12-07 15:38:26 +000020287
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020288# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020289{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20290echo $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 +000020291if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020293else
Martin v. Löwis11437992002-04-12 09:54:03 +000020294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020295/* confdefs.h. */
20296_ACEOF
20297cat confdefs.h >>conftest.$ac_ext
20298cat >>conftest.$ac_ext <<_ACEOF
20299/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020300#include <sys/types.h>
20301#include <sys/time.h>
20302#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020303
Martin v. Löwis11437992002-04-12 09:54:03 +000020304int
20305main ()
20306{
20307if ((struct tm *) 0)
20308return 0;
20309 ;
20310 return 0;
20311}
20312_ACEOF
20313rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020314if { (ac_try="$ac_compile"
20315case "(($ac_try" in
20316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20317 *) ac_try_echo=$ac_try;;
20318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020320 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020322 grep -v '^ *+' conftest.er1 >conftest.err
20323 rm -f conftest.er1
20324 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020326 (exit $ac_status); } && {
20327 test -z "$ac_c_werror_flag" ||
20328 test ! -s conftest.err
20329 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020330 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020331else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020333sed 's/^/| /' conftest.$ac_ext >&5
20334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020335 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020337
20338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020339fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020340{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20341echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020342if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020343
20344cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020345#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020346_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020347
20348fi
20349
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020350{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20351echo $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 +000020352if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020353 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020354else
Martin v. Löwis11437992002-04-12 09:54:03 +000020355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020356/* confdefs.h. */
20357_ACEOF
20358cat confdefs.h >>conftest.$ac_ext
20359cat >>conftest.$ac_ext <<_ACEOF
20360/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020361#include <sys/types.h>
20362#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020363
Martin v. Löwis11437992002-04-12 09:54:03 +000020364int
20365main ()
20366{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020367struct tm tm;
20368 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020369 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020370 ;
20371 return 0;
20372}
20373_ACEOF
20374rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020375if { (ac_try="$ac_compile"
20376case "(($ac_try" in
20377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20378 *) ac_try_echo=$ac_try;;
20379esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020383 grep -v '^ *+' conftest.er1 >conftest.err
20384 rm -f conftest.er1
20385 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020387 (exit $ac_status); } && {
20388 test -z "$ac_c_werror_flag" ||
20389 test ! -s conftest.err
20390 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020391 ac_cv_struct_tm=time.h
20392else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020394sed 's/^/| /' conftest.$ac_ext >&5
20395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020396 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020398
20399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020400fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020401{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20402echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020403if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020404
20405cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020406#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020407_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020408
20409fi
20410
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020411{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20412echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020413if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020414 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020415else
Martin v. Löwis11437992002-04-12 09:54:03 +000020416 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020417/* confdefs.h. */
20418_ACEOF
20419cat confdefs.h >>conftest.$ac_ext
20420cat >>conftest.$ac_ext <<_ACEOF
20421/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020422#include <sys/types.h>
20423#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020424
20425
Martin v. Löwis11437992002-04-12 09:54:03 +000020426int
20427main ()
20428{
20429static struct tm ac_aggr;
20430if (ac_aggr.tm_zone)
20431return 0;
20432 ;
20433 return 0;
20434}
20435_ACEOF
20436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020437if { (ac_try="$ac_compile"
20438case "(($ac_try" in
20439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20440 *) ac_try_echo=$ac_try;;
20441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020445 grep -v '^ *+' conftest.er1 >conftest.err
20446 rm -f conftest.er1
20447 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020449 (exit $ac_status); } && {
20450 test -z "$ac_c_werror_flag" ||
20451 test ! -s conftest.err
20452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020453 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020454else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020456sed 's/^/| /' conftest.$ac_ext >&5
20457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020459/* confdefs.h. */
20460_ACEOF
20461cat confdefs.h >>conftest.$ac_ext
20462cat >>conftest.$ac_ext <<_ACEOF
20463/* end confdefs.h. */
20464#include <sys/types.h>
20465#include <$ac_cv_struct_tm>
20466
20467
20468int
20469main ()
20470{
20471static struct tm ac_aggr;
20472if (sizeof ac_aggr.tm_zone)
20473return 0;
20474 ;
20475 return 0;
20476}
20477_ACEOF
20478rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020479if { (ac_try="$ac_compile"
20480case "(($ac_try" in
20481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20482 *) ac_try_echo=$ac_try;;
20483esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020485 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020487 grep -v '^ *+' conftest.er1 >conftest.err
20488 rm -f conftest.er1
20489 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491 (exit $ac_status); } && {
20492 test -z "$ac_c_werror_flag" ||
20493 test ! -s conftest.err
20494 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020495 ac_cv_member_struct_tm_tm_zone=yes
20496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020498sed 's/^/| /' conftest.$ac_ext >&5
20499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020500 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020502
20503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020505
20506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020507fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020508{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20509echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20510if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020511
20512cat >>confdefs.h <<_ACEOF
20513#define HAVE_STRUCT_TM_TM_ZONE 1
20514_ACEOF
20515
20516
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020517fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020518
Martin v. Löwis11437992002-04-12 09:54:03 +000020519if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20520
20521cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020522#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020524
20525else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020526 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20527echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020528if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020529 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020530else
20531 cat >conftest.$ac_ext <<_ACEOF
20532/* confdefs.h. */
20533_ACEOF
20534cat confdefs.h >>conftest.$ac_ext
20535cat >>conftest.$ac_ext <<_ACEOF
20536/* end confdefs.h. */
20537#include <time.h>
20538
20539int
20540main ()
20541{
20542#ifndef tzname
20543 (void) tzname;
20544#endif
20545
20546 ;
20547 return 0;
20548}
20549_ACEOF
20550rm -f conftest.$ac_objext
20551if { (ac_try="$ac_compile"
20552case "(($ac_try" in
20553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20554 *) ac_try_echo=$ac_try;;
20555esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020557 (eval "$ac_compile") 2>conftest.er1
20558 ac_status=$?
20559 grep -v '^ *+' conftest.er1 >conftest.err
20560 rm -f conftest.er1
20561 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020563 (exit $ac_status); } && {
20564 test -z "$ac_c_werror_flag" ||
20565 test ! -s conftest.err
20566 } && test -s conftest.$ac_objext; then
20567 ac_cv_have_decl_tzname=yes
20568else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020569 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020570sed 's/^/| /' conftest.$ac_ext >&5
20571
20572 ac_cv_have_decl_tzname=no
20573fi
20574
20575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20576fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020577{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20578echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20579if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020580
20581cat >>confdefs.h <<_ACEOF
20582#define HAVE_DECL_TZNAME 1
20583_ACEOF
20584
20585
20586else
20587 cat >>confdefs.h <<_ACEOF
20588#define HAVE_DECL_TZNAME 0
20589_ACEOF
20590
20591
20592fi
20593
20594
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020595 { echo "$as_me:$LINENO: checking for tzname" >&5
20596echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020597if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020598 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020599else
Martin v. Löwis11437992002-04-12 09:54:03 +000020600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020601/* confdefs.h. */
20602_ACEOF
20603cat confdefs.h >>conftest.$ac_ext
20604cat >>conftest.$ac_ext <<_ACEOF
20605/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020606#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020607#if !HAVE_DECL_TZNAME
20608extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020610
Martin v. Löwis11437992002-04-12 09:54:03 +000020611int
20612main ()
20613{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020614return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020615 ;
20616 return 0;
20617}
20618_ACEOF
20619rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020620if { (ac_try="$ac_link"
20621case "(($ac_try" in
20622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20623 *) ac_try_echo=$ac_try;;
20624esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020626 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020628 grep -v '^ *+' conftest.er1 >conftest.err
20629 rm -f conftest.er1
20630 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020632 (exit $ac_status); } && {
20633 test -z "$ac_c_werror_flag" ||
20634 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020635 } && test -s conftest$ac_exeext &&
20636 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020637 ac_cv_var_tzname=yes
20638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020640sed 's/^/| /' conftest.$ac_ext >&5
20641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020642 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020644
20645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020646 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020647fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020648{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20649echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020650 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020651
20652cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020653#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020654_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020655
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020656 fi
20657fi
20658
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020659{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20660echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020661if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020662 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020663else
20664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020665/* confdefs.h. */
20666_ACEOF
20667cat confdefs.h >>conftest.$ac_ext
20668cat >>conftest.$ac_ext <<_ACEOF
20669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020670$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020671int
20672main ()
20673{
20674static struct stat ac_aggr;
20675if (ac_aggr.st_rdev)
20676return 0;
20677 ;
20678 return 0;
20679}
20680_ACEOF
20681rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020682if { (ac_try="$ac_compile"
20683case "(($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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020690 grep -v '^ *+' conftest.er1 >conftest.err
20691 rm -f conftest.er1
20692 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020694 (exit $ac_status); } && {
20695 test -z "$ac_c_werror_flag" ||
20696 test ! -s conftest.err
20697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020698 ac_cv_member_struct_stat_st_rdev=yes
20699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020701sed 's/^/| /' conftest.$ac_ext >&5
20702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020704/* confdefs.h. */
20705_ACEOF
20706cat confdefs.h >>conftest.$ac_ext
20707cat >>conftest.$ac_ext <<_ACEOF
20708/* end confdefs.h. */
20709$ac_includes_default
20710int
20711main ()
20712{
20713static struct stat ac_aggr;
20714if (sizeof ac_aggr.st_rdev)
20715return 0;
20716 ;
20717 return 0;
20718}
20719_ACEOF
20720rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020721if { (ac_try="$ac_compile"
20722case "(($ac_try" in
20723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20724 *) ac_try_echo=$ac_try;;
20725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020727 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020729 grep -v '^ *+' conftest.er1 >conftest.err
20730 rm -f conftest.er1
20731 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020733 (exit $ac_status); } && {
20734 test -z "$ac_c_werror_flag" ||
20735 test ! -s conftest.err
20736 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020737 ac_cv_member_struct_stat_st_rdev=yes
20738else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020740sed 's/^/| /' conftest.$ac_ext >&5
20741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020744
20745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020747
20748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020749fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020750{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20751echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20752if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020753
20754cat >>confdefs.h <<_ACEOF
20755#define HAVE_STRUCT_STAT_ST_RDEV 1
20756_ACEOF
20757
20758
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020759fi
20760
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020761{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20762echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020763if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020764 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020765else
Martin v. Löwis11437992002-04-12 09:54:03 +000020766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020767/* confdefs.h. */
20768_ACEOF
20769cat confdefs.h >>conftest.$ac_ext
20770cat >>conftest.$ac_ext <<_ACEOF
20771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020772$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020773int
20774main ()
20775{
20776static struct stat ac_aggr;
20777if (ac_aggr.st_blksize)
20778return 0;
20779 ;
20780 return 0;
20781}
20782_ACEOF
20783rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020784if { (ac_try="$ac_compile"
20785case "(($ac_try" in
20786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20787 *) ac_try_echo=$ac_try;;
20788esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020792 grep -v '^ *+' conftest.er1 >conftest.err
20793 rm -f conftest.er1
20794 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020796 (exit $ac_status); } && {
20797 test -z "$ac_c_werror_flag" ||
20798 test ! -s conftest.err
20799 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020800 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020801else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020803sed 's/^/| /' conftest.$ac_ext >&5
20804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020806/* confdefs.h. */
20807_ACEOF
20808cat confdefs.h >>conftest.$ac_ext
20809cat >>conftest.$ac_ext <<_ACEOF
20810/* end confdefs.h. */
20811$ac_includes_default
20812int
20813main ()
20814{
20815static struct stat ac_aggr;
20816if (sizeof ac_aggr.st_blksize)
20817return 0;
20818 ;
20819 return 0;
20820}
20821_ACEOF
20822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020823if { (ac_try="$ac_compile"
20824case "(($ac_try" in
20825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20826 *) ac_try_echo=$ac_try;;
20827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020829 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020831 grep -v '^ *+' conftest.er1 >conftest.err
20832 rm -f conftest.er1
20833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020835 (exit $ac_status); } && {
20836 test -z "$ac_c_werror_flag" ||
20837 test ! -s conftest.err
20838 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020839 ac_cv_member_struct_stat_st_blksize=yes
20840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020842sed 's/^/| /' conftest.$ac_ext >&5
20843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020844 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020846
20847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020849
20850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020851fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020852{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20853echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20854if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020855
Martin v. Löwis11437992002-04-12 09:54:03 +000020856cat >>confdefs.h <<_ACEOF
20857#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20858_ACEOF
20859
20860
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020861fi
20862
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020863{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20864echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020865if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020866 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020867else
20868 cat >conftest.$ac_ext <<_ACEOF
20869/* confdefs.h. */
20870_ACEOF
20871cat confdefs.h >>conftest.$ac_ext
20872cat >>conftest.$ac_ext <<_ACEOF
20873/* end confdefs.h. */
20874$ac_includes_default
20875int
20876main ()
20877{
20878static struct stat ac_aggr;
20879if (ac_aggr.st_flags)
20880return 0;
20881 ;
20882 return 0;
20883}
20884_ACEOF
20885rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020886if { (ac_try="$ac_compile"
20887case "(($ac_try" in
20888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20889 *) ac_try_echo=$ac_try;;
20890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020892 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020893 ac_status=$?
20894 grep -v '^ *+' conftest.er1 >conftest.err
20895 rm -f conftest.er1
20896 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898 (exit $ac_status); } && {
20899 test -z "$ac_c_werror_flag" ||
20900 test ! -s conftest.err
20901 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020902 ac_cv_member_struct_stat_st_flags=yes
20903else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020904 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020905sed 's/^/| /' conftest.$ac_ext >&5
20906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020907 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020908/* confdefs.h. */
20909_ACEOF
20910cat confdefs.h >>conftest.$ac_ext
20911cat >>conftest.$ac_ext <<_ACEOF
20912/* end confdefs.h. */
20913$ac_includes_default
20914int
20915main ()
20916{
20917static struct stat ac_aggr;
20918if (sizeof ac_aggr.st_flags)
20919return 0;
20920 ;
20921 return 0;
20922}
20923_ACEOF
20924rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020925if { (ac_try="$ac_compile"
20926case "(($ac_try" in
20927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20928 *) ac_try_echo=$ac_try;;
20929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020931 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020932 ac_status=$?
20933 grep -v '^ *+' conftest.er1 >conftest.err
20934 rm -f conftest.er1
20935 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020937 (exit $ac_status); } && {
20938 test -z "$ac_c_werror_flag" ||
20939 test ! -s conftest.err
20940 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020941 ac_cv_member_struct_stat_st_flags=yes
20942else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020943 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020944sed 's/^/| /' conftest.$ac_ext >&5
20945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020946 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020948
20949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020951
20952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020953fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020954{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20955echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20956if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020957
20958cat >>confdefs.h <<_ACEOF
20959#define HAVE_STRUCT_STAT_ST_FLAGS 1
20960_ACEOF
20961
20962
20963fi
20964
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020965{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20966echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020967if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020968 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020969else
20970 cat >conftest.$ac_ext <<_ACEOF
20971/* confdefs.h. */
20972_ACEOF
20973cat confdefs.h >>conftest.$ac_ext
20974cat >>conftest.$ac_ext <<_ACEOF
20975/* end confdefs.h. */
20976$ac_includes_default
20977int
20978main ()
20979{
20980static struct stat ac_aggr;
20981if (ac_aggr.st_gen)
20982return 0;
20983 ;
20984 return 0;
20985}
20986_ACEOF
20987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020988if { (ac_try="$ac_compile"
20989case "(($ac_try" in
20990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20991 *) ac_try_echo=$ac_try;;
20992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020995 ac_status=$?
20996 grep -v '^ *+' conftest.er1 >conftest.err
20997 rm -f conftest.er1
20998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021000 (exit $ac_status); } && {
21001 test -z "$ac_c_werror_flag" ||
21002 test ! -s conftest.err
21003 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021004 ac_cv_member_struct_stat_st_gen=yes
21005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021006 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021007sed 's/^/| /' conftest.$ac_ext >&5
21008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021009 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021010/* confdefs.h. */
21011_ACEOF
21012cat confdefs.h >>conftest.$ac_ext
21013cat >>conftest.$ac_ext <<_ACEOF
21014/* end confdefs.h. */
21015$ac_includes_default
21016int
21017main ()
21018{
21019static struct stat ac_aggr;
21020if (sizeof ac_aggr.st_gen)
21021return 0;
21022 ;
21023 return 0;
21024}
21025_ACEOF
21026rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021027if { (ac_try="$ac_compile"
21028case "(($ac_try" in
21029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21030 *) ac_try_echo=$ac_try;;
21031esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021034 ac_status=$?
21035 grep -v '^ *+' conftest.er1 >conftest.err
21036 rm -f conftest.er1
21037 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021039 (exit $ac_status); } && {
21040 test -z "$ac_c_werror_flag" ||
21041 test ! -s conftest.err
21042 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021043 ac_cv_member_struct_stat_st_gen=yes
21044else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021045 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021046sed 's/^/| /' conftest.$ac_ext >&5
21047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021048 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021050
21051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021053
21054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021055fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021056{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21057echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21058if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021059
21060cat >>confdefs.h <<_ACEOF
21061#define HAVE_STRUCT_STAT_ST_GEN 1
21062_ACEOF
21063
21064
21065fi
21066
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021067{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21068echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021069if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021070 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021071else
21072 cat >conftest.$ac_ext <<_ACEOF
21073/* confdefs.h. */
21074_ACEOF
21075cat confdefs.h >>conftest.$ac_ext
21076cat >>conftest.$ac_ext <<_ACEOF
21077/* end confdefs.h. */
21078$ac_includes_default
21079int
21080main ()
21081{
21082static struct stat ac_aggr;
21083if (ac_aggr.st_birthtime)
21084return 0;
21085 ;
21086 return 0;
21087}
21088_ACEOF
21089rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021090if { (ac_try="$ac_compile"
21091case "(($ac_try" in
21092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21093 *) ac_try_echo=$ac_try;;
21094esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021097 ac_status=$?
21098 grep -v '^ *+' conftest.er1 >conftest.err
21099 rm -f conftest.er1
21100 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021102 (exit $ac_status); } && {
21103 test -z "$ac_c_werror_flag" ||
21104 test ! -s conftest.err
21105 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021106 ac_cv_member_struct_stat_st_birthtime=yes
21107else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021108 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021109sed 's/^/| /' conftest.$ac_ext >&5
21110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021111 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021112/* confdefs.h. */
21113_ACEOF
21114cat confdefs.h >>conftest.$ac_ext
21115cat >>conftest.$ac_ext <<_ACEOF
21116/* end confdefs.h. */
21117$ac_includes_default
21118int
21119main ()
21120{
21121static struct stat ac_aggr;
21122if (sizeof ac_aggr.st_birthtime)
21123return 0;
21124 ;
21125 return 0;
21126}
21127_ACEOF
21128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021129if { (ac_try="$ac_compile"
21130case "(($ac_try" in
21131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21132 *) ac_try_echo=$ac_try;;
21133esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021136 ac_status=$?
21137 grep -v '^ *+' conftest.er1 >conftest.err
21138 rm -f conftest.er1
21139 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021141 (exit $ac_status); } && {
21142 test -z "$ac_c_werror_flag" ||
21143 test ! -s conftest.err
21144 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021145 ac_cv_member_struct_stat_st_birthtime=yes
21146else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021147 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021148sed 's/^/| /' conftest.$ac_ext >&5
21149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021150 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021152
21153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021155
21156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021157fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021158{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21159echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21160if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021161
21162cat >>confdefs.h <<_ACEOF
21163#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21164_ACEOF
21165
21166
21167fi
21168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021169{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21170echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021171if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021172 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021173else
Martin v. Löwis11437992002-04-12 09:54:03 +000021174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021175/* confdefs.h. */
21176_ACEOF
21177cat confdefs.h >>conftest.$ac_ext
21178cat >>conftest.$ac_ext <<_ACEOF
21179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021180$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021181int
21182main ()
21183{
21184static struct stat ac_aggr;
21185if (ac_aggr.st_blocks)
21186return 0;
21187 ;
21188 return 0;
21189}
21190_ACEOF
21191rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021192if { (ac_try="$ac_compile"
21193case "(($ac_try" in
21194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21195 *) ac_try_echo=$ac_try;;
21196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021200 grep -v '^ *+' conftest.er1 >conftest.err
21201 rm -f conftest.er1
21202 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021204 (exit $ac_status); } && {
21205 test -z "$ac_c_werror_flag" ||
21206 test ! -s conftest.err
21207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021208 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021209else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021211sed 's/^/| /' conftest.$ac_ext >&5
21212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021214/* confdefs.h. */
21215_ACEOF
21216cat confdefs.h >>conftest.$ac_ext
21217cat >>conftest.$ac_ext <<_ACEOF
21218/* end confdefs.h. */
21219$ac_includes_default
21220int
21221main ()
21222{
21223static struct stat ac_aggr;
21224if (sizeof ac_aggr.st_blocks)
21225return 0;
21226 ;
21227 return 0;
21228}
21229_ACEOF
21230rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021231if { (ac_try="$ac_compile"
21232case "(($ac_try" in
21233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21234 *) ac_try_echo=$ac_try;;
21235esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021237 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021239 grep -v '^ *+' conftest.er1 >conftest.err
21240 rm -f conftest.er1
21241 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021243 (exit $ac_status); } && {
21244 test -z "$ac_c_werror_flag" ||
21245 test ! -s conftest.err
21246 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021247 ac_cv_member_struct_stat_st_blocks=yes
21248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021250sed 's/^/| /' conftest.$ac_ext >&5
21251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021252 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021254
21255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021257
21258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021259fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021260{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21261echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21262if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021263
Martin v. Löwis11437992002-04-12 09:54:03 +000021264cat >>confdefs.h <<_ACEOF
21265#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21266_ACEOF
21267
21268
21269cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021270#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021271_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021272
21273else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021274 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021275 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021276 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21277 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021278esac
21279
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021280fi
21281
Michael W. Hudson54241132001-12-07 15:38:26 +000021282
Martin v. Löwis11437992002-04-12 09:54:03 +000021283
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021284{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21285echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021286if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021288else
Martin v. Löwis11437992002-04-12 09:54:03 +000021289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021290/* confdefs.h. */
21291_ACEOF
21292cat confdefs.h >>conftest.$ac_ext
21293cat >>conftest.$ac_ext <<_ACEOF
21294/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021295#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021296int
21297main ()
21298{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021299return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021300 ;
21301 return 0;
21302}
21303_ACEOF
21304rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021305if { (ac_try="$ac_compile"
21306case "(($ac_try" in
21307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21308 *) ac_try_echo=$ac_try;;
21309esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021311 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021313 grep -v '^ *+' conftest.er1 >conftest.err
21314 rm -f conftest.er1
21315 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021317 (exit $ac_status); } && {
21318 test -z "$ac_c_werror_flag" ||
21319 test ! -s conftest.err
21320 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021321 ac_cv_header_time_altzone=yes
21322else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021324sed 's/^/| /' conftest.$ac_ext >&5
21325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021326 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021327fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21330fi
21331
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021332{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21333echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021334if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021335
21336cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021337#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021338_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021339
21340fi
21341
Guido van Rossumda88dad1995-01-26 00:46:29 +000021342was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021343{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21344echo $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 +000021345cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021346/* confdefs.h. */
21347_ACEOF
21348cat confdefs.h >>conftest.$ac_ext
21349cat >>conftest.$ac_ext <<_ACEOF
21350/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021351
21352#include <sys/types.h>
21353#include <sys/select.h>
21354#include <sys/time.h>
21355
Martin v. Löwis11437992002-04-12 09:54:03 +000021356int
21357main ()
21358{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021359;
Martin v. Löwis11437992002-04-12 09:54:03 +000021360 ;
21361 return 0;
21362}
21363_ACEOF
21364rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021365if { (ac_try="$ac_compile"
21366case "(($ac_try" in
21367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21368 *) ac_try_echo=$ac_try;;
21369esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021373 grep -v '^ *+' conftest.er1 >conftest.err
21374 rm -f conftest.er1
21375 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021377 (exit $ac_status); } && {
21378 test -z "$ac_c_werror_flag" ||
21379 test ! -s conftest.err
21380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021381
21382
21383cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021384#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021385_ACEOF
21386
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021387 was_it_defined=yes
21388
Guido van Rossumf78abae1997-01-21 22:02:36 +000021389else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021391sed 's/^/| /' conftest.$ac_ext >&5
21392
Thomas Wouters477c8d52006-05-27 19:21:47 +000021393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394fi
21395
21396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021397{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21398echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021399
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021400{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21401echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021402if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021404else
Martin v. Löwis11437992002-04-12 09:54:03 +000021405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021406/* confdefs.h. */
21407_ACEOF
21408cat confdefs.h >>conftest.$ac_ext
21409cat >>conftest.$ac_ext <<_ACEOF
21410/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021411
21412# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021413int
21414main ()
21415{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021416struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021417 ;
21418 return 0;
21419}
21420_ACEOF
21421rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021422if { (ac_try="$ac_compile"
21423case "(($ac_try" in
21424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21425 *) ac_try_echo=$ac_try;;
21426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021430 grep -v '^ *+' conftest.er1 >conftest.err
21431 rm -f conftest.er1
21432 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021434 (exit $ac_status); } && {
21435 test -z "$ac_c_werror_flag" ||
21436 test ! -s conftest.err
21437 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021438 ac_cv_struct_addrinfo=yes
21439else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021441sed 's/^/| /' conftest.$ac_ext >&5
21442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021443 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021444fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21447fi
21448
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021449{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21450echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021451if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021452
21453cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021454#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021455_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021456
21457fi
21458
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021459{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21460echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021461if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021463else
Martin v. Löwis11437992002-04-12 09:54:03 +000021464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021465/* confdefs.h. */
21466_ACEOF
21467cat confdefs.h >>conftest.$ac_ext
21468cat >>conftest.$ac_ext <<_ACEOF
21469/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021470
21471# include <sys/types.h>
21472# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021473int
21474main ()
21475{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021476struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021477 ;
21478 return 0;
21479}
21480_ACEOF
21481rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021482if { (ac_try="$ac_compile"
21483case "(($ac_try" in
21484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21485 *) ac_try_echo=$ac_try;;
21486esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021490 grep -v '^ *+' conftest.er1 >conftest.err
21491 rm -f conftest.er1
21492 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021494 (exit $ac_status); } && {
21495 test -z "$ac_c_werror_flag" ||
21496 test ! -s conftest.err
21497 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021498 ac_cv_struct_sockaddr_storage=yes
21499else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021501sed 's/^/| /' conftest.$ac_ext >&5
21502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021503 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021504fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21507fi
21508
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021509{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21510echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021511if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021512
21513cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021514#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021515_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021516
21517fi
21518
Guido van Rossum627b2d71993-12-24 10:39:16 +000021519# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021520
Michael W. Hudson54241132001-12-07 15:38:26 +000021521
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021522{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21523echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021524if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021525 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021526else
Martin v. Löwis11437992002-04-12 09:54:03 +000021527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021528/* confdefs.h. */
21529_ACEOF
21530cat confdefs.h >>conftest.$ac_ext
21531cat >>conftest.$ac_ext <<_ACEOF
21532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021533$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021534int
21535main ()
21536{
21537static int test_array [1 - 2 * !(((char) -1) < 0)];
21538test_array [0] = 0
21539
21540 ;
21541 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021542}
Martin v. Löwis11437992002-04-12 09:54:03 +000021543_ACEOF
21544rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021545if { (ac_try="$ac_compile"
21546case "(($ac_try" in
21547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21548 *) ac_try_echo=$ac_try;;
21549esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021553 grep -v '^ *+' conftest.er1 >conftest.err
21554 rm -f conftest.er1
21555 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021557 (exit $ac_status); } && {
21558 test -z "$ac_c_werror_flag" ||
21559 test ! -s conftest.err
21560 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021561 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021562else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021564sed 's/^/| /' conftest.$ac_ext >&5
21565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021566 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021568
21569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021570fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021571{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21572echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021573if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021574 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021575#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021576_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021577
21578fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021579
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021580{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21581echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021582if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021584else
21585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021586/* confdefs.h. */
21587_ACEOF
21588cat confdefs.h >>conftest.$ac_ext
21589cat >>conftest.$ac_ext <<_ACEOF
21590/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021591
Martin v. Löwis11437992002-04-12 09:54:03 +000021592int
21593main ()
21594{
21595/* FIXME: Include the comments suggested by Paul. */
21596#ifndef __cplusplus
21597 /* Ultrix mips cc rejects this. */
21598 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021599 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021600 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021601 char const *const *pcpcc;
21602 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021603 /* NEC SVR4.0.2 mips cc rejects this. */
21604 struct point {int x, y;};
21605 static struct point const zero = {0,0};
21606 /* AIX XL C 1.02.0.0 rejects this.
21607 It does not let you subtract one const X* pointer from another in
21608 an arm of an if-expression whose if-part is not a constant
21609 expression */
21610 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021611 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021612 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021613 ++pcpcc;
21614 ppc = (char**) pcpcc;
21615 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021616 { /* SCO 3.2v4 cc rejects this. */
21617 char *t;
21618 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021619
Martin v. Löwis11437992002-04-12 09:54:03 +000021620 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021621 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021622 }
21623 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21624 int x[] = {25, 17};
21625 const int *foo = &x[0];
21626 ++foo;
21627 }
21628 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21629 typedef const int *iptr;
21630 iptr p = 0;
21631 ++p;
21632 }
21633 { /* AIX XL C 1.02.0.0 rejects this saying
21634 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21635 struct s { int j; const int *ap[3]; };
21636 struct s *b; b->j = 5;
21637 }
21638 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21639 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021640 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021641 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021642 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021643#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021644
Martin v. Löwis11437992002-04-12 09:54:03 +000021645 ;
21646 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021647}
Martin v. Löwis11437992002-04-12 09:54:03 +000021648_ACEOF
21649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021650if { (ac_try="$ac_compile"
21651case "(($ac_try" in
21652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21653 *) ac_try_echo=$ac_try;;
21654esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021658 grep -v '^ *+' conftest.er1 >conftest.err
21659 rm -f conftest.er1
21660 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021662 (exit $ac_status); } && {
21663 test -z "$ac_c_werror_flag" ||
21664 test ! -s conftest.err
21665 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021666 ac_cv_c_const=yes
21667else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021669sed 's/^/| /' conftest.$ac_ext >&5
21670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021671 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021673
21674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021675fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021676{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21677echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021678if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021679
21680cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021681#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021682_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021683
21684fi
21685
Michael W. Hudson54241132001-12-07 15:38:26 +000021686
Guido van Rossumda88dad1995-01-26 00:46:29 +000021687works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021688{ echo "$as_me:$LINENO: checking for working volatile" >&5
21689echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021690cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021691/* confdefs.h. */
21692_ACEOF
21693cat confdefs.h >>conftest.$ac_ext
21694cat >>conftest.$ac_ext <<_ACEOF
21695/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021696
Martin v. Löwis11437992002-04-12 09:54:03 +000021697int
21698main ()
21699{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021700volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021701 ;
21702 return 0;
21703}
21704_ACEOF
21705rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021706if { (ac_try="$ac_compile"
21707case "(($ac_try" in
21708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21709 *) ac_try_echo=$ac_try;;
21710esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021714 grep -v '^ *+' conftest.er1 >conftest.err
21715 rm -f conftest.er1
21716 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021718 (exit $ac_status); } && {
21719 test -z "$ac_c_werror_flag" ||
21720 test ! -s conftest.err
21721 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021722 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021723else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021725sed 's/^/| /' conftest.$ac_ext >&5
21726
Martin v. Löwis11437992002-04-12 09:54:03 +000021727
21728cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021729#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021730_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021731
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021732
Guido van Rossum627b2d71993-12-24 10:39:16 +000021733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021734
21735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021736{ echo "$as_me:$LINENO: result: $works" >&5
21737echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021738
Guido van Rossumda88dad1995-01-26 00:46:29 +000021739works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021740{ echo "$as_me:$LINENO: checking for working signed char" >&5
21741echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021743/* confdefs.h. */
21744_ACEOF
21745cat confdefs.h >>conftest.$ac_ext
21746cat >>conftest.$ac_ext <<_ACEOF
21747/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021748
Martin v. Löwis11437992002-04-12 09:54:03 +000021749int
21750main ()
21751{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021752signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021753 ;
21754 return 0;
21755}
21756_ACEOF
21757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021758if { (ac_try="$ac_compile"
21759case "(($ac_try" in
21760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21761 *) ac_try_echo=$ac_try;;
21762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021766 grep -v '^ *+' conftest.er1 >conftest.err
21767 rm -f conftest.er1
21768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021770 (exit $ac_status); } && {
21771 test -z "$ac_c_werror_flag" ||
21772 test ! -s conftest.err
21773 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021774 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021777sed 's/^/| /' conftest.$ac_ext >&5
21778
Martin v. Löwis11437992002-04-12 09:54:03 +000021779
21780cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021781#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021782_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021783
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021784
Guido van Rossum7f43da71994-08-01 12:15:30 +000021785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021786
21787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021788{ echo "$as_me:$LINENO: result: $works" >&5
21789echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021790
Guido van Rossumda88dad1995-01-26 00:46:29 +000021791have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021792{ echo "$as_me:$LINENO: checking for prototypes" >&5
21793echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021795/* confdefs.h. */
21796_ACEOF
21797cat confdefs.h >>conftest.$ac_ext
21798cat >>conftest.$ac_ext <<_ACEOF
21799/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021800int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021801int
21802main ()
21803{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021804return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021805 ;
21806 return 0;
21807}
21808_ACEOF
21809rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021810if { (ac_try="$ac_compile"
21811case "(($ac_try" in
21812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21813 *) ac_try_echo=$ac_try;;
21814esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021818 grep -v '^ *+' conftest.er1 >conftest.err
21819 rm -f conftest.er1
21820 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021822 (exit $ac_status); } && {
21823 test -z "$ac_c_werror_flag" ||
21824 test ! -s conftest.err
21825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021826
21827
21828cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021829#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021830_ACEOF
21831
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021832 have_prototypes=yes
21833
Guido van Rossumf78abae1997-01-21 22:02:36 +000021834else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021836sed 's/^/| /' conftest.$ac_ext >&5
21837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021838
Guido van Rossum7f43da71994-08-01 12:15:30 +000021839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021840
21841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021842{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21843echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021844
Guido van Rossumda88dad1995-01-26 00:46:29 +000021845works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021846{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21847echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021848cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021849/* confdefs.h. */
21850_ACEOF
21851cat confdefs.h >>conftest.$ac_ext
21852cat >>conftest.$ac_ext <<_ACEOF
21853/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021854
21855#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021856int foo(int x, ...) {
21857 va_list va;
21858 va_start(va, x);
21859 va_arg(va, int);
21860 va_arg(va, char *);
21861 va_arg(va, double);
21862 return 0;
21863}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021864
Martin v. Löwis11437992002-04-12 09:54:03 +000021865int
21866main ()
21867{
Guido van Rossum90eea071996-08-30 20:58:57 +000021868return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021869 ;
21870 return 0;
21871}
21872_ACEOF
21873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021874if { (ac_try="$ac_compile"
21875case "(($ac_try" in
21876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21877 *) ac_try_echo=$ac_try;;
21878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021882 grep -v '^ *+' conftest.er1 >conftest.err
21883 rm -f conftest.er1
21884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021886 (exit $ac_status); } && {
21887 test -z "$ac_c_werror_flag" ||
21888 test ! -s conftest.err
21889 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021890
21891
21892cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021893#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021894_ACEOF
21895
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021896 works=yes
21897
Guido van Rossumf78abae1997-01-21 22:02:36 +000021898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021900sed 's/^/| /' conftest.$ac_ext >&5
21901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021902
Guido van Rossum627b2d71993-12-24 10:39:16 +000021903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021904
21905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021906{ echo "$as_me:$LINENO: result: $works" >&5
21907echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021908
Martin v. Löwisd6320502004-08-12 13:45:08 +000021909# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021910{ echo "$as_me:$LINENO: checking for socketpair" >&5
21911echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021912cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021913/* confdefs.h. */
21914_ACEOF
21915cat confdefs.h >>conftest.$ac_ext
21916cat >>conftest.$ac_ext <<_ACEOF
21917/* end confdefs.h. */
21918
21919#include <sys/types.h>
21920#include <sys/socket.h>
21921
21922int
21923main ()
21924{
21925void *x=socketpair
21926 ;
21927 return 0;
21928}
21929_ACEOF
21930rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021931if { (ac_try="$ac_compile"
21932case "(($ac_try" in
21933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21934 *) ac_try_echo=$ac_try;;
21935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021939 grep -v '^ *+' conftest.er1 >conftest.err
21940 rm -f conftest.er1
21941 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021943 (exit $ac_status); } && {
21944 test -z "$ac_c_werror_flag" ||
21945 test ! -s conftest.err
21946 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021947
21948cat >>confdefs.h <<\_ACEOF
21949#define HAVE_SOCKETPAIR 1
21950_ACEOF
21951
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021952 { echo "$as_me:$LINENO: result: yes" >&5
21953echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021954else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021955 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021956sed 's/^/| /' conftest.$ac_ext >&5
21957
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021958 { echo "$as_me:$LINENO: result: no" >&5
21959echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021960
21961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021962
21963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021964
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021965# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021966{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21967echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021969/* confdefs.h. */
21970_ACEOF
21971cat confdefs.h >>conftest.$ac_ext
21972cat >>conftest.$ac_ext <<_ACEOF
21973/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021974#include <sys/types.h>
21975#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021976int
21977main ()
21978{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021979struct sockaddr x;
21980x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021981 ;
21982 return 0;
21983}
21984_ACEOF
21985rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021986if { (ac_try="$ac_compile"
21987case "(($ac_try" in
21988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21989 *) ac_try_echo=$ac_try;;
21990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021994 grep -v '^ *+' conftest.er1 >conftest.err
21995 rm -f conftest.er1
21996 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021998 (exit $ac_status); } && {
21999 test -z "$ac_c_werror_flag" ||
22000 test ! -s conftest.err
22001 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022002 { echo "$as_me:$LINENO: result: yes" >&5
22003echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022004
22005cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022006#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022007_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022008
22009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022011sed 's/^/| /' conftest.$ac_ext >&5
22012
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022013 { echo "$as_me:$LINENO: result: no" >&5
22014echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022016
22017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022018
Guido van Rossumda88dad1995-01-26 00:46:29 +000022019va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022020{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22021echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022023/* confdefs.h. */
22024_ACEOF
22025cat confdefs.h >>conftest.$ac_ext
22026cat >>conftest.$ac_ext <<_ACEOF
22027/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022028
22029#ifdef HAVE_STDARG_PROTOTYPES
22030#include <stdarg.h>
22031#else
22032#include <varargs.h>
22033#endif
22034
Martin v. Löwis11437992002-04-12 09:54:03 +000022035int
22036main ()
22037{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022038va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022039 ;
22040 return 0;
22041}
22042_ACEOF
22043rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022044if { (ac_try="$ac_compile"
22045case "(($ac_try" in
22046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22047 *) ac_try_echo=$ac_try;;
22048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022052 grep -v '^ *+' conftest.er1 >conftest.err
22053 rm -f conftest.er1
22054 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022056 (exit $ac_status); } && {
22057 test -z "$ac_c_werror_flag" ||
22058 test ! -s conftest.err
22059 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022060 :
22061else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022063sed 's/^/| /' conftest.$ac_ext >&5
22064
Martin v. Löwis11437992002-04-12 09:54:03 +000022065
22066
22067cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022068#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022069_ACEOF
22070
Guido van Rossumda88dad1995-01-26 00:46:29 +000022071 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022072
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022074
22075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022076{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22077echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022078
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022079# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022080
22081
22082
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022083{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22084echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022085if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022086 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022087else
Martin v. Löwis11437992002-04-12 09:54:03 +000022088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022089/* confdefs.h. */
22090_ACEOF
22091cat confdefs.h >>conftest.$ac_ext
22092cat >>conftest.$ac_ext <<_ACEOF
22093/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022094/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22095 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22096#define gethostbyname_r innocuous_gethostbyname_r
22097
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022098/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022099 which can conflict with char gethostbyname_r (); below.
22100 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022101 <limits.h> exists even on freestanding compilers. */
22102
22103#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022104# include <limits.h>
22105#else
22106# include <assert.h>
22107#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022108
22109#undef gethostbyname_r
22110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022111/* Override any GCC internal prototype to avoid an error.
22112 Use char because int might match the return type of a GCC
22113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022114#ifdef __cplusplus
22115extern "C"
22116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022117char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022118/* The GNU C library defines this for functions which it implements
22119 to always fail with ENOSYS. Some functions are actually named
22120 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022121#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022122choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022123#endif
22124
Skip Montanaro6dead952003-09-25 14:50:04 +000022125int
22126main ()
22127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022128return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022129 ;
22130 return 0;
22131}
22132_ACEOF
22133rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022134if { (ac_try="$ac_link"
22135case "(($ac_try" in
22136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22137 *) ac_try_echo=$ac_try;;
22138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022140 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022142 grep -v '^ *+' conftest.er1 >conftest.err
22143 rm -f conftest.er1
22144 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022146 (exit $ac_status); } && {
22147 test -z "$ac_c_werror_flag" ||
22148 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022149 } && test -s conftest$ac_exeext &&
22150 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022151 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022154sed 's/^/| /' conftest.$ac_ext >&5
22155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022156 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022158
22159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022160 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022161fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022162{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22163echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22164if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022165
Martin v. Löwis11437992002-04-12 09:54:03 +000022166 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022167#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022168_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022169
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022170 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22171echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022172 OLD_CFLAGS=$CFLAGS
22173 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022175/* confdefs.h. */
22176_ACEOF
22177cat confdefs.h >>conftest.$ac_ext
22178cat >>conftest.$ac_ext <<_ACEOF
22179/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022180
22181# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022182
Martin v. Löwis11437992002-04-12 09:54:03 +000022183int
22184main ()
22185{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022186
22187 char *name;
22188 struct hostent *he, *res;
22189 char buffer[2048];
22190 int buflen = 2048;
22191 int h_errnop;
22192
22193 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022194
22195 ;
22196 return 0;
22197}
22198_ACEOF
22199rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022200if { (ac_try="$ac_compile"
22201case "(($ac_try" in
22202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22203 *) ac_try_echo=$ac_try;;
22204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022208 grep -v '^ *+' conftest.er1 >conftest.err
22209 rm -f conftest.er1
22210 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022212 (exit $ac_status); } && {
22213 test -z "$ac_c_werror_flag" ||
22214 test ! -s conftest.err
22215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022216
22217 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022218#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022219_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022220
Martin v. Löwis11437992002-04-12 09:54:03 +000022221
22222cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022223#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022224_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022225
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022226 { echo "$as_me:$LINENO: result: yes" >&5
22227echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022228
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022231sed 's/^/| /' conftest.$ac_ext >&5
22232
Martin v. Löwis11437992002-04-12 09:54:03 +000022233
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022234 { echo "$as_me:$LINENO: result: no" >&5
22235echo "${ECHO_T}no" >&6; }
22236 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22237echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022239/* confdefs.h. */
22240_ACEOF
22241cat confdefs.h >>conftest.$ac_ext
22242cat >>conftest.$ac_ext <<_ACEOF
22243/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022244
22245# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022246
Martin v. Löwis11437992002-04-12 09:54:03 +000022247int
22248main ()
22249{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022250
22251 char *name;
22252 struct hostent *he;
22253 char buffer[2048];
22254 int buflen = 2048;
22255 int h_errnop;
22256
22257 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022258
22259 ;
22260 return 0;
22261}
22262_ACEOF
22263rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022264if { (ac_try="$ac_compile"
22265case "(($ac_try" in
22266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22267 *) ac_try_echo=$ac_try;;
22268esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022272 grep -v '^ *+' conftest.er1 >conftest.err
22273 rm -f conftest.er1
22274 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022276 (exit $ac_status); } && {
22277 test -z "$ac_c_werror_flag" ||
22278 test ! -s conftest.err
22279 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022280
22281 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022282#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022283_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022284
Martin v. Löwis11437992002-04-12 09:54:03 +000022285
22286cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022287#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022288_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022289
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022290 { echo "$as_me:$LINENO: result: yes" >&5
22291echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022292
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022293else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022295sed 's/^/| /' conftest.$ac_ext >&5
22296
Martin v. Löwis11437992002-04-12 09:54:03 +000022297
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022298 { echo "$as_me:$LINENO: result: no" >&5
22299echo "${ECHO_T}no" >&6; }
22300 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22301echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022303/* confdefs.h. */
22304_ACEOF
22305cat confdefs.h >>conftest.$ac_ext
22306cat >>conftest.$ac_ext <<_ACEOF
22307/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022308
22309# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022310
Martin v. Löwis11437992002-04-12 09:54:03 +000022311int
22312main ()
22313{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022314
22315 char *name;
22316 struct hostent *he;
22317 struct hostent_data data;
22318
22319 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022320
22321 ;
22322 return 0;
22323}
22324_ACEOF
22325rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022326if { (ac_try="$ac_compile"
22327case "(($ac_try" in
22328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22329 *) ac_try_echo=$ac_try;;
22330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022334 grep -v '^ *+' conftest.er1 >conftest.err
22335 rm -f conftest.er1
22336 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022338 (exit $ac_status); } && {
22339 test -z "$ac_c_werror_flag" ||
22340 test ! -s conftest.err
22341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022342
22343 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022344#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022345_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022346
Martin v. Löwis11437992002-04-12 09:54:03 +000022347
22348cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022349#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022350_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022351
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022352 { echo "$as_me:$LINENO: result: yes" >&5
22353echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022354
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022355else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022357sed 's/^/| /' conftest.$ac_ext >&5
22358
Martin v. Löwis11437992002-04-12 09:54:03 +000022359
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022360 { echo "$as_me:$LINENO: result: no" >&5
22361echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022362
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022364
22365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022366
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022368
22369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022372
22373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022374 CFLAGS=$OLD_CFLAGS
22375
22376else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022377
Martin v. Löwis11437992002-04-12 09:54:03 +000022378
22379for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022380do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022381as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22382{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22383echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022384if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022386else
Martin v. Löwis11437992002-04-12 09:54:03 +000022387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022388/* confdefs.h. */
22389_ACEOF
22390cat confdefs.h >>conftest.$ac_ext
22391cat >>conftest.$ac_ext <<_ACEOF
22392/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022393/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22394 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22395#define $ac_func innocuous_$ac_func
22396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022397/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022398 which can conflict with char $ac_func (); below.
22399 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022400 <limits.h> exists even on freestanding compilers. */
22401
22402#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022403# include <limits.h>
22404#else
22405# include <assert.h>
22406#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022407
22408#undef $ac_func
22409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022410/* Override any GCC internal prototype to avoid an error.
22411 Use char because int might match the return type of a GCC
22412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022413#ifdef __cplusplus
22414extern "C"
22415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022416char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022417/* The GNU C library defines this for functions which it implements
22418 to always fail with ENOSYS. Some functions are actually named
22419 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022420#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022421choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022422#endif
22423
Skip Montanaro6dead952003-09-25 14:50:04 +000022424int
22425main ()
22426{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022427return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022428 ;
22429 return 0;
22430}
22431_ACEOF
22432rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022433if { (ac_try="$ac_link"
22434case "(($ac_try" in
22435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22436 *) ac_try_echo=$ac_try;;
22437esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022439 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022441 grep -v '^ *+' conftest.er1 >conftest.err
22442 rm -f conftest.er1
22443 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022445 (exit $ac_status); } && {
22446 test -z "$ac_c_werror_flag" ||
22447 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022448 } && test -s conftest$ac_exeext &&
22449 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022450 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022453sed 's/^/| /' conftest.$ac_ext >&5
22454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022455 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022457
22458rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022459 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022460fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022461ac_res=`eval echo '${'$as_ac_var'}'`
22462 { echo "$as_me:$LINENO: result: $ac_res" >&5
22463echo "${ECHO_T}$ac_res" >&6; }
22464if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022465 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022466#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022467_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022468
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022469fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022470done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022471
Michael W. Hudson54241132001-12-07 15:38:26 +000022472
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022473fi
22474
Michael W. Hudson54241132001-12-07 15:38:26 +000022475
22476
22477
22478
22479
22480
Guido van Rossum627b2d71993-12-24 10:39:16 +000022481# checks for system services
22482# (none yet)
22483
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022484# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022485{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22486echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022487if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022488 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022489else
Martin v. Löwis11437992002-04-12 09:54:03 +000022490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022491/* confdefs.h. */
22492_ACEOF
22493cat confdefs.h >>conftest.$ac_ext
22494cat >>conftest.$ac_ext <<_ACEOF
22495/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022496/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22498#define __fpu_control innocuous___fpu_control
22499
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022500/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022501 which can conflict with char __fpu_control (); below.
22502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022503 <limits.h> exists even on freestanding compilers. */
22504
22505#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022506# include <limits.h>
22507#else
22508# include <assert.h>
22509#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022510
22511#undef __fpu_control
22512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022513/* Override any GCC internal prototype to avoid an error.
22514 Use char because int might match the return type of a GCC
22515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022516#ifdef __cplusplus
22517extern "C"
22518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022519char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022520/* The GNU C library defines this for functions which it implements
22521 to always fail with ENOSYS. Some functions are actually named
22522 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022523#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022524choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022525#endif
22526
Skip Montanaro6dead952003-09-25 14:50:04 +000022527int
22528main ()
22529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022530return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022531 ;
22532 return 0;
22533}
22534_ACEOF
22535rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022536if { (ac_try="$ac_link"
22537case "(($ac_try" in
22538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22539 *) ac_try_echo=$ac_try;;
22540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022542 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022544 grep -v '^ *+' conftest.er1 >conftest.err
22545 rm -f conftest.er1
22546 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022548 (exit $ac_status); } && {
22549 test -z "$ac_c_werror_flag" ||
22550 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022551 } && test -s conftest$ac_exeext &&
22552 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022553 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022556sed 's/^/| /' conftest.$ac_ext >&5
22557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022558 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022560
22561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022562 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022563fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022564{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22565echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22566if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022567 :
22568else
Martin v. Löwis11437992002-04-12 09:54:03 +000022569
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022570{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22571echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022572if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022574else
Martin v. Löwis11437992002-04-12 09:54:03 +000022575 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022576LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022578/* confdefs.h. */
22579_ACEOF
22580cat confdefs.h >>conftest.$ac_ext
22581cat >>conftest.$ac_ext <<_ACEOF
22582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022584/* Override any GCC internal prototype to avoid an error.
22585 Use char because int might match the return type of a GCC
22586 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022587#ifdef __cplusplus
22588extern "C"
22589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022590char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022591int
22592main ()
22593{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022594return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022595 ;
22596 return 0;
22597}
22598_ACEOF
22599rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022600if { (ac_try="$ac_link"
22601case "(($ac_try" in
22602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22603 *) ac_try_echo=$ac_try;;
22604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022606 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022608 grep -v '^ *+' conftest.er1 >conftest.err
22609 rm -f conftest.er1
22610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022612 (exit $ac_status); } && {
22613 test -z "$ac_c_werror_flag" ||
22614 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022615 } && test -s conftest$ac_exeext &&
22616 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022617 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022618else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022620sed 's/^/| /' conftest.$ac_ext >&5
22621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022622 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022624
22625rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022626 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022627LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022628fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022629{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22630echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22631if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022632 cat >>confdefs.h <<_ACEOF
22633#define HAVE_LIBIEEE 1
22634_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022635
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022636 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022637
Guido van Rossum627b2d71993-12-24 10:39:16 +000022638fi
22639
Michael W. Hudson54241132001-12-07 15:38:26 +000022640
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022641fi
22642
Michael W. Hudson54241132001-12-07 15:38:26 +000022643
Guido van Rossum7f253911997-05-09 02:42:48 +000022644# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022645{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22646echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022648# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022649if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022650 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022651if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022652then
22653
22654cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022655#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022656_ACEOF
22657
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022658 { echo "$as_me:$LINENO: result: yes" >&5
22659echo "${ECHO_T}yes" >&6; }
22660else { echo "$as_me:$LINENO: result: no" >&5
22661echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022662fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022664 { echo "$as_me:$LINENO: result: no" >&5
22665echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022666fi
22667
Guido van Rossum7f253911997-05-09 02:42:48 +000022668
Guido van Rossum7f43da71994-08-01 12:15:30 +000022669# check for --with-libm=...
22670
Guido van Rossum563e7081996-09-10 18:20:48 +000022671case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022672Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022673*) LIBM=-lm
22674esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022675{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22676echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022678# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022679if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022680 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022681if test "$withval" = no
22682then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022683 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22684echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022685elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022686then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022687 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22688echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22689else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22690echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022691 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022692fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022694 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22695echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022696fi
22697
Guido van Rossum7f43da71994-08-01 12:15:30 +000022698
22699# check for --with-libc=...
22700
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022701{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22702echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022704# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022705if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022706 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022707if test "$withval" = no
22708then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022709 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22710echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022711elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022712then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022713 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22714echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22715else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22716echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022717 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022718fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022720 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22721echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022722fi
22723
Guido van Rossum7f43da71994-08-01 12:15:30 +000022724
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022725# **************************************************
22726# * Check for various properties of floating point *
22727# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022728
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022729{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22730echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022731if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022732 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022733else
22734
22735if test "$cross_compiling" = yes; then
22736 ac_cv_little_endian_double=no
22737else
22738 cat >conftest.$ac_ext <<_ACEOF
22739/* confdefs.h. */
22740_ACEOF
22741cat confdefs.h >>conftest.$ac_ext
22742cat >>conftest.$ac_ext <<_ACEOF
22743/* end confdefs.h. */
22744
22745#include <string.h>
22746int main() {
22747 double x = 9006104071832581.0;
22748 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22749 return 0;
22750 else
22751 return 1;
22752}
22753
22754_ACEOF
22755rm -f conftest$ac_exeext
22756if { (ac_try="$ac_link"
22757case "(($ac_try" in
22758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22759 *) ac_try_echo=$ac_try;;
22760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022762 (eval "$ac_link") 2>&5
22763 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22766 { (case "(($ac_try" in
22767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22768 *) ac_try_echo=$ac_try;;
22769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022771 (eval "$ac_try") 2>&5
22772 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022774 (exit $ac_status); }; }; then
22775 ac_cv_little_endian_double=yes
22776else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022777 echo "$as_me: program exited with status $ac_status" >&5
22778echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022779sed 's/^/| /' conftest.$ac_ext >&5
22780
22781( exit $ac_status )
22782ac_cv_little_endian_double=no
22783fi
22784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22785fi
22786
22787
22788fi
22789
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022790{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22791echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022792if test "$ac_cv_little_endian_double" = yes
22793then
22794
22795cat >>confdefs.h <<\_ACEOF
22796#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22797_ACEOF
22798
22799fi
22800
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022801{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22802echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022803if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022804 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022805else
22806
22807if test "$cross_compiling" = yes; then
22808 ac_cv_big_endian_double=no
22809else
22810 cat >conftest.$ac_ext <<_ACEOF
22811/* confdefs.h. */
22812_ACEOF
22813cat confdefs.h >>conftest.$ac_ext
22814cat >>conftest.$ac_ext <<_ACEOF
22815/* end confdefs.h. */
22816
22817#include <string.h>
22818int main() {
22819 double x = 9006104071832581.0;
22820 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22821 return 0;
22822 else
22823 return 1;
22824}
22825
22826_ACEOF
22827rm -f conftest$ac_exeext
22828if { (ac_try="$ac_link"
22829case "(($ac_try" in
22830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22831 *) ac_try_echo=$ac_try;;
22832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022834 (eval "$ac_link") 2>&5
22835 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22838 { (case "(($ac_try" in
22839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22840 *) ac_try_echo=$ac_try;;
22841esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022843 (eval "$ac_try") 2>&5
22844 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022846 (exit $ac_status); }; }; then
22847 ac_cv_big_endian_double=yes
22848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022849 echo "$as_me: program exited with status $ac_status" >&5
22850echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022851sed 's/^/| /' conftest.$ac_ext >&5
22852
22853( exit $ac_status )
22854ac_cv_big_endian_double=no
22855fi
22856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22857fi
22858
22859
22860fi
22861
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022862{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22863echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022864if test "$ac_cv_big_endian_double" = yes
22865then
22866
22867cat >>confdefs.h <<\_ACEOF
22868#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22869_ACEOF
22870
22871fi
22872
22873# Some ARM platforms use a mixed-endian representation for doubles.
22874# While Python doesn't currently have full support for these platforms
22875# (see e.g., issue 1762561), we can at least make sure that float <-> string
22876# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022877{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22878echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022879if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022880 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022881else
22882
22883if test "$cross_compiling" = yes; then
22884 ac_cv_mixed_endian_double=no
22885else
22886 cat >conftest.$ac_ext <<_ACEOF
22887/* confdefs.h. */
22888_ACEOF
22889cat confdefs.h >>conftest.$ac_ext
22890cat >>conftest.$ac_ext <<_ACEOF
22891/* end confdefs.h. */
22892
22893#include <string.h>
22894int main() {
22895 double x = 9006104071832581.0;
22896 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22897 return 0;
22898 else
22899 return 1;
22900}
22901
22902_ACEOF
22903rm -f conftest$ac_exeext
22904if { (ac_try="$ac_link"
22905case "(($ac_try" in
22906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22907 *) ac_try_echo=$ac_try;;
22908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022910 (eval "$ac_link") 2>&5
22911 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022913 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22914 { (case "(($ac_try" in
22915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22916 *) ac_try_echo=$ac_try;;
22917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022919 (eval "$ac_try") 2>&5
22920 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022922 (exit $ac_status); }; }; then
22923 ac_cv_mixed_endian_double=yes
22924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022925 echo "$as_me: program exited with status $ac_status" >&5
22926echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022927sed 's/^/| /' conftest.$ac_ext >&5
22928
22929( exit $ac_status )
22930ac_cv_mixed_endian_double=no
22931fi
22932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22933fi
22934
22935
22936fi
22937
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022938{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22939echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022940if test "$ac_cv_mixed_endian_double" = yes
22941then
22942
22943cat >>confdefs.h <<\_ACEOF
22944#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22945_ACEOF
22946
22947fi
22948
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022949# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022950# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022951# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022952# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022953# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000022954# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022955
22956# This inline assembler syntax may also work for suncc and icc,
22957# so we try it on all platforms.
22958
22959{ 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 +000022960echo $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 +000022961cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022962/* confdefs.h. */
22963_ACEOF
22964cat confdefs.h >>conftest.$ac_ext
22965cat >>conftest.$ac_ext <<_ACEOF
22966/* end confdefs.h. */
22967
22968int
22969main ()
22970{
22971
Mark Dickinsonf4243f62009-11-15 13:47:27 +000022972 unsigned short cw;
22973 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22974 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022975
22976 ;
22977 return 0;
22978}
22979_ACEOF
22980rm -f conftest.$ac_objext
22981if { (ac_try="$ac_compile"
22982case "(($ac_try" in
22983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22984 *) ac_try_echo=$ac_try;;
22985esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022987 (eval "$ac_compile") 2>conftest.er1
22988 ac_status=$?
22989 grep -v '^ *+' conftest.er1 >conftest.err
22990 rm -f conftest.er1
22991 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022993 (exit $ac_status); } && {
22994 test -z "$ac_c_werror_flag" ||
22995 test ! -s conftest.err
22996 } && test -s conftest.$ac_objext; then
22997 have_gcc_asm_for_x87=yes
22998else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022999 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023000sed 's/^/| /' conftest.$ac_ext >&5
23001
23002 have_gcc_asm_for_x87=no
23003fi
23004
23005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023006{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023007echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023008if test "$have_gcc_asm_for_x87" = yes
23009then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023010
23011cat >>confdefs.h <<\_ACEOF
23012#define HAVE_GCC_ASM_FOR_X87 1
23013_ACEOF
23014
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023015fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023016
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023017# Detect whether system arithmetic is subject to x87-style double
23018# rounding issues. The result of this test has little meaning on non
23019# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23020# mode is round-to-nearest and double rounding issues are present, and
23021# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023022{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23023echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023024# $BASECFLAGS may affect the result
23025ac_save_cc="$CC"
23026CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023027if test "$cross_compiling" = yes; then
23028 ac_cv_x87_double_rounding=no
23029else
23030 cat >conftest.$ac_ext <<_ACEOF
23031/* confdefs.h. */
23032_ACEOF
23033cat confdefs.h >>conftest.$ac_ext
23034cat >>conftest.$ac_ext <<_ACEOF
23035/* end confdefs.h. */
23036
23037#include <stdlib.h>
23038#include <math.h>
23039int main() {
23040 volatile double x, y, z;
23041 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23042 x = 0.99999999999999989; /* 1-2**-53 */
23043 y = 1./x;
23044 if (y != 1.)
23045 exit(0);
23046 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23047 x = 1e16;
23048 y = 2.99999;
23049 z = x + y;
23050 if (z != 1e16+4.)
23051 exit(0);
23052 /* both tests show evidence of double rounding */
23053 exit(1);
23054}
23055
23056_ACEOF
23057rm -f conftest$ac_exeext
23058if { (ac_try="$ac_link"
23059case "(($ac_try" in
23060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23061 *) ac_try_echo=$ac_try;;
23062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023064 (eval "$ac_link") 2>&5
23065 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23068 { (case "(($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
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023073 (eval "$ac_try") 2>&5
23074 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023076 (exit $ac_status); }; }; then
23077 ac_cv_x87_double_rounding=no
23078else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023079 echo "$as_me: program exited with status $ac_status" >&5
23080echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023081sed 's/^/| /' conftest.$ac_ext >&5
23082
23083( exit $ac_status )
23084ac_cv_x87_double_rounding=yes
23085fi
23086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23087fi
23088
23089
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023090CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023091{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23092echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023093if test "$ac_cv_x87_double_rounding" = yes
23094then
23095
23096cat >>confdefs.h <<\_ACEOF
23097#define X87_DOUBLE_ROUNDING 1
23098_ACEOF
23099
23100fi
23101
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023102# ************************************
23103# * Check for mathematical functions *
23104# ************************************
23105
23106LIBS_SAVE=$LIBS
23107LIBS="$LIBS $LIBM"
23108
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023109# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23110# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023111{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23112echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023113if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023114 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023115else
23116
23117if test "$cross_compiling" = yes; then
23118 ac_cv_tanh_preserves_zero_sign=no
23119else
23120 cat >conftest.$ac_ext <<_ACEOF
23121/* confdefs.h. */
23122_ACEOF
23123cat confdefs.h >>conftest.$ac_ext
23124cat >>conftest.$ac_ext <<_ACEOF
23125/* end confdefs.h. */
23126
23127#include <math.h>
23128#include <stdlib.h>
23129int main() {
23130 /* return 0 if either negative zeros don't exist
23131 on this platform or if negative zeros exist
23132 and tanh(-0.) == -0. */
23133 if (atan2(0., -1.) == atan2(-0., -1.) ||
23134 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23135 else exit(1);
23136}
23137
23138_ACEOF
23139rm -f conftest$ac_exeext
23140if { (ac_try="$ac_link"
23141case "(($ac_try" in
23142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23143 *) ac_try_echo=$ac_try;;
23144esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023146 (eval "$ac_link") 2>&5
23147 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023149 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23150 { (case "(($ac_try" in
23151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23152 *) ac_try_echo=$ac_try;;
23153esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023155 (eval "$ac_try") 2>&5
23156 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023158 (exit $ac_status); }; }; then
23159 ac_cv_tanh_preserves_zero_sign=yes
23160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023161 echo "$as_me: program exited with status $ac_status" >&5
23162echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023163sed 's/^/| /' conftest.$ac_ext >&5
23164
23165( exit $ac_status )
23166ac_cv_tanh_preserves_zero_sign=no
23167fi
23168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23169fi
23170
23171
23172fi
23173
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023174{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23175echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023176if test "$ac_cv_tanh_preserves_zero_sign" = yes
23177then
23178
23179cat >>confdefs.h <<\_ACEOF
23180#define TANH_PRESERVES_ZERO_SIGN 1
23181_ACEOF
23182
23183fi
23184
23185
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023186
Michael W. Hudson54241132001-12-07 15:38:26 +000023187
Christian Heimes99170a52007-12-19 02:07:34 +000023188
23189
23190
23191
23192
Mark Dickinsonf2537862009-04-18 13:58:18 +000023193
Mark Dickinson9c113362009-09-05 10:36:23 +000023194for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23195do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023196as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23197{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23198echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023199if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023200 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023201else
23202 cat >conftest.$ac_ext <<_ACEOF
23203/* confdefs.h. */
23204_ACEOF
23205cat confdefs.h >>conftest.$ac_ext
23206cat >>conftest.$ac_ext <<_ACEOF
23207/* end confdefs.h. */
23208/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23209 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23210#define $ac_func innocuous_$ac_func
23211
23212/* System header to define __stub macros and hopefully few prototypes,
23213 which can conflict with char $ac_func (); below.
23214 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23215 <limits.h> exists even on freestanding compilers. */
23216
23217#ifdef __STDC__
23218# include <limits.h>
23219#else
23220# include <assert.h>
23221#endif
23222
23223#undef $ac_func
23224
23225/* Override any GCC internal prototype to avoid an error.
23226 Use char because int might match the return type of a GCC
23227 builtin and then its argument prototype would still apply. */
23228#ifdef __cplusplus
23229extern "C"
23230#endif
23231char $ac_func ();
23232/* The GNU C library defines this for functions which it implements
23233 to always fail with ENOSYS. Some functions are actually named
23234 something starting with __ and the normal name is an alias. */
23235#if defined __stub_$ac_func || defined __stub___$ac_func
23236choke me
23237#endif
23238
23239int
23240main ()
23241{
23242return $ac_func ();
23243 ;
23244 return 0;
23245}
23246_ACEOF
23247rm -f conftest.$ac_objext conftest$ac_exeext
23248if { (ac_try="$ac_link"
23249case "(($ac_try" in
23250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23251 *) ac_try_echo=$ac_try;;
23252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023254 (eval "$ac_link") 2>conftest.er1
23255 ac_status=$?
23256 grep -v '^ *+' conftest.er1 >conftest.err
23257 rm -f conftest.er1
23258 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023260 (exit $ac_status); } && {
23261 test -z "$ac_c_werror_flag" ||
23262 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023263 } && test -s conftest$ac_exeext &&
23264 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023265 eval "$as_ac_var=yes"
23266else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023267 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023268sed 's/^/| /' conftest.$ac_ext >&5
23269
23270 eval "$as_ac_var=no"
23271fi
23272
23273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23274 conftest$ac_exeext conftest.$ac_ext
23275fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023276ac_res=`eval echo '${'$as_ac_var'}'`
23277 { echo "$as_me:$LINENO: result: $ac_res" >&5
23278echo "${ECHO_T}$ac_res" >&6; }
23279if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023280 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023281#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023282_ACEOF
23283
23284fi
23285done
23286
23287
23288
23289
23290
23291
23292for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023293do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023294as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23295{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23296echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023297if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023298 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023299else
23300 cat >conftest.$ac_ext <<_ACEOF
23301/* confdefs.h. */
23302_ACEOF
23303cat confdefs.h >>conftest.$ac_ext
23304cat >>conftest.$ac_ext <<_ACEOF
23305/* end confdefs.h. */
23306/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23307 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23308#define $ac_func innocuous_$ac_func
23309
23310/* System header to define __stub macros and hopefully few prototypes,
23311 which can conflict with char $ac_func (); below.
23312 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23313 <limits.h> exists even on freestanding compilers. */
23314
23315#ifdef __STDC__
23316# include <limits.h>
23317#else
23318# include <assert.h>
23319#endif
23320
23321#undef $ac_func
23322
23323/* Override any GCC internal prototype to avoid an error.
23324 Use char because int might match the return type of a GCC
23325 builtin and then its argument prototype would still apply. */
23326#ifdef __cplusplus
23327extern "C"
23328#endif
23329char $ac_func ();
23330/* The GNU C library defines this for functions which it implements
23331 to always fail with ENOSYS. Some functions are actually named
23332 something starting with __ and the normal name is an alias. */
23333#if defined __stub_$ac_func || defined __stub___$ac_func
23334choke me
23335#endif
23336
23337int
23338main ()
23339{
23340return $ac_func ();
23341 ;
23342 return 0;
23343}
23344_ACEOF
23345rm -f conftest.$ac_objext conftest$ac_exeext
23346if { (ac_try="$ac_link"
23347case "(($ac_try" in
23348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23349 *) ac_try_echo=$ac_try;;
23350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023352 (eval "$ac_link") 2>conftest.er1
23353 ac_status=$?
23354 grep -v '^ *+' conftest.er1 >conftest.err
23355 rm -f conftest.er1
23356 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023358 (exit $ac_status); } && {
23359 test -z "$ac_c_werror_flag" ||
23360 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023361 } && test -s conftest$ac_exeext &&
23362 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023363 eval "$as_ac_var=yes"
23364else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023365 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023366sed 's/^/| /' conftest.$ac_ext >&5
23367
23368 eval "$as_ac_var=no"
23369fi
23370
23371rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23372 conftest$ac_exeext conftest.$ac_ext
23373fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023374ac_res=`eval echo '${'$as_ac_var'}'`
23375 { echo "$as_me:$LINENO: result: $ac_res" >&5
23376echo "${ECHO_T}$ac_res" >&6; }
23377if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023378 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023379#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023380_ACEOF
23381
23382fi
23383done
23384
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023385{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23386echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023387if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023388 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023389else
23390 cat >conftest.$ac_ext <<_ACEOF
23391/* confdefs.h. */
23392_ACEOF
23393cat confdefs.h >>conftest.$ac_ext
23394cat >>conftest.$ac_ext <<_ACEOF
23395/* end confdefs.h. */
23396#include <math.h>
23397
23398int
23399main ()
23400{
23401#ifndef isinf
23402 (void) isinf;
23403#endif
23404
23405 ;
23406 return 0;
23407}
23408_ACEOF
23409rm -f conftest.$ac_objext
23410if { (ac_try="$ac_compile"
23411case "(($ac_try" in
23412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23413 *) ac_try_echo=$ac_try;;
23414esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023416 (eval "$ac_compile") 2>conftest.er1
23417 ac_status=$?
23418 grep -v '^ *+' conftest.er1 >conftest.err
23419 rm -f conftest.er1
23420 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023422 (exit $ac_status); } && {
23423 test -z "$ac_c_werror_flag" ||
23424 test ! -s conftest.err
23425 } && test -s conftest.$ac_objext; then
23426 ac_cv_have_decl_isinf=yes
23427else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023428 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023429sed 's/^/| /' conftest.$ac_ext >&5
23430
23431 ac_cv_have_decl_isinf=no
23432fi
23433
23434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23435fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023436{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23437echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23438if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023439
23440cat >>confdefs.h <<_ACEOF
23441#define HAVE_DECL_ISINF 1
23442_ACEOF
23443
23444
23445else
23446 cat >>confdefs.h <<_ACEOF
23447#define HAVE_DECL_ISINF 0
23448_ACEOF
23449
23450
23451fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023452{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23453echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023454if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023455 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023456else
23457 cat >conftest.$ac_ext <<_ACEOF
23458/* confdefs.h. */
23459_ACEOF
23460cat confdefs.h >>conftest.$ac_ext
23461cat >>conftest.$ac_ext <<_ACEOF
23462/* end confdefs.h. */
23463#include <math.h>
23464
23465int
23466main ()
23467{
23468#ifndef isnan
23469 (void) isnan;
23470#endif
23471
23472 ;
23473 return 0;
23474}
23475_ACEOF
23476rm -f conftest.$ac_objext
23477if { (ac_try="$ac_compile"
23478case "(($ac_try" in
23479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23480 *) ac_try_echo=$ac_try;;
23481esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023483 (eval "$ac_compile") 2>conftest.er1
23484 ac_status=$?
23485 grep -v '^ *+' conftest.er1 >conftest.err
23486 rm -f conftest.er1
23487 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023489 (exit $ac_status); } && {
23490 test -z "$ac_c_werror_flag" ||
23491 test ! -s conftest.err
23492 } && test -s conftest.$ac_objext; then
23493 ac_cv_have_decl_isnan=yes
23494else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023495 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023496sed 's/^/| /' conftest.$ac_ext >&5
23497
23498 ac_cv_have_decl_isnan=no
23499fi
23500
23501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23502fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023503{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23504echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23505if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023506
23507cat >>confdefs.h <<_ACEOF
23508#define HAVE_DECL_ISNAN 1
23509_ACEOF
23510
23511
23512else
23513 cat >>confdefs.h <<_ACEOF
23514#define HAVE_DECL_ISNAN 0
23515_ACEOF
23516
23517
23518fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023519{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23520echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023521if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023522 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023523else
23524 cat >conftest.$ac_ext <<_ACEOF
23525/* confdefs.h. */
23526_ACEOF
23527cat confdefs.h >>conftest.$ac_ext
23528cat >>conftest.$ac_ext <<_ACEOF
23529/* end confdefs.h. */
23530#include <math.h>
23531
23532int
23533main ()
23534{
23535#ifndef isfinite
23536 (void) isfinite;
23537#endif
23538
23539 ;
23540 return 0;
23541}
23542_ACEOF
23543rm -f conftest.$ac_objext
23544if { (ac_try="$ac_compile"
23545case "(($ac_try" in
23546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23547 *) ac_try_echo=$ac_try;;
23548esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023550 (eval "$ac_compile") 2>conftest.er1
23551 ac_status=$?
23552 grep -v '^ *+' conftest.er1 >conftest.err
23553 rm -f conftest.er1
23554 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023556 (exit $ac_status); } && {
23557 test -z "$ac_c_werror_flag" ||
23558 test ! -s conftest.err
23559 } && test -s conftest.$ac_objext; then
23560 ac_cv_have_decl_isfinite=yes
23561else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023562 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023563sed 's/^/| /' conftest.$ac_ext >&5
23564
23565 ac_cv_have_decl_isfinite=no
23566fi
23567
23568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23569fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023570{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23571echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23572if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023573
23574cat >>confdefs.h <<_ACEOF
23575#define HAVE_DECL_ISFINITE 1
23576_ACEOF
23577
23578
23579else
23580 cat >>confdefs.h <<_ACEOF
23581#define HAVE_DECL_ISFINITE 0
23582_ACEOF
23583
23584
23585fi
23586
23587
Christian Heimes99170a52007-12-19 02:07:34 +000023588
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023589LIBS=$LIBS_SAVE
23590
Mark Dickinsona614f042009-11-28 12:48:43 +000023591# For multiprocessing module, check that sem_open
23592# actually works. For FreeBSD versions <= 7.2,
23593# the kernel module that provides POSIX semaphores
23594# isn't loaded by default, so an attempt to call
23595# sem_open results in a 'Signal 12' error.
23596{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23597echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
23598if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
23599 echo $ECHO_N "(cached) $ECHO_C" >&6
23600else
23601 if test "$cross_compiling" = yes; then
23602 ac_cv_posix_semaphores_enabled=yes
23603else
23604 cat >conftest.$ac_ext <<_ACEOF
23605/* confdefs.h. */
23606_ACEOF
23607cat confdefs.h >>conftest.$ac_ext
23608cat >>conftest.$ac_ext <<_ACEOF
23609/* end confdefs.h. */
23610
23611#include <unistd.h>
23612#include <fcntl.h>
23613#include <stdio.h>
23614#include <semaphore.h>
23615#include <sys/stat.h>
23616
23617int main(void) {
23618 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23619 if (a == SEM_FAILED) {
23620 perror("sem_open");
23621 return 1;
23622 }
23623 sem_close(a);
23624 return 0;
23625}
23626
23627_ACEOF
23628rm -f conftest$ac_exeext
23629if { (ac_try="$ac_link"
23630case "(($ac_try" in
23631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23632 *) ac_try_echo=$ac_try;;
23633esac
23634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23635 (eval "$ac_link") 2>&5
23636 ac_status=$?
23637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23638 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23639 { (case "(($ac_try" in
23640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23641 *) ac_try_echo=$ac_try;;
23642esac
23643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23644 (eval "$ac_try") 2>&5
23645 ac_status=$?
23646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23647 (exit $ac_status); }; }; then
23648 ac_cv_posix_semaphores_enabled=yes
23649else
23650 echo "$as_me: program exited with status $ac_status" >&5
23651echo "$as_me: failed program was:" >&5
23652sed 's/^/| /' conftest.$ac_ext >&5
23653
23654( exit $ac_status )
23655ac_cv_posix_semaphores_enabled=no
23656fi
23657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23658fi
23659
23660
23661
23662fi
23663
23664{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23665echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
23666if test $ac_cv_posix_semaphores_enabled = no
23667then
23668
23669cat >>confdefs.h <<\_ACEOF
23670#define POSIX_SEMAPHORES_NOT_ENABLED 1
23671_ACEOF
23672
23673fi
23674
Mark Dickinson10683072009-04-18 21:18:19 +000023675# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023676{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23677echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023678if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023679 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023680else
23681 if test "$cross_compiling" = yes; then
23682 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023683else
23684 cat >conftest.$ac_ext <<_ACEOF
23685/* confdefs.h. */
23686_ACEOF
23687cat confdefs.h >>conftest.$ac_ext
23688cat >>conftest.$ac_ext <<_ACEOF
23689/* end confdefs.h. */
23690
23691#include <unistd.h>
23692#include <fcntl.h>
23693#include <stdio.h>
23694#include <semaphore.h>
23695#include <sys/stat.h>
23696
23697int main(void){
23698 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23699 int count;
23700 int res;
23701 if(a==SEM_FAILED){
23702 perror("sem_open");
23703 return 1;
23704
23705 }
23706 res = sem_getvalue(a, &count);
23707 sem_close(a);
23708 return res==-1 ? 1 : 0;
23709}
23710
Mark Dickinson10683072009-04-18 21:18:19 +000023711_ACEOF
23712rm -f conftest$ac_exeext
23713if { (ac_try="$ac_link"
23714case "(($ac_try" in
23715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23716 *) ac_try_echo=$ac_try;;
23717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023719 (eval "$ac_link") 2>&5
23720 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023722 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23723 { (case "(($ac_try" in
23724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23725 *) ac_try_echo=$ac_try;;
23726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023728 (eval "$ac_try") 2>&5
23729 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023731 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023732 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023733else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023734 echo "$as_me: program exited with status $ac_status" >&5
23735echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023736sed 's/^/| /' conftest.$ac_ext >&5
23737
23738( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023739ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023740fi
23741rm -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 +000023742fi
23743
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023744
23745
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023746fi
23747
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023748{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23749echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023750if test $ac_cv_broken_sem_getvalue = yes
23751then
23752
23753cat >>confdefs.h <<\_ACEOF
23754#define HAVE_BROKEN_SEM_GETVALUE 1
23755_ACEOF
23756
23757fi
23758
Mark Dickinsonbd792642009-03-18 20:06:12 +000023759# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023760{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23761echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023762# Check whether --enable-big-digits was given.
23763if test "${enable_big_digits+set}" = set; then
23764 enableval=$enable_big_digits; case $enable_big_digits in
23765yes)
23766 enable_big_digits=30 ;;
23767no)
23768 enable_big_digits=15 ;;
2376915|30)
23770 ;;
23771*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023772 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23773echo "$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 +000023774 { (exit 1); exit 1; }; } ;;
23775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023776{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23777echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023778
23779cat >>confdefs.h <<_ACEOF
23780#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23781_ACEOF
23782
23783
23784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023785 { echo "$as_me:$LINENO: result: no value specified" >&5
23786echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023787fi
23788
23789
Guido van Rossumef2255b2000-03-10 22:30:29 +000023790# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023791if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023792 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23793echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023794if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023795 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023796fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023797{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23798echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023799else
Martin v. Löwis11437992002-04-12 09:54:03 +000023800 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023801{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23802echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023804/* confdefs.h. */
23805_ACEOF
23806cat confdefs.h >>conftest.$ac_ext
23807cat >>conftest.$ac_ext <<_ACEOF
23808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023809$ac_includes_default
23810#include <wchar.h>
23811_ACEOF
23812rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023813if { (ac_try="$ac_compile"
23814case "(($ac_try" in
23815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23816 *) ac_try_echo=$ac_try;;
23817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023821 grep -v '^ *+' conftest.er1 >conftest.err
23822 rm -f conftest.er1
23823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023825 (exit $ac_status); } && {
23826 test -z "$ac_c_werror_flag" ||
23827 test ! -s conftest.err
23828 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023829 ac_header_compiler=yes
23830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023832sed 's/^/| /' conftest.$ac_ext >&5
23833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023834 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023836
23837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023838{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23839echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023840
23841# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023842{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23843echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023845/* confdefs.h. */
23846_ACEOF
23847cat confdefs.h >>conftest.$ac_ext
23848cat >>conftest.$ac_ext <<_ACEOF
23849/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023850#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023851_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023852if { (ac_try="$ac_cpp conftest.$ac_ext"
23853case "(($ac_try" in
23854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23855 *) ac_try_echo=$ac_try;;
23856esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023858 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023859 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023860 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023861 rm -f conftest.er1
23862 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023864 (exit $ac_status); } >/dev/null && {
23865 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23866 test ! -s conftest.err
23867 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023868 ac_header_preproc=yes
23869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023871sed 's/^/| /' conftest.$ac_ext >&5
23872
Martin v. Löwis11437992002-04-12 09:54:03 +000023873 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023875
Martin v. Löwis11437992002-04-12 09:54:03 +000023876rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023877{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23878echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023879
23880# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023881case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23882 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023883 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23884echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23885 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23886echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023887 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023888 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023889 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023890 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23891echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23892 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23893echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23894 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23895echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23896 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23897echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23898 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23899echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23900 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23901echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023902 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023903## -------------------------------------- ##
23904## Report this to http://bugs.python.org/ ##
23905## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023906_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023907 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023908 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023910{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23911echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023912if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023913 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023914else
23915 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023917{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23918echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023919
23920fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023921if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023922
23923
23924cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023925#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023926_ACEOF
23927
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023928 wchar_h="yes"
23929
Guido van Rossumef2255b2000-03-10 22:30:29 +000023930else
Martin v. Löwis11437992002-04-12 09:54:03 +000023931 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023932
23933fi
23934
Michael W. Hudson54241132001-12-07 15:38:26 +000023935
Martin v. Löwis11437992002-04-12 09:54:03 +000023936
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023937# determine wchar_t size
23938if test "$wchar_h" = yes
23939then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023940 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23941echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23942if test "${ac_cv_type_wchar_t+set}" = set; then
23943 echo $ECHO_N "(cached) $ECHO_C" >&6
23944else
23945 cat >conftest.$ac_ext <<_ACEOF
23946/* confdefs.h. */
23947_ACEOF
23948cat confdefs.h >>conftest.$ac_ext
23949cat >>conftest.$ac_ext <<_ACEOF
23950/* end confdefs.h. */
23951#include <wchar.h>
23952
23953typedef wchar_t ac__type_new_;
23954int
23955main ()
23956{
23957if ((ac__type_new_ *) 0)
23958 return 0;
23959if (sizeof (ac__type_new_))
23960 return 0;
23961 ;
23962 return 0;
23963}
23964_ACEOF
23965rm -f conftest.$ac_objext
23966if { (ac_try="$ac_compile"
23967case "(($ac_try" in
23968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23969 *) ac_try_echo=$ac_try;;
23970esac
23971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23972 (eval "$ac_compile") 2>conftest.er1
23973 ac_status=$?
23974 grep -v '^ *+' conftest.er1 >conftest.err
23975 rm -f conftest.er1
23976 cat conftest.err >&5
23977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23978 (exit $ac_status); } && {
23979 test -z "$ac_c_werror_flag" ||
23980 test ! -s conftest.err
23981 } && test -s conftest.$ac_objext; then
23982 ac_cv_type_wchar_t=yes
23983else
23984 echo "$as_me: failed program was:" >&5
23985sed 's/^/| /' conftest.$ac_ext >&5
23986
23987 ac_cv_type_wchar_t=no
23988fi
23989
23990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23991fi
23992{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23993echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23994
23995# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23998# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023999{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24000echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024001if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024003else
Martin v. Löwis11437992002-04-12 09:54:03 +000024004 if test "$cross_compiling" = yes; then
24005 # Depending upon the size, compute the lo and hi bounds.
24006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024007/* confdefs.h. */
24008_ACEOF
24009cat confdefs.h >>conftest.$ac_ext
24010cat >>conftest.$ac_ext <<_ACEOF
24011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024012#include <wchar.h>
24013
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024014 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024015int
24016main ()
24017{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024018static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024019test_array [0] = 0
24020
24021 ;
24022 return 0;
24023}
24024_ACEOF
24025rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024026if { (ac_try="$ac_compile"
24027case "(($ac_try" in
24028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24029 *) ac_try_echo=$ac_try;;
24030esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024034 grep -v '^ *+' conftest.er1 >conftest.err
24035 rm -f conftest.er1
24036 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024038 (exit $ac_status); } && {
24039 test -z "$ac_c_werror_flag" ||
24040 test ! -s conftest.err
24041 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024042 ac_lo=0 ac_mid=0
24043 while :; do
24044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024045/* confdefs.h. */
24046_ACEOF
24047cat confdefs.h >>conftest.$ac_ext
24048cat >>conftest.$ac_ext <<_ACEOF
24049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024050#include <wchar.h>
24051
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024052 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024053int
24054main ()
24055{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024056static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024057test_array [0] = 0
24058
24059 ;
24060 return 0;
24061}
24062_ACEOF
24063rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024064if { (ac_try="$ac_compile"
24065case "(($ac_try" in
24066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24067 *) ac_try_echo=$ac_try;;
24068esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024072 grep -v '^ *+' conftest.er1 >conftest.err
24073 rm -f conftest.er1
24074 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024076 (exit $ac_status); } && {
24077 test -z "$ac_c_werror_flag" ||
24078 test ! -s conftest.err
24079 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024080 ac_hi=$ac_mid; break
24081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024083sed 's/^/| /' conftest.$ac_ext >&5
24084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024085 ac_lo=`expr $ac_mid + 1`
24086 if test $ac_lo -le $ac_mid; then
24087 ac_lo= ac_hi=
24088 break
24089 fi
24090 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024092
24093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024094 done
24095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024097sed 's/^/| /' conftest.$ac_ext >&5
24098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024100/* confdefs.h. */
24101_ACEOF
24102cat confdefs.h >>conftest.$ac_ext
24103cat >>conftest.$ac_ext <<_ACEOF
24104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024105#include <wchar.h>
24106
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024107 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024108int
24109main ()
24110{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024111static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024112test_array [0] = 0
24113
24114 ;
24115 return 0;
24116}
24117_ACEOF
24118rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024119if { (ac_try="$ac_compile"
24120case "(($ac_try" in
24121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24122 *) ac_try_echo=$ac_try;;
24123esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024127 grep -v '^ *+' conftest.er1 >conftest.err
24128 rm -f conftest.er1
24129 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024131 (exit $ac_status); } && {
24132 test -z "$ac_c_werror_flag" ||
24133 test ! -s conftest.err
24134 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024135 ac_hi=-1 ac_mid=-1
24136 while :; do
24137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024138/* confdefs.h. */
24139_ACEOF
24140cat confdefs.h >>conftest.$ac_ext
24141cat >>conftest.$ac_ext <<_ACEOF
24142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024143#include <wchar.h>
24144
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024145 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024146int
24147main ()
24148{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024150test_array [0] = 0
24151
24152 ;
24153 return 0;
24154}
24155_ACEOF
24156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024157if { (ac_try="$ac_compile"
24158case "(($ac_try" in
24159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24160 *) ac_try_echo=$ac_try;;
24161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024165 grep -v '^ *+' conftest.er1 >conftest.err
24166 rm -f conftest.er1
24167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024169 (exit $ac_status); } && {
24170 test -z "$ac_c_werror_flag" ||
24171 test ! -s conftest.err
24172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024173 ac_lo=$ac_mid; break
24174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024176sed 's/^/| /' conftest.$ac_ext >&5
24177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024178 ac_hi=`expr '(' $ac_mid ')' - 1`
24179 if test $ac_mid -le $ac_hi; then
24180 ac_lo= ac_hi=
24181 break
24182 fi
24183 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024185
24186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024187 done
24188else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024190sed 's/^/| /' conftest.$ac_ext >&5
24191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024192 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024194
24195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024197
24198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024199# Binary search between lo and hi bounds.
24200while test "x$ac_lo" != "x$ac_hi"; do
24201 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024203/* confdefs.h. */
24204_ACEOF
24205cat confdefs.h >>conftest.$ac_ext
24206cat >>conftest.$ac_ext <<_ACEOF
24207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024208#include <wchar.h>
24209
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024210 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024211int
24212main ()
24213{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024214static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024215test_array [0] = 0
24216
24217 ;
24218 return 0;
24219}
24220_ACEOF
24221rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024222if { (ac_try="$ac_compile"
24223case "(($ac_try" in
24224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24225 *) ac_try_echo=$ac_try;;
24226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024228 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024230 grep -v '^ *+' conftest.er1 >conftest.err
24231 rm -f conftest.er1
24232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024234 (exit $ac_status); } && {
24235 test -z "$ac_c_werror_flag" ||
24236 test ! -s conftest.err
24237 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024238 ac_hi=$ac_mid
24239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024241sed 's/^/| /' conftest.$ac_ext >&5
24242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024243 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024245
24246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024247done
24248case $ac_lo in
24249?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024250'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024251 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024252See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024253echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024254See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024255 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024256 else
24257 ac_cv_sizeof_wchar_t=0
24258 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024259esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024260else
Martin v. Löwis11437992002-04-12 09:54:03 +000024261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024262/* confdefs.h. */
24263_ACEOF
24264cat confdefs.h >>conftest.$ac_ext
24265cat >>conftest.$ac_ext <<_ACEOF
24266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024267#include <wchar.h>
24268
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024269 typedef wchar_t ac__type_sizeof_;
24270static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24271static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024272#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024273#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024274int
24275main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024276{
Martin v. Löwis11437992002-04-12 09:54:03 +000024277
24278 FILE *f = fopen ("conftest.val", "w");
24279 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024280 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024281 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024282 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024283 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024284 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024285 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024286 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024287 }
24288 else
24289 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024290 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024291 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024292 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024293 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024294 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024295 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024296
24297 ;
24298 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024299}
Martin v. Löwis11437992002-04-12 09:54:03 +000024300_ACEOF
24301rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024302if { (ac_try="$ac_link"
24303case "(($ac_try" in
24304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24305 *) ac_try_echo=$ac_try;;
24306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024308 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024309 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024311 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024312 { (case "(($ac_try" in
24313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24314 *) ac_try_echo=$ac_try;;
24315esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024317 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024318 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024320 (exit $ac_status); }; }; then
24321 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024322else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024323 echo "$as_me: program exited with status $ac_status" >&5
24324echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024325sed 's/^/| /' conftest.$ac_ext >&5
24326
Martin v. Löwis11437992002-04-12 09:54:03 +000024327( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024328if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024329 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024330See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024331echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024332See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024333 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024334 else
24335 ac_cv_sizeof_wchar_t=0
24336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024338rm -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 +000024339fi
24340rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024341fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024342{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24343echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024344
24345
24346
Martin v. Löwis11437992002-04-12 09:54:03 +000024347cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024348#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024349_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024350
Michael W. Hudson54241132001-12-07 15:38:26 +000024351
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024352fi
24353
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024354{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24355echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024356have_ucs4_tcl=no
24357cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024358/* confdefs.h. */
24359_ACEOF
24360cat confdefs.h >>conftest.$ac_ext
24361cat >>conftest.$ac_ext <<_ACEOF
24362/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024363
24364#include <tcl.h>
24365#if TCL_UTF_MAX != 6
24366# error "NOT UCS4_TCL"
24367#endif
24368int
24369main ()
24370{
24371
24372 ;
24373 return 0;
24374}
24375_ACEOF
24376rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024377if { (ac_try="$ac_compile"
24378case "(($ac_try" in
24379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24380 *) ac_try_echo=$ac_try;;
24381esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024385 grep -v '^ *+' conftest.er1 >conftest.err
24386 rm -f conftest.er1
24387 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024389 (exit $ac_status); } && {
24390 test -z "$ac_c_werror_flag" ||
24391 test ! -s conftest.err
24392 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024393
24394
24395cat >>confdefs.h <<\_ACEOF
24396#define HAVE_UCS4_TCL 1
24397_ACEOF
24398
24399 have_ucs4_tcl=yes
24400
24401else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024403sed 's/^/| /' conftest.$ac_ext >&5
24404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024405
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024407
24408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024409{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24410echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024411
Skip Montanaro6dead952003-09-25 14:50:04 +000024412# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024413if test "$wchar_h" = yes
24414then
24415 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024416 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24417echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024418 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024419 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024420else
24421
24422 if test "$cross_compiling" = yes; then
24423 ac_cv_wchar_t_signed=yes
24424else
24425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024426/* confdefs.h. */
24427_ACEOF
24428cat confdefs.h >>conftest.$ac_ext
24429cat >>conftest.$ac_ext <<_ACEOF
24430/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024431
24432 #include <wchar.h>
24433 int main()
24434 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024435 /* Success: exit code 0 */
24436 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024437 }
24438
24439_ACEOF
24440rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024441if { (ac_try="$ac_link"
24442case "(($ac_try" in
24443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24444 *) ac_try_echo=$ac_try;;
24445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024447 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024448 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024450 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024451 { (case "(($ac_try" in
24452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24453 *) ac_try_echo=$ac_try;;
24454esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024456 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024457 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024459 (exit $ac_status); }; }; then
24460 ac_cv_wchar_t_signed=yes
24461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024462 echo "$as_me: program exited with status $ac_status" >&5
24463echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024464sed 's/^/| /' conftest.$ac_ext >&5
24465
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024466( exit $ac_status )
24467ac_cv_wchar_t_signed=no
24468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024469rm -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 +000024470fi
24471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024472
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024473fi
24474
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024475 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24476echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024477fi
24478
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024479{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24480echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024481
24482# Check whether --with-wide-unicode was given.
24483if test "${with_wide_unicode+set}" = set; then
24484 withval=$with_wide_unicode;
24485if test "$withval" != no
24486then unicode_size="4"
24487else unicode_size="2"
24488fi
24489
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024490else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024491
Georg Brandl52d168a2008-01-07 18:10:24 +000024492case "$have_ucs4_tcl" in
24493 yes) unicode_size="4" ;;
24494 *) unicode_size="2" ;;
24495esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024496
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024497fi
24498
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024499
24500
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024501
Georg Brandl52d168a2008-01-07 18:10:24 +000024502case "$unicode_size" in
24503 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024504#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024505_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024506 ;;
24507 *) cat >>confdefs.h <<\_ACEOF
24508#define Py_UNICODE_SIZE 2
24509_ACEOF
24510 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024511esac
24512
Michael W. Hudson54241132001-12-07 15:38:26 +000024513
Martin v. Löwis11437992002-04-12 09:54:03 +000024514
24515
Georg Brandl52d168a2008-01-07 18:10:24 +000024516# wchar_t is only usable if it maps to an unsigned type
24517if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024518 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024519then
24520 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024521
Martin v. Löwis11437992002-04-12 09:54:03 +000024522cat >>confdefs.h <<\_ACEOF
24523#define HAVE_USABLE_WCHAR_T 1
24524_ACEOF
24525
Georg Brandl52d168a2008-01-07 18:10:24 +000024526 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024527#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024528_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024529
Georg Brandl52d168a2008-01-07 18:10:24 +000024530elif test "$ac_cv_sizeof_short" = "$unicode_size"
24531then
24532 PY_UNICODE_TYPE="unsigned short"
24533 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024534#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024535_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024536
Georg Brandl52d168a2008-01-07 18:10:24 +000024537elif test "$ac_cv_sizeof_long" = "$unicode_size"
24538then
24539 PY_UNICODE_TYPE="unsigned long"
24540 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024541#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024542_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024543
Georg Brandl52d168a2008-01-07 18:10:24 +000024544else
24545 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024546fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024547{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24548echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024549
24550# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024551{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24552echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024553if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024554 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024555else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024556 # See if sys/param.h defines the BYTE_ORDER macro.
24557cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024558/* confdefs.h. */
24559_ACEOF
24560cat confdefs.h >>conftest.$ac_ext
24561cat >>conftest.$ac_ext <<_ACEOF
24562/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024563#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024564#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024565
Martin v. Löwis11437992002-04-12 09:54:03 +000024566int
24567main ()
24568{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024569#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24570 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24571 bogus endian macros
24572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024573
24574 ;
24575 return 0;
24576}
24577_ACEOF
24578rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024579if { (ac_try="$ac_compile"
24580case "(($ac_try" in
24581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24582 *) ac_try_echo=$ac_try;;
24583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024587 grep -v '^ *+' conftest.er1 >conftest.err
24588 rm -f conftest.er1
24589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024591 (exit $ac_status); } && {
24592 test -z "$ac_c_werror_flag" ||
24593 test ! -s conftest.err
24594 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024595 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024597/* confdefs.h. */
24598_ACEOF
24599cat confdefs.h >>conftest.$ac_ext
24600cat >>conftest.$ac_ext <<_ACEOF
24601/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024602#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024603#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024604
Martin v. Löwis11437992002-04-12 09:54:03 +000024605int
24606main ()
24607{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024608#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024609 not big endian
24610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024611
24612 ;
24613 return 0;
24614}
24615_ACEOF
24616rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024617if { (ac_try="$ac_compile"
24618case "(($ac_try" in
24619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24620 *) ac_try_echo=$ac_try;;
24621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024625 grep -v '^ *+' conftest.er1 >conftest.err
24626 rm -f conftest.er1
24627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024629 (exit $ac_status); } && {
24630 test -z "$ac_c_werror_flag" ||
24631 test ! -s conftest.err
24632 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024633 ac_cv_c_bigendian=yes
24634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024636sed 's/^/| /' conftest.$ac_ext >&5
24637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024638 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024640
24641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024642else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024644sed 's/^/| /' conftest.$ac_ext >&5
24645
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024646 # It does not; compile a test program.
24647if test "$cross_compiling" = yes; then
24648 # try to guess the endianness by grepping values into an object file
24649 ac_cv_c_bigendian=unknown
24650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024651/* confdefs.h. */
24652_ACEOF
24653cat confdefs.h >>conftest.$ac_ext
24654cat >>conftest.$ac_ext <<_ACEOF
24655/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024656short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24657short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24658void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24659short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24660short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24661void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024662int
24663main ()
24664{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024665 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024666 ;
24667 return 0;
24668}
24669_ACEOF
24670rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024671if { (ac_try="$ac_compile"
24672case "(($ac_try" in
24673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24674 *) ac_try_echo=$ac_try;;
24675esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024677 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024679 grep -v '^ *+' conftest.er1 >conftest.err
24680 rm -f conftest.er1
24681 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024683 (exit $ac_status); } && {
24684 test -z "$ac_c_werror_flag" ||
24685 test ! -s conftest.err
24686 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024687 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024688 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024689fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024690if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24691 if test "$ac_cv_c_bigendian" = unknown; then
24692 ac_cv_c_bigendian=no
24693 else
24694 # finding both strings is unlikely to happen, but who knows?
24695 ac_cv_c_bigendian=unknown
24696 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024697fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024698else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024700sed 's/^/| /' conftest.$ac_ext >&5
24701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024702
Martin v. Löwis11437992002-04-12 09:54:03 +000024703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024704
24705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024706else
24707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024708/* confdefs.h. */
24709_ACEOF
24710cat confdefs.h >>conftest.$ac_ext
24711cat >>conftest.$ac_ext <<_ACEOF
24712/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024713$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024714int
24715main ()
24716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024717
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024718 /* Are we little or big endian? From Harbison&Steele. */
24719 union
24720 {
24721 long int l;
24722 char c[sizeof (long int)];
24723 } u;
24724 u.l = 1;
24725 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024726
24727 ;
24728 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024729}
Martin v. Löwis11437992002-04-12 09:54:03 +000024730_ACEOF
24731rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024732if { (ac_try="$ac_link"
24733case "(($ac_try" in
24734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24735 *) ac_try_echo=$ac_try;;
24736esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024738 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024739 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024741 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024742 { (case "(($ac_try" in
24743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24744 *) ac_try_echo=$ac_try;;
24745esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024747 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024748 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024750 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024751 ac_cv_c_bigendian=no
24752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024753 echo "$as_me: program exited with status $ac_status" >&5
24754echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024755sed 's/^/| /' conftest.$ac_ext >&5
24756
Martin v. Löwis11437992002-04-12 09:54:03 +000024757( exit $ac_status )
24758ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024760rm -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 +000024761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024762
24763
Martin v. Löwis11437992002-04-12 09:54:03 +000024764fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024765
24766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24767fi
24768{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24769echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24770case $ac_cv_c_bigendian in
24771 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024772
24773cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024774#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024775_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024776 ;;
24777 no)
24778 ;;
24779 *)
24780 { { echo "$as_me:$LINENO: error: unknown endianness
24781presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24782echo "$as_me: error: unknown endianness
24783presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024784 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024785esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024786
Michael W. Hudson54241132001-12-07 15:38:26 +000024787
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024788# Check whether right shifting a negative integer extends the sign bit
24789# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024790{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24791echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024792if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024793 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024794else
Martin v. Löwis11437992002-04-12 09:54:03 +000024795
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024796if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024797 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024798else
Martin v. Löwis11437992002-04-12 09:54:03 +000024799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024800/* confdefs.h. */
24801_ACEOF
24802cat confdefs.h >>conftest.$ac_ext
24803cat >>conftest.$ac_ext <<_ACEOF
24804/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024805
24806int main()
24807{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024808 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024809}
24810
Martin v. Löwis11437992002-04-12 09:54:03 +000024811_ACEOF
24812rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024813if { (ac_try="$ac_link"
24814case "(($ac_try" in
24815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24816 *) ac_try_echo=$ac_try;;
24817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024820 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024822 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024823 { (case "(($ac_try" in
24824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24825 *) ac_try_echo=$ac_try;;
24826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024828 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024829 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024831 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024832 ac_cv_rshift_extends_sign=yes
24833else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024834 echo "$as_me: program exited with status $ac_status" >&5
24835echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024836sed 's/^/| /' conftest.$ac_ext >&5
24837
Martin v. Löwis11437992002-04-12 09:54:03 +000024838( exit $ac_status )
24839ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024841rm -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 +000024842fi
24843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024844
24845fi
24846
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024847{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24848echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024849if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024850then
Martin v. Löwis11437992002-04-12 09:54:03 +000024851
24852cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024853#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024854_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024855
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024856fi
24857
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024858# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024859{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24860echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024861if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024862 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024863else
Martin v. Löwis11437992002-04-12 09:54:03 +000024864
24865cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024866/* confdefs.h. */
24867_ACEOF
24868cat confdefs.h >>conftest.$ac_ext
24869cat >>conftest.$ac_ext <<_ACEOF
24870/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024871#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024872int
24873main ()
24874{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024875
24876 FILE *f = fopen("/dev/null", "r");
24877 flockfile(f);
24878 getc_unlocked(f);
24879 funlockfile(f);
24880
Martin v. Löwis11437992002-04-12 09:54:03 +000024881 ;
24882 return 0;
24883}
24884_ACEOF
24885rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024886if { (ac_try="$ac_link"
24887case "(($ac_try" in
24888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24889 *) ac_try_echo=$ac_try;;
24890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024892 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024894 grep -v '^ *+' conftest.er1 >conftest.err
24895 rm -f conftest.er1
24896 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024898 (exit $ac_status); } && {
24899 test -z "$ac_c_werror_flag" ||
24900 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024901 } && test -s conftest$ac_exeext &&
24902 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024903 ac_cv_have_getc_unlocked=yes
24904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024906sed 's/^/| /' conftest.$ac_ext >&5
24907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024908 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024910
24911rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024912 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024913fi
24914
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024915{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24916echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024917if test "$ac_cv_have_getc_unlocked" = yes
24918then
Martin v. Löwis11437992002-04-12 09:54:03 +000024919
24920cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024921#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024922_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024923
24924fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024925
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024926# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024927# save the value of LIBS so we don't actually link Python with readline
24928LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024929
Gregory P. Smith18820942008-09-07 06:24:49 +000024930# On some systems we need to link readline to a termcap compatible
24931# library. NOTE: Keep the precedence of listed libraries synchronised
24932# with setup.py.
24933py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024934{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24935echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024936for py_libtermcap in "" ncursesw ncurses curses termcap; do
24937 if test -z "$py_libtermcap"; then
24938 READLINE_LIBS="-lreadline"
24939 else
24940 READLINE_LIBS="-lreadline -l$py_libtermcap"
24941 fi
24942 LIBS="$READLINE_LIBS $LIBS_no_readline"
24943 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024944/* confdefs.h. */
24945_ACEOF
24946cat confdefs.h >>conftest.$ac_ext
24947cat >>conftest.$ac_ext <<_ACEOF
24948/* end confdefs.h. */
24949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024950/* Override any GCC internal prototype to avoid an error.
24951 Use char because int might match the return type of a GCC
24952 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024953#ifdef __cplusplus
24954extern "C"
24955#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024956char readline ();
24957int
24958main ()
24959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024960return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024961 ;
24962 return 0;
24963}
24964_ACEOF
24965rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024966if { (ac_try="$ac_link"
24967case "(($ac_try" in
24968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24969 *) ac_try_echo=$ac_try;;
24970esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024972 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024973 ac_status=$?
24974 grep -v '^ *+' conftest.er1 >conftest.err
24975 rm -f conftest.er1
24976 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024978 (exit $ac_status); } && {
24979 test -z "$ac_c_werror_flag" ||
24980 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024981 } && test -s conftest$ac_exeext &&
24982 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024983 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024984else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024985 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024986sed 's/^/| /' conftest.$ac_ext >&5
24987
Gregory P. Smith18820942008-09-07 06:24:49 +000024988
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024990
24991rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024992 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024993 if test $py_cv_lib_readline = yes; then
24994 break
24995 fi
24996done
24997# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24998#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024999if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025000 { echo "$as_me:$LINENO: result: none" >&5
25001echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025002else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025003 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25004echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025005
25006cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025007#define HAVE_LIBREADLINE 1
25008_ACEOF
25009
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025010fi
25011
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025012# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025013{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25014echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025015if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025016 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025017else
25018 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025019LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025020cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025021/* confdefs.h. */
25022_ACEOF
25023cat confdefs.h >>conftest.$ac_ext
25024cat >>conftest.$ac_ext <<_ACEOF
25025/* end confdefs.h. */
25026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025027/* Override any GCC internal prototype to avoid an error.
25028 Use char because int might match the return type of a GCC
25029 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025030#ifdef __cplusplus
25031extern "C"
25032#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025033char rl_callback_handler_install ();
25034int
25035main ()
25036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025037return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025038 ;
25039 return 0;
25040}
25041_ACEOF
25042rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025043if { (ac_try="$ac_link"
25044case "(($ac_try" in
25045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25046 *) ac_try_echo=$ac_try;;
25047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025049 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025051 grep -v '^ *+' conftest.er1 >conftest.err
25052 rm -f conftest.er1
25053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025055 (exit $ac_status); } && {
25056 test -z "$ac_c_werror_flag" ||
25057 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025058 } && test -s conftest$ac_exeext &&
25059 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025060 ac_cv_lib_readline_rl_callback_handler_install=yes
25061else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025062 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025063sed 's/^/| /' conftest.$ac_ext >&5
25064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025065 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025067
25068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025069 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025070LIBS=$ac_check_lib_save_LIBS
25071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025072{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25073echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25074if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025075
25076cat >>confdefs.h <<\_ACEOF
25077#define HAVE_RL_CALLBACK 1
25078_ACEOF
25079
25080fi
25081
25082
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025083# check for readline 2.2
25084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025085/* confdefs.h. */
25086_ACEOF
25087cat confdefs.h >>conftest.$ac_ext
25088cat >>conftest.$ac_ext <<_ACEOF
25089/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025090#include <readline/readline.h>
25091_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025092if { (ac_try="$ac_cpp conftest.$ac_ext"
25093case "(($ac_try" in
25094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25095 *) ac_try_echo=$ac_try;;
25096esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025098 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025099 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025100 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025101 rm -f conftest.er1
25102 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025104 (exit $ac_status); } >/dev/null && {
25105 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25106 test ! -s conftest.err
25107 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025108 have_readline=yes
25109else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025111sed 's/^/| /' conftest.$ac_ext >&5
25112
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025113 have_readline=no
25114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025115
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025116rm -f conftest.err conftest.$ac_ext
25117if test $have_readline = yes
25118then
25119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025120/* confdefs.h. */
25121_ACEOF
25122cat confdefs.h >>conftest.$ac_ext
25123cat >>conftest.$ac_ext <<_ACEOF
25124/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025125#include <readline/readline.h>
25126
25127_ACEOF
25128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025129 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025130
25131cat >>confdefs.h <<\_ACEOF
25132#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25133_ACEOF
25134
25135fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025136rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025137
Antoine Pitroud5131772009-10-26 19:22:14 +000025138 cat >conftest.$ac_ext <<_ACEOF
25139/* confdefs.h. */
25140_ACEOF
25141cat confdefs.h >>conftest.$ac_ext
25142cat >>conftest.$ac_ext <<_ACEOF
25143/* end confdefs.h. */
25144#include <readline/readline.h>
25145
25146_ACEOF
25147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25148 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25149
25150cat >>confdefs.h <<\_ACEOF
25151#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25152_ACEOF
25153
25154fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025155rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025156
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025157fi
25158
Martin v. Löwis0daad592001-09-30 21:09:59 +000025159# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025160{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25161echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025162if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025164else
Martin v. Löwis11437992002-04-12 09:54:03 +000025165 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025166LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025168/* confdefs.h. */
25169_ACEOF
25170cat confdefs.h >>conftest.$ac_ext
25171cat >>conftest.$ac_ext <<_ACEOF
25172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025174/* Override any GCC internal prototype to avoid an error.
25175 Use char because int might match the return type of a GCC
25176 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025177#ifdef __cplusplus
25178extern "C"
25179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025180char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025181int
25182main ()
25183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025184return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025185 ;
25186 return 0;
25187}
25188_ACEOF
25189rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025190if { (ac_try="$ac_link"
25191case "(($ac_try" in
25192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25193 *) ac_try_echo=$ac_try;;
25194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025196 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025198 grep -v '^ *+' conftest.er1 >conftest.err
25199 rm -f conftest.er1
25200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025202 (exit $ac_status); } && {
25203 test -z "$ac_c_werror_flag" ||
25204 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025205 } && test -s conftest$ac_exeext &&
25206 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025207 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025208else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025210sed 's/^/| /' conftest.$ac_ext >&5
25211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025212 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025214
25215rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025217LIBS=$ac_check_lib_save_LIBS
25218fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025219{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25220echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25221if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025222
Martin v. Löwis11437992002-04-12 09:54:03 +000025223cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025224#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025225_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025226
Martin v. Löwis0daad592001-09-30 21:09:59 +000025227fi
25228
Michael W. Hudson54241132001-12-07 15:38:26 +000025229
Thomas Wouters89d996e2007-09-08 17:39:28 +000025230# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025231{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25232echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025233if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025234 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025235else
25236 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025237LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025238cat >conftest.$ac_ext <<_ACEOF
25239/* confdefs.h. */
25240_ACEOF
25241cat confdefs.h >>conftest.$ac_ext
25242cat >>conftest.$ac_ext <<_ACEOF
25243/* end confdefs.h. */
25244
25245/* Override any GCC internal prototype to avoid an error.
25246 Use char because int might match the return type of a GCC
25247 builtin and then its argument prototype would still apply. */
25248#ifdef __cplusplus
25249extern "C"
25250#endif
25251char rl_completion_display_matches_hook ();
25252int
25253main ()
25254{
25255return rl_completion_display_matches_hook ();
25256 ;
25257 return 0;
25258}
25259_ACEOF
25260rm -f conftest.$ac_objext conftest$ac_exeext
25261if { (ac_try="$ac_link"
25262case "(($ac_try" in
25263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25264 *) ac_try_echo=$ac_try;;
25265esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025267 (eval "$ac_link") 2>conftest.er1
25268 ac_status=$?
25269 grep -v '^ *+' conftest.er1 >conftest.err
25270 rm -f conftest.er1
25271 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025273 (exit $ac_status); } && {
25274 test -z "$ac_c_werror_flag" ||
25275 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025276 } && test -s conftest$ac_exeext &&
25277 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025278 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025280 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025281sed 's/^/| /' conftest.$ac_ext >&5
25282
25283 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25284fi
25285
25286rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25287 conftest$ac_exeext conftest.$ac_ext
25288LIBS=$ac_check_lib_save_LIBS
25289fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025290{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25291echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25292if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025293
25294cat >>confdefs.h <<\_ACEOF
25295#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25296_ACEOF
25297
25298fi
25299
25300
Martin v. Löwis0daad592001-09-30 21:09:59 +000025301# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025302{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25303echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025304if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025305 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025306else
Martin v. Löwis11437992002-04-12 09:54:03 +000025307 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025308LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025310/* confdefs.h. */
25311_ACEOF
25312cat confdefs.h >>conftest.$ac_ext
25313cat >>conftest.$ac_ext <<_ACEOF
25314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025316/* Override any GCC internal prototype to avoid an error.
25317 Use char because int might match the return type of a GCC
25318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025319#ifdef __cplusplus
25320extern "C"
25321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025322char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025323int
25324main ()
25325{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025326return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025327 ;
25328 return 0;
25329}
25330_ACEOF
25331rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025332if { (ac_try="$ac_link"
25333case "(($ac_try" in
25334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25335 *) ac_try_echo=$ac_try;;
25336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025338 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025340 grep -v '^ *+' conftest.er1 >conftest.err
25341 rm -f conftest.er1
25342 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025344 (exit $ac_status); } && {
25345 test -z "$ac_c_werror_flag" ||
25346 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025347 } && test -s conftest$ac_exeext &&
25348 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025349 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025350else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025352sed 's/^/| /' conftest.$ac_ext >&5
25353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025354 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025356
25357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025359LIBS=$ac_check_lib_save_LIBS
25360fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025361{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25362echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25363if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025364
Martin v. Löwis11437992002-04-12 09:54:03 +000025365cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025366#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025367_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025368
Guido van Rossum353ae582001-07-10 16:45:32 +000025369fi
25370
Jack Jansendd19cf82001-12-06 22:36:17 +000025371
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025372# also in readline 4.2
25373cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025374/* confdefs.h. */
25375_ACEOF
25376cat confdefs.h >>conftest.$ac_ext
25377cat >>conftest.$ac_ext <<_ACEOF
25378/* end confdefs.h. */
25379#include <readline/readline.h>
25380_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025381if { (ac_try="$ac_cpp conftest.$ac_ext"
25382case "(($ac_try" in
25383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25384 *) ac_try_echo=$ac_try;;
25385esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025387 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025388 ac_status=$?
25389 grep -v '^ *+' conftest.er1 >conftest.err
25390 rm -f conftest.er1
25391 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025393 (exit $ac_status); } >/dev/null && {
25394 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25395 test ! -s conftest.err
25396 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025397 have_readline=yes
25398else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025399 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025400sed 's/^/| /' conftest.$ac_ext >&5
25401
25402 have_readline=no
25403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025404
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025405rm -f conftest.err conftest.$ac_ext
25406if test $have_readline = yes
25407then
25408 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025409/* confdefs.h. */
25410_ACEOF
25411cat confdefs.h >>conftest.$ac_ext
25412cat >>conftest.$ac_ext <<_ACEOF
25413/* end confdefs.h. */
25414#include <readline/readline.h>
25415
25416_ACEOF
25417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25418 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25419
25420cat >>confdefs.h <<\_ACEOF
25421#define HAVE_RL_CATCH_SIGNAL 1
25422_ACEOF
25423
25424fi
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000025425rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025426
25427fi
25428
Martin v. Löwis82bca632006-02-10 20:49:30 +000025429# End of readline checks: restore LIBS
25430LIBS=$LIBS_no_readline
25431
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025432{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25433echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025434if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025435 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025436else
Martin v. Löwis11437992002-04-12 09:54:03 +000025437
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025438if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025439 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025440else
Martin v. Löwis11437992002-04-12 09:54:03 +000025441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025442/* confdefs.h. */
25443_ACEOF
25444cat confdefs.h >>conftest.$ac_ext
25445cat >>conftest.$ac_ext <<_ACEOF
25446/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025447
25448int main()
25449{
25450 int val1 = nice(1);
25451 if (val1 != -1 && val1 == nice(2))
25452 exit(0);
25453 exit(1);
25454}
25455
Martin v. Löwis11437992002-04-12 09:54:03 +000025456_ACEOF
25457rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025458if { (ac_try="$ac_link"
25459case "(($ac_try" in
25460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25461 *) ac_try_echo=$ac_try;;
25462esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025464 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025465 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025467 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025468 { (case "(($ac_try" in
25469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25470 *) ac_try_echo=$ac_try;;
25471esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025473 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025474 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025476 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025477 ac_cv_broken_nice=yes
25478else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025479 echo "$as_me: program exited with status $ac_status" >&5
25480echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025481sed 's/^/| /' conftest.$ac_ext >&5
25482
Martin v. Löwis11437992002-04-12 09:54:03 +000025483( exit $ac_status )
25484ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025486rm -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 +000025487fi
25488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025489
25490fi
25491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025492{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25493echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025494if test "$ac_cv_broken_nice" = yes
25495then
Martin v. Löwis11437992002-04-12 09:54:03 +000025496
25497cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025498#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025499_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025500
25501fi
25502
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025503{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25504echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025505if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025506 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025507else
25508 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025509 ac_cv_broken_poll=no
25510else
25511 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025512/* confdefs.h. */
25513_ACEOF
25514cat confdefs.h >>conftest.$ac_ext
25515cat >>conftest.$ac_ext <<_ACEOF
25516/* end confdefs.h. */
25517
25518#include <poll.h>
25519
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025520int main()
25521{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025522 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025523 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025524
25525 close (42);
25526
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025527 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025528 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025529 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025530 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025531 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025532 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025533 return 1;
25534}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025535
25536_ACEOF
25537rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025538if { (ac_try="$ac_link"
25539case "(($ac_try" in
25540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25541 *) ac_try_echo=$ac_try;;
25542esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025544 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025545 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025548 { (case "(($ac_try" in
25549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25550 *) ac_try_echo=$ac_try;;
25551esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025553 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025554 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025556 (exit $ac_status); }; }; then
25557 ac_cv_broken_poll=yes
25558else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025559 echo "$as_me: program exited with status $ac_status" >&5
25560echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025561sed 's/^/| /' conftest.$ac_ext >&5
25562
25563( exit $ac_status )
25564ac_cv_broken_poll=no
25565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025566rm -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 +000025567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025568
25569
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025570fi
25571
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025572{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25573echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025574if test "$ac_cv_broken_poll" = yes
25575then
25576
25577cat >>confdefs.h <<\_ACEOF
25578#define HAVE_BROKEN_POLL 1
25579_ACEOF
25580
25581fi
25582
Brett Cannon43802422005-02-10 20:48:03 +000025583# 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 +000025584# (which is not required by ISO C or UNIX spec) and/or if we support
25585# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025586{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25587echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025588if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025589 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025590else
25591 cat >conftest.$ac_ext <<_ACEOF
25592/* confdefs.h. */
25593_ACEOF
25594cat confdefs.h >>conftest.$ac_ext
25595cat >>conftest.$ac_ext <<_ACEOF
25596/* end confdefs.h. */
25597#include <sys/types.h>
25598#include <$ac_cv_struct_tm>
25599
25600
25601int
25602main ()
25603{
25604static struct tm ac_aggr;
25605if (ac_aggr.tm_zone)
25606return 0;
25607 ;
25608 return 0;
25609}
25610_ACEOF
25611rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025612if { (ac_try="$ac_compile"
25613case "(($ac_try" in
25614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25615 *) ac_try_echo=$ac_try;;
25616esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025618 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025619 ac_status=$?
25620 grep -v '^ *+' conftest.er1 >conftest.err
25621 rm -f conftest.er1
25622 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025624 (exit $ac_status); } && {
25625 test -z "$ac_c_werror_flag" ||
25626 test ! -s conftest.err
25627 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025628 ac_cv_member_struct_tm_tm_zone=yes
25629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025630 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025631sed 's/^/| /' conftest.$ac_ext >&5
25632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025633 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025634/* confdefs.h. */
25635_ACEOF
25636cat confdefs.h >>conftest.$ac_ext
25637cat >>conftest.$ac_ext <<_ACEOF
25638/* end confdefs.h. */
25639#include <sys/types.h>
25640#include <$ac_cv_struct_tm>
25641
25642
25643int
25644main ()
25645{
25646static struct tm ac_aggr;
25647if (sizeof ac_aggr.tm_zone)
25648return 0;
25649 ;
25650 return 0;
25651}
25652_ACEOF
25653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025654if { (ac_try="$ac_compile"
25655case "(($ac_try" in
25656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25657 *) ac_try_echo=$ac_try;;
25658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025660 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025661 ac_status=$?
25662 grep -v '^ *+' conftest.er1 >conftest.err
25663 rm -f conftest.er1
25664 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025666 (exit $ac_status); } && {
25667 test -z "$ac_c_werror_flag" ||
25668 test ! -s conftest.err
25669 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025670 ac_cv_member_struct_tm_tm_zone=yes
25671else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025672 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025673sed 's/^/| /' conftest.$ac_ext >&5
25674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025675 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025677
25678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025680
25681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025682fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025683{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25684echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25685if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025686
25687cat >>confdefs.h <<_ACEOF
25688#define HAVE_STRUCT_TM_TM_ZONE 1
25689_ACEOF
25690
25691
25692fi
25693
25694if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25695
25696cat >>confdefs.h <<\_ACEOF
25697#define HAVE_TM_ZONE 1
25698_ACEOF
25699
25700else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025701 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25702echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025703if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025704 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025705else
25706 cat >conftest.$ac_ext <<_ACEOF
25707/* confdefs.h. */
25708_ACEOF
25709cat confdefs.h >>conftest.$ac_ext
25710cat >>conftest.$ac_ext <<_ACEOF
25711/* end confdefs.h. */
25712#include <time.h>
25713
25714int
25715main ()
25716{
25717#ifndef tzname
25718 (void) tzname;
25719#endif
25720
25721 ;
25722 return 0;
25723}
25724_ACEOF
25725rm -f conftest.$ac_objext
25726if { (ac_try="$ac_compile"
25727case "(($ac_try" in
25728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25729 *) ac_try_echo=$ac_try;;
25730esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025732 (eval "$ac_compile") 2>conftest.er1
25733 ac_status=$?
25734 grep -v '^ *+' conftest.er1 >conftest.err
25735 rm -f conftest.er1
25736 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025738 (exit $ac_status); } && {
25739 test -z "$ac_c_werror_flag" ||
25740 test ! -s conftest.err
25741 } && test -s conftest.$ac_objext; then
25742 ac_cv_have_decl_tzname=yes
25743else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025744 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025745sed 's/^/| /' conftest.$ac_ext >&5
25746
25747 ac_cv_have_decl_tzname=no
25748fi
25749
25750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25751fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025752{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25753echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25754if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025755
25756cat >>confdefs.h <<_ACEOF
25757#define HAVE_DECL_TZNAME 1
25758_ACEOF
25759
25760
25761else
25762 cat >>confdefs.h <<_ACEOF
25763#define HAVE_DECL_TZNAME 0
25764_ACEOF
25765
25766
25767fi
25768
25769
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025770 { echo "$as_me:$LINENO: checking for tzname" >&5
25771echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025772if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025773 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025774else
25775 cat >conftest.$ac_ext <<_ACEOF
25776/* confdefs.h. */
25777_ACEOF
25778cat confdefs.h >>conftest.$ac_ext
25779cat >>conftest.$ac_ext <<_ACEOF
25780/* end confdefs.h. */
25781#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025782#if !HAVE_DECL_TZNAME
25783extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025784#endif
25785
25786int
25787main ()
25788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025789return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025790 ;
25791 return 0;
25792}
25793_ACEOF
25794rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025795if { (ac_try="$ac_link"
25796case "(($ac_try" in
25797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25798 *) ac_try_echo=$ac_try;;
25799esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025801 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025802 ac_status=$?
25803 grep -v '^ *+' conftest.er1 >conftest.err
25804 rm -f conftest.er1
25805 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025807 (exit $ac_status); } && {
25808 test -z "$ac_c_werror_flag" ||
25809 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025810 } && test -s conftest$ac_exeext &&
25811 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025812 ac_cv_var_tzname=yes
25813else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025814 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025815sed 's/^/| /' conftest.$ac_ext >&5
25816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025817 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025819
25820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025821 conftest$ac_exeext conftest.$ac_ext
25822fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025823{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25824echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025825 if test $ac_cv_var_tzname = yes; then
25826
25827cat >>confdefs.h <<\_ACEOF
25828#define HAVE_TZNAME 1
25829_ACEOF
25830
25831 fi
25832fi
25833
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025834
Martin v. Löwis1d459062005-03-14 21:23:33 +000025835# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025836{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25837echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025838if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025839 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025840else
25841
25842if test "$cross_compiling" = yes; then
25843 ac_cv_working_tzset=no
25844else
25845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025846/* confdefs.h. */
25847_ACEOF
25848cat confdefs.h >>conftest.$ac_ext
25849cat >>conftest.$ac_ext <<_ACEOF
25850/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025851
25852#include <stdlib.h>
25853#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025854#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025855
25856#if HAVE_TZNAME
25857extern char *tzname[];
25858#endif
25859
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025860int main()
25861{
Brett Cannon18367812003-09-19 00:59:16 +000025862 /* Note that we need to ensure that not only does tzset(3)
25863 do 'something' with localtime, but it works as documented
25864 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025865 This includes making sure that tzname is set properly if
25866 tm->tm_zone does not exist since it is the alternative way
25867 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025868
25869 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025870 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025871 */
25872
Martin v. Löwis1d459062005-03-14 21:23:33 +000025873 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025874 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25875
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025876 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025877 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025878 if (localtime(&groundhogday)->tm_hour != 0)
25879 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025880#if HAVE_TZNAME
25881 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25882 if (strcmp(tzname[0], "UTC") ||
25883 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25884 exit(1);
25885#endif
Brett Cannon18367812003-09-19 00:59:16 +000025886
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025887 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025888 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025889 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025890 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025891#if HAVE_TZNAME
25892 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25893 exit(1);
25894#endif
Brett Cannon18367812003-09-19 00:59:16 +000025895
25896 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25897 tzset();
25898 if (localtime(&groundhogday)->tm_hour != 11)
25899 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025900#if HAVE_TZNAME
25901 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25902 exit(1);
25903#endif
25904
25905#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025906 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25907 exit(1);
25908 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25909 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025910#endif
Brett Cannon18367812003-09-19 00:59:16 +000025911
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025912 exit(0);
25913}
25914
25915_ACEOF
25916rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025917if { (ac_try="$ac_link"
25918case "(($ac_try" in
25919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25920 *) ac_try_echo=$ac_try;;
25921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025923 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025924 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025927 { (case "(($ac_try" in
25928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25929 *) ac_try_echo=$ac_try;;
25930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025932 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025933 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025935 (exit $ac_status); }; }; then
25936 ac_cv_working_tzset=yes
25937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025938 echo "$as_me: program exited with status $ac_status" >&5
25939echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025940sed 's/^/| /' conftest.$ac_ext >&5
25941
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025942( exit $ac_status )
25943ac_cv_working_tzset=no
25944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025945rm -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 +000025946fi
25947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025948
25949fi
25950
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025951{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25952echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025953if test "$ac_cv_working_tzset" = yes
25954then
25955
25956cat >>confdefs.h <<\_ACEOF
25957#define HAVE_WORKING_TZSET 1
25958_ACEOF
25959
25960fi
25961
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025962# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025963{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25964echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025965if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025966 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025967else
25968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025969/* confdefs.h. */
25970_ACEOF
25971cat confdefs.h >>conftest.$ac_ext
25972cat >>conftest.$ac_ext <<_ACEOF
25973/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025974#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025975int
25976main ()
25977{
25978
25979struct stat st;
25980st.st_mtim.tv_nsec = 1;
25981
25982 ;
25983 return 0;
25984}
25985_ACEOF
25986rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025987if { (ac_try="$ac_compile"
25988case "(($ac_try" in
25989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25990 *) ac_try_echo=$ac_try;;
25991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025995 grep -v '^ *+' conftest.er1 >conftest.err
25996 rm -f conftest.er1
25997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025999 (exit $ac_status); } && {
26000 test -z "$ac_c_werror_flag" ||
26001 test ! -s conftest.err
26002 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026003 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026006sed 's/^/| /' conftest.$ac_ext >&5
26007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026008 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026009fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26012fi
26013
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026014{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26015echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026016if test "$ac_cv_stat_tv_nsec" = yes
26017then
26018
26019cat >>confdefs.h <<\_ACEOF
26020#define HAVE_STAT_TV_NSEC 1
26021_ACEOF
26022
26023fi
26024
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026025# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026026{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26027echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026028if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026029 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026030else
26031 cat >conftest.$ac_ext <<_ACEOF
26032/* confdefs.h. */
26033_ACEOF
26034cat confdefs.h >>conftest.$ac_ext
26035cat >>conftest.$ac_ext <<_ACEOF
26036/* end confdefs.h. */
26037#include <sys/stat.h>
26038int
26039main ()
26040{
26041
26042struct stat st;
26043st.st_mtimespec.tv_nsec = 1;
26044
26045 ;
26046 return 0;
26047}
26048_ACEOF
26049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026050if { (ac_try="$ac_compile"
26051case "(($ac_try" in
26052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26053 *) ac_try_echo=$ac_try;;
26054esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026057 ac_status=$?
26058 grep -v '^ *+' conftest.er1 >conftest.err
26059 rm -f conftest.er1
26060 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026062 (exit $ac_status); } && {
26063 test -z "$ac_c_werror_flag" ||
26064 test ! -s conftest.err
26065 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026066 ac_cv_stat_tv_nsec2=yes
26067else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026068 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026069sed 's/^/| /' conftest.$ac_ext >&5
26070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026071 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026072fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26075fi
26076
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026077{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26078echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026079if test "$ac_cv_stat_tv_nsec2" = yes
26080then
26081
26082cat >>confdefs.h <<\_ACEOF
26083#define HAVE_STAT_TV_NSEC2 1
26084_ACEOF
26085
26086fi
26087
Jack Jansen666b1e72001-10-31 12:11:48 +000026088# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026089{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26090echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026091if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026092 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026093else
Martin v. Löwis11437992002-04-12 09:54:03 +000026094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026095/* confdefs.h. */
26096_ACEOF
26097cat confdefs.h >>conftest.$ac_ext
26098cat >>conftest.$ac_ext <<_ACEOF
26099/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026100#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026101int
26102main ()
26103{
Jack Jansen666b1e72001-10-31 12:11:48 +000026104
26105 int rtn;
26106 rtn = mvwdelch(0,0,0);
26107
Martin v. Löwis11437992002-04-12 09:54:03 +000026108 ;
26109 return 0;
26110}
26111_ACEOF
26112rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026113if { (ac_try="$ac_compile"
26114case "(($ac_try" in
26115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26116 *) ac_try_echo=$ac_try;;
26117esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026121 grep -v '^ *+' conftest.er1 >conftest.err
26122 rm -f conftest.er1
26123 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026125 (exit $ac_status); } && {
26126 test -z "$ac_c_werror_flag" ||
26127 test ! -s conftest.err
26128 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026129 ac_cv_mvwdelch_is_expression=yes
26130else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026132sed 's/^/| /' conftest.$ac_ext >&5
26133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026134 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026135fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26138fi
26139
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026140{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26141echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026142
26143if test "$ac_cv_mvwdelch_is_expression" = yes
26144then
Martin v. Löwis11437992002-04-12 09:54:03 +000026145
26146cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026147#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026148_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026149
26150fi
26151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026152{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26153echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026154if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026155 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026156else
Martin v. Löwis11437992002-04-12 09:54:03 +000026157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026158/* confdefs.h. */
26159_ACEOF
26160cat confdefs.h >>conftest.$ac_ext
26161cat >>conftest.$ac_ext <<_ACEOF
26162/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026163#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026164int
26165main ()
26166{
Jack Jansen666b1e72001-10-31 12:11:48 +000026167
26168 WINDOW *w;
26169 w->_flags = 0;
26170
Martin v. Löwis11437992002-04-12 09:54:03 +000026171 ;
26172 return 0;
26173}
26174_ACEOF
26175rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026176if { (ac_try="$ac_compile"
26177case "(($ac_try" in
26178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26179 *) ac_try_echo=$ac_try;;
26180esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026184 grep -v '^ *+' conftest.er1 >conftest.err
26185 rm -f conftest.er1
26186 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026188 (exit $ac_status); } && {
26189 test -z "$ac_c_werror_flag" ||
26190 test ! -s conftest.err
26191 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026192 ac_cv_window_has_flags=yes
26193else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026195sed 's/^/| /' conftest.$ac_ext >&5
26196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026197 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026198fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26201fi
26202
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026203{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26204echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026205
Jack Jansen666b1e72001-10-31 12:11:48 +000026206
26207if test "$ac_cv_window_has_flags" = yes
26208then
Martin v. Löwis11437992002-04-12 09:54:03 +000026209
26210cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026211#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026212_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026213
26214fi
26215
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026216{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26217echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026218cat >conftest.$ac_ext <<_ACEOF
26219/* confdefs.h. */
26220_ACEOF
26221cat confdefs.h >>conftest.$ac_ext
26222cat >>conftest.$ac_ext <<_ACEOF
26223/* end confdefs.h. */
26224#include <curses.h>
26225int
26226main ()
26227{
26228void *x=is_term_resized
26229 ;
26230 return 0;
26231}
26232_ACEOF
26233rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026234if { (ac_try="$ac_compile"
26235case "(($ac_try" in
26236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26237 *) ac_try_echo=$ac_try;;
26238esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026240 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026241 ac_status=$?
26242 grep -v '^ *+' conftest.er1 >conftest.err
26243 rm -f conftest.er1
26244 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026246 (exit $ac_status); } && {
26247 test -z "$ac_c_werror_flag" ||
26248 test ! -s conftest.err
26249 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026250
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026251cat >>confdefs.h <<\_ACEOF
26252#define HAVE_CURSES_IS_TERM_RESIZED 1
26253_ACEOF
26254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026255 { echo "$as_me:$LINENO: result: yes" >&5
26256echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026257else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026258 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026259sed 's/^/| /' conftest.$ac_ext >&5
26260
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026261 { echo "$as_me:$LINENO: result: no" >&5
26262echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026263
26264fi
26265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26267
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026268{ echo "$as_me:$LINENO: checking for resize_term" >&5
26269echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026270cat >conftest.$ac_ext <<_ACEOF
26271/* confdefs.h. */
26272_ACEOF
26273cat confdefs.h >>conftest.$ac_ext
26274cat >>conftest.$ac_ext <<_ACEOF
26275/* end confdefs.h. */
26276#include <curses.h>
26277int
26278main ()
26279{
26280void *x=resize_term
26281 ;
26282 return 0;
26283}
26284_ACEOF
26285rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026286if { (ac_try="$ac_compile"
26287case "(($ac_try" in
26288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26289 *) ac_try_echo=$ac_try;;
26290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026292 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026293 ac_status=$?
26294 grep -v '^ *+' conftest.er1 >conftest.err
26295 rm -f conftest.er1
26296 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026298 (exit $ac_status); } && {
26299 test -z "$ac_c_werror_flag" ||
26300 test ! -s conftest.err
26301 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026302
26303cat >>confdefs.h <<\_ACEOF
26304#define HAVE_CURSES_RESIZE_TERM 1
26305_ACEOF
26306
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026307 { echo "$as_me:$LINENO: result: yes" >&5
26308echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026310 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026311sed 's/^/| /' conftest.$ac_ext >&5
26312
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026313 { echo "$as_me:$LINENO: result: no" >&5
26314echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026315
26316fi
26317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26319
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026320{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26321echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026322cat >conftest.$ac_ext <<_ACEOF
26323/* confdefs.h. */
26324_ACEOF
26325cat confdefs.h >>conftest.$ac_ext
26326cat >>conftest.$ac_ext <<_ACEOF
26327/* end confdefs.h. */
26328#include <curses.h>
26329int
26330main ()
26331{
26332void *x=resizeterm
26333 ;
26334 return 0;
26335}
26336_ACEOF
26337rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026338if { (ac_try="$ac_compile"
26339case "(($ac_try" in
26340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26341 *) ac_try_echo=$ac_try;;
26342esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026344 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026345 ac_status=$?
26346 grep -v '^ *+' conftest.er1 >conftest.err
26347 rm -f conftest.er1
26348 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026350 (exit $ac_status); } && {
26351 test -z "$ac_c_werror_flag" ||
26352 test ! -s conftest.err
26353 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026354
26355cat >>confdefs.h <<\_ACEOF
26356#define HAVE_CURSES_RESIZETERM 1
26357_ACEOF
26358
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026359 { echo "$as_me:$LINENO: result: yes" >&5
26360echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026361else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026362 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026363sed 's/^/| /' conftest.$ac_ext >&5
26364
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026365 { echo "$as_me:$LINENO: result: no" >&5
26366echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026367
26368fi
26369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26371
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026372{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26373echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026374
26375if test -r /dev/ptmx
26376then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026377 { echo "$as_me:$LINENO: result: yes" >&5
26378echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026379
26380cat >>confdefs.h <<\_ACEOF
26381#define HAVE_DEV_PTMX 1
26382_ACEOF
26383
Thomas Wouters89f507f2006-12-13 04:49:30 +000026384else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026385 { echo "$as_me:$LINENO: result: no" >&5
26386echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026387fi
26388
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026389{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26390echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026391
26392if test -r /dev/ptc
26393then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026394 { echo "$as_me:$LINENO: result: yes" >&5
26395echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026396
26397cat >>confdefs.h <<\_ACEOF
26398#define HAVE_DEV_PTC 1
26399_ACEOF
26400
Thomas Wouters89f507f2006-12-13 04:49:30 +000026401else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026402 { echo "$as_me:$LINENO: result: no" >&5
26403echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026404fi
26405
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026406if test "$have_long_long" = yes
26407then
26408 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26409echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26410 if test "${ac_cv_have_long_long_format+set}" = set; then
26411 echo $ECHO_N "(cached) $ECHO_C" >&6
26412else
26413 if test "$cross_compiling" = yes; then
26414 ac_cv_have_long_long_format=no
26415else
26416 cat >conftest.$ac_ext <<_ACEOF
26417/* confdefs.h. */
26418_ACEOF
26419cat confdefs.h >>conftest.$ac_ext
26420cat >>conftest.$ac_ext <<_ACEOF
26421/* end confdefs.h. */
26422
26423 #include <stdio.h>
26424 #include <stddef.h>
26425 #include <string.h>
26426
26427 #ifdef HAVE_SYS_TYPES_H
26428 #include <sys/types.h>
26429 #endif
26430
26431 int main()
26432 {
26433 char buffer[256];
26434
26435 if (sprintf(buffer, "%lld", (long long)123) < 0)
26436 return 1;
26437 if (strcmp(buffer, "123"))
26438 return 1;
26439
26440 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26441 return 1;
26442 if (strcmp(buffer, "-123"))
26443 return 1;
26444
26445 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26446 return 1;
26447 if (strcmp(buffer, "123"))
26448 return 1;
26449
26450 return 0;
26451 }
26452
26453_ACEOF
26454rm -f conftest$ac_exeext
26455if { (ac_try="$ac_link"
26456case "(($ac_try" in
26457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26458 *) ac_try_echo=$ac_try;;
26459esac
26460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26461 (eval "$ac_link") 2>&5
26462 ac_status=$?
26463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26464 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26465 { (case "(($ac_try" in
26466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26467 *) ac_try_echo=$ac_try;;
26468esac
26469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26470 (eval "$ac_try") 2>&5
26471 ac_status=$?
26472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26473 (exit $ac_status); }; }; then
26474 ac_cv_have_long_long_format=yes
26475else
26476 echo "$as_me: program exited with status $ac_status" >&5
26477echo "$as_me: failed program was:" >&5
26478sed 's/^/| /' conftest.$ac_ext >&5
26479
26480( exit $ac_status )
26481ac_cv_have_long_long_format=no
26482fi
26483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26484fi
26485
26486
26487
26488fi
26489
26490 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26491echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26492fi
26493
26494if test $ac_cv_have_long_long_format = yes
26495then
26496
26497cat >>confdefs.h <<\_ACEOF
26498#define PY_FORMAT_LONG_LONG "ll"
26499_ACEOF
26500
26501fi
26502
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026503if test $ac_sys_system = Darwin
26504then
26505 LIBS="$LIBS -framework CoreFoundation"
26506fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026507
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026508{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26509echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026510if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026511 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026512else
26513 if test "$cross_compiling" = yes; then
26514 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026515else
26516 cat >conftest.$ac_ext <<_ACEOF
26517/* confdefs.h. */
26518_ACEOF
26519cat confdefs.h >>conftest.$ac_ext
26520cat >>conftest.$ac_ext <<_ACEOF
26521/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026522
Thomas Wouters477c8d52006-05-27 19:21:47 +000026523#include <stdio.h>
26524#include <stddef.h>
26525#include <string.h>
26526
Christian Heimes2c181612007-12-17 20:04:13 +000026527#ifdef HAVE_SYS_TYPES_H
26528#include <sys/types.h>
26529#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026530
26531#ifdef HAVE_SSIZE_T
26532typedef ssize_t Py_ssize_t;
26533#elif SIZEOF_VOID_P == SIZEOF_LONG
26534typedef long Py_ssize_t;
26535#else
26536typedef int Py_ssize_t;
26537#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026538
Christian Heimes2c181612007-12-17 20:04:13 +000026539int main()
26540{
26541 char buffer[256];
26542
Thomas Wouters477c8d52006-05-27 19:21:47 +000026543 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26544 return 1;
26545
Thomas Wouters89f507f2006-12-13 04:49:30 +000026546 if (strcmp(buffer, "123"))
26547 return 1;
26548
26549 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26550 return 1;
26551
26552 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026553 return 1;
26554
26555 return 0;
26556}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026557
Thomas Wouters477c8d52006-05-27 19:21:47 +000026558_ACEOF
26559rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026560if { (ac_try="$ac_link"
26561case "(($ac_try" in
26562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26563 *) ac_try_echo=$ac_try;;
26564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026566 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026567 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026569 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026570 { (case "(($ac_try" in
26571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26572 *) ac_try_echo=$ac_try;;
26573esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026575 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026576 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026578 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026579 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026581 echo "$as_me: program exited with status $ac_status" >&5
26582echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026583sed 's/^/| /' conftest.$ac_ext >&5
26584
26585( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026586ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026587fi
26588rm -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 +000026589fi
26590
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026591
26592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026593fi
26594
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026595{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26596echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026597if test $ac_cv_have_size_t_format = yes
26598then
26599
26600cat >>confdefs.h <<\_ACEOF
26601#define PY_FORMAT_SIZE_T "z"
26602_ACEOF
26603
26604fi
26605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026606{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26607echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026608if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026610else
Martin v. Löwis11437992002-04-12 09:54:03 +000026611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026612/* confdefs.h. */
26613_ACEOF
26614cat confdefs.h >>conftest.$ac_ext
26615cat >>conftest.$ac_ext <<_ACEOF
26616/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026617
26618#ifdef HAVE_SYS_TYPES_H
26619#include <sys/types.h>
26620#endif
26621#ifdef HAVE_SYS_SOCKET_H
26622#include <sys/socket.h>
26623#endif
26624
26625
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026626typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026627int
26628main ()
26629{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026630if ((ac__type_new_ *) 0)
26631 return 0;
26632if (sizeof (ac__type_new_))
26633 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026634 ;
26635 return 0;
26636}
26637_ACEOF
26638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026639if { (ac_try="$ac_compile"
26640case "(($ac_try" in
26641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26642 *) ac_try_echo=$ac_try;;
26643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026647 grep -v '^ *+' conftest.er1 >conftest.err
26648 rm -f conftest.er1
26649 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026651 (exit $ac_status); } && {
26652 test -z "$ac_c_werror_flag" ||
26653 test ! -s conftest.err
26654 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026655 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026656else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026658sed 's/^/| /' conftest.$ac_ext >&5
26659
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026660 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026662
26663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026664fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026665{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26666echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26667if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026668 :
26669else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026670
Martin v. Löwis01c04012002-11-11 14:58:44 +000026671cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026672#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026673_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026674
26675fi
26676
Michael W. Hudson54241132001-12-07 15:38:26 +000026677
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026678{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26679echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026680if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026681 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026682else
26683 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026684 ac_cv_broken_mbstowcs=no
26685else
26686 cat >conftest.$ac_ext <<_ACEOF
26687/* confdefs.h. */
26688_ACEOF
26689cat confdefs.h >>conftest.$ac_ext
26690cat >>conftest.$ac_ext <<_ACEOF
26691/* end confdefs.h. */
26692
26693#include<stdlib.h>
26694int main() {
26695 size_t len = -1;
26696 const char *str = "text";
26697 len = mbstowcs(NULL, str, 0);
26698 return (len != 4);
26699}
26700
26701_ACEOF
26702rm -f conftest$ac_exeext
26703if { (ac_try="$ac_link"
26704case "(($ac_try" in
26705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26706 *) ac_try_echo=$ac_try;;
26707esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026709 (eval "$ac_link") 2>&5
26710 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26713 { (case "(($ac_try" in
26714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26715 *) ac_try_echo=$ac_try;;
26716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026718 (eval "$ac_try") 2>&5
26719 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026721 (exit $ac_status); }; }; then
26722 ac_cv_broken_mbstowcs=no
26723else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026724 echo "$as_me: program exited with status $ac_status" >&5
26725echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026726sed 's/^/| /' conftest.$ac_ext >&5
26727
26728( exit $ac_status )
26729ac_cv_broken_mbstowcs=yes
26730fi
26731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26732fi
26733
26734
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026735fi
26736
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026737{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26738echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026739if test "$ac_cv_broken_mbstowcs" = yes
26740then
26741
26742cat >>confdefs.h <<\_ACEOF
26743#define HAVE_BROKEN_MBSTOWCS 1
26744_ACEOF
26745
26746fi
26747
Antoine Pitroub52ec782009-01-25 16:34:23 +000026748# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026749{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26750echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026751
26752# Check whether --with-computed-gotos was given.
26753if test "${with_computed_gotos+set}" = set; then
26754 withval=$with_computed_gotos;
26755if test "$withval" != no
26756then
26757
26758cat >>confdefs.h <<\_ACEOF
26759#define USE_COMPUTED_GOTOS 1
26760_ACEOF
26761
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026762 { echo "$as_me:$LINENO: result: yes" >&5
26763echo "${ECHO_T}yes" >&6; }
26764else { echo "$as_me:$LINENO: result: no" >&5
26765echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026766fi
26767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026768 { echo "$as_me:$LINENO: result: no" >&5
26769echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026770fi
26771
26772
26773
Michael W. Hudson54241132001-12-07 15:38:26 +000026774
26775
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026776for h in `(cd $srcdir;echo Python/thread_*.h)`
26777do
26778 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26779done
26780
Michael W. Hudson54241132001-12-07 15:38:26 +000026781
Neal Norwitzd24499d2005-12-18 21:36:39 +000026782SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026783{ echo "$as_me:$LINENO: checking for build directories" >&5
26784echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026785for dir in $SRCDIRS; do
26786 if test ! -d $dir; then
26787 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026788 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026789done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026790{ echo "$as_me:$LINENO: result: done" >&5
26791echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026792
Guido van Rossum627b2d71993-12-24 10:39:16 +000026793# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026794ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026795
Martin v. Löwis11437992002-04-12 09:54:03 +000026796cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026797# This file is a shell script that caches the results of configure
26798# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026799# scripts and configure runs, see configure's option --config-cache.
26800# It is not useful on other systems. If it contains results you don't
26801# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026802#
Martin v. Löwis11437992002-04-12 09:54:03 +000026803# config.status only pays attention to the cache file if you give it
26804# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026805#
Skip Montanaro6dead952003-09-25 14:50:04 +000026806# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026807# loading this file, other *unset* `ac_cv_foo' will be assigned the
26808# following values.
26809
26810_ACEOF
26811
Guido van Rossumf78abae1997-01-21 22:02:36 +000026812# The following way of writing the cache mishandles newlines in values,
26813# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026814# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026815# Ultrix sh set writes to stderr and can't be redirected directly,
26816# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026817(
26818 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26819 eval ac_val=\$$ac_var
26820 case $ac_val in #(
26821 *${as_nl}*)
26822 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026823 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26824echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026825 esac
26826 case $ac_var in #(
26827 _ | IFS | as_nl) ;; #(
26828 *) $as_unset $ac_var ;;
26829 esac ;;
26830 esac
26831 done
26832
Martin v. Löwis11437992002-04-12 09:54:03 +000026833 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026834 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26835 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026836 # `set' does not quote correctly, so add quotes (double-quote
26837 # substitution turns \\\\ into \\, and sed turns \\ into \).
26838 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026839 "s/'/'\\\\''/g;
26840 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026841 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026842 *)
26843 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026844 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026845 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026846 esac |
26847 sort
26848) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026849 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026850 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026851 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026852 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026853 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26854 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026855 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26856 :end' >>confcache
26857if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26858 if test -w "$cache_file"; then
26859 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026860 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26861echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026862 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026863 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026864 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26865echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026866 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026867fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026868rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026869
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026870test "x$prefix" = xNONE && prefix=$ac_default_prefix
26871# Let make expand exec_prefix.
26872test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026874DEFS=-DHAVE_CONFIG_H
26875
Skip Montanaro6dead952003-09-25 14:50:04 +000026876ac_libobjs=
26877ac_ltlibobjs=
26878for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26879 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026880 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026881 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026882 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26883 # will be set to the directory where LIBOBJS objects are built.
26884 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26885 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026886done
26887LIBOBJS=$ac_libobjs
26888
26889LTLIBOBJS=$ac_ltlibobjs
26890
26891
Martin v. Löwis11437992002-04-12 09:54:03 +000026892
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026893: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026894ac_clean_files_save=$ac_clean_files
26895ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026896{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26897echo "$as_me: creating $CONFIG_STATUS" >&6;}
26898cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026899#! $SHELL
26900# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026901# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026902# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026903# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026904
Martin v. Löwis11437992002-04-12 09:54:03 +000026905debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026906ac_cs_recheck=false
26907ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026908SHELL=\${CONFIG_SHELL-$SHELL}
26909_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026910
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026911cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026912## --------------------- ##
26913## M4sh Initialization. ##
26914## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026916# Be more Bourne compatible
26917DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026918if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26919 emulate sh
26920 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026921 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026922 # is contrary to our usage. Disable this feature.
26923 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026924 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026925else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026926 case `(set -o) 2>/dev/null` in
26927 *posix*) set -o posix ;;
26928esac
26929
Michael W. Hudson54241132001-12-07 15:38:26 +000026930fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026931
26932
Michael W. Hudson54241132001-12-07 15:38:26 +000026933
Michael W. Hudson54241132001-12-07 15:38:26 +000026934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026935# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026936# Avoid depending upon Character Ranges.
26937as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26938as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26939as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26940as_cr_digits='0123456789'
26941as_cr_alnum=$as_cr_Letters$as_cr_digits
26942
26943# The user is always right.
26944if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026945 echo "#! /bin/sh" >conf$$.sh
26946 echo "exit 0" >>conf$$.sh
26947 chmod +x conf$$.sh
26948 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26949 PATH_SEPARATOR=';'
26950 else
26951 PATH_SEPARATOR=:
26952 fi
26953 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026954fi
26955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026956# Support unset when possible.
26957if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26958 as_unset=unset
26959else
26960 as_unset=false
26961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026963
26964# IFS
26965# We need space, tab and new line, in precisely that order. Quoting is
26966# there to prevent editors from complaining about space-tab.
26967# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26968# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026969as_nl='
26970'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026971IFS=" "" $as_nl"
26972
26973# Find who we are. Look in the path if we contain no directory separator.
26974case $0 in
26975 *[\\/]* ) as_myself=$0 ;;
26976 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026977for as_dir in $PATH
26978do
26979 IFS=$as_save_IFS
26980 test -z "$as_dir" && as_dir=.
26981 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26982done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026983IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026985 ;;
26986esac
26987# We did not find ourselves, most probably we were run as `sh COMMAND'
26988# in which case we are not to be found in the path.
26989if test "x$as_myself" = x; then
26990 as_myself=$0
26991fi
26992if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026993 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026994 { (exit 1); exit 1; }
26995fi
26996
26997# Work around bugs in pre-3.0 UWIN ksh.
26998for as_var in ENV MAIL MAILPATH
26999do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27000done
27001PS1='$ '
27002PS2='> '
27003PS4='+ '
27004
27005# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027006for as_var in \
27007 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27008 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27009 LC_TELEPHONE LC_TIME
27010do
27011 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27012 eval $as_var=C; export $as_var
27013 else
27014 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27015 fi
27016done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027017
27018# Required to use basename.
27019if expr a : '\(a\)' >/dev/null 2>&1 &&
27020 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27021 as_expr=expr
27022else
27023 as_expr=false
27024fi
27025
27026if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27027 as_basename=basename
27028else
27029 as_basename=false
27030fi
27031
27032
27033# Name of the executable.
27034as_me=`$as_basename -- "$0" ||
27035$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27036 X"$0" : 'X\(//\)$' \| \
27037 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027038echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027039 sed '/^.*\/\([^/][^/]*\)\/*$/{
27040 s//\1/
27041 q
27042 }
27043 /^X\/\(\/\/\)$/{
27044 s//\1/
27045 q
27046 }
27047 /^X\/\(\/\).*/{
27048 s//\1/
27049 q
27050 }
27051 s/.*/./; q'`
27052
27053# CDPATH.
27054$as_unset CDPATH
27055
27056
27057
Martin v. Löwis11437992002-04-12 09:54:03 +000027058 as_lineno_1=$LINENO
27059 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027060 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027061 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027062
Martin v. Löwis11437992002-04-12 09:54:03 +000027063 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27064 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027065 # line-number line after each line using $LINENO; the second 'sed'
27066 # does the real work. The second script uses 'N' to pair each
27067 # line-number line with the line containing $LINENO, and appends
27068 # trailing '-' during substitution so that $LINENO is not a special
27069 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027070 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027071 # scripts with optimization help from Paolo Bonzini. Blame Lee
27072 # E. McMahon (1931-1989) for sed's syntax. :-)
27073 sed -n '
27074 p
27075 /[$]LINENO/=
27076 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027077 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027078 s/[$]LINENO.*/&-/
27079 t lineno
27080 b
27081 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027082 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027083 :loop
27084 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027085 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027086 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027087 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027088 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027089 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027090 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027091
Martin v. Löwis11437992002-04-12 09:54:03 +000027092 # Don't try to exec as it changes $[0], causing all sort of problems
27093 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027094 # original and so on. Autoconf is especially sensitive to this).
27095 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027096 # Exit status is that of the last command.
27097 exit
27098}
27099
27100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027101if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27102 as_dirname=dirname
27103else
27104 as_dirname=false
27105fi
27106
27107ECHO_C= ECHO_N= ECHO_T=
27108case `echo -n x` in
27109-n*)
27110 case `echo 'x\c'` in
27111 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27112 *) ECHO_C='\c';;
27113 esac;;
27114*)
27115 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027118if expr a : '\(a\)' >/dev/null 2>&1 &&
27119 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027120 as_expr=expr
27121else
27122 as_expr=false
27123fi
27124
27125rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027126if test -d conf$$.dir; then
27127 rm -f conf$$.dir/conf$$.file
27128else
27129 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027130 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027131fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027132echo >conf$$.file
27133if ln -s conf$$.file conf$$ 2>/dev/null; then
27134 as_ln_s='ln -s'
27135 # ... but there are two gotchas:
27136 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27137 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27138 # In both cases, we have to default to `cp -p'.
27139 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027140 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027141elif ln conf$$.file conf$$ 2>/dev/null; then
27142 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027143else
27144 as_ln_s='cp -p'
27145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027146rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27147rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027148
Skip Montanaro6dead952003-09-25 14:50:04 +000027149if mkdir -p . 2>/dev/null; then
27150 as_mkdir_p=:
27151else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027152 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027153 as_mkdir_p=false
27154fi
27155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027156if test -x / >/dev/null 2>&1; then
27157 as_test_x='test -x'
27158else
27159 if ls -dL / >/dev/null 2>&1; then
27160 as_ls_L_option=L
27161 else
27162 as_ls_L_option=
27163 fi
27164 as_test_x='
27165 eval sh -c '\''
27166 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027167 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027168 else
27169 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027170 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027171 esac;
27172 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27173 ???[sx]*):;;*)false;;esac;fi
27174 '\'' sh
27175 '
27176fi
27177as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027178
27179# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027180as_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 +000027181
27182# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027183as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027184
27185
Martin v. Löwis11437992002-04-12 09:54:03 +000027186exec 6>&1
27187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027188# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027189# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027190# values after options handling.
27191ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027192This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027193generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027194
27195 CONFIG_FILES = $CONFIG_FILES
27196 CONFIG_HEADERS = $CONFIG_HEADERS
27197 CONFIG_LINKS = $CONFIG_LINKS
27198 CONFIG_COMMANDS = $CONFIG_COMMANDS
27199 $ $0 $@
27200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027201on `(hostname || uname -n) 2>/dev/null | sed 1q`
27202"
27203
Martin v. Löwis11437992002-04-12 09:54:03 +000027204_ACEOF
27205
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027206cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027207# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027208config_files="$ac_config_files"
27209config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027211_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027212
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027213cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027214ac_cs_usage="\
27215\`$as_me' instantiates files from templates according to the
27216current configuration.
27217
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027218Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027219
27220 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027221 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027222 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027223 -d, --debug don't remove temporary files
27224 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027225 --file=FILE[:TEMPLATE]
27226 instantiate the configuration file FILE
27227 --header=FILE[:TEMPLATE]
27228 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027229
27230Configuration files:
27231$config_files
27232
27233Configuration headers:
27234$config_headers
27235
27236Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027238_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027239cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027240ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027241python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027242configured by $0, generated by GNU Autoconf 2.61,
27243 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027244
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027245Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027246This config.status script is free software; the Free Software Foundation
27247gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027248
27249ac_pwd='$ac_pwd'
27250srcdir='$srcdir'
27251INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027252_ACEOF
27253
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027254cat >>$CONFIG_STATUS <<\_ACEOF
27255# If no file are specified by the user, then we need to provide default
27256# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027257ac_need_defaults=:
27258while test $# != 0
27259do
27260 case $1 in
27261 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027262 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27263 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027264 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027265 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027266 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027267 ac_option=$1
27268 ac_optarg=$2
27269 ac_shift=shift
27270 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027271 esac
27272
Skip Montanaro6dead952003-09-25 14:50:04 +000027273 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027274 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027275 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27276 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027277 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027278 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027279 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027280 debug=: ;;
27281 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027282 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027283 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027284 ac_need_defaults=false;;
27285 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027286 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027287 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027288 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027289 --he | --h)
27290 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027291 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027292Try \`$0 --help' for more information." >&2
27293 { (exit 1); exit 1; }; };;
27294 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027295 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027296 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27297 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27298 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027299
27300 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027301 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027302Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027303 { (exit 1); exit 1; }; } ;;
27304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027305 *) ac_config_targets="$ac_config_targets $1"
27306 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027307
27308 esac
27309 shift
27310done
27311
Skip Montanaro6dead952003-09-25 14:50:04 +000027312ac_configure_extra_args=
27313
27314if $ac_cs_silent; then
27315 exec 6>/dev/null
27316 ac_configure_extra_args="$ac_configure_extra_args --silent"
27317fi
27318
27319_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027320cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027321if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027322 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27323 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027324 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027325 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027326fi
27327
Martin v. Löwis11437992002-04-12 09:54:03 +000027328_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027329cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027330exec 5>>config.log
27331{
27332 echo
27333 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27334## Running $as_me. ##
27335_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027336 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027337} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027339_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027340cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027341_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027342
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027343cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027344
27345# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027346for ac_config_target in $ac_config_targets
27347do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027348 case $ac_config_target in
27349 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27350 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27351 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027352 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27353 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027354 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27355 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027356 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027357
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027358 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27359echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027360 { (exit 1); exit 1; }; };;
27361 esac
27362done
27363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027364
Martin v. Löwis11437992002-04-12 09:54:03 +000027365# If the user did not use the arguments to specify the items to instantiate,
27366# then the envvar interface is used. Set only those that are not.
27367# We use the long form for the default assignment because of an extremely
27368# bizarre bug on SunOS 4.1.3.
27369if $ac_need_defaults; then
27370 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27371 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27372fi
27373
Skip Montanaro6dead952003-09-25 14:50:04 +000027374# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027375# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027376# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027377# Hook for its removal unless debugging.
27378# Note that there is a small window in which the directory will not be cleaned:
27379# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027380$debug ||
27381{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027382 tmp=
27383 trap 'exit_status=$?
27384 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27385' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027386 trap '{ (exit 1); exit 1; }' 1 2 13 15
27387}
Martin v. Löwis11437992002-04-12 09:54:03 +000027388# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027389
Martin v. Löwis11437992002-04-12 09:54:03 +000027390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027391 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027392 test -n "$tmp" && test -d "$tmp"
27393} ||
27394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027395 tmp=./conf$$-$RANDOM
27396 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027397} ||
27398{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027399 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027400 { (exit 1); exit 1; }
27401}
27402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027403#
27404# Set up the sed scripts for CONFIG_FILES section.
27405#
27406
27407# No need to generate the scripts if there are no CONFIG_FILES.
27408# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027409if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027410
27411_ACEOF
27412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027413
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027415ac_delim='%!_!# '
27416for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027417 cat >conf$$subs.sed <<_ACEOF
27418SHELL!$SHELL$ac_delim
27419PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27420PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27421PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27422PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27423PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27424PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27425exec_prefix!$exec_prefix$ac_delim
27426prefix!$prefix$ac_delim
27427program_transform_name!$program_transform_name$ac_delim
27428bindir!$bindir$ac_delim
27429sbindir!$sbindir$ac_delim
27430libexecdir!$libexecdir$ac_delim
27431datarootdir!$datarootdir$ac_delim
27432datadir!$datadir$ac_delim
27433sysconfdir!$sysconfdir$ac_delim
27434sharedstatedir!$sharedstatedir$ac_delim
27435localstatedir!$localstatedir$ac_delim
27436includedir!$includedir$ac_delim
27437oldincludedir!$oldincludedir$ac_delim
27438docdir!$docdir$ac_delim
27439infodir!$infodir$ac_delim
27440htmldir!$htmldir$ac_delim
27441dvidir!$dvidir$ac_delim
27442pdfdir!$pdfdir$ac_delim
27443psdir!$psdir$ac_delim
27444libdir!$libdir$ac_delim
27445localedir!$localedir$ac_delim
27446mandir!$mandir$ac_delim
27447DEFS!$DEFS$ac_delim
27448ECHO_C!$ECHO_C$ac_delim
27449ECHO_N!$ECHO_N$ac_delim
27450ECHO_T!$ECHO_T$ac_delim
27451LIBS!$LIBS$ac_delim
27452build_alias!$build_alias$ac_delim
27453host_alias!$host_alias$ac_delim
27454target_alias!$target_alias$ac_delim
27455VERSION!$VERSION$ac_delim
27456SOVERSION!$SOVERSION$ac_delim
27457CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27458UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27459ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27460PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27461PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27462PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27463PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27464PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27465FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27466FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27467FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27468FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27469FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27470MACHDEP!$MACHDEP$ac_delim
27471SGI_ABI!$SGI_ABI$ac_delim
27472CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27473EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27474CC!$CC$ac_delim
27475CFLAGS!$CFLAGS$ac_delim
27476LDFLAGS!$LDFLAGS$ac_delim
27477CPPFLAGS!$CPPFLAGS$ac_delim
27478ac_ct_CC!$ac_ct_CC$ac_delim
27479EXEEXT!$EXEEXT$ac_delim
27480OBJEXT!$OBJEXT$ac_delim
27481CXX!$CXX$ac_delim
27482MAINCC!$MAINCC$ac_delim
27483CPP!$CPP$ac_delim
27484GREP!$GREP$ac_delim
27485EGREP!$EGREP$ac_delim
27486BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27487LIBRARY!$LIBRARY$ac_delim
27488LDLIBRARY!$LDLIBRARY$ac_delim
27489DLLLIBRARY!$DLLLIBRARY$ac_delim
27490BLDLIBRARY!$BLDLIBRARY$ac_delim
27491LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27492INSTSONAME!$INSTSONAME$ac_delim
27493RUNSHARED!$RUNSHARED$ac_delim
27494LINKCC!$LINKCC$ac_delim
27495GNULD!$GNULD$ac_delim
27496RANLIB!$RANLIB$ac_delim
27497AR!$AR$ac_delim
27498ARFLAGS!$ARFLAGS$ac_delim
27499SVNVERSION!$SVNVERSION$ac_delim
27500INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27501INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27502INSTALL_DATA!$INSTALL_DATA$ac_delim
27503LN!$LN$ac_delim
27504OPT!$OPT$ac_delim
27505BASECFLAGS!$BASECFLAGS$ac_delim
27506UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27507OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27508LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27509SO!$SO$ac_delim
27510LDSHARED!$LDSHARED$ac_delim
27511BLDSHARED!$BLDSHARED$ac_delim
27512CCSHARED!$CCSHARED$ac_delim
27513LINKFORSHARED!$LINKFORSHARED$ac_delim
27514CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27515_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027516
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027517 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027518 break
27519 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027520 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27521echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027522 { (exit 1); exit 1; }; }
27523 else
27524 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027525 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027526done
27527
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027528ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27529if test -n "$ac_eof"; then
27530 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27531 ac_eof=`expr $ac_eof + 1`
27532fi
27533
27534cat >>$CONFIG_STATUS <<_ACEOF
27535cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27536/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027537_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027538sed '
27539s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27540s/^/s,@/; s/!/@,|#_!!_#|/
27541:n
27542t n
27543s/'"$ac_delim"'$/,g/; t
27544s/$/\\/; p
27545N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27546' >>$CONFIG_STATUS <conf$$subs.sed
27547rm -f conf$$subs.sed
27548cat >>$CONFIG_STATUS <<_ACEOF
27549CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027550_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027551
27552
27553ac_delim='%!_!# '
27554for ac_last_try in false false false false false :; do
27555 cat >conf$$subs.sed <<_ACEOF
27556SHLIBS!$SHLIBS$ac_delim
27557USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27558SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27559USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27560LDLAST!$LDLAST$ac_delim
27561THREADOBJ!$THREADOBJ$ac_delim
27562DLINCLDIR!$DLINCLDIR$ac_delim
27563DYNLOADFILE!$DYNLOADFILE$ac_delim
27564MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27565TRUE!$TRUE$ac_delim
27566LIBOBJS!$LIBOBJS$ac_delim
27567HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27568HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27569HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27570HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27571HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27572LIBM!$LIBM$ac_delim
27573LIBC!$LIBC$ac_delim
27574THREADHEADERS!$THREADHEADERS$ac_delim
27575SRCDIRS!$SRCDIRS$ac_delim
27576LTLIBOBJS!$LTLIBOBJS$ac_delim
27577_ACEOF
27578
27579 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27580 break
27581 elif $ac_last_try; then
27582 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27583echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027584 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027585 else
27586 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27587 fi
27588done
27589
27590ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27591if test -n "$ac_eof"; then
27592 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27593 ac_eof=`expr $ac_eof + 1`
27594fi
27595
27596cat >>$CONFIG_STATUS <<_ACEOF
27597cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27598/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027599_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027600sed '
27601s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27602s/^/s,@/; s/!/@,|#_!!_#|/
27603:n
27604t n
27605s/'"$ac_delim"'$/,g/; t
27606s/$/\\/; p
27607N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27608' >>$CONFIG_STATUS <conf$$subs.sed
27609rm -f conf$$subs.sed
27610cat >>$CONFIG_STATUS <<_ACEOF
27611:end
27612s/|#_!!_#|//g
27613CEOF$ac_eof
27614_ACEOF
27615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027616
27617# VPATH may cause trouble with some makes, so we remove $(srcdir),
27618# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27619# trailing colons and then remove the whole line if VPATH becomes empty
27620# (actually we leave an empty line to preserve line numbers).
27621if test "x$srcdir" = x.; then
27622 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27623s/:*\$(srcdir):*/:/
27624s/:*\${srcdir}:*/:/
27625s/:*@srcdir@:*/:/
27626s/^\([^=]*=[ ]*\):*/\1/
27627s/:*$//
27628s/^[^=]*=[ ]*$//
27629}'
27630fi
27631
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027632cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027633fi # test -n "$CONFIG_FILES"
27634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027635
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027636for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027637do
27638 case $ac_tag in
27639 :[FHLC]) ac_mode=$ac_tag; continue;;
27640 esac
27641 case $ac_mode$ac_tag in
27642 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027643 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27644echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027645 { (exit 1); exit 1; }; };;
27646 :[FH]-) ac_tag=-:-;;
27647 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27648 esac
27649 ac_save_IFS=$IFS
27650 IFS=:
27651 set x $ac_tag
27652 IFS=$ac_save_IFS
27653 shift
27654 ac_file=$1
27655 shift
27656
27657 case $ac_mode in
27658 :L) ac_source=$1;;
27659 :[FH])
27660 ac_file_inputs=
27661 for ac_f
27662 do
27663 case $ac_f in
27664 -) ac_f="$tmp/stdin";;
27665 *) # Look for the file first in the build tree, then in the source tree
27666 # (if the path is not absolute). The absolute path cannot be DOS-style,
27667 # because $ac_f cannot contain `:'.
27668 test -f "$ac_f" ||
27669 case $ac_f in
27670 [\\/$]*) false;;
27671 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27672 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027673 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27674echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027675 { (exit 1); exit 1; }; };;
27676 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027677 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027678 done
27679
27680 # Let's still pretend it is `configure' which instantiates (i.e., don't
27681 # use $as_me), people would be surprised to read:
27682 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027683 configure_input="Generated from "`IFS=:
27684 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027685 if test x"$ac_file" != x-; then
27686 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027687 { echo "$as_me:$LINENO: creating $ac_file" >&5
27688echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027689 fi
27690
27691 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027692 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027693 esac
27694 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027695 esac
27696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027697 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027698$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027699 X"$ac_file" : 'X\(//\)[^/]' \| \
27700 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027701 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027702echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027703 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27704 s//\1/
27705 q
27706 }
27707 /^X\(\/\/\)[^/].*/{
27708 s//\1/
27709 q
27710 }
27711 /^X\(\/\/\)$/{
27712 s//\1/
27713 q
27714 }
27715 /^X\(\/\).*/{
27716 s//\1/
27717 q
27718 }
27719 s/.*/./; q'`
27720 { as_dir="$ac_dir"
27721 case $as_dir in #(
27722 -*) as_dir=./$as_dir;;
27723 esac
27724 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027725 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027726 while :; do
27727 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027728 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027729 *) as_qdir=$as_dir;;
27730 esac
27731 as_dirs="'$as_qdir' $as_dirs"
27732 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027733$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027734 X"$as_dir" : 'X\(//\)[^/]' \| \
27735 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027736 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027737echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027738 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27739 s//\1/
27740 q
27741 }
27742 /^X\(\/\/\)[^/].*/{
27743 s//\1/
27744 q
27745 }
27746 /^X\(\/\/\)$/{
27747 s//\1/
27748 q
27749 }
27750 /^X\(\/\).*/{
27751 s//\1/
27752 q
27753 }
27754 s/.*/./; q'`
27755 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027757 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027758 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27759echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027760 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027761 ac_builddir=.
27762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027763case "$ac_dir" in
27764.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27765*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027766 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027767 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027768 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027769 case $ac_top_builddir_sub in
27770 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27771 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27772 esac ;;
27773esac
27774ac_abs_top_builddir=$ac_pwd
27775ac_abs_builddir=$ac_pwd$ac_dir_suffix
27776# for backward compatibility:
27777ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027778
27779case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027780 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027781 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027782 ac_top_srcdir=$ac_top_builddir_sub
27783 ac_abs_top_srcdir=$ac_pwd ;;
27784 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027785 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027786 ac_top_srcdir=$srcdir
27787 ac_abs_top_srcdir=$srcdir ;;
27788 *) # Relative name.
27789 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27790 ac_top_srcdir=$ac_top_build_prefix$srcdir
27791 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027792esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027793ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027794
Martin v. Löwis11437992002-04-12 09:54:03 +000027795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027796 case $ac_mode in
27797 :F)
27798 #
27799 # CONFIG_FILE
27800 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027801
27802 case $INSTALL in
27803 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027804 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027805 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027806_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027807
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027808cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027809# If the template does not know about datarootdir, expand it.
27810# FIXME: This hack should be removed a few years after 2.60.
27811ac_datarootdir_hack=; ac_datarootdir_seen=
27812
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027813case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027814 p
27815 q
27816}
27817/@datadir@/p
27818/@docdir@/p
27819/@infodir@/p
27820/@localedir@/p
27821/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027822' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027823*datarootdir*) ac_datarootdir_seen=yes;;
27824*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027825 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27826echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027827_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027828cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027829 ac_datarootdir_hack='
27830 s&@datadir@&$datadir&g
27831 s&@docdir@&$docdir&g
27832 s&@infodir@&$infodir&g
27833 s&@localedir@&$localedir&g
27834 s&@mandir@&$mandir&g
27835 s&\\\${datarootdir}&$datarootdir&g' ;;
27836esac
27837_ACEOF
27838
27839# Neutralize VPATH when `$srcdir' = `.'.
27840# Shell code in configure.ac might set extrasub.
27841# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027842cat >>$CONFIG_STATUS <<_ACEOF
27843 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027844$extrasub
27845_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027846cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027847:t
27848/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027849s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027850s&@top_builddir@&$ac_top_builddir_sub&;t t
27851s&@srcdir@&$ac_srcdir&;t t
27852s&@abs_srcdir@&$ac_abs_srcdir&;t t
27853s&@top_srcdir@&$ac_top_srcdir&;t t
27854s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27855s&@builddir@&$ac_builddir&;t t
27856s&@abs_builddir@&$ac_abs_builddir&;t t
27857s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27858s&@INSTALL@&$ac_INSTALL&;t t
27859$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027860" $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 +000027861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027862test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27863 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27864 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027865 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027866which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027867echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027868which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027870 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027871 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027872 -) cat "$tmp/out"; rm -f "$tmp/out";;
27873 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27874 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875 ;;
27876 :H)
27877 #
27878 # CONFIG_HEADER
27879 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027880_ACEOF
27881
27882# Transform confdefs.h into a sed script `conftest.defines', that
27883# substitutes the proper values into config.h.in to produce config.h.
27884rm -f conftest.defines conftest.tail
27885# First, append a space to every undef/define line, to ease matching.
27886echo 's/$/ /' >conftest.defines
27887# Then, protect against being on the right side of a sed subst, or in
27888# an unquoted here document, in config.status. If some macros were
27889# called several times there might be several #defines for the same
27890# symbol, which is useless. But do not sort them, since the last
27891# AC_DEFINE must be honored.
27892ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27893# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27894# NAME is the cpp macro being defined, VALUE is the value it is being given.
27895# PARAMS is the parameter list in the macro definition--in most cases, it's
27896# just an empty string.
27897ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27898ac_dB='\\)[ (].*,\\1define\\2'
27899ac_dC=' '
27900ac_dD=' ,'
27901
27902uniq confdefs.h |
27903 sed -n '
27904 t rset
27905 :rset
27906 s/^[ ]*#[ ]*define[ ][ ]*//
27907 t ok
27908 d
27909 :ok
27910 s/[\\&,]/\\&/g
27911 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27912 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27913 ' >>conftest.defines
27914
27915# Remove the space that was appended to ease matching.
27916# Then replace #undef with comments. This is necessary, for
27917# example, in the case of _POSIX_SOURCE, which is predefined and required
27918# on some systems where configure will not decide to define it.
27919# (The regexp can be short, since the line contains either #define or #undef.)
27920echo 's/ $//
27921s,^[ #]*u.*,/* & */,' >>conftest.defines
27922
27923# Break up conftest.defines:
27924ac_max_sed_lines=50
27925
27926# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27927# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27928# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27929# et cetera.
27930ac_in='$ac_file_inputs'
27931ac_out='"$tmp/out1"'
27932ac_nxt='"$tmp/out2"'
27933
27934while :
27935do
27936 # Write a here document:
27937 cat >>$CONFIG_STATUS <<_ACEOF
27938 # First, check the format of the line:
27939 cat >"\$tmp/defines.sed" <<\\CEOF
27940/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27941/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27942b
27943:def
27944_ACEOF
27945 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27946 echo 'CEOF
27947 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27948 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27949 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27950 grep . conftest.tail >/dev/null || break
27951 rm -f conftest.defines
27952 mv conftest.tail conftest.defines
27953done
27954rm -f conftest.defines conftest.tail
27955
27956echo "ac_result=$ac_in" >>$CONFIG_STATUS
27957cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027958 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027959 echo "/* $configure_input */" >"$tmp/config.h"
27960 cat "$ac_result" >>"$tmp/config.h"
27961 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27962 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27963echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027964 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027965 rm -f $ac_file
27966 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027967 fi
27968 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027969 echo "/* $configure_input */"
27970 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027971 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027972 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027973 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027975
27976 esac
27977
27978done # for ac_tag
27979
Guido van Rossum627b2d71993-12-24 10:39:16 +000027980
Martin v. Löwis11437992002-04-12 09:54:03 +000027981{ (exit 0); exit 0; }
27982_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027983chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027984ac_clean_files=$ac_clean_files_save
27985
27986
27987# configure is writing to config.log, and then calls config.status.
27988# config.status does its own redirection, appending to config.log.
27989# Unfortunately, on DOS this fails, as config.log is still kept open
27990# by configure, so config.status won't be able to write to it; its
27991# output is simply discarded. So we exec the FD to /dev/null,
27992# effectively closing config.log, so it can be properly (re)opened and
27993# appended to by config.status. When coming back to configure, we
27994# need to make the FD available again.
27995if test "$no_create" != yes; then
27996 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027997 ac_config_status_args=
27998 test "$silent" = yes &&
27999 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028000 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028001 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028002 exec 5>>config.log
28003 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28004 # would make configure fail if this is the last instruction.
28005 $ac_cs_success || { (exit 1); exit 1; }
28006fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028007
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028008
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028009echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028010if test ! -f Modules/Setup
28011then
28012 cp $srcdir/Modules/Setup.dist Modules/Setup
28013fi
28014
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028015echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028016if test ! -f Modules/Setup.local
28017then
28018 echo "# Edit this file for local setup changes" >Modules/Setup.local
28019fi
28020
28021echo "creating Makefile"
28022$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28023 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028024 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028025mv config.c Modules