blob: 54e147d995a3c30c5f82e3ebfa5025ce5b16610a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002# From configure.in Revision: 78156 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000718PKG_CONFIG
719LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001135# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001226 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001252\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001313 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001320 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Optional Packages:
1332 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1333 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001334 --with-universal-archs=ARCH
1335 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001336 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001337 --with-framework-name=FRAMEWORK
1338 specify an alternate name of the framework built
1339 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001340 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001341 --with-cxx-main=<compiler>
1342 compile main() and link python executable with C++
1343 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --with-suffix=.exe set executable suffix
1345 --with-pydebug build with Py_DEBUG defined
1346 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001347 --with-system-expat build pyexpat module using an installed expat
1348 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001363 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001368 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001369 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1370 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandle2e15612009-05-20 18:25:10 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001446python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001460It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001602 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705shift
1706for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Benjamin Petersond23f8222009-04-05 19:13:16 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001834VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001889{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1890echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001891# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001892if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001893 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001894 case $enableval in
1895 yes)
1896 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001897 if test ! -d "${enableval}"
1898 then
1899 enableval=/
1900 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901 ;;
1902 esac
1903 case $enableval in
1904 no)
1905 UNIVERSALSDK=
1906 enable_universalsdk=
1907 ;;
1908 *)
1909 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001910 if test ! -d "${UNIVERSALSDK}"
1911 then
1912 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1913echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1914 { (exit 1); exit 1; }; }
1915 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001916 ;;
1917 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001918
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001919
Thomas Wouters477c8d52006-05-27 19:21:47 +00001920else
1921
1922 UNIVERSALSDK=
1923 enable_universalsdk=
1924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001925fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001926
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001927if test -n "${UNIVERSALSDK}"
1928then
1929 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1930echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1931else
1932 { echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6; }
1934fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001936
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001937
1938
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001939UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001940
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001941{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1942echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943
1944# Check whether --with-universal-archs was given.
1945if test "${with_universal_archs+set}" = set; then
1946 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001947 { echo "$as_me:$LINENO: result: $withval" >&5
1948echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949 UNIVERSAL_ARCHS="$withval"
1950
1951else
1952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001953 { echo "$as_me:$LINENO: result: 32-bit" >&5
1954echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001955
1956fi
1957
1958
1959
1960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001961
1962# Check whether --with-framework-name was given.
1963if test "${with_framework_name+set}" = set; then
1964 withval=$with_framework_name;
1965 PYTHONFRAMEWORK=${withval}
1966 PYTHONFRAMEWORKDIR=${withval}.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1968
1969else
1970
1971 PYTHONFRAMEWORK=Python
1972 PYTHONFRAMEWORKDIR=Python.framework
1973 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1974
1975fi
1976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001978if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001979 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001980 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001981 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001982 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001983 esac
1984 case $enableval in
1985 no)
1986 PYTHONFRAMEWORK=
1987 PYTHONFRAMEWORKDIR=no-framework
1988 PYTHONFRAMEWORKPREFIX=
1989 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001990 FRAMEWORKINSTALLFIRST=
1991 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001992 FRAMEWORKALTINSTALLFIRST=
1993 FRAMEWORKALTINSTALLLAST=
1994 if test "x${prefix}" = "xNONE"; then
1995 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1996 else
1997 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1998 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001999 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002000 ;;
2001 *)
2002 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002004 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002005 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002046fi
2047
Thomas Wouters477c8d52006-05-27 19:21:47 +00002048
2049
Michael W. Hudson54241132001-12-07 15:38:26 +00002050
2051
2052
2053
Jack Jansene578a632001-08-15 01:27:14 +00002054
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002055
2056
2057
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002058
Jack Jansene578a632001-08-15 01:27:14 +00002059##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002060## AC_HELP_STRING(--with-dyld,
2061## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002062##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063# Set name for machine-dependent library files
2064
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002065{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2066echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002067if test -z "$MACHDEP"
2068then
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002070 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002071 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002073 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002075 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002076 ac_md_system=`echo $ac_sys_system |
2077 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2078 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002079 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002080 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002081
Guido van Rossum07397971997-04-29 21:49:50 +00002082 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002083 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002084 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002085 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002086 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002087 esac
2088fi
Guido van Rossum91922671997-10-09 20:24:13 +00002089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002090# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2091# disable features if it is defined, without any means to access these
2092# features as extensions. For these systems, we skip the definition of
2093# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2094# some feature, make sure there is no alternative way to access this
2095# feature. Also, when using wildcards, make sure you have verified the
2096# need for not defining _XOPEN_SOURCE on all systems matching the
2097# wildcard, and that the wildcard does not include future systems
2098# (which may remove their limitations).
2099case $ac_sys_system/$ac_sys_release in
2100 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2101 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002102 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002103 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002104 define_xopen_source=no
2105 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2106 # also defined. This can be overridden by defining _BSD_SOURCE
2107 # As this has a different meaning on Linux, only define it on OpenBSD
2108
2109cat >>confdefs.h <<\_ACEOF
2110#define _BSD_SOURCE 1
2111_ACEOF
2112
2113 ;;
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002114 OpenBSD/4.[4])
2115 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2116 # also defined. This can be overridden by defining _BSD_SOURCE
2117 # As this has a different meaning on Linux, only define it on OpenBSD
2118
2119cat >>confdefs.h <<\_ACEOF
2120#define _BSD_SOURCE 1
2121_ACEOF
2122
2123 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002124 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2125 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2126 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002127 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 +00002128 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002129 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2130 # of union __?sigval. Reported by Stuart Bishop.
2131 SunOS/5.6)
2132 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002133 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2134 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002135 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002136 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002137 define_xopen_source=no;;
2138 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002139 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002140 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002141 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002142 # On FreeBSD 4, the math functions C89 does not cover are never defined
2143 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2144 FreeBSD/4.*)
2145 define_xopen_source=no;;
2146 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2147 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2148 # identifies itself as Darwin/7.*
2149 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2150 # disables platform specific features beyond repair.
2151 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2152 # has no effect, don't bother defining them
2153 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002154 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002155 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2156 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2157 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002158 AIX/4)
2159 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002160 AIX/5)
2161 if test `uname -r` -eq 1; then
2162 define_xopen_source=no
2163 fi
2164 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002165 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2166 # defining NI_NUMERICHOST.
2167 QNX/6.3.2)
2168 define_xopen_source=no
2169 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002170
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002171esac
2172
2173if test $define_xopen_source = yes
2174then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002175 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2176 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002177 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2178 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002179 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002180 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002181
2182cat >>confdefs.h <<\_ACEOF
2183#define _XOPEN_SOURCE 500
2184_ACEOF
2185
2186 ;;
2187 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188
2189cat >>confdefs.h <<\_ACEOF
2190#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002191_ACEOF
2192
Skip Montanarof0d5f792004-08-15 14:08:23 +00002193 ;;
2194 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002195
2196 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2197 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2198 # several APIs are not declared. Since this is also needed in some
2199 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002200 # except for Solaris 10, where it must not be defined,
2201 # as it implies XPG4.2
2202 case $ac_sys_system/$ac_sys_release in
2203 SunOS/5.10)
2204 ;;
2205 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002206
2207cat >>confdefs.h <<\_ACEOF
2208#define _XOPEN_SOURCE_EXTENDED 1
2209_ACEOF
2210
Martin v. Löwis7dece662005-11-26 11:38:24 +00002211 ;;
2212 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002213
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002214
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002215cat >>confdefs.h <<\_ACEOF
2216#define _POSIX_C_SOURCE 200112L
2217_ACEOF
2218
2219
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002220fi
2221
Guido van Rossum91922671997-10-09 20:24:13 +00002222#
2223# SGI compilers allow the specification of the both the ABI and the
2224# ISA on the command line. Depending on the values of these switches,
2225# different and often incompatable code will be generated.
2226#
2227# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2228# thus supply support for various ABI/ISA combinations. The MACHDEP
2229# variable is also adjusted.
2230#
2231
2232if test ! -z "$SGI_ABI"
2233then
2234 CC="cc $SGI_ABI"
2235 LDFLAGS="$SGI_ABI $LDFLAGS"
2236 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2237fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002238{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2239echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002240
Jack Jansen6b08a402004-06-03 12:41:45 +00002241# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2242# it may influence the way we can build extensions, so distutils
2243# needs to check it
2244
Thomas Wouters477c8d52006-05-27 19:21:47 +00002245
Jack Jansen6b08a402004-06-03 12:41:45 +00002246CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002247EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002248
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002249{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2250echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002251ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002252{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2253echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002254
Guido van Rossum627b2d71993-12-24 10:39:16 +00002255# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002256
2257# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2258# for debug/optimization stuff. BASECFLAGS is for flags that are required
2259# just to get things to compile and link. Users are free to override OPT
2260# when running configure or make. The build should not break if they do.
2261# BASECFLAGS should generally not be messed with, however.
2262
2263# XXX shouldn't some/most/all of this code be merged with the stuff later
2264# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002265{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2266echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002268# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002269if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002270 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002271 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002272 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002273 without_gcc=yes;;
2274 yes) CC=gcc
2275 without_gcc=no;;
2276 *) CC=$withval
2277 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002278 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002279else
Martin v. Löwis11437992002-04-12 09:54:03 +00002280
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002281 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002282 AIX*) CC=cc_r
2283 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002284 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002285 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002286fi
2287
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002288{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2289echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002290
Guido van Rossum8b131c51995-03-09 14:10:13 +00002291# If the user switches compilers, we can't believe the cache
2292if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2293then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002294 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002295(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002296echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002297(it is also a good idea to do 'make clean' before compiling)" >&2;}
2298 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002299fi
2300
Martin v. Löwis11437992002-04-12 09:54:03 +00002301ac_ext=c
2302ac_cpp='$CPP $CPPFLAGS'
2303ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2304ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2305ac_compiler_gnu=$ac_cv_c_compiler_gnu
2306if test -n "$ac_tool_prefix"; then
2307 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2308set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002309{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2310echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002311if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002313else
2314 if test -n "$CC"; then
2315 ac_cv_prog_CC="$CC" # Let the user override the test.
2316else
Martin v. Löwis11437992002-04-12 09:54:03 +00002317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2318for as_dir in $PATH
2319do
2320 IFS=$as_save_IFS
2321 test -z "$as_dir" && as_dir=.
2322 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002323 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 +00002324 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002325 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002326 break 2
2327 fi
2328done
2329done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002330IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002331
Jack Jansendd19cf82001-12-06 22:36:17 +00002332fi
2333fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002334CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002335if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002336 { echo "$as_me:$LINENO: result: $CC" >&5
2337echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002338else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002339 { echo "$as_me:$LINENO: result: no" >&5
2340echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002341fi
2342
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343
Martin v. Löwis11437992002-04-12 09:54:03 +00002344fi
2345if test -z "$ac_cv_prog_CC"; then
2346 ac_ct_CC=$CC
2347 # Extract the first word of "gcc", so it can be a program name with args.
2348set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002349{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2350echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002351if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002352 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002353else
2354 if test -n "$ac_ct_CC"; then
2355 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2356else
2357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2358for as_dir in $PATH
2359do
2360 IFS=$as_save_IFS
2361 test -z "$as_dir" && as_dir=.
2362 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363 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 +00002364 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002365 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002366 break 2
2367 fi
2368done
2369done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
2372fi
2373fi
2374ac_ct_CC=$ac_cv_prog_ac_ct_CC
2375if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002376 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2377echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002378else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002379 { echo "$as_me:$LINENO: result: no" >&5
2380echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002381fi
2382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383 if test "x$ac_ct_CC" = x; then
2384 CC=""
2385 else
2386 case $cross_compiling:$ac_tool_warned in
2387yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002388{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2389whose name does not start with the host triplet. If you think this
2390configuration is useful to you, please write to autoconf@gnu.org." >&5
2391echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2392whose name does not start with the host triplet. If you think this
2393configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394ac_tool_warned=yes ;;
2395esac
2396 CC=$ac_ct_CC
2397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002398else
2399 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002400fi
2401
Jack Jansendd19cf82001-12-06 22:36:17 +00002402if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 if test -n "$ac_tool_prefix"; then
2404 # 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 +00002405set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002406{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2407echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002409 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002410else
2411 if test -n "$CC"; then
2412 ac_cv_prog_CC="$CC" # Let the user override the test.
2413else
Martin v. Löwis11437992002-04-12 09:54:03 +00002414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2415for as_dir in $PATH
2416do
2417 IFS=$as_save_IFS
2418 test -z "$as_dir" && as_dir=.
2419 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002420 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 +00002421 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002422 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002423 break 2
2424 fi
2425done
2426done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002427IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429fi
2430fi
2431CC=$ac_cv_prog_CC
2432if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002433 { echo "$as_me:$LINENO: result: $CC" >&5
2434echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002436 { echo "$as_me:$LINENO: result: no" >&5
2437echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002438fi
2439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002442fi
2443if test -z "$CC"; then
2444 # Extract the first word of "cc", so it can be a program name with args.
2445set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002446{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2447echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002448if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002449 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002450else
2451 if test -n "$CC"; then
2452 ac_cv_prog_CC="$CC" # Let the user override the test.
2453else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002454 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2456for as_dir in $PATH
2457do
2458 IFS=$as_save_IFS
2459 test -z "$as_dir" && as_dir=.
2460 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 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 +00002462 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2463 ac_prog_rejected=yes
2464 continue
2465 fi
2466 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002467 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 break 2
2469 fi
2470done
2471done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002473
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002474if test $ac_prog_rejected = yes; then
2475 # We found a bogon in the path, so make sure we never use it.
2476 set dummy $ac_cv_prog_CC
2477 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002479 # We chose a different compiler from the bogus one.
2480 # However, it has the same basename, so the bogon will be chosen
2481 # first if we set CC to just the basename; use the full file name.
2482 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002484 fi
2485fi
2486fi
2487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002488CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002489if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002490 { echo "$as_me:$LINENO: result: $CC" >&5
2491echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002492else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002493 { echo "$as_me:$LINENO: result: no" >&5
2494echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002495fi
2496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497
Martin v. Löwis11437992002-04-12 09:54:03 +00002498fi
2499if test -z "$CC"; then
2500 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 do
2503 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2504set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002505{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2506echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002508 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002509else
2510 if test -n "$CC"; then
2511 ac_cv_prog_CC="$CC" # Let the user override the test.
2512else
Martin v. Löwis11437992002-04-12 09:54:03 +00002513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2514for as_dir in $PATH
2515do
2516 IFS=$as_save_IFS
2517 test -z "$as_dir" && as_dir=.
2518 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 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 +00002520 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002521 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002523 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002524done
2525done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002527
2528fi
2529fi
2530CC=$ac_cv_prog_CC
2531if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002532 { echo "$as_me:$LINENO: result: $CC" >&5
2533echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002534else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002535 { echo "$as_me:$LINENO: result: no" >&5
2536echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002537fi
2538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 test -n "$CC" && break
2541 done
2542fi
2543if test -z "$CC"; then
2544 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002546do
2547 # Extract the first word of "$ac_prog", so it can be a program name with args.
2548set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002549{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2550echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002551if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002552 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002553else
2554 if test -n "$ac_ct_CC"; then
2555 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2556else
2557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2558for as_dir in $PATH
2559do
2560 IFS=$as_save_IFS
2561 test -z "$as_dir" && as_dir=.
2562 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 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 +00002564 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002565 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 break 2
2567 fi
2568done
2569done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572fi
2573fi
2574ac_ct_CC=$ac_cv_prog_ac_ct_CC
2575if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002576 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2577echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002578else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002579 { echo "$as_me:$LINENO: result: no" >&5
2580echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002581fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 test -n "$ac_ct_CC" && break
2585done
Michael W. Hudson54241132001-12-07 15:38:26 +00002586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 if test "x$ac_ct_CC" = x; then
2588 CC=""
2589 else
2590 case $cross_compiling:$ac_tool_warned in
2591yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002592{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2593whose name does not start with the host triplet. If you think this
2594configuration is useful to you, please write to autoconf@gnu.org." >&5
2595echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2596whose name does not start with the host triplet. If you think this
2597configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598ac_tool_warned=yes ;;
2599esac
2600 CC=$ac_ct_CC
2601 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002602fi
2603
2604fi
2605
2606
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002607test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002608See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002609echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002610See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002611 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002612
2613# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614echo "$as_me:$LINENO: checking for C compiler version" >&5
2615ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616{ (ac_try="$ac_compiler --version >&5"
2617case "(($ac_try" in
2618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2619 *) ac_try_echo=$ac_try;;
2620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626{ (ac_try="$ac_compiler -v >&5"
2627case "(($ac_try" in
2628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2629 *) ac_try_echo=$ac_try;;
2630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636{ (ac_try="$ac_compiler -V >&5"
2637case "(($ac_try" in
2638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2639 *) ac_try_echo=$ac_try;;
2640esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 (exit $ac_status); }
2646
2647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002648/* confdefs.h. */
2649_ACEOF
2650cat confdefs.h >>conftest.$ac_ext
2651cat >>conftest.$ac_ext <<_ACEOF
2652/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654int
2655main ()
2656{
2657
2658 ;
2659 return 0;
2660}
2661_ACEOF
2662ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002663ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002664# Try to create an executable without -o first, disregard a.out.
2665# It will help us diagnose broken compilers, and finding out an intuition
2666# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002667{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2668echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2669ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2670#
2671# List of possible output files, starting from the most likely.
2672# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2673# only as a last resort. b.out is created by i960 compilers.
2674ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2675#
2676# The IRIX 6 linker writes into existing files which may not be
2677# executable, retaining their permissions. Remove them first so a
2678# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679ac_rmfiles=
2680for ac_file in $ac_files
2681do
2682 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002683 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2685 esac
2686done
2687rm -f $ac_rmfiles
2688
2689if { (ac_try="$ac_link_default"
2690case "(($ac_try" in
2691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2692 *) ac_try_echo=$ac_try;;
2693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2700# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2701# in a Makefile. We should not override ac_cv_exeext if it was cached,
2702# so that the user can short-circuit this test for compilers unknown to
2703# Autoconf.
2704for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002705do
2706 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002708 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002709 ;;
2710 [ab].out )
2711 # We found the default executable, but exeext='' is most
2712 # certainly right.
2713 break;;
2714 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2716 then :; else
2717 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2718 fi
2719 # We set ac_cv_exeext here because the later test for it is not
2720 # safe: cross compilers may not add the suffix if given an `-o'
2721 # argument, so we may need to know it at that point already.
2722 # Even if this section looks crufty: it has the advantage of
2723 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002724 break;;
2725 * )
2726 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 esac
2728done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002729test "$ac_cv_exeext" = no && ac_cv_exeext=
2730
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002731else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002732 ac_file=''
2733fi
2734
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002735{ echo "$as_me:$LINENO: result: $ac_file" >&5
2736echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002739sed 's/^/| /' conftest.$ac_ext >&5
2740
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002741{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002742See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002743echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002744See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002746fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002747
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002748ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002750# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002751# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002752{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2753echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002754# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2755# If not cross compiling, check that we can run a simple program.
2756if test "$cross_compiling" != yes; then
2757 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002758 { (case "(($ac_try" in
2759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2760 *) ac_try_echo=$ac_try;;
2761esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002763 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 (exit $ac_status); }; }; then
2767 cross_compiling=no
2768 else
2769 if test "$cross_compiling" = maybe; then
2770 cross_compiling=yes
2771 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002772 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002773If you meant to cross compile, use \`--host'.
2774See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002775echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002776If you meant to cross compile, use \`--host'.
2777See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002778 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 fi
2780 fi
2781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002782{ echo "$as_me:$LINENO: result: yes" >&5
2783echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002784
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002785rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002786ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002787# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002788# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002789{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2790echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2791{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2792echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002793
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002794{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2795echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002796if { (ac_try="$ac_link"
2797case "(($ac_try" in
2798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2799 *) ac_try_echo=$ac_try;;
2800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002803 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002805 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002806 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2807# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2808# work properly (i.e., refer to `conftest.exe'), while it won't with
2809# `rm'.
2810for ac_file in conftest.exe conftest conftest.*; do
2811 test -f "$ac_file" || continue
2812 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002813 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002814 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2815 break;;
2816 * ) break;;
2817 esac
2818done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002820 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002821See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002822echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002823See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002824 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002825fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002826
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002827rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002828{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2829echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002830
2831rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002832EXEEXT=$ac_cv_exeext
2833ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002834{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2835echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002836if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002837 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002838else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002839 cat >conftest.$ac_ext <<_ACEOF
2840/* confdefs.h. */
2841_ACEOF
2842cat confdefs.h >>conftest.$ac_ext
2843cat >>conftest.$ac_ext <<_ACEOF
2844/* end confdefs.h. */
2845
2846int
2847main ()
2848{
2849
2850 ;
2851 return 0;
2852}
2853_ACEOF
2854rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002855if { (ac_try="$ac_compile"
2856case "(($ac_try" in
2857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2858 *) ac_try_echo=$ac_try;;
2859esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002864 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002865 for ac_file in conftest.o conftest.obj conftest.*; do
2866 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002868 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002869 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2870 break;;
2871 esac
2872done
2873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002875sed 's/^/| /' conftest.$ac_ext >&5
2876
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002877{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002878See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002879echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002880See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002881 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002882fi
2883
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002884rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002885fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002886{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2887echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002888OBJEXT=$ac_cv_objext
2889ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002890{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2891echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002892if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002893 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002894else
2895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002896/* confdefs.h. */
2897_ACEOF
2898cat confdefs.h >>conftest.$ac_ext
2899cat >>conftest.$ac_ext <<_ACEOF
2900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002901
Martin v. Löwis11437992002-04-12 09:54:03 +00002902int
2903main ()
2904{
2905#ifndef __GNUC__
2906 choke me
2907#endif
2908
2909 ;
2910 return 0;
2911}
2912_ACEOF
2913rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002914if { (ac_try="$ac_compile"
2915case "(($ac_try" in
2916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2917 *) ac_try_echo=$ac_try;;
2918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002922 grep -v '^ *+' conftest.er1 >conftest.err
2923 rm -f conftest.er1
2924 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002926 (exit $ac_status); } && {
2927 test -z "$ac_c_werror_flag" ||
2928 test ! -s conftest.err
2929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002930 ac_compiler_gnu=yes
2931else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002933sed 's/^/| /' conftest.$ac_ext >&5
2934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002935 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002937
2938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002939ac_cv_c_compiler_gnu=$ac_compiler_gnu
2940
2941fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002942{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2943echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2944GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002945ac_test_CFLAGS=${CFLAGS+set}
2946ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002947{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2948echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002949if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002950 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002951else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002952 ac_save_c_werror_flag=$ac_c_werror_flag
2953 ac_c_werror_flag=yes
2954 ac_cv_prog_cc_g=no
2955 CFLAGS="-g"
2956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002957/* confdefs.h. */
2958_ACEOF
2959cat confdefs.h >>conftest.$ac_ext
2960cat >>conftest.$ac_ext <<_ACEOF
2961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
Martin v. Löwis11437992002-04-12 09:54:03 +00002963int
2964main ()
2965{
2966
2967 ;
2968 return 0;
2969}
2970_ACEOF
2971rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002972if { (ac_try="$ac_compile"
2973case "(($ac_try" in
2974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2975 *) ac_try_echo=$ac_try;;
2976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002980 grep -v '^ *+' conftest.er1 >conftest.err
2981 rm -f conftest.er1
2982 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002984 (exit $ac_status); } && {
2985 test -z "$ac_c_werror_flag" ||
2986 test ! -s conftest.err
2987 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002988 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002991sed 's/^/| /' conftest.$ac_ext >&5
2992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002993 CFLAGS=""
2994 cat >conftest.$ac_ext <<_ACEOF
2995/* confdefs.h. */
2996_ACEOF
2997cat confdefs.h >>conftest.$ac_ext
2998cat >>conftest.$ac_ext <<_ACEOF
2999/* end confdefs.h. */
3000
3001int
3002main ()
3003{
3004
3005 ;
3006 return 0;
3007}
3008_ACEOF
3009rm -f conftest.$ac_objext
3010if { (ac_try="$ac_compile"
3011case "(($ac_try" in
3012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3013 *) ac_try_echo=$ac_try;;
3014esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016 (eval "$ac_compile") 2>conftest.er1
3017 ac_status=$?
3018 grep -v '^ *+' conftest.er1 >conftest.err
3019 rm -f conftest.er1
3020 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022 (exit $ac_status); } && {
3023 test -z "$ac_c_werror_flag" ||
3024 test ! -s conftest.err
3025 } && test -s conftest.$ac_objext; then
3026 :
3027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003028 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003029sed 's/^/| /' conftest.$ac_ext >&5
3030
3031 ac_c_werror_flag=$ac_save_c_werror_flag
3032 CFLAGS="-g"
3033 cat >conftest.$ac_ext <<_ACEOF
3034/* confdefs.h. */
3035_ACEOF
3036cat confdefs.h >>conftest.$ac_ext
3037cat >>conftest.$ac_ext <<_ACEOF
3038/* end confdefs.h. */
3039
3040int
3041main ()
3042{
3043
3044 ;
3045 return 0;
3046}
3047_ACEOF
3048rm -f conftest.$ac_objext
3049if { (ac_try="$ac_compile"
3050case "(($ac_try" in
3051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3052 *) ac_try_echo=$ac_try;;
3053esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055 (eval "$ac_compile") 2>conftest.er1
3056 ac_status=$?
3057 grep -v '^ *+' conftest.er1 >conftest.err
3058 rm -f conftest.er1
3059 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061 (exit $ac_status); } && {
3062 test -z "$ac_c_werror_flag" ||
3063 test ! -s conftest.err
3064 } && test -s conftest.$ac_objext; then
3065 ac_cv_prog_cc_g=yes
3066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003067 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068sed 's/^/| /' conftest.$ac_ext >&5
3069
3070
Guido van Rossum627b2d71993-12-24 10:39:16 +00003071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003072
3073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003075
3076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3077fi
3078
3079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3080 ac_c_werror_flag=$ac_save_c_werror_flag
3081fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003082{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3083echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003084if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003085 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003086elif test $ac_cv_prog_cc_g = yes; then
3087 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003088 CFLAGS="-g -O2"
3089 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003090 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003091 fi
3092else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003093 if test "$GCC" = yes; then
3094 CFLAGS="-O2"
3095 else
3096 CFLAGS=
3097 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003098fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003099{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3100echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003101if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003102 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003103else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003105ac_save_CC=$CC
3106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003107/* confdefs.h. */
3108_ACEOF
3109cat confdefs.h >>conftest.$ac_ext
3110cat >>conftest.$ac_ext <<_ACEOF
3111/* end confdefs.h. */
3112#include <stdarg.h>
3113#include <stdio.h>
3114#include <sys/types.h>
3115#include <sys/stat.h>
3116/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3117struct buf { int x; };
3118FILE * (*rcsopen) (struct buf *, struct stat *, int);
3119static char *e (p, i)
3120 char **p;
3121 int i;
3122{
3123 return p[i];
3124}
3125static char *f (char * (*g) (char **, int), char **p, ...)
3126{
3127 char *s;
3128 va_list v;
3129 va_start (v,p);
3130 s = g (p, va_arg (v,int));
3131 va_end (v);
3132 return s;
3133}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003134
3135/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3136 function prototypes and stuff, but not '\xHH' hex character constants.
3137 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003139 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3140 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003142int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003144/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3145 inside strings and character constants. */
3146#define FOO(x) 'x'
3147int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3148
Skip Montanaro6dead952003-09-25 14:50:04 +00003149int test (int i, double x);
3150struct s1 {int (*f) (int a);};
3151struct s2 {int (*f) (double a);};
3152int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3153int argc;
3154char **argv;
3155int
3156main ()
3157{
3158return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3159 ;
3160 return 0;
3161}
3162_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3164 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003165do
3166 CC="$ac_save_CC $ac_arg"
3167 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168if { (ac_try="$ac_compile"
3169case "(($ac_try" in
3170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3171 *) ac_try_echo=$ac_try;;
3172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003176 grep -v '^ *+' conftest.er1 >conftest.err
3177 rm -f conftest.er1
3178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180 (exit $ac_status); } && {
3181 test -z "$ac_c_werror_flag" ||
3182 test ! -s conftest.err
3183 } && test -s conftest.$ac_objext; then
3184 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003187sed 's/^/| /' conftest.$ac_ext >&5
3188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189
Skip Montanaro6dead952003-09-25 14:50:04 +00003190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191
3192rm -f core conftest.err conftest.$ac_objext
3193 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003194done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003196CC=$ac_save_CC
3197
3198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199# AC_CACHE_VAL
3200case "x$ac_cv_prog_cc_c89" in
3201 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003202 { echo "$as_me:$LINENO: result: none needed" >&5
3203echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003205 { echo "$as_me:$LINENO: result: unsupported" >&5
3206echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003207 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003209 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3210echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003211esac
3212
Skip Montanaro6dead952003-09-25 14:50:04 +00003213
Martin v. Löwis11437992002-04-12 09:54:03 +00003214ac_ext=c
3215ac_cpp='$CPP $CPPFLAGS'
3216ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3217ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3218ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003219
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003220
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003221
3222
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003223{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3224echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003227if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229
3230 case $withval in
3231 no) with_cxx_main=no
3232 MAINCC='$(CC)';;
3233 yes) with_cxx_main=yes
3234 MAINCC='$(CXX)';;
3235 *) with_cxx_main=yes
3236 MAINCC=$withval
3237 if test -z "$CXX"
3238 then
3239 CXX=$withval
3240 fi;;
3241 esac
3242else
3243
3244 with_cxx_main=no
3245 MAINCC='$(CC)'
3246
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003247fi
3248
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003249{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3250echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003251
3252preset_cxx="$CXX"
3253if test -z "$CXX"
3254then
3255 case "$CC" in
3256 gcc) # Extract the first word of "g++", so it can be a program name with args.
3257set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003258{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3259echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003260if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003261 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003262else
3263 case $CXX in
3264 [\\/]* | ?:[\\/]*)
3265 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3266 ;;
3267 *)
3268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3269for as_dir in notfound
3270do
3271 IFS=$as_save_IFS
3272 test -z "$as_dir" && as_dir=.
3273 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003274 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 +00003275 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003276 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003277 break 2
3278 fi
3279done
3280done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003281IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003282
3283 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3284 ;;
3285esac
3286fi
3287CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003288if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003289 { echo "$as_me:$LINENO: result: $CXX" >&5
3290echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003292 { echo "$as_me:$LINENO: result: no" >&5
3293echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003296 ;;
3297 cc) # Extract the first word of "c++", so it can be a program name with args.
3298set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003299{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003301if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003302 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003303else
3304 case $CXX in
3305 [\\/]* | ?:[\\/]*)
3306 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3307 ;;
3308 *)
3309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3310for as_dir in notfound
3311do
3312 IFS=$as_save_IFS
3313 test -z "$as_dir" && as_dir=.
3314 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003315 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 +00003316 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003317 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003318 break 2
3319 fi
3320done
3321done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003322IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003323
3324 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3325 ;;
3326esac
3327fi
3328CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003329if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003330 { echo "$as_me:$LINENO: result: $CXX" >&5
3331echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003332else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003333 { echo "$as_me:$LINENO: result: no" >&5
3334echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003336
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003337 ;;
3338 esac
3339 if test "$CXX" = "notfound"
3340 then
3341 CXX=""
3342 fi
3343fi
3344if test -z "$CXX"
3345then
3346 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3347do
3348 # Extract the first word of "$ac_prog", so it can be a program name with args.
3349set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003350{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3351echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003352if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003353 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003354else
3355 if test -n "$CXX"; then
3356 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3357else
3358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3359for as_dir in $PATH
3360do
3361 IFS=$as_save_IFS
3362 test -z "$as_dir" && as_dir=.
3363 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003364 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 +00003365 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003366 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003367 break 2
3368 fi
3369done
3370done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003372
3373fi
3374fi
3375CXX=$ac_cv_prog_CXX
3376if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003377 { echo "$as_me:$LINENO: result: $CXX" >&5
3378echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003379else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003380 { echo "$as_me:$LINENO: result: no" >&5
3381echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003382fi
3383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003384
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003385 test -n "$CXX" && break
3386done
3387test -n "$CXX" || CXX="notfound"
3388
3389 if test "$CXX" = "notfound"
3390 then
3391 CXX=""
3392 fi
3393fi
3394if test "$preset_cxx" != "$CXX"
3395then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003396 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003397
3398 By default, distutils will build C++ extension modules with \"$CXX\".
3399 If this is not intended, then set CXX on the configure command line.
3400 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003401echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003402
3403 By default, distutils will build C++ extension modules with \"$CXX\".
3404 If this is not intended, then set CXX on the configure command line.
3405 " >&2;}
3406fi
3407
3408
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003409# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003410
3411ac_ext=c
3412ac_cpp='$CPP $CPPFLAGS'
3413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3415ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003416{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3417echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003418# On Suns, sometimes $CPP names a directory.
3419if test -n "$CPP" && test -d "$CPP"; then
3420 CPP=
3421fi
3422if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003424 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003425else
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 # Double quotes because CPP needs to be expanded
3427 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3428 do
3429 ac_preproc_ok=false
3430for ac_c_preproc_warn_flag in '' yes
3431do
3432 # Use a header file that comes with gcc, so configuring glibc
3433 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003434 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3435 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003436 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 # not just through cpp. "Syntax error" is here to catch this case.
3438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003439/* confdefs.h. */
3440_ACEOF
3441cat confdefs.h >>conftest.$ac_ext
3442cat >>conftest.$ac_ext <<_ACEOF
3443/* end confdefs.h. */
3444#ifdef __STDC__
3445# include <limits.h>
3446#else
3447# include <assert.h>
3448#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003449 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451if { (ac_try="$ac_cpp conftest.$ac_ext"
3452case "(($ac_try" in
3453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3454 *) ac_try_echo=$ac_try;;
3455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003459 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 rm -f conftest.er1
3461 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 (exit $ac_status); } >/dev/null && {
3464 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3465 test ! -s conftest.err
3466 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003467 :
3468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003470sed 's/^/| /' conftest.$ac_ext >&5
3471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 # Broken: fails on valid input.
3473continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # can be detected and how.
3480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003481/* confdefs.h. */
3482_ACEOF
3483cat confdefs.h >>conftest.$ac_ext
3484cat >>conftest.$ac_ext <<_ACEOF
3485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003486#include <ac_nonexistent.h>
3487_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488if { (ac_try="$ac_cpp conftest.$ac_ext"
3489case "(($ac_try" in
3490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3491 *) ac_try_echo=$ac_try;;
3492esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003496 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003497 rm -f conftest.er1
3498 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500 (exit $ac_status); } >/dev/null && {
3501 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3502 test ! -s conftest.err
3503 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 # Broken: success on invalid input.
3505continue
3506else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003508sed 's/^/| /' conftest.$ac_ext >&5
3509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # Passes both tests.
3511ac_preproc_ok=:
3512break
3513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003514
Martin v. Löwis11437992002-04-12 09:54:03 +00003515rm -f conftest.err conftest.$ac_ext
3516
3517done
3518# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3519rm -f conftest.err conftest.$ac_ext
3520if $ac_preproc_ok; then
3521 break
3522fi
3523
3524 done
3525 ac_cv_prog_CPP=$CPP
3526
3527fi
3528 CPP=$ac_cv_prog_CPP
3529else
3530 ac_cv_prog_CPP=$CPP
3531fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003532{ echo "$as_me:$LINENO: result: $CPP" >&5
3533echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003534ac_preproc_ok=false
3535for ac_c_preproc_warn_flag in '' yes
3536do
3537 # Use a header file that comes with gcc, so configuring glibc
3538 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003539 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3540 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 # On the NeXT, cc -E runs the code through the compiler's parser,
3542 # not just through cpp. "Syntax error" is here to catch this case.
3543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003544/* confdefs.h. */
3545_ACEOF
3546cat confdefs.h >>conftest.$ac_ext
3547cat >>conftest.$ac_ext <<_ACEOF
3548/* end confdefs.h. */
3549#ifdef __STDC__
3550# include <limits.h>
3551#else
3552# include <assert.h>
3553#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003554 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556if { (ac_try="$ac_cpp conftest.$ac_ext"
3557case "(($ac_try" in
3558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3559 *) ac_try_echo=$ac_try;;
3560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003564 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 rm -f conftest.er1
3566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 (exit $ac_status); } >/dev/null && {
3569 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3570 test ! -s conftest.err
3571 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 :
3573else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003575sed 's/^/| /' conftest.$ac_ext >&5
3576
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 # Broken: fails on valid input.
3578continue
3579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580
Martin v. Löwis11437992002-04-12 09:54:03 +00003581rm -f conftest.err conftest.$ac_ext
3582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # can be detected and how.
3585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003586/* confdefs.h. */
3587_ACEOF
3588cat confdefs.h >>conftest.$ac_ext
3589cat >>conftest.$ac_ext <<_ACEOF
3590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003591#include <ac_nonexistent.h>
3592_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593if { (ac_try="$ac_cpp conftest.$ac_ext"
3594case "(($ac_try" in
3595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3596 *) ac_try_echo=$ac_try;;
3597esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003601 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 rm -f conftest.er1
3603 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605 (exit $ac_status); } >/dev/null && {
3606 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3607 test ! -s conftest.err
3608 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 # Broken: success on invalid input.
3610continue
3611else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003613sed 's/^/| /' conftest.$ac_ext >&5
3614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Passes both tests.
3616ac_preproc_ok=:
3617break
3618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619
Martin v. Löwis11437992002-04-12 09:54:03 +00003620rm -f conftest.err conftest.$ac_ext
3621
3622done
3623# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3624rm -f conftest.err conftest.$ac_ext
3625if $ac_preproc_ok; then
3626 :
3627else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003628 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003629See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003630echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003631See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003632 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003633fi
3634
3635ac_ext=c
3636ac_cpp='$CPP $CPPFLAGS'
3637ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3638ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3639ac_compiler_gnu=$ac_cv_c_compiler_gnu
3640
3641
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003642{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3643echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003645 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003646else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003647 # Extract the first word of "grep ggrep" to use in msg output
3648if test -z "$GREP"; then
3649set dummy grep ggrep; ac_prog_name=$2
3650if test "${ac_cv_path_GREP+set}" = set; then
3651 echo $ECHO_N "(cached) $ECHO_C" >&6
3652else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003654# Loop through the user's path and test for each of PROGNAME-LIST
3655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3657do
3658 IFS=$as_save_IFS
3659 test -z "$as_dir" && as_dir=.
3660 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003661 for ac_exec_ext in '' $ac_executable_extensions; do
3662 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3663 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3664 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665 # Check for GNU $ac_path_GREP
3666case `"$ac_path_GREP" --version 2>&1` in
3667*GNU*)
3668 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3669*)
3670 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003671 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 while :
3673 do
3674 cat "conftest.in" "conftest.in" >"conftest.tmp"
3675 mv "conftest.tmp" "conftest.in"
3676 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003677 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3679 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3680 ac_count=`expr $ac_count + 1`
3681 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3682 # Best one so far, save it but keep looking for a better one
3683 ac_cv_path_GREP="$ac_path_GREP"
3684 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003685 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686 # 10*(2^10) chars as input seems more than enough
3687 test $ac_count -gt 10 && break
3688 done
3689 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3690esac
3691
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003692
3693 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694 done
3695done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003696
3697done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003699
3700
3701fi
3702
3703GREP="$ac_cv_path_GREP"
3704if test -z "$GREP"; then
3705 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3706echo "$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 +00003707 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003708fi
3709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710else
3711 ac_cv_path_GREP=$GREP
3712fi
3713
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003716{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3717echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718 GREP="$ac_cv_path_GREP"
3719
3720
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003721{ echo "$as_me:$LINENO: checking for egrep" >&5
3722echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003724 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725else
3726 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3727 then ac_cv_path_EGREP="$GREP -E"
3728 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003729 # Extract the first word of "egrep" to use in msg output
3730if test -z "$EGREP"; then
3731set dummy egrep; ac_prog_name=$2
3732if test "${ac_cv_path_EGREP+set}" = set; then
3733 echo $ECHO_N "(cached) $ECHO_C" >&6
3734else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003736# Loop through the user's path and test for each of PROGNAME-LIST
3737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
3742 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003743 for ac_exec_ext in '' $ac_executable_extensions; do
3744 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3745 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3746 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747 # Check for GNU $ac_path_EGREP
3748case `"$ac_path_EGREP" --version 2>&1` in
3749*GNU*)
3750 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3751*)
3752 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003753 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754 while :
3755 do
3756 cat "conftest.in" "conftest.in" >"conftest.tmp"
3757 mv "conftest.tmp" "conftest.in"
3758 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003759 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3761 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3762 ac_count=`expr $ac_count + 1`
3763 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3764 # Best one so far, save it but keep looking for a better one
3765 ac_cv_path_EGREP="$ac_path_EGREP"
3766 ac_path_EGREP_max=$ac_count
3767 fi
3768 # 10*(2^10) chars as input seems more than enough
3769 test $ac_count -gt 10 && break
3770 done
3771 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3772esac
3773
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003774
3775 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 done
3777done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003778
3779done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003781
3782
3783fi
3784
3785EGREP="$ac_cv_path_EGREP"
3786if test -z "$EGREP"; then
3787 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3788echo "$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 +00003789 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003790fi
3791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792else
3793 ac_cv_path_EGREP=$EGREP
3794fi
3795
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797 fi
3798fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003799{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3800echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003802
3803
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003804
3805{ echo "$as_me:$LINENO: checking for AIX" >&5
3806echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3807cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003808/* confdefs.h. */
3809_ACEOF
3810cat confdefs.h >>conftest.$ac_ext
3811cat >>conftest.$ac_ext <<_ACEOF
3812/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003813#ifdef _AIX
3814 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003815#endif
3816
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003817_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3819 $EGREP "yes" >/dev/null 2>&1; then
3820 { echo "$as_me:$LINENO: result: yes" >&5
3821echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003822cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003823#define _ALL_SOURCE 1
3824_ACEOF
3825
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003826else
3827 { echo "$as_me:$LINENO: result: no" >&5
3828echo "${ECHO_T}no" >&6; }
3829fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003830rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003831
3832
3833
3834# Check for unsupported systems
3835case $ac_sys_system/$ac_sys_release in
3836atheos*|Linux*/1*)
3837 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3838 echo See README for details.
3839 exit 1;;
3840esac
3841
3842
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003843{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3844echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003845
3846# Check whether --with-suffix was given.
3847if test "${with_suffix+set}" = set; then
3848 withval=$with_suffix;
3849 case $withval in
3850 no) EXEEXT=;;
3851 yes) EXEEXT=.exe;;
3852 *) EXEEXT=$withval;;
3853 esac
3854fi
3855
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003856{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3857echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003858
3859# Test whether we're running on a non-case-sensitive system, in which
3860# case we give a warning if no ext is given
3861
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003862{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3863echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003864if test ! -d CaseSensitiveTestDir; then
3865mkdir CaseSensitiveTestDir
3866fi
3867
3868if test -d casesensitivetestdir
3869then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003870 { echo "$as_me:$LINENO: result: yes" >&5
3871echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003872 BUILDEXEEXT=.exe
3873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003874 { echo "$as_me:$LINENO: result: no" >&5
3875echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003876 BUILDEXEEXT=$EXEEXT
3877fi
3878rmdir CaseSensitiveTestDir
3879
3880case $MACHDEP in
3881bsdos*)
3882 case $CC in
3883 gcc) CC="$CC -D_HAVE_BSDI";;
3884 esac;;
3885esac
3886
3887case $ac_sys_system in
3888hp*|HP*)
3889 case $CC in
3890 cc|*/cc) CC="$CC -Ae";;
3891 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003892SunOS*)
3893 # Some functions have a prototype only with that define, e.g. confstr
3894
3895cat >>confdefs.h <<\_ACEOF
3896#define __EXTENSIONS__ 1
3897_ACEOF
3898
3899 ;;
3900esac
3901
3902
3903
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003904{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3905echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003906if test -z "$LIBRARY"
3907then
3908 LIBRARY='libpython$(VERSION).a'
3909fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003910{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3911echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003912
3913# LDLIBRARY is the name of the library to link against (as opposed to the
3914# name of the library into which to insert object files). BLDLIBRARY is also
3915# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3916# is blank as the main program is not linked directly against LDLIBRARY.
3917# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3918# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3919# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3920# DLLLIBRARY is the shared (i.e., DLL) library.
3921#
3922# RUNSHARED is used to run shared python without installed libraries
3923#
3924# INSTSONAME is the name of the shared library that will be use to install
3925# on the system - some systems like version suffix, others don't
3926
3927
3928
3929
3930
3931
3932LDLIBRARY="$LIBRARY"
3933BLDLIBRARY='$(LDLIBRARY)'
3934INSTSONAME='$(LDLIBRARY)'
3935DLLLIBRARY=''
3936LDLIBRARYDIR=''
3937RUNSHARED=''
3938
3939# LINKCC is the command that links the python executable -- default is $(CC).
3940# If CXX is set, and if it is needed to link a main function that was
3941# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3942# python might then depend on the C++ runtime
3943# This is altered for AIX in order to build the export list before
3944# linking.
3945
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003946{ echo "$as_me:$LINENO: checking LINKCC" >&5
3947echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003948if test -z "$LINKCC"
3949then
3950 LINKCC='$(PURIFY) $(MAINCC)'
3951 case $ac_sys_system in
3952 AIX*)
3953 exp_extra="\"\""
3954 if test $ac_sys_release -ge 5 -o \
3955 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3956 exp_extra="."
3957 fi
3958 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003959 QNX*)
3960 # qcc must be used because the other compilers do not
3961 # support -N.
3962 LINKCC=qcc;;
3963 esac
3964fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003965{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3966echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003967
3968# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3969# make sure we default having it set to "no": this is used by
3970# distutils.unixccompiler to know if it should add --enable-new-dtags
3971# to linker command lines, and failing to detect GNU ld simply results
3972# in the same bahaviour as before.
3973
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003974{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3975echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003976ac_prog=ld
3977if test "$GCC" = yes; then
3978 ac_prog=`$CC -print-prog-name=ld`
3979fi
3980case `"$ac_prog" -V 2>&1 < /dev/null` in
3981 *GNU*)
3982 GNULD=yes;;
3983 *)
3984 GNULD=no;;
3985esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003986{ echo "$as_me:$LINENO: result: $GNULD" >&5
3987echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003988
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003989{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3990echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003991# Check whether --enable-shared was given.
3992if test "${enable_shared+set}" = set; then
3993 enableval=$enable_shared;
3994fi
3995
3996
3997if test -z "$enable_shared"
3998then
3999 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004000 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004001 enable_shared="yes";;
4002 *)
4003 enable_shared="no";;
4004 esac
4005fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004006{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4007echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004008
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004009{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4010echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004011# Check whether --enable-profiling was given.
4012if test "${enable_profiling+set}" = set; then
4013 enableval=$enable_profiling; ac_save_cc="$CC"
4014 CC="$CC -pg"
4015 if test "$cross_compiling" = yes; then
4016 ac_enable_profiling="no"
4017else
4018 cat >conftest.$ac_ext <<_ACEOF
4019/* confdefs.h. */
4020_ACEOF
4021cat confdefs.h >>conftest.$ac_ext
4022cat >>conftest.$ac_ext <<_ACEOF
4023/* end confdefs.h. */
4024int main() { return 0; }
4025_ACEOF
4026rm -f conftest$ac_exeext
4027if { (ac_try="$ac_link"
4028case "(($ac_try" in
4029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4030 *) ac_try_echo=$ac_try;;
4031esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004033 (eval "$ac_link") 2>&5
4034 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4037 { (case "(($ac_try" in
4038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4039 *) ac_try_echo=$ac_try;;
4040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004042 (eval "$ac_try") 2>&5
4043 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004045 (exit $ac_status); }; }; then
4046 ac_enable_profiling="yes"
4047else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004048 echo "$as_me: program exited with status $ac_status" >&5
4049echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004050sed 's/^/| /' conftest.$ac_ext >&5
4051
4052( exit $ac_status )
4053ac_enable_profiling="no"
4054fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4056fi
4057
4058
4059 CC="$ac_save_cc"
4060fi
4061
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004062{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4063echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004064
4065case "$ac_enable_profiling" in
4066 "yes")
4067 BASECFLAGS="-pg $BASECFLAGS"
4068 LDFLAGS="-pg $LDFLAGS"
4069 ;;
4070esac
4071
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004072{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4073echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004074
4075# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4076# library that we build, but we do not want to link against it (we
4077# will find it with a -framework option). For this reason there is an
4078# extra variable BLDLIBRARY against which Python and the extension
4079# modules are linked, BLDLIBRARY. This is normally the same as
4080# LDLIBRARY, but empty for MacOSX framework builds.
4081if test "$enable_framework"
4082then
4083 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4084 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4085 BLDLIBRARY=''
4086else
4087 BLDLIBRARY='$(LDLIBRARY)'
4088fi
4089
4090# Other platforms follow
4091if test $enable_shared = "yes"; then
4092
4093cat >>confdefs.h <<\_ACEOF
4094#define Py_ENABLE_SHARED 1
4095_ACEOF
4096
4097 case $ac_sys_system in
4098 CYGWIN*)
4099 LDLIBRARY='libpython$(VERSION).dll.a'
4100 DLLLIBRARY='libpython$(VERSION).dll'
4101 ;;
4102 SunOS*)
4103 LDLIBRARY='libpython$(VERSION).so'
4104 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4105 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4106 INSTSONAME="$LDLIBRARY".$SOVERSION
4107 ;;
4108 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4109 LDLIBRARY='libpython$(VERSION).so'
4110 BLDLIBRARY='-L. -lpython$(VERSION)'
4111 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4112 case $ac_sys_system in
4113 FreeBSD*)
4114 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4115 ;;
4116 esac
4117 INSTSONAME="$LDLIBRARY".$SOVERSION
4118 ;;
4119 hp*|HP*)
4120 case `uname -m` in
4121 ia64)
4122 LDLIBRARY='libpython$(VERSION).so'
4123 ;;
4124 *)
4125 LDLIBRARY='libpython$(VERSION).sl'
4126 ;;
4127 esac
4128 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4129 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4130 ;;
4131 OSF*)
4132 LDLIBRARY='libpython$(VERSION).so'
4133 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4134 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4135 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004136 Darwin*)
4137 LDLIBRARY='libpython$(VERSION).dylib'
4138 BLDLIBRARY='-L. -lpython$(VERSION)'
4139 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4140 ;;
4141
4142 esac
4143else # shared is disabled
4144 case $ac_sys_system in
4145 CYGWIN*)
4146 BLDLIBRARY='$(LIBRARY)'
4147 LDLIBRARY='libpython$(VERSION).dll.a'
4148 ;;
4149 esac
4150fi
4151
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004152{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4153echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004154
4155if test -n "$ac_tool_prefix"; then
4156 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4157set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004158{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4159echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004160if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004161 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004162else
4163 if test -n "$RANLIB"; then
4164 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4165else
4166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167for as_dir in $PATH
4168do
4169 IFS=$as_save_IFS
4170 test -z "$as_dir" && as_dir=.
4171 for ac_exec_ext in '' $ac_executable_extensions; do
4172 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4173 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004174 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004175 break 2
4176 fi
4177done
4178done
4179IFS=$as_save_IFS
4180
4181fi
4182fi
4183RANLIB=$ac_cv_prog_RANLIB
4184if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004185 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4186echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004187else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004188 { echo "$as_me:$LINENO: result: no" >&5
4189echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004190fi
4191
4192
4193fi
4194if test -z "$ac_cv_prog_RANLIB"; then
4195 ac_ct_RANLIB=$RANLIB
4196 # Extract the first word of "ranlib", so it can be a program name with args.
4197set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004198{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4199echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004200if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004201 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004202else
4203 if test -n "$ac_ct_RANLIB"; then
4204 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4205else
4206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4207for as_dir in $PATH
4208do
4209 IFS=$as_save_IFS
4210 test -z "$as_dir" && as_dir=.
4211 for ac_exec_ext in '' $ac_executable_extensions; do
4212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4213 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004214 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004215 break 2
4216 fi
4217done
4218done
4219IFS=$as_save_IFS
4220
4221fi
4222fi
4223ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4224if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004225 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4226echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004228 { echo "$as_me:$LINENO: result: no" >&5
4229echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004230fi
4231
4232 if test "x$ac_ct_RANLIB" = x; then
4233 RANLIB=":"
4234 else
4235 case $cross_compiling:$ac_tool_warned in
4236yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004237{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4238whose name does not start with the host triplet. If you think this
4239configuration is useful to you, please write to autoconf@gnu.org." >&5
4240echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4241whose name does not start with the host triplet. If you think this
4242configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004243ac_tool_warned=yes ;;
4244esac
4245 RANLIB=$ac_ct_RANLIB
4246 fi
4247else
4248 RANLIB="$ac_cv_prog_RANLIB"
4249fi
4250
4251
4252for ac_prog in ar aal
4253do
4254 # Extract the first word of "$ac_prog", so it can be a program name with args.
4255set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004256{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004258if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004259 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004260else
4261 if test -n "$AR"; then
4262 ac_cv_prog_AR="$AR" # Let the user override the test.
4263else
4264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4265for as_dir in $PATH
4266do
4267 IFS=$as_save_IFS
4268 test -z "$as_dir" && as_dir=.
4269 for ac_exec_ext in '' $ac_executable_extensions; do
4270 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4271 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004272 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004273 break 2
4274 fi
4275done
4276done
4277IFS=$as_save_IFS
4278
4279fi
4280fi
4281AR=$ac_cv_prog_AR
4282if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004283 { echo "$as_me:$LINENO: result: $AR" >&5
4284echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004285else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004286 { echo "$as_me:$LINENO: result: no" >&5
4287echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004288fi
4289
4290
4291 test -n "$AR" && break
4292done
4293test -n "$AR" || AR="ar"
4294
4295
4296# tweak ARFLAGS only if the user didn't set it on the command line
4297
4298if test -z "$ARFLAGS"
4299then
4300 ARFLAGS="rc"
4301fi
4302
4303
4304# Extract the first word of "svnversion", so it can be a program name with args.
4305set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004306{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004308if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004309 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004310else
4311 if test -n "$SVNVERSION"; then
4312 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4313else
4314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4315for as_dir in $PATH
4316do
4317 IFS=$as_save_IFS
4318 test -z "$as_dir" && as_dir=.
4319 for ac_exec_ext in '' $ac_executable_extensions; do
4320 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4321 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004322 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004323 break 2
4324 fi
4325done
4326done
4327IFS=$as_save_IFS
4328
4329 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4330fi
4331fi
4332SVNVERSION=$ac_cv_prog_SVNVERSION
4333if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004334 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4335echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004336else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004337 { echo "$as_me:$LINENO: result: no" >&5
4338echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004339fi
4340
4341
4342if test $SVNVERSION = found
4343then
4344 SVNVERSION="svnversion \$(srcdir)"
4345else
4346 SVNVERSION="echo Unversioned directory"
4347fi
4348
4349case $MACHDEP in
4350bsdos*|hp*|HP*)
4351 # install -d does not work on BSDI or HP-UX
4352 if test -z "$INSTALL"
4353 then
4354 INSTALL="${srcdir}/install-sh -c"
4355 fi
4356esac
4357ac_aux_dir=
4358for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4359 if test -f "$ac_dir/install-sh"; then
4360 ac_aux_dir=$ac_dir
4361 ac_install_sh="$ac_aux_dir/install-sh -c"
4362 break
4363 elif test -f "$ac_dir/install.sh"; then
4364 ac_aux_dir=$ac_dir
4365 ac_install_sh="$ac_aux_dir/install.sh -c"
4366 break
4367 elif test -f "$ac_dir/shtool"; then
4368 ac_aux_dir=$ac_dir
4369 ac_install_sh="$ac_aux_dir/shtool install -c"
4370 break
4371 fi
4372done
4373if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004374 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4375echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004376 { (exit 1); exit 1; }; }
4377fi
4378
4379# These three variables are undocumented and unsupported,
4380# and are intended to be withdrawn in a future Autoconf release.
4381# They can cause serious problems if a builder's source tree is in a directory
4382# whose full name contains unusual characters.
4383ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4384ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4385ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4386
4387
4388# Find a good install program. We prefer a C program (faster),
4389# so one script is as good as another. But avoid the broken or
4390# incompatible versions:
4391# SysV /etc/install, /usr/sbin/install
4392# SunOS /usr/etc/install
4393# IRIX /sbin/install
4394# AIX /bin/install
4395# AmigaOS /C/install, which installs bootblocks on floppy discs
4396# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4397# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4398# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4399# OS/2's system install, which has a completely different semantic
4400# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004401{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4402echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004403if test -z "$INSTALL"; then
4404if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004405 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004406else
4407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4408for as_dir in $PATH
4409do
4410 IFS=$as_save_IFS
4411 test -z "$as_dir" && as_dir=.
4412 # Account for people who put trailing slashes in PATH elements.
4413case $as_dir/ in
4414 ./ | .// | /cC/* | \
4415 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4416 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4417 /usr/ucb/* ) ;;
4418 *)
4419 # OSF1 and SCO ODT 3.0 have their own names for install.
4420 # Don't use installbsd from OSF since it installs stuff as root
4421 # by default.
4422 for ac_prog in ginstall scoinst install; do
4423 for ac_exec_ext in '' $ac_executable_extensions; do
4424 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4425 if test $ac_prog = install &&
4426 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4427 # AIX install. It has an incompatible calling convention.
4428 :
4429 elif test $ac_prog = install &&
4430 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4431 # program-specific install script used by HP pwplus--don't use.
4432 :
4433 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004434 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4435 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004436 fi
4437 fi
4438 done
4439 done
4440 ;;
4441esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004442done
4443IFS=$as_save_IFS
4444
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004445
4446fi
4447 if test "${ac_cv_path_install+set}" = set; then
4448 INSTALL=$ac_cv_path_install
4449 else
4450 # As a last resort, use the slow shell script. Don't cache a
4451 # value for INSTALL within a source directory, because that will
4452 # break other packages using the cache if that directory is
4453 # removed, or if the value is a relative name.
4454 INSTALL=$ac_install_sh
4455 fi
4456fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004457{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4458echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004459
4460# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4461# It thinks the first close brace ends the variable substitution.
4462test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4463
4464test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4465
4466test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4467
4468
4469# Not every filesystem supports hard links
4470
4471if test -z "$LN" ; then
4472 case $ac_sys_system in
4473 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004474 *) LN=ln;;
4475 esac
4476fi
4477
4478# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004479{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4480echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004481
4482# Check whether --with-pydebug was given.
4483if test "${with_pydebug+set}" = set; then
4484 withval=$with_pydebug;
4485if test "$withval" != no
4486then
4487
4488cat >>confdefs.h <<\_ACEOF
4489#define Py_DEBUG 1
4490_ACEOF
4491
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004492 { echo "$as_me:$LINENO: result: yes" >&5
4493echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004494 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004495else { echo "$as_me:$LINENO: result: no" >&5
4496echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004497fi
4498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004499 { echo "$as_me:$LINENO: result: no" >&5
4500echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004501fi
4502
4503
4504# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4505# merged with this chunk of code?
4506
4507# Optimizer/debugger flags
4508# ------------------------
4509# (The following bit of code is complicated enough - please keep things
4510# indented properly. Just pretend you're editing Python code. ;-)
4511
4512# There are two parallel sets of case statements below, one that checks to
4513# see if OPT was set and one that does BASECFLAGS setting based upon
4514# compiler and platform. BASECFLAGS tweaks need to be made even if the
4515# user set OPT.
4516
4517# tweak OPT based on compiler and platform, only if the user didn't set
4518# it on the command line
4519
4520if test -z "$OPT"
4521then
4522 case $GCC in
4523 yes)
4524 if test "$CC" != 'g++' ; then
4525 STRICT_PROTO="-Wstrict-prototypes"
4526 fi
4527 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4528 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4529 WRAP="-fwrapv"
4530 fi
4531 case $ac_cv_prog_cc_g in
4532 yes)
4533 if test "$Py_DEBUG" = 'true' ; then
4534 # Optimization messes up debuggers, so turn it off for
4535 # debug builds.
4536 OPT="-g -Wall $STRICT_PROTO"
4537 else
4538 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4539 fi
4540 ;;
4541 *)
4542 OPT="-O3 -Wall $STRICT_PROTO"
4543 ;;
4544 esac
4545 case $ac_sys_system in
4546 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4547 ;;
4548 esac
4549 ;;
4550
4551 *)
4552 OPT="-O"
4553 ;;
4554 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004555fi
4556
4557
4558
4559# The -arch flags for universal builds on OSX
4560UNIVERSAL_ARCH_FLAGS=
4561
4562
4563# tweak BASECFLAGS based on compiler and platform
4564case $GCC in
4565yes)
4566 # Python violates C99 rules, by casting between incompatible
4567 # pointer types. GCC may generate bad code as a result of that,
4568 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004569 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4570echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004571 ac_save_cc="$CC"
4572 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004573 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004574 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004575else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004576 cat >conftest.$ac_ext <<_ACEOF
4577/* confdefs.h. */
4578_ACEOF
4579cat confdefs.h >>conftest.$ac_ext
4580cat >>conftest.$ac_ext <<_ACEOF
4581/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004582
4583int
4584main ()
4585{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004586int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004587 ;
4588 return 0;
4589}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004590_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004591rm -f conftest.$ac_objext
4592if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004593case "(($ac_try" in
4594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4595 *) ac_try_echo=$ac_try;;
4596esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004598 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004599 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004600 grep -v '^ *+' conftest.er1 >conftest.err
4601 rm -f conftest.er1
4602 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004604 (exit $ac_status); } && {
4605 test -z "$ac_c_werror_flag" ||
4606 test ! -s conftest.err
4607 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004608 ac_cv_no_strict_aliasing_ok=yes
4609else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004610 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004611sed 's/^/| /' conftest.$ac_ext >&5
4612
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004613 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004614fi
4615
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004617fi
4618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004619 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004620 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4621echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622 if test $ac_cv_no_strict_aliasing_ok = yes
4623 then
4624 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4625 fi
4626
4627 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4628 # support. Without this, treatment of subnormals doesn't follow
4629 # the standard.
4630 case $ac_sys_machine in
4631 alpha*)
4632 BASECFLAGS="$BASECFLAGS -mieee"
4633 ;;
4634 esac
4635
4636 case $ac_sys_system in
4637 SCO_SV*)
4638 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4639 ;;
4640 # is there any other compiler on Darwin besides gcc?
4641 Darwin*)
4642 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4643 # used to be here, but non-Apple gcc doesn't accept them.
4644
4645
4646 if test "${enable_universalsdk}"; then
4647 UNIVERSAL_ARCH_FLAGS=""
4648 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4649 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4650 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004651 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652
Ronald Oussoren755740f2010-02-07 19:56:39 +00004653 # You have to use different flags on various versions of
4654 # OSX to extract PPC code from an universal binary, basically
4655 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4656 # newer.
4657 # Because '-arch pp7400' works on OSX 10.5 or higher this
4658 # test is only present in the '32-bit' branch, all other
4659 # branches require OSX 10.5 to compile.
4660
4661 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4662echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4663 FN="test.$$"
4664 cat >${FN}.c <<-EOF
4665 int main() { return 0; }
4666EOF
4667 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4668 if test $? != 0 ; then
4669 rm ${FN} ${FN}.c
4670 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4671echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4672 else
4673 lipo "${FN}" -extract ppc7400 -output "${FN}.out" 2>/dev/null
4674 if test $? != 0 ; then
4675 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4676 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4677echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4678 else
4679 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4680echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4681 fi
4682 rm -f ${FN} ${FN}.c ${FN}.out
4683 fi
4684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004685 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4686 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004687 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004688 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004689
4690 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4691 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004692 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004693 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004694
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004695 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4696 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004697 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004698 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004699
4700 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4701 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004702 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004703 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004705 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004706 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4707echo "$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 +00004708 { (exit 1); exit 1; }; }
4709
4710 fi
4711
4712
4713 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4714 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4715 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4716 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4717 fi
4718 fi
4719
4720 # Calculate the right deployment target for this build.
4721 #
4722 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4723 if test ${cur_target} '>' 10.2; then
4724 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004725 if test ${enable_universalsdk}; then
4726 if test "${UNIVERSAL_ARCHS}" = "all"; then
4727 # Ensure that the default platform for a
4728 # 4-way universal build is OSX 10.5,
4729 # that's the first OS release where
4730 # 4-way builds make sense.
4731 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004732
4733 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4734 cur_target='10.5'
4735
4736 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4737 cur_target='10.5'
4738
4739 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4740 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004741 fi
4742 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004743 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004744 # On Intel macs default to a deployment
4745 # target of 10.4, that's the first OSX
4746 # release with Intel support.
4747 cur_target="10.4"
4748 fi
4749 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750 fi
4751 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4752
4753 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4754 # environment with a value that is the same as what we'll use
4755 # in the Makefile to ensure that we'll get the same compiler
4756 # environment during configure and build time.
4757 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4758 export MACOSX_DEPLOYMENT_TARGET
4759 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4760
4761 ;;
4762 OSF*)
4763 BASECFLAGS="$BASECFLAGS -mieee"
4764 ;;
4765 esac
4766 ;;
4767
4768*)
4769 case $ac_sys_system in
4770 OpenUNIX*|UnixWare*)
4771 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4772 ;;
4773 OSF*)
4774 BASECFLAGS="$BASECFLAGS -ieee -std"
4775 ;;
4776 SCO_SV*)
4777 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4778 ;;
4779 esac
4780 ;;
4781esac
4782
4783if test "$Py_DEBUG" = 'true'; then
4784 :
4785else
4786 OPT="-DNDEBUG $OPT"
4787fi
4788
4789if test "$ac_arch_flags"
4790then
4791 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4792fi
4793
4794# disable check for icc since it seems to pass, but generates a warning
4795if test "$CC" = icc
4796then
4797 ac_cv_opt_olimit_ok=no
4798fi
4799
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004800{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4801echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004802if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004803 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804else
4805 ac_save_cc="$CC"
4806CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004807cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808/* confdefs.h. */
4809_ACEOF
4810cat confdefs.h >>conftest.$ac_ext
4811cat >>conftest.$ac_ext <<_ACEOF
4812/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004813
4814int
4815main ()
4816{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004817int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004818 ;
4819 return 0;
4820}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004822rm -f conftest.$ac_objext
4823if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824case "(($ac_try" in
4825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4826 *) ac_try_echo=$ac_try;;
4827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004829 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004831 grep -v '^ *+' conftest.er1 >conftest.err
4832 rm -f conftest.er1
4833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004835 (exit $ac_status); } && {
4836 test -z "$ac_c_werror_flag" ||
4837 test ! -s conftest.err
4838 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839 ac_cv_opt_olimit_ok=yes
4840else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004841 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842sed 's/^/| /' conftest.$ac_ext >&5
4843
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004844 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845fi
4846
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848CC="$ac_save_cc"
4849fi
4850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004851{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4852echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853if test $ac_cv_opt_olimit_ok = yes; then
4854 case $ac_sys_system in
4855 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4856 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4857 # environment?
4858 Darwin*)
4859 ;;
4860 *)
4861 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4862 ;;
4863 esac
4864else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004865 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4866echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004868 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004869else
4870 ac_save_cc="$CC"
4871 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872 cat >conftest.$ac_ext <<_ACEOF
4873/* confdefs.h. */
4874_ACEOF
4875cat confdefs.h >>conftest.$ac_ext
4876cat >>conftest.$ac_ext <<_ACEOF
4877/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004878
4879int
4880main ()
4881{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004883 ;
4884 return 0;
4885}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004886_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004887rm -f conftest.$ac_objext
4888if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889case "(($ac_try" in
4890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4891 *) ac_try_echo=$ac_try;;
4892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004894 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004896 grep -v '^ *+' conftest.er1 >conftest.err
4897 rm -f conftest.er1
4898 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004900 (exit $ac_status); } && {
4901 test -z "$ac_c_werror_flag" ||
4902 test ! -s conftest.err
4903 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 ac_cv_olimit_ok=yes
4905else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004906 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004907sed 's/^/| /' conftest.$ac_ext >&5
4908
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004909 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910fi
4911
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913 CC="$ac_save_cc"
4914fi
4915
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004916 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4917echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918 if test $ac_cv_olimit_ok = yes; then
4919 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4920 fi
4921fi
4922
4923# Check whether GCC supports PyArg_ParseTuple format
4924if test "$GCC" = "yes"
4925then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004926 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4927echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 save_CFLAGS=$CFLAGS
4929 CFLAGS="$CFLAGS -Werror"
4930 cat >conftest.$ac_ext <<_ACEOF
4931/* confdefs.h. */
4932_ACEOF
4933cat confdefs.h >>conftest.$ac_ext
4934cat >>conftest.$ac_ext <<_ACEOF
4935/* end confdefs.h. */
4936
4937 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4938
4939int
4940main ()
4941{
4942
4943 ;
4944 return 0;
4945}
4946_ACEOF
4947rm -f conftest.$ac_objext
4948if { (ac_try="$ac_compile"
4949case "(($ac_try" in
4950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4951 *) ac_try_echo=$ac_try;;
4952esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954 (eval "$ac_compile") 2>conftest.er1
4955 ac_status=$?
4956 grep -v '^ *+' conftest.er1 >conftest.err
4957 rm -f conftest.er1
4958 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 (exit $ac_status); } && {
4961 test -z "$ac_c_werror_flag" ||
4962 test ! -s conftest.err
4963 } && test -s conftest.$ac_objext; then
4964
4965cat >>confdefs.h <<\_ACEOF
4966#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4967_ACEOF
4968
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004969 { echo "$as_me:$LINENO: result: yes" >&5
4970echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004972 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973sed 's/^/| /' conftest.$ac_ext >&5
4974
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004975 { echo "$as_me:$LINENO: result: no" >&5
4976echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977
4978fi
4979
4980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4981 CFLAGS=$save_CFLAGS
4982fi
4983
4984# On some compilers, pthreads are available without further options
4985# (e.g. MacOS X). On some of these systems, the compiler will not
4986# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4987# So we have to see first whether pthreads are available without
4988# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004989{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4990echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004992 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993else
4994 if test "$cross_compiling" = yes; then
4995 ac_cv_pthread_is_default=no
4996else
4997 cat >conftest.$ac_ext <<_ACEOF
4998/* confdefs.h. */
4999_ACEOF
5000cat confdefs.h >>conftest.$ac_ext
5001cat >>conftest.$ac_ext <<_ACEOF
5002/* end confdefs.h. */
5003
5004#include <pthread.h>
5005
5006void* routine(void* p){return NULL;}
5007
5008int main(){
5009 pthread_t p;
5010 if(pthread_create(&p,NULL,routine,NULL)!=0)
5011 return 1;
5012 (void)pthread_detach(p);
5013 return 0;
5014}
5015
5016_ACEOF
5017rm -f conftest$ac_exeext
5018if { (ac_try="$ac_link"
5019case "(($ac_try" in
5020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5021 *) ac_try_echo=$ac_try;;
5022esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024 (eval "$ac_link") 2>&5
5025 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5028 { (case "(($ac_try" in
5029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5030 *) ac_try_echo=$ac_try;;
5031esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033 (eval "$ac_try") 2>&5
5034 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 (exit $ac_status); }; }; then
5037
5038 ac_cv_pthread_is_default=yes
5039 ac_cv_kthread=no
5040 ac_cv_pthread=no
5041
5042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005043 echo "$as_me: program exited with status $ac_status" >&5
5044echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045sed 's/^/| /' conftest.$ac_ext >&5
5046
5047( exit $ac_status )
5048ac_cv_pthread_is_default=no
5049fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5051fi
5052
5053
5054
5055fi
5056
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005057{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5058echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059
5060
5061if test $ac_cv_pthread_is_default = yes
5062then
5063 ac_cv_kpthread=no
5064else
5065# -Kpthread, if available, provides the right #defines
5066# and linker options to make pthread_create available
5067# Some compilers won't report that they do not support -Kpthread,
5068# so we need to run a program to see whether it really made the
5069# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005070{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5071echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005073 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074else
5075 ac_save_cc="$CC"
5076CC="$CC -Kpthread"
5077if test "$cross_compiling" = yes; then
5078 ac_cv_kpthread=no
5079else
5080 cat >conftest.$ac_ext <<_ACEOF
5081/* confdefs.h. */
5082_ACEOF
5083cat confdefs.h >>conftest.$ac_ext
5084cat >>conftest.$ac_ext <<_ACEOF
5085/* end confdefs.h. */
5086
5087#include <pthread.h>
5088
5089void* routine(void* p){return NULL;}
5090
5091int main(){
5092 pthread_t p;
5093 if(pthread_create(&p,NULL,routine,NULL)!=0)
5094 return 1;
5095 (void)pthread_detach(p);
5096 return 0;
5097}
5098
5099_ACEOF
5100rm -f conftest$ac_exeext
5101if { (ac_try="$ac_link"
5102case "(($ac_try" in
5103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5104 *) ac_try_echo=$ac_try;;
5105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107 (eval "$ac_link") 2>&5
5108 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5111 { (case "(($ac_try" in
5112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5113 *) ac_try_echo=$ac_try;;
5114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116 (eval "$ac_try") 2>&5
5117 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 (exit $ac_status); }; }; then
5120 ac_cv_kpthread=yes
5121else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005122 echo "$as_me: program exited with status $ac_status" >&5
5123echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124sed 's/^/| /' conftest.$ac_ext >&5
5125
5126( exit $ac_status )
5127ac_cv_kpthread=no
5128fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5130fi
5131
5132
5133CC="$ac_save_cc"
5134fi
5135
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005136{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5137echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138fi
5139
5140if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5141then
5142# -Kthread, if available, provides the right #defines
5143# and linker options to make pthread_create available
5144# Some compilers won't report that they do not support -Kthread,
5145# so we need to run a program to see whether it really made the
5146# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005147{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5148echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005150 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005151else
5152 ac_save_cc="$CC"
5153CC="$CC -Kthread"
5154if test "$cross_compiling" = yes; then
5155 ac_cv_kthread=no
5156else
5157 cat >conftest.$ac_ext <<_ACEOF
5158/* confdefs.h. */
5159_ACEOF
5160cat confdefs.h >>conftest.$ac_ext
5161cat >>conftest.$ac_ext <<_ACEOF
5162/* end confdefs.h. */
5163
5164#include <pthread.h>
5165
5166void* routine(void* p){return NULL;}
5167
5168int main(){
5169 pthread_t p;
5170 if(pthread_create(&p,NULL,routine,NULL)!=0)
5171 return 1;
5172 (void)pthread_detach(p);
5173 return 0;
5174}
5175
5176_ACEOF
5177rm -f conftest$ac_exeext
5178if { (ac_try="$ac_link"
5179case "(($ac_try" in
5180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5181 *) ac_try_echo=$ac_try;;
5182esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005184 (eval "$ac_link") 2>&5
5185 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005187 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5188 { (case "(($ac_try" in
5189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5190 *) ac_try_echo=$ac_try;;
5191esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005193 (eval "$ac_try") 2>&5
5194 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196 (exit $ac_status); }; }; then
5197 ac_cv_kthread=yes
5198else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005199 echo "$as_me: program exited with status $ac_status" >&5
5200echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201sed 's/^/| /' conftest.$ac_ext >&5
5202
5203( exit $ac_status )
5204ac_cv_kthread=no
5205fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5207fi
5208
5209
5210CC="$ac_save_cc"
5211fi
5212
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005213{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5214echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215fi
5216
5217if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5218then
5219# -pthread, if available, provides the right #defines
5220# and linker options to make pthread_create available
5221# Some compilers won't report that they do not support -pthread,
5222# so we need to run a program to see whether it really made the
5223# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005224{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5225echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005226if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005227 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228else
5229 ac_save_cc="$CC"
5230CC="$CC -pthread"
5231if test "$cross_compiling" = yes; then
5232 ac_cv_pthread=no
5233else
5234 cat >conftest.$ac_ext <<_ACEOF
5235/* confdefs.h. */
5236_ACEOF
5237cat confdefs.h >>conftest.$ac_ext
5238cat >>conftest.$ac_ext <<_ACEOF
5239/* end confdefs.h. */
5240
5241#include <pthread.h>
5242
5243void* routine(void* p){return NULL;}
5244
5245int main(){
5246 pthread_t p;
5247 if(pthread_create(&p,NULL,routine,NULL)!=0)
5248 return 1;
5249 (void)pthread_detach(p);
5250 return 0;
5251}
5252
5253_ACEOF
5254rm -f conftest$ac_exeext
5255if { (ac_try="$ac_link"
5256case "(($ac_try" in
5257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5258 *) ac_try_echo=$ac_try;;
5259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005261 (eval "$ac_link") 2>&5
5262 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5265 { (case "(($ac_try" in
5266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5267 *) ac_try_echo=$ac_try;;
5268esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005270 (eval "$ac_try") 2>&5
5271 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273 (exit $ac_status); }; }; then
5274 ac_cv_pthread=yes
5275else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005276 echo "$as_me: program exited with status $ac_status" >&5
5277echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278sed 's/^/| /' conftest.$ac_ext >&5
5279
5280( exit $ac_status )
5281ac_cv_pthread=no
5282fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5284fi
5285
5286
5287CC="$ac_save_cc"
5288fi
5289
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005290{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5291echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292fi
5293
5294# If we have set a CC compiler flag for thread support then
5295# check if it works for CXX, too.
5296ac_cv_cxx_thread=no
5297if test ! -z "$CXX"
5298then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005299{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5300echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301ac_save_cxx="$CXX"
5302
5303if test "$ac_cv_kpthread" = "yes"
5304then
5305 CXX="$CXX -Kpthread"
5306 ac_cv_cxx_thread=yes
5307elif test "$ac_cv_kthread" = "yes"
5308then
5309 CXX="$CXX -Kthread"
5310 ac_cv_cxx_thread=yes
5311elif test "$ac_cv_pthread" = "yes"
5312then
5313 CXX="$CXX -pthread"
5314 ac_cv_cxx_thread=yes
5315fi
5316
5317if test $ac_cv_cxx_thread = yes
5318then
5319 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5320 $CXX -c conftest.$ac_ext 2>&5
5321 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5322 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5323 then
5324 ac_cv_cxx_thread=yes
5325 else
5326 ac_cv_cxx_thread=no
5327 fi
5328 rm -fr conftest*
5329fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005330{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5331echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332fi
5333CXX="$ac_save_cxx"
5334
5335
5336# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005337{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5338echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005340 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341else
5342 cat >conftest.$ac_ext <<_ACEOF
5343/* confdefs.h. */
5344_ACEOF
5345cat confdefs.h >>conftest.$ac_ext
5346cat >>conftest.$ac_ext <<_ACEOF
5347/* end confdefs.h. */
5348#include <stdlib.h>
5349#include <stdarg.h>
5350#include <string.h>
5351#include <float.h>
5352
5353int
5354main ()
5355{
5356
5357 ;
5358 return 0;
5359}
5360_ACEOF
5361rm -f conftest.$ac_objext
5362if { (ac_try="$ac_compile"
5363case "(($ac_try" in
5364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5365 *) ac_try_echo=$ac_try;;
5366esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368 (eval "$ac_compile") 2>conftest.er1
5369 ac_status=$?
5370 grep -v '^ *+' conftest.er1 >conftest.err
5371 rm -f conftest.er1
5372 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005374 (exit $ac_status); } && {
5375 test -z "$ac_c_werror_flag" ||
5376 test ! -s conftest.err
5377 } && test -s conftest.$ac_objext; then
5378 ac_cv_header_stdc=yes
5379else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005380 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381sed 's/^/| /' conftest.$ac_ext >&5
5382
5383 ac_cv_header_stdc=no
5384fi
5385
5386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5387
5388if test $ac_cv_header_stdc = yes; then
5389 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5390 cat >conftest.$ac_ext <<_ACEOF
5391/* confdefs.h. */
5392_ACEOF
5393cat confdefs.h >>conftest.$ac_ext
5394cat >>conftest.$ac_ext <<_ACEOF
5395/* end confdefs.h. */
5396#include <string.h>
5397
5398_ACEOF
5399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5400 $EGREP "memchr" >/dev/null 2>&1; then
5401 :
5402else
5403 ac_cv_header_stdc=no
5404fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00005405rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406
5407fi
5408
5409if test $ac_cv_header_stdc = yes; then
5410 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5411 cat >conftest.$ac_ext <<_ACEOF
5412/* confdefs.h. */
5413_ACEOF
5414cat confdefs.h >>conftest.$ac_ext
5415cat >>conftest.$ac_ext <<_ACEOF
5416/* end confdefs.h. */
5417#include <stdlib.h>
5418
5419_ACEOF
5420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5421 $EGREP "free" >/dev/null 2>&1; then
5422 :
5423else
5424 ac_cv_header_stdc=no
5425fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00005426rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427
5428fi
5429
5430if test $ac_cv_header_stdc = yes; then
5431 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5432 if test "$cross_compiling" = yes; then
5433 :
5434else
5435 cat >conftest.$ac_ext <<_ACEOF
5436/* confdefs.h. */
5437_ACEOF
5438cat confdefs.h >>conftest.$ac_ext
5439cat >>conftest.$ac_ext <<_ACEOF
5440/* end confdefs.h. */
5441#include <ctype.h>
5442#include <stdlib.h>
5443#if ((' ' & 0x0FF) == 0x020)
5444# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5445# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5446#else
5447# define ISLOWER(c) \
5448 (('a' <= (c) && (c) <= 'i') \
5449 || ('j' <= (c) && (c) <= 'r') \
5450 || ('s' <= (c) && (c) <= 'z'))
5451# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5452#endif
5453
5454#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5455int
5456main ()
5457{
5458 int i;
5459 for (i = 0; i < 256; i++)
5460 if (XOR (islower (i), ISLOWER (i))
5461 || toupper (i) != TOUPPER (i))
5462 return 2;
5463 return 0;
5464}
5465_ACEOF
5466rm -f conftest$ac_exeext
5467if { (ac_try="$ac_link"
5468case "(($ac_try" in
5469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5470 *) ac_try_echo=$ac_try;;
5471esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473 (eval "$ac_link") 2>&5
5474 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5477 { (case "(($ac_try" in
5478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5479 *) ac_try_echo=$ac_try;;
5480esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482 (eval "$ac_try") 2>&5
5483 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485 (exit $ac_status); }; }; then
5486 :
5487else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005488 echo "$as_me: program exited with status $ac_status" >&5
5489echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005490sed 's/^/| /' conftest.$ac_ext >&5
5491
5492( exit $ac_status )
5493ac_cv_header_stdc=no
5494fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5496fi
5497
5498
5499fi
5500fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5502echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503if test $ac_cv_header_stdc = yes; then
5504
5505cat >>confdefs.h <<\_ACEOF
5506#define STDC_HEADERS 1
5507_ACEOF
5508
5509fi
5510
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005511# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5522 inttypes.h stdint.h unistd.h
5523do
5524as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5525{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5526echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5527if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5528 echo $ECHO_N "(cached) $ECHO_C" >&6
5529else
5530 cat >conftest.$ac_ext <<_ACEOF
5531/* confdefs.h. */
5532_ACEOF
5533cat confdefs.h >>conftest.$ac_ext
5534cat >>conftest.$ac_ext <<_ACEOF
5535/* end confdefs.h. */
5536$ac_includes_default
5537
5538#include <$ac_header>
5539_ACEOF
5540rm -f conftest.$ac_objext
5541if { (ac_try="$ac_compile"
5542case "(($ac_try" in
5543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5544 *) ac_try_echo=$ac_try;;
5545esac
5546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5547 (eval "$ac_compile") 2>conftest.er1
5548 ac_status=$?
5549 grep -v '^ *+' conftest.er1 >conftest.err
5550 rm -f conftest.er1
5551 cat conftest.err >&5
5552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5553 (exit $ac_status); } && {
5554 test -z "$ac_c_werror_flag" ||
5555 test ! -s conftest.err
5556 } && test -s conftest.$ac_objext; then
5557 eval "$as_ac_Header=yes"
5558else
5559 echo "$as_me: failed program was:" >&5
5560sed 's/^/| /' conftest.$ac_ext >&5
5561
5562 eval "$as_ac_Header=no"
5563fi
5564
5565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5566fi
5567ac_res=`eval echo '${'$as_ac_Header'}'`
5568 { echo "$as_me:$LINENO: result: $ac_res" >&5
5569echo "${ECHO_T}$ac_res" >&6; }
5570if test `eval echo '${'$as_ac_Header'}'` = yes; then
5571 cat >>confdefs.h <<_ACEOF
5572#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5573_ACEOF
5574
5575fi
5576
5577done
5578
5579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580
Martin v. Löwis11437992002-04-12 09:54:03 +00005581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
Anthony Baxter8a560de2004-10-13 15:30:56 +00005616
Martin v. Löwisc3001752005-01-23 09:27:24 +00005617
Martin v. Löwis11017b12006-01-14 18:12:57 +00005618
Thomas Wouters477c8d52006-05-27 19:21:47 +00005619
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005620
5621
5622
5623
5624
5625
5626
5627
Thomas Wouters89f507f2006-12-13 04:49:30 +00005628
Christian Heimes043d6f62008-01-07 17:19:16 +00005629
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005630
5631
Christian Heimesbbe741d2008-03-28 10:53:29 +00005632
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005633
Ronald Oussoren755740f2010-02-07 19:56:39 +00005634
5635
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005636for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5637fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005638ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005639shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005640unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005641sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5642sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005643sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005644sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005645sys/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 +00005646sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005647bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005648do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005649as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005650if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005651 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5652echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005653if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005654 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005655fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005656ac_res=`eval echo '${'$as_ac_Header'}'`
5657 { echo "$as_me:$LINENO: result: $ac_res" >&5
5658echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005659else
Martin v. Löwis11437992002-04-12 09:54:03 +00005660 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005661{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5662echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005664/* confdefs.h. */
5665_ACEOF
5666cat confdefs.h >>conftest.$ac_ext
5667cat >>conftest.$ac_ext <<_ACEOF
5668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005669$ac_includes_default
5670#include <$ac_header>
5671_ACEOF
5672rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005673if { (ac_try="$ac_compile"
5674case "(($ac_try" in
5675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5676 *) ac_try_echo=$ac_try;;
5677esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005681 grep -v '^ *+' conftest.er1 >conftest.err
5682 rm -f conftest.er1
5683 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005685 (exit $ac_status); } && {
5686 test -z "$ac_c_werror_flag" ||
5687 test ! -s conftest.err
5688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005690else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005692sed 's/^/| /' conftest.$ac_ext >&5
5693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005694 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005696
5697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005698{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5699echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005700
5701# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005702{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5703echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005704cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005705/* confdefs.h. */
5706_ACEOF
5707cat confdefs.h >>conftest.$ac_ext
5708cat >>conftest.$ac_ext <<_ACEOF
5709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005710#include <$ac_header>
5711_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005712if { (ac_try="$ac_cpp conftest.$ac_ext"
5713case "(($ac_try" in
5714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5715 *) ac_try_echo=$ac_try;;
5716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005718 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005719 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005720 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005721 rm -f conftest.er1
5722 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005724 (exit $ac_status); } >/dev/null && {
5725 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5726 test ! -s conftest.err
5727 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005728 ac_header_preproc=yes
5729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005731sed 's/^/| /' conftest.$ac_ext >&5
5732
Martin v. Löwis11437992002-04-12 09:54:03 +00005733 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005735
Martin v. Löwis11437992002-04-12 09:54:03 +00005736rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005737{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5738echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005739
5740# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005741case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5742 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005743 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5744echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5745 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5746echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005747 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005748 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005749 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005750 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5751echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5752 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5753echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5754 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5755echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5756 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5757echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5758 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5759echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5761echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005762 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005763## -------------------------------------- ##
5764## Report this to http://bugs.python.org/ ##
5765## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005766_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005767 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005768 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005770{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5771echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005772if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005773 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005774else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005775 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005776fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005777ac_res=`eval echo '${'$as_ac_Header'}'`
5778 { echo "$as_me:$LINENO: result: $ac_res" >&5
5779echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005780
5781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005782if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005783 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005784#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005785_ACEOF
5786
5787fi
5788
Guido van Rossum627b2d71993-12-24 10:39:16 +00005789done
5790
Martin v. Löwis11437992002-04-12 09:54:03 +00005791
5792
5793
5794
5795
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005796ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005797for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005798 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5799{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5800echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005801if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005803else
Martin v. Löwis11437992002-04-12 09:54:03 +00005804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005805/* confdefs.h. */
5806_ACEOF
5807cat confdefs.h >>conftest.$ac_ext
5808cat >>conftest.$ac_ext <<_ACEOF
5809/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005810#include <sys/types.h>
5811#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005812
Martin v. Löwis11437992002-04-12 09:54:03 +00005813int
5814main ()
5815{
5816if ((DIR *) 0)
5817return 0;
5818 ;
5819 return 0;
5820}
5821_ACEOF
5822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005823if { (ac_try="$ac_compile"
5824case "(($ac_try" in
5825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5826 *) ac_try_echo=$ac_try;;
5827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005831 grep -v '^ *+' conftest.er1 >conftest.err
5832 rm -f conftest.er1
5833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005835 (exit $ac_status); } && {
5836 test -z "$ac_c_werror_flag" ||
5837 test ! -s conftest.err
5838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005839 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005842sed 's/^/| /' conftest.$ac_ext >&5
5843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005844 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005846
5847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005848fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005849ac_res=`eval echo '${'$as_ac_Header'}'`
5850 { echo "$as_me:$LINENO: result: $ac_res" >&5
5851echo "${ECHO_T}$ac_res" >&6; }
5852if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005853 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005854#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005855_ACEOF
5856
5857ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005859
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005860done
5861# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5862if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005863 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5864echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005865if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005867else
Martin v. Löwis11437992002-04-12 09:54:03 +00005868 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005869cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005870/* confdefs.h. */
5871_ACEOF
5872cat confdefs.h >>conftest.$ac_ext
5873cat >>conftest.$ac_ext <<_ACEOF
5874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005876/* Override any GCC internal prototype to avoid an error.
5877 Use char because int might match the return type of a GCC
5878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005879#ifdef __cplusplus
5880extern "C"
5881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005882char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005883int
5884main ()
5885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005886return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005887 ;
5888 return 0;
5889}
5890_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005891for ac_lib in '' dir; do
5892 if test -z "$ac_lib"; then
5893 ac_res="none required"
5894 else
5895 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005896 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005897 fi
5898 rm -f conftest.$ac_objext conftest$ac_exeext
5899if { (ac_try="$ac_link"
5900case "(($ac_try" in
5901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5902 *) ac_try_echo=$ac_try;;
5903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005905 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005906 ac_status=$?
5907 grep -v '^ *+' conftest.er1 >conftest.err
5908 rm -f conftest.er1
5909 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005911 (exit $ac_status); } && {
5912 test -z "$ac_c_werror_flag" ||
5913 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005914 } && test -s conftest$ac_exeext &&
5915 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005917else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005918 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005919sed 's/^/| /' conftest.$ac_ext >&5
5920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005921
Thomas Wouters477c8d52006-05-27 19:21:47 +00005922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005923
5924rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5925 conftest$ac_exeext
5926 if test "${ac_cv_search_opendir+set}" = set; then
5927 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005929done
5930if test "${ac_cv_search_opendir+set}" = set; then
5931 :
5932else
5933 ac_cv_search_opendir=no
5934fi
5935rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005936LIBS=$ac_func_search_save_LIBS
5937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005938{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5939echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940ac_res=$ac_cv_search_opendir
5941if test "$ac_res" != no; then
5942 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005945
Michael W. Hudson54241132001-12-07 15:38:26 +00005946else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005947 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5948echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005949if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005950 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005951else
5952 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005954/* confdefs.h. */
5955_ACEOF
5956cat confdefs.h >>conftest.$ac_ext
5957cat >>conftest.$ac_ext <<_ACEOF
5958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005960/* Override any GCC internal prototype to avoid an error.
5961 Use char because int might match the return type of a GCC
5962 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005963#ifdef __cplusplus
5964extern "C"
5965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005966char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005967int
5968main ()
5969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005970return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005971 ;
5972 return 0;
5973}
5974_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005975for ac_lib in '' x; do
5976 if test -z "$ac_lib"; then
5977 ac_res="none required"
5978 else
5979 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005980 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005981 fi
5982 rm -f conftest.$ac_objext conftest$ac_exeext
5983if { (ac_try="$ac_link"
5984case "(($ac_try" in
5985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5986 *) ac_try_echo=$ac_try;;
5987esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005989 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005990 ac_status=$?
5991 grep -v '^ *+' conftest.er1 >conftest.err
5992 rm -f conftest.er1
5993 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005995 (exit $ac_status); } && {
5996 test -z "$ac_c_werror_flag" ||
5997 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005998 } && test -s conftest$ac_exeext &&
5999 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006000 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006002 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006003sed 's/^/| /' conftest.$ac_ext >&5
6004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006005
Thomas Wouters477c8d52006-05-27 19:21:47 +00006006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006007
6008rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6009 conftest$ac_exeext
6010 if test "${ac_cv_search_opendir+set}" = set; then
6011 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006013done
6014if test "${ac_cv_search_opendir+set}" = set; then
6015 :
6016else
6017 ac_cv_search_opendir=no
6018fi
6019rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006020LIBS=$ac_func_search_save_LIBS
6021fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006022{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6023echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006024ac_res=$ac_cv_search_opendir
6025if test "$ac_res" != no; then
6026 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006027
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006028fi
6029
6030fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006031
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006032{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6033echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006034if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036else
6037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006038/* confdefs.h. */
6039_ACEOF
6040cat confdefs.h >>conftest.$ac_ext
6041cat >>conftest.$ac_ext <<_ACEOF
6042/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044int
6045main ()
6046{
6047return makedev(0, 0);
6048 ;
6049 return 0;
6050}
6051_ACEOF
6052rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006053if { (ac_try="$ac_link"
6054case "(($ac_try" in
6055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6056 *) ac_try_echo=$ac_try;;
6057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006059 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006061 grep -v '^ *+' conftest.er1 >conftest.err
6062 rm -f conftest.er1
6063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065 (exit $ac_status); } && {
6066 test -z "$ac_c_werror_flag" ||
6067 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006068 } && test -s conftest$ac_exeext &&
6069 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 ac_cv_header_sys_types_h_makedev=yes
6071else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006073sed 's/^/| /' conftest.$ac_ext >&5
6074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077
6078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006079 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080
6081fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006082{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6083echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084
6085if test $ac_cv_header_sys_types_h_makedev = no; then
6086if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006087 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6088echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006090 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006092{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6093echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094else
6095 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006096{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6097echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006099/* confdefs.h. */
6100_ACEOF
6101cat confdefs.h >>conftest.$ac_ext
6102cat >>conftest.$ac_ext <<_ACEOF
6103/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104$ac_includes_default
6105#include <sys/mkdev.h>
6106_ACEOF
6107rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108if { (ac_try="$ac_compile"
6109case "(($ac_try" in
6110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6111 *) ac_try_echo=$ac_try;;
6112esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006116 grep -v '^ *+' conftest.er1 >conftest.err
6117 rm -f conftest.er1
6118 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006120 (exit $ac_status); } && {
6121 test -z "$ac_c_werror_flag" ||
6122 test ! -s conftest.err
6123 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 ac_header_compiler=yes
6125else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006127sed 's/^/| /' conftest.$ac_ext >&5
6128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131
6132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006133{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6134echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135
6136# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006137{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6138echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006140/* confdefs.h. */
6141_ACEOF
6142cat confdefs.h >>conftest.$ac_ext
6143cat >>conftest.$ac_ext <<_ACEOF
6144/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145#include <sys/mkdev.h>
6146_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147if { (ac_try="$ac_cpp conftest.$ac_ext"
6148case "(($ac_try" in
6149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6150 *) ac_try_echo=$ac_try;;
6151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006155 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156 rm -f conftest.er1
6157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159 (exit $ac_status); } >/dev/null && {
6160 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6161 test ! -s conftest.err
6162 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163 ac_header_preproc=yes
6164else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006166sed 's/^/| /' conftest.$ac_ext >&5
6167
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168 ac_header_preproc=no
6169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006171rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006172{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6173echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174
6175# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006176case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6177 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006178 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6179echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6180 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6181echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006182 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006183 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006184 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006185 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6186echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6187 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6188echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006197 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006198## -------------------------------------- ##
6199## Report this to http://bugs.python.org/ ##
6200## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006201_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006202 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006203 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006205{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6206echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006208 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209else
6210 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6211fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006212{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6213echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214
6215fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006216if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217
6218cat >>confdefs.h <<\_ACEOF
6219#define MAJOR_IN_MKDEV 1
6220_ACEOF
6221
6222fi
6223
6224
6225
6226 if test $ac_cv_header_sys_mkdev_h = no; then
6227 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006228 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6229echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006231 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006233{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6234echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235else
6236 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006237{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6238echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006240/* confdefs.h. */
6241_ACEOF
6242cat confdefs.h >>conftest.$ac_ext
6243cat >>conftest.$ac_ext <<_ACEOF
6244/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245$ac_includes_default
6246#include <sys/sysmacros.h>
6247_ACEOF
6248rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249if { (ac_try="$ac_compile"
6250case "(($ac_try" in
6251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6252 *) ac_try_echo=$ac_try;;
6253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006257 grep -v '^ *+' conftest.er1 >conftest.err
6258 rm -f conftest.er1
6259 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261 (exit $ac_status); } && {
6262 test -z "$ac_c_werror_flag" ||
6263 test ! -s conftest.err
6264 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265 ac_header_compiler=yes
6266else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006268sed 's/^/| /' conftest.$ac_ext >&5
6269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006270 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006272
6273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006274{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6275echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276
6277# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006278{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6279echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006281/* confdefs.h. */
6282_ACEOF
6283cat confdefs.h >>conftest.$ac_ext
6284cat >>conftest.$ac_ext <<_ACEOF
6285/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286#include <sys/sysmacros.h>
6287_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006288if { (ac_try="$ac_cpp conftest.$ac_ext"
6289case "(($ac_try" in
6290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6291 *) ac_try_echo=$ac_try;;
6292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006294 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006296 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297 rm -f conftest.er1
6298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006300 (exit $ac_status); } >/dev/null && {
6301 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6302 test ! -s conftest.err
6303 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304 ac_header_preproc=yes
6305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006307sed 's/^/| /' conftest.$ac_ext >&5
6308
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006309 ac_header_preproc=no
6310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006311
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006312rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006313{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6314echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315
6316# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006317case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6318 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006319 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6320echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6321 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6322echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006323 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006324 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006325 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006326 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6327echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6328 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6329echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006338 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006339## -------------------------------------- ##
6340## Report this to http://bugs.python.org/ ##
6341## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006342_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006343 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006344 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006346{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6347echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006348if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006349 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006350else
6351 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6352fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006353{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6354echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006355
6356fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006357if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006358
6359cat >>confdefs.h <<\_ACEOF
6360#define MAJOR_IN_SYSMACROS 1
6361_ACEOF
6362
6363fi
6364
6365
6366 fi
6367fi
6368
Michael W. Hudson54241132001-12-07 15:38:26 +00006369
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006371
6372for ac_header in term.h
6373do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006374as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6375{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6376echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006377if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006378 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379else
6380 cat >conftest.$ac_ext <<_ACEOF
6381/* confdefs.h. */
6382_ACEOF
6383cat confdefs.h >>conftest.$ac_ext
6384cat >>conftest.$ac_ext <<_ACEOF
6385/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006386
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006387#ifdef HAVE_CURSES_H
6388#include <curses.h>
6389#endif
6390
6391
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006392#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006393_ACEOF
6394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006395if { (ac_try="$ac_compile"
6396case "(($ac_try" in
6397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6398 *) ac_try_echo=$ac_try;;
6399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402 ac_status=$?
6403 grep -v '^ *+' conftest.er1 >conftest.err
6404 rm -f conftest.er1
6405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006407 (exit $ac_status); } && {
6408 test -z "$ac_c_werror_flag" ||
6409 test ! -s conftest.err
6410 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006411 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006413 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006414sed 's/^/| /' conftest.$ac_ext >&5
6415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418
6419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006421ac_res=`eval echo '${'$as_ac_Header'}'`
6422 { echo "$as_me:$LINENO: result: $ac_res" >&5
6423echo "${ECHO_T}$ac_res" >&6; }
6424if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006425 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006426#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006427_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006428
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006429fi
6430
6431done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006432
6433
Martin v. Löwis11017b12006-01-14 18:12:57 +00006434# On Linux, netlink.h requires asm/types.h
6435
6436for ac_header in linux/netlink.h
6437do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006438as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6439{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6440echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006441if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006442 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443else
6444 cat >conftest.$ac_ext <<_ACEOF
6445/* confdefs.h. */
6446_ACEOF
6447cat confdefs.h >>conftest.$ac_ext
6448cat >>conftest.$ac_ext <<_ACEOF
6449/* end confdefs.h. */
6450
6451#ifdef HAVE_ASM_TYPES_H
6452#include <asm/types.h>
6453#endif
6454#ifdef HAVE_SYS_SOCKET_H
6455#include <sys/socket.h>
6456#endif
6457
6458
6459#include <$ac_header>
6460_ACEOF
6461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006462if { (ac_try="$ac_compile"
6463case "(($ac_try" in
6464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6465 *) ac_try_echo=$ac_try;;
6466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006469 ac_status=$?
6470 grep -v '^ *+' conftest.er1 >conftest.err
6471 rm -f conftest.er1
6472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006474 (exit $ac_status); } && {
6475 test -z "$ac_c_werror_flag" ||
6476 test ! -s conftest.err
6477 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006478 eval "$as_ac_Header=yes"
6479else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006480 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006481sed 's/^/| /' conftest.$ac_ext >&5
6482
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006483 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485
6486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006488ac_res=`eval echo '${'$as_ac_Header'}'`
6489 { echo "$as_me:$LINENO: result: $ac_res" >&5
6490echo "${ECHO_T}$ac_res" >&6; }
6491if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006492 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006493#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006494_ACEOF
6495
6496fi
6497
6498done
6499
6500
Guido van Rossum627b2d71993-12-24 10:39:16 +00006501# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006502was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006503{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6504echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006506/* confdefs.h. */
6507_ACEOF
6508cat confdefs.h >>conftest.$ac_ext
6509cat >>conftest.$ac_ext <<_ACEOF
6510/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006511#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006512
6513_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006515 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006516 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517else
Martin v. Löwis11437992002-04-12 09:54:03 +00006518
6519
6520cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006521#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006522_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006523
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006524
Guido van Rossum627b2d71993-12-24 10:39:16 +00006525fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00006526rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006528{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6529echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006530
Neal Norwitz11690112002-07-30 01:08:28 +00006531# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006532{ echo "$as_me:$LINENO: checking for makedev" >&5
6533echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006535/* confdefs.h. */
6536_ACEOF
6537cat confdefs.h >>conftest.$ac_ext
6538cat >>conftest.$ac_ext <<_ACEOF
6539/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006540#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006541int
6542main ()
6543{
6544 makedev(0, 0)
6545 ;
6546 return 0;
6547}
6548_ACEOF
6549rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550if { (ac_try="$ac_link"
6551case "(($ac_try" in
6552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6553 *) ac_try_echo=$ac_try;;
6554esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006558 grep -v '^ *+' conftest.er1 >conftest.err
6559 rm -f conftest.er1
6560 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006562 (exit $ac_status); } && {
6563 test -z "$ac_c_werror_flag" ||
6564 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006565 } && test -s conftest$ac_exeext &&
6566 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006567 ac_cv_has_makedev=yes
6568else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006570sed 's/^/| /' conftest.$ac_ext >&5
6571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006572 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574
6575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006576 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006577if test "$ac_cv_has_makedev" = "no"; then
6578 # we didn't link, try if _OSF_SOURCE will allow us to link
6579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006580/* confdefs.h. */
6581_ACEOF
6582cat confdefs.h >>conftest.$ac_ext
6583cat >>conftest.$ac_ext <<_ACEOF
6584/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006585
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006586#define _OSF_SOURCE 1
6587#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006588
Neal Norwitz11690112002-07-30 01:08:28 +00006589int
6590main ()
6591{
6592 makedev(0, 0)
6593 ;
6594 return 0;
6595}
6596_ACEOF
6597rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006598if { (ac_try="$ac_link"
6599case "(($ac_try" in
6600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6601 *) ac_try_echo=$ac_try;;
6602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006606 grep -v '^ *+' conftest.er1 >conftest.err
6607 rm -f conftest.er1
6608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006610 (exit $ac_status); } && {
6611 test -z "$ac_c_werror_flag" ||
6612 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006613 } && test -s conftest$ac_exeext &&
6614 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006615 ac_cv_has_makedev=yes
6616else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006618sed 's/^/| /' conftest.$ac_ext >&5
6619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006622
6623rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006624 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006625 if test "$ac_cv_has_makedev" = "yes"; then
6626
6627cat >>confdefs.h <<\_ACEOF
6628#define _OSF_SOURCE 1
6629_ACEOF
6630
6631 fi
6632fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006633{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6634echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006635if test "$ac_cv_has_makedev" = "yes"; then
6636
6637cat >>confdefs.h <<\_ACEOF
6638#define HAVE_MAKEDEV 1
6639_ACEOF
6640
6641fi
6642
Martin v. Löwis399a6892002-10-04 10:22:02 +00006643# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6644# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6645# defined, but the compiler does not support pragma redefine_extname,
6646# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6647# structures (such as rlimit64) without declaring them. As a
6648# work-around, disable LFS on such configurations
6649
6650use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006651{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6652echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006654/* confdefs.h. */
6655_ACEOF
6656cat confdefs.h >>conftest.$ac_ext
6657cat >>conftest.$ac_ext <<_ACEOF
6658/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006659
6660#define _LARGEFILE_SOURCE 1
6661#define _FILE_OFFSET_BITS 64
6662#include <sys/resource.h>
6663
Martin v. Löwis399a6892002-10-04 10:22:02 +00006664int
6665main ()
6666{
6667struct rlimit foo;
6668 ;
6669 return 0;
6670}
6671_ACEOF
6672rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006673if { (ac_try="$ac_compile"
6674case "(($ac_try" in
6675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6676 *) ac_try_echo=$ac_try;;
6677esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006681 grep -v '^ *+' conftest.er1 >conftest.err
6682 rm -f conftest.er1
6683 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006685 (exit $ac_status); } && {
6686 test -z "$ac_c_werror_flag" ||
6687 test ! -s conftest.err
6688 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006689 sol_lfs_bug=no
6690else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006692sed 's/^/| /' conftest.$ac_ext >&5
6693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006694 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006696
6697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006698{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6699echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006700if test "$sol_lfs_bug" = "yes"; then
6701 use_lfs=no
6702fi
6703
6704if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006705# Two defines needed to enable largefile support on various platforms
6706# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006707
Martin v. Löwis11437992002-04-12 09:54:03 +00006708cat >>confdefs.h <<\_ACEOF
6709#define _LARGEFILE_SOURCE 1
6710_ACEOF
6711
6712
6713cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006714#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006715_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006716
Martin v. Löwis399a6892002-10-04 10:22:02 +00006717fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006718
Guido van Rossum84e7b241996-08-19 21:59:00 +00006719# Add some code to confdefs.h so that the test for off_t works on SCO
6720cat >> confdefs.h <<\EOF
6721#if defined(SCO_DS)
6722#undef _OFF_T
6723#endif
6724EOF
6725
Guido van Rossumef2255b2000-03-10 22:30:29 +00006726# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006727{ echo "$as_me:$LINENO: checking for mode_t" >&5
6728echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006729if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006730 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006731else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006732 cat >conftest.$ac_ext <<_ACEOF
6733/* confdefs.h. */
6734_ACEOF
6735cat confdefs.h >>conftest.$ac_ext
6736cat >>conftest.$ac_ext <<_ACEOF
6737/* end confdefs.h. */
6738$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006739typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006740int
6741main ()
6742{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006743if ((ac__type_new_ *) 0)
6744 return 0;
6745if (sizeof (ac__type_new_))
6746 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006747 ;
6748 return 0;
6749}
6750_ACEOF
6751rm -f conftest.$ac_objext
6752if { (ac_try="$ac_compile"
6753case "(($ac_try" in
6754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6755 *) ac_try_echo=$ac_try;;
6756esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006758 (eval "$ac_compile") 2>conftest.er1
6759 ac_status=$?
6760 grep -v '^ *+' conftest.er1 >conftest.err
6761 rm -f conftest.er1
6762 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006764 (exit $ac_status); } && {
6765 test -z "$ac_c_werror_flag" ||
6766 test ! -s conftest.err
6767 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006768 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006769else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006771sed 's/^/| /' conftest.$ac_ext >&5
6772
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006773 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006775
6776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006777fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006778{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6779echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6780if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006781 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006782else
Martin v. Löwis11437992002-04-12 09:54:03 +00006783
6784cat >>confdefs.h <<_ACEOF
6785#define mode_t int
6786_ACEOF
6787
6788fi
6789
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006790{ echo "$as_me:$LINENO: checking for off_t" >&5
6791echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006792if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006793 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006795 cat >conftest.$ac_ext <<_ACEOF
6796/* confdefs.h. */
6797_ACEOF
6798cat confdefs.h >>conftest.$ac_ext
6799cat >>conftest.$ac_ext <<_ACEOF
6800/* end confdefs.h. */
6801$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006802typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006803int
6804main ()
6805{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006806if ((ac__type_new_ *) 0)
6807 return 0;
6808if (sizeof (ac__type_new_))
6809 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006810 ;
6811 return 0;
6812}
6813_ACEOF
6814rm -f conftest.$ac_objext
6815if { (ac_try="$ac_compile"
6816case "(($ac_try" in
6817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6818 *) ac_try_echo=$ac_try;;
6819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006821 (eval "$ac_compile") 2>conftest.er1
6822 ac_status=$?
6823 grep -v '^ *+' conftest.er1 >conftest.err
6824 rm -f conftest.er1
6825 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006827 (exit $ac_status); } && {
6828 test -z "$ac_c_werror_flag" ||
6829 test ! -s conftest.err
6830 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006831 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006832else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006834sed 's/^/| /' conftest.$ac_ext >&5
6835
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006836 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006838
6839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006840fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006841{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6842echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6843if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006844 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006845else
Martin v. Löwis11437992002-04-12 09:54:03 +00006846
6847cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006848#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006849_ACEOF
6850
6851fi
6852
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006853{ echo "$as_me:$LINENO: checking for pid_t" >&5
6854echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006855if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006856 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006857else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006858 cat >conftest.$ac_ext <<_ACEOF
6859/* confdefs.h. */
6860_ACEOF
6861cat confdefs.h >>conftest.$ac_ext
6862cat >>conftest.$ac_ext <<_ACEOF
6863/* end confdefs.h. */
6864$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006865typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006866int
6867main ()
6868{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006869if ((ac__type_new_ *) 0)
6870 return 0;
6871if (sizeof (ac__type_new_))
6872 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006873 ;
6874 return 0;
6875}
6876_ACEOF
6877rm -f conftest.$ac_objext
6878if { (ac_try="$ac_compile"
6879case "(($ac_try" in
6880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6881 *) ac_try_echo=$ac_try;;
6882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006884 (eval "$ac_compile") 2>conftest.er1
6885 ac_status=$?
6886 grep -v '^ *+' conftest.er1 >conftest.err
6887 rm -f conftest.er1
6888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006890 (exit $ac_status); } && {
6891 test -z "$ac_c_werror_flag" ||
6892 test ! -s conftest.err
6893 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006894 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006897sed 's/^/| /' conftest.$ac_ext >&5
6898
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006899 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006901
6902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006903fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006904{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6905echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6906if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006907 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006908else
Martin v. Löwis11437992002-04-12 09:54:03 +00006909
6910cat >>confdefs.h <<_ACEOF
6911#define pid_t int
6912_ACEOF
6913
6914fi
6915
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006916{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6917echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006918if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006920else
6921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006922/* confdefs.h. */
6923_ACEOF
6924cat confdefs.h >>conftest.$ac_ext
6925cat >>conftest.$ac_ext <<_ACEOF
6926/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006927#include <sys/types.h>
6928#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006929
Martin v. Löwis11437992002-04-12 09:54:03 +00006930int
6931main ()
6932{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006933return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 ;
6935 return 0;
6936}
6937_ACEOF
6938rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006939if { (ac_try="$ac_compile"
6940case "(($ac_try" in
6941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6942 *) ac_try_echo=$ac_try;;
6943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006947 grep -v '^ *+' conftest.er1 >conftest.err
6948 rm -f conftest.er1
6949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006951 (exit $ac_status); } && {
6952 test -z "$ac_c_werror_flag" ||
6953 test ! -s conftest.err
6954 } && test -s conftest.$ac_objext; then
6955 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006956else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006958sed 's/^/| /' conftest.$ac_ext >&5
6959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006960 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006962
6963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006964fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006965{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6966echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006967
Martin v. Löwis11437992002-04-12 09:54:03 +00006968cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006969#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006970_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971
Michael W. Hudson54241132001-12-07 15:38:26 +00006972
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006973{ echo "$as_me:$LINENO: checking for size_t" >&5
6974echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006975if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006976 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006978 cat >conftest.$ac_ext <<_ACEOF
6979/* confdefs.h. */
6980_ACEOF
6981cat confdefs.h >>conftest.$ac_ext
6982cat >>conftest.$ac_ext <<_ACEOF
6983/* end confdefs.h. */
6984$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006985typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006986int
6987main ()
6988{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006989if ((ac__type_new_ *) 0)
6990 return 0;
6991if (sizeof (ac__type_new_))
6992 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006993 ;
6994 return 0;
6995}
6996_ACEOF
6997rm -f conftest.$ac_objext
6998if { (ac_try="$ac_compile"
6999case "(($ac_try" in
7000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7001 *) ac_try_echo=$ac_try;;
7002esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007004 (eval "$ac_compile") 2>conftest.er1
7005 ac_status=$?
7006 grep -v '^ *+' conftest.er1 >conftest.err
7007 rm -f conftest.er1
7008 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007010 (exit $ac_status); } && {
7011 test -z "$ac_c_werror_flag" ||
7012 test ! -s conftest.err
7013 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007014 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007015else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007017sed 's/^/| /' conftest.$ac_ext >&5
7018
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007019 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007021
7022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007023fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007024{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7025echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7026if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007027 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007028else
Martin v. Löwis11437992002-04-12 09:54:03 +00007029
7030cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007032_ACEOF
7033
7034fi
7035
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007036{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7037echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007038if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007040else
7041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007042/* confdefs.h. */
7043_ACEOF
7044cat confdefs.h >>conftest.$ac_ext
7045cat >>conftest.$ac_ext <<_ACEOF
7046/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007047#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007048
7049_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007051 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007052 ac_cv_type_uid_t=yes
7053else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054 ac_cv_type_uid_t=no
7055fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +00007056rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007059{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7060echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007061if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062
Martin v. Löwis11437992002-04-12 09:54:03 +00007063cat >>confdefs.h <<\_ACEOF
7064#define uid_t int
7065_ACEOF
7066
7067
7068cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007069#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007070_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007071
7072fi
7073
Mark Dickinsonbd792642009-03-18 20:06:12 +00007074
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007075 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7076echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007077if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007078 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007079else
7080 ac_cv_c_uint32_t=no
7081 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7082 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7083 cat >conftest.$ac_ext <<_ACEOF
7084/* confdefs.h. */
7085_ACEOF
7086cat confdefs.h >>conftest.$ac_ext
7087cat >>conftest.$ac_ext <<_ACEOF
7088/* end confdefs.h. */
7089$ac_includes_default
7090int
7091main ()
7092{
7093static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7094test_array [0] = 0
7095
7096 ;
7097 return 0;
7098}
7099_ACEOF
7100rm -f conftest.$ac_objext
7101if { (ac_try="$ac_compile"
7102case "(($ac_try" in
7103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7104 *) ac_try_echo=$ac_try;;
7105esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007107 (eval "$ac_compile") 2>conftest.er1
7108 ac_status=$?
7109 grep -v '^ *+' conftest.er1 >conftest.err
7110 rm -f conftest.er1
7111 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007113 (exit $ac_status); } && {
7114 test -z "$ac_c_werror_flag" ||
7115 test ! -s conftest.err
7116 } && test -s conftest.$ac_objext; then
7117 case $ac_type in
7118 uint32_t) ac_cv_c_uint32_t=yes ;;
7119 *) ac_cv_c_uint32_t=$ac_type ;;
7120esac
7121
7122else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007123 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007124sed 's/^/| /' conftest.$ac_ext >&5
7125
7126
7127fi
7128
7129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7130 test "$ac_cv_c_uint32_t" != no && break
7131 done
7132fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007133{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7134echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135 case $ac_cv_c_uint32_t in #(
7136 no|yes) ;; #(
7137 *)
7138
7139cat >>confdefs.h <<\_ACEOF
7140#define _UINT32_T 1
7141_ACEOF
7142
7143
7144cat >>confdefs.h <<_ACEOF
7145#define uint32_t $ac_cv_c_uint32_t
7146_ACEOF
7147;;
7148 esac
7149
7150
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007151 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7152echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007153if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007154 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007155else
7156 ac_cv_c_uint64_t=no
7157 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7158 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7159 cat >conftest.$ac_ext <<_ACEOF
7160/* confdefs.h. */
7161_ACEOF
7162cat confdefs.h >>conftest.$ac_ext
7163cat >>conftest.$ac_ext <<_ACEOF
7164/* end confdefs.h. */
7165$ac_includes_default
7166int
7167main ()
7168{
7169static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7170test_array [0] = 0
7171
7172 ;
7173 return 0;
7174}
7175_ACEOF
7176rm -f conftest.$ac_objext
7177if { (ac_try="$ac_compile"
7178case "(($ac_try" in
7179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7180 *) ac_try_echo=$ac_try;;
7181esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007183 (eval "$ac_compile") 2>conftest.er1
7184 ac_status=$?
7185 grep -v '^ *+' conftest.er1 >conftest.err
7186 rm -f conftest.er1
7187 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007189 (exit $ac_status); } && {
7190 test -z "$ac_c_werror_flag" ||
7191 test ! -s conftest.err
7192 } && test -s conftest.$ac_objext; then
7193 case $ac_type in
7194 uint64_t) ac_cv_c_uint64_t=yes ;;
7195 *) ac_cv_c_uint64_t=$ac_type ;;
7196esac
7197
7198else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007199 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007200sed 's/^/| /' conftest.$ac_ext >&5
7201
7202
7203fi
7204
7205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206 test "$ac_cv_c_uint64_t" != no && break
7207 done
7208fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007209{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7210echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007211 case $ac_cv_c_uint64_t in #(
7212 no|yes) ;; #(
7213 *)
7214
7215cat >>confdefs.h <<\_ACEOF
7216#define _UINT64_T 1
7217_ACEOF
7218
7219
7220cat >>confdefs.h <<_ACEOF
7221#define uint64_t $ac_cv_c_uint64_t
7222_ACEOF
7223;;
7224 esac
7225
7226
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007227 { echo "$as_me:$LINENO: checking for int32_t" >&5
7228echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007229if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007230 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007231else
7232 ac_cv_c_int32_t=no
7233 for ac_type in 'int32_t' 'int' 'long int' \
7234 'long long int' 'short int' 'signed char'; do
7235 cat >conftest.$ac_ext <<_ACEOF
7236/* confdefs.h. */
7237_ACEOF
7238cat confdefs.h >>conftest.$ac_ext
7239cat >>conftest.$ac_ext <<_ACEOF
7240/* end confdefs.h. */
7241$ac_includes_default
7242int
7243main ()
7244{
7245static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7246test_array [0] = 0
7247
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
7253if { (ac_try="$ac_compile"
7254case "(($ac_try" in
7255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7256 *) ac_try_echo=$ac_try;;
7257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007259 (eval "$ac_compile") 2>conftest.er1
7260 ac_status=$?
7261 grep -v '^ *+' conftest.er1 >conftest.err
7262 rm -f conftest.er1
7263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007265 (exit $ac_status); } && {
7266 test -z "$ac_c_werror_flag" ||
7267 test ! -s conftest.err
7268 } && test -s conftest.$ac_objext; then
7269 cat >conftest.$ac_ext <<_ACEOF
7270/* confdefs.h. */
7271_ACEOF
7272cat confdefs.h >>conftest.$ac_ext
7273cat >>conftest.$ac_ext <<_ACEOF
7274/* end confdefs.h. */
7275$ac_includes_default
7276int
7277main ()
7278{
7279static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007280 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007281test_array [0] = 0
7282
7283 ;
7284 return 0;
7285}
7286_ACEOF
7287rm -f conftest.$ac_objext
7288if { (ac_try="$ac_compile"
7289case "(($ac_try" in
7290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7291 *) ac_try_echo=$ac_try;;
7292esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007294 (eval "$ac_compile") 2>conftest.er1
7295 ac_status=$?
7296 grep -v '^ *+' conftest.er1 >conftest.err
7297 rm -f conftest.er1
7298 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007300 (exit $ac_status); } && {
7301 test -z "$ac_c_werror_flag" ||
7302 test ! -s conftest.err
7303 } && test -s conftest.$ac_objext; then
7304 :
7305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007306 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007307sed 's/^/| /' conftest.$ac_ext >&5
7308
7309 case $ac_type in
7310 int32_t) ac_cv_c_int32_t=yes ;;
7311 *) ac_cv_c_int32_t=$ac_type ;;
7312esac
7313
7314fi
7315
7316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007318 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007319sed 's/^/| /' conftest.$ac_ext >&5
7320
7321
7322fi
7323
7324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7325 test "$ac_cv_c_int32_t" != no && break
7326 done
7327fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007328{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7329echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007330 case $ac_cv_c_int32_t in #(
7331 no|yes) ;; #(
7332 *)
7333
7334cat >>confdefs.h <<_ACEOF
7335#define int32_t $ac_cv_c_int32_t
7336_ACEOF
7337;;
7338 esac
7339
7340
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007341 { echo "$as_me:$LINENO: checking for int64_t" >&5
7342echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007343if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007344 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007345else
7346 ac_cv_c_int64_t=no
7347 for ac_type in 'int64_t' 'int' 'long int' \
7348 'long long int' 'short int' 'signed char'; do
7349 cat >conftest.$ac_ext <<_ACEOF
7350/* confdefs.h. */
7351_ACEOF
7352cat confdefs.h >>conftest.$ac_ext
7353cat >>conftest.$ac_ext <<_ACEOF
7354/* end confdefs.h. */
7355$ac_includes_default
7356int
7357main ()
7358{
7359static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7360test_array [0] = 0
7361
7362 ;
7363 return 0;
7364}
7365_ACEOF
7366rm -f conftest.$ac_objext
7367if { (ac_try="$ac_compile"
7368case "(($ac_try" in
7369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7370 *) ac_try_echo=$ac_try;;
7371esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007373 (eval "$ac_compile") 2>conftest.er1
7374 ac_status=$?
7375 grep -v '^ *+' conftest.er1 >conftest.err
7376 rm -f conftest.er1
7377 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007379 (exit $ac_status); } && {
7380 test -z "$ac_c_werror_flag" ||
7381 test ! -s conftest.err
7382 } && test -s conftest.$ac_objext; then
7383 cat >conftest.$ac_ext <<_ACEOF
7384/* confdefs.h. */
7385_ACEOF
7386cat confdefs.h >>conftest.$ac_ext
7387cat >>conftest.$ac_ext <<_ACEOF
7388/* end confdefs.h. */
7389$ac_includes_default
7390int
7391main ()
7392{
7393static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007394 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007395test_array [0] = 0
7396
7397 ;
7398 return 0;
7399}
7400_ACEOF
7401rm -f conftest.$ac_objext
7402if { (ac_try="$ac_compile"
7403case "(($ac_try" in
7404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7405 *) ac_try_echo=$ac_try;;
7406esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007408 (eval "$ac_compile") 2>conftest.er1
7409 ac_status=$?
7410 grep -v '^ *+' conftest.er1 >conftest.err
7411 rm -f conftest.er1
7412 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007414 (exit $ac_status); } && {
7415 test -z "$ac_c_werror_flag" ||
7416 test ! -s conftest.err
7417 } && test -s conftest.$ac_objext; then
7418 :
7419else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007420 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007421sed 's/^/| /' conftest.$ac_ext >&5
7422
7423 case $ac_type in
7424 int64_t) ac_cv_c_int64_t=yes ;;
7425 *) ac_cv_c_int64_t=$ac_type ;;
7426esac
7427
7428fi
7429
7430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7431else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007432 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007433sed 's/^/| /' conftest.$ac_ext >&5
7434
7435
7436fi
7437
7438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7439 test "$ac_cv_c_int64_t" != no && break
7440 done
7441fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007442{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7443echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007444 case $ac_cv_c_int64_t in #(
7445 no|yes) ;; #(
7446 *)
7447
7448cat >>confdefs.h <<_ACEOF
7449#define int64_t $ac_cv_c_int64_t
7450_ACEOF
7451;;
7452 esac
7453
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007454{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7455echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007456if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007457 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007458else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007459 cat >conftest.$ac_ext <<_ACEOF
7460/* confdefs.h. */
7461_ACEOF
7462cat confdefs.h >>conftest.$ac_ext
7463cat >>conftest.$ac_ext <<_ACEOF
7464/* end confdefs.h. */
7465$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007466typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007467int
7468main ()
7469{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007470if ((ac__type_new_ *) 0)
7471 return 0;
7472if (sizeof (ac__type_new_))
7473 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007474 ;
7475 return 0;
7476}
7477_ACEOF
7478rm -f conftest.$ac_objext
7479if { (ac_try="$ac_compile"
7480case "(($ac_try" in
7481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7482 *) ac_try_echo=$ac_try;;
7483esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007485 (eval "$ac_compile") 2>conftest.er1
7486 ac_status=$?
7487 grep -v '^ *+' conftest.er1 >conftest.err
7488 rm -f conftest.er1
7489 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007491 (exit $ac_status); } && {
7492 test -z "$ac_c_werror_flag" ||
7493 test ! -s conftest.err
7494 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007495 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007496else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007497 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007498sed 's/^/| /' conftest.$ac_ext >&5
7499
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007500 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007502
7503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007504fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007505{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7506echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7507if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007508
7509cat >>confdefs.h <<\_ACEOF
7510#define HAVE_SSIZE_T 1
7511_ACEOF
7512
7513fi
7514
Jack Jansendd19cf82001-12-06 22:36:17 +00007515
Michael W. Hudson54241132001-12-07 15:38:26 +00007516# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007517# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007518{ echo "$as_me:$LINENO: checking for int" >&5
7519echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7520if test "${ac_cv_type_int+set}" = set; then
7521 echo $ECHO_N "(cached) $ECHO_C" >&6
7522else
7523 cat >conftest.$ac_ext <<_ACEOF
7524/* confdefs.h. */
7525_ACEOF
7526cat confdefs.h >>conftest.$ac_ext
7527cat >>conftest.$ac_ext <<_ACEOF
7528/* end confdefs.h. */
7529$ac_includes_default
7530typedef int ac__type_new_;
7531int
7532main ()
7533{
7534if ((ac__type_new_ *) 0)
7535 return 0;
7536if (sizeof (ac__type_new_))
7537 return 0;
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
7543if { (ac_try="$ac_compile"
7544case "(($ac_try" in
7545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7546 *) ac_try_echo=$ac_try;;
7547esac
7548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7549 (eval "$ac_compile") 2>conftest.er1
7550 ac_status=$?
7551 grep -v '^ *+' conftest.er1 >conftest.err
7552 rm -f conftest.er1
7553 cat conftest.err >&5
7554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7555 (exit $ac_status); } && {
7556 test -z "$ac_c_werror_flag" ||
7557 test ! -s conftest.err
7558 } && test -s conftest.$ac_objext; then
7559 ac_cv_type_int=yes
7560else
7561 echo "$as_me: failed program was:" >&5
7562sed 's/^/| /' conftest.$ac_ext >&5
7563
7564 ac_cv_type_int=no
7565fi
7566
7567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7568fi
7569{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7570echo "${ECHO_T}$ac_cv_type_int" >&6; }
7571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007572# The cast to long int works around a bug in the HP C Compiler
7573# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7574# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7575# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007576{ echo "$as_me:$LINENO: checking size of int" >&5
7577echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007578if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007579 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007580else
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 if test "$cross_compiling" = yes; then
7582 # Depending upon the size, compute the lo and hi bounds.
7583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007584/* confdefs.h. */
7585_ACEOF
7586cat confdefs.h >>conftest.$ac_ext
7587cat >>conftest.$ac_ext <<_ACEOF
7588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007589$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007590 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007591int
7592main ()
7593{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007594static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007595test_array [0] = 0
7596
7597 ;
7598 return 0;
7599}
7600_ACEOF
7601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602if { (ac_try="$ac_compile"
7603case "(($ac_try" in
7604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7605 *) ac_try_echo=$ac_try;;
7606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007610 grep -v '^ *+' conftest.er1 >conftest.err
7611 rm -f conftest.er1
7612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007614 (exit $ac_status); } && {
7615 test -z "$ac_c_werror_flag" ||
7616 test ! -s conftest.err
7617 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 ac_lo=0 ac_mid=0
7619 while :; do
7620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007621/* confdefs.h. */
7622_ACEOF
7623cat confdefs.h >>conftest.$ac_ext
7624cat >>conftest.$ac_ext <<_ACEOF
7625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007626$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007627 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007628int
7629main ()
7630{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007631static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007632test_array [0] = 0
7633
7634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639if { (ac_try="$ac_compile"
7640case "(($ac_try" in
7641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7642 *) ac_try_echo=$ac_try;;
7643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007647 grep -v '^ *+' conftest.er1 >conftest.err
7648 rm -f conftest.er1
7649 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 (exit $ac_status); } && {
7652 test -z "$ac_c_werror_flag" ||
7653 test ! -s conftest.err
7654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_hi=$ac_mid; break
7656else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007658sed 's/^/| /' conftest.$ac_ext >&5
7659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660 ac_lo=`expr $ac_mid + 1`
7661 if test $ac_lo -le $ac_mid; then
7662 ac_lo= ac_hi=
7663 break
7664 fi
7665 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667
7668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 done
7670else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007672sed 's/^/| /' conftest.$ac_ext >&5
7673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007675/* confdefs.h. */
7676_ACEOF
7677cat confdefs.h >>conftest.$ac_ext
7678cat >>conftest.$ac_ext <<_ACEOF
7679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007680$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007681 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007682int
7683main ()
7684{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007685static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007686test_array [0] = 0
7687
7688 ;
7689 return 0;
7690}
7691_ACEOF
7692rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693if { (ac_try="$ac_compile"
7694case "(($ac_try" in
7695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7696 *) ac_try_echo=$ac_try;;
7697esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007701 grep -v '^ *+' conftest.er1 >conftest.err
7702 rm -f conftest.er1
7703 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705 (exit $ac_status); } && {
7706 test -z "$ac_c_werror_flag" ||
7707 test ! -s conftest.err
7708 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 ac_hi=-1 ac_mid=-1
7710 while :; do
7711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007712/* confdefs.h. */
7713_ACEOF
7714cat confdefs.h >>conftest.$ac_ext
7715cat >>conftest.$ac_ext <<_ACEOF
7716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007717$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007718 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007719int
7720main ()
7721{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007722static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007723test_array [0] = 0
7724
7725 ;
7726 return 0;
7727}
7728_ACEOF
7729rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730if { (ac_try="$ac_compile"
7731case "(($ac_try" in
7732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7733 *) ac_try_echo=$ac_try;;
7734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007738 grep -v '^ *+' conftest.er1 >conftest.err
7739 rm -f conftest.er1
7740 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742 (exit $ac_status); } && {
7743 test -z "$ac_c_werror_flag" ||
7744 test ! -s conftest.err
7745 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ac_lo=$ac_mid; break
7747else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007749sed 's/^/| /' conftest.$ac_ext >&5
7750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751 ac_hi=`expr '(' $ac_mid ')' - 1`
7752 if test $ac_mid -le $ac_hi; then
7753 ac_lo= ac_hi=
7754 break
7755 fi
7756 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758
7759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 done
7761else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007763sed 's/^/| /' conftest.$ac_ext >&5
7764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767
7768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770
7771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007772# Binary search between lo and hi bounds.
7773while test "x$ac_lo" != "x$ac_hi"; do
7774 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007776/* confdefs.h. */
7777_ACEOF
7778cat confdefs.h >>conftest.$ac_ext
7779cat >>conftest.$ac_ext <<_ACEOF
7780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007781$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007782 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007783int
7784main ()
7785{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007787test_array [0] = 0
7788
7789 ;
7790 return 0;
7791}
7792_ACEOF
7793rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794if { (ac_try="$ac_compile"
7795case "(($ac_try" in
7796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7797 *) ac_try_echo=$ac_try;;
7798esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007802 grep -v '^ *+' conftest.er1 >conftest.err
7803 rm -f conftest.er1
7804 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 (exit $ac_status); } && {
7807 test -z "$ac_c_werror_flag" ||
7808 test ! -s conftest.err
7809 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 ac_hi=$ac_mid
7811else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007813sed 's/^/| /' conftest.$ac_ext >&5
7814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817
7818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007819done
7820case $ac_lo in
7821?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007823 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007824See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007825echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007826See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007827 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828 else
7829 ac_cv_sizeof_int=0
7830 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007831esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007832else
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007834/* confdefs.h. */
7835_ACEOF
7836cat confdefs.h >>conftest.$ac_ext
7837cat >>conftest.$ac_ext <<_ACEOF
7838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007839$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007840 typedef int ac__type_sizeof_;
7841static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7842static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007843#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007844#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007845int
7846main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007847{
Martin v. Löwis11437992002-04-12 09:54:03 +00007848
7849 FILE *f = fopen ("conftest.val", "w");
7850 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007852 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007855 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007857 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 }
7859 else
7860 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007862 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007864 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007867
7868 ;
7869 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007870}
Martin v. Löwis11437992002-04-12 09:54:03 +00007871_ACEOF
7872rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873if { (ac_try="$ac_link"
7874case "(($ac_try" in
7875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7876 *) ac_try_echo=$ac_try;;
7877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883 { (case "(($ac_try" in
7884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7885 *) ac_try_echo=$ac_try;;
7886esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 (exit $ac_status); }; }; then
7892 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007894 echo "$as_me: program exited with status $ac_status" >&5
7895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007896sed 's/^/| /' conftest.$ac_ext >&5
7897
Martin v. Löwis11437992002-04-12 09:54:03 +00007898( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007900 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007901See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007902echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007903See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007904 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905 else
7906 ac_cv_sizeof_int=0
7907 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909rm -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 +00007910fi
7911rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007912fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007913{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7914echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915
7916
7917
Martin v. Löwis11437992002-04-12 09:54:03 +00007918cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007919#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007921
7922
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007923{ echo "$as_me:$LINENO: checking for long" >&5
7924echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7925if test "${ac_cv_type_long+set}" = set; then
7926 echo $ECHO_N "(cached) $ECHO_C" >&6
7927else
7928 cat >conftest.$ac_ext <<_ACEOF
7929/* confdefs.h. */
7930_ACEOF
7931cat confdefs.h >>conftest.$ac_ext
7932cat >>conftest.$ac_ext <<_ACEOF
7933/* end confdefs.h. */
7934$ac_includes_default
7935typedef long ac__type_new_;
7936int
7937main ()
7938{
7939if ((ac__type_new_ *) 0)
7940 return 0;
7941if (sizeof (ac__type_new_))
7942 return 0;
7943 ;
7944 return 0;
7945}
7946_ACEOF
7947rm -f conftest.$ac_objext
7948if { (ac_try="$ac_compile"
7949case "(($ac_try" in
7950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7951 *) ac_try_echo=$ac_try;;
7952esac
7953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7954 (eval "$ac_compile") 2>conftest.er1
7955 ac_status=$?
7956 grep -v '^ *+' conftest.er1 >conftest.err
7957 rm -f conftest.er1
7958 cat conftest.err >&5
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); } && {
7961 test -z "$ac_c_werror_flag" ||
7962 test ! -s conftest.err
7963 } && test -s conftest.$ac_objext; then
7964 ac_cv_type_long=yes
7965else
7966 echo "$as_me: failed program was:" >&5
7967sed 's/^/| /' conftest.$ac_ext >&5
7968
7969 ac_cv_type_long=no
7970fi
7971
7972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7973fi
7974{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7975echo "${ECHO_T}$ac_cv_type_long" >&6; }
7976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977# The cast to long int works around a bug in the HP C Compiler
7978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7980# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007981{ echo "$as_me:$LINENO: checking size of long" >&5
7982echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007983if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007985else
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 if test "$cross_compiling" = yes; then
7987 # Depending upon the size, compute the lo and hi bounds.
7988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007989/* confdefs.h. */
7990_ACEOF
7991cat confdefs.h >>conftest.$ac_ext
7992cat >>conftest.$ac_ext <<_ACEOF
7993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007994$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007995 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007996int
7997main ()
7998{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007999static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008000test_array [0] = 0
8001
8002 ;
8003 return 0;
8004}
8005_ACEOF
8006rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007if { (ac_try="$ac_compile"
8008case "(($ac_try" in
8009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8010 *) ac_try_echo=$ac_try;;
8011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008015 grep -v '^ *+' conftest.er1 >conftest.err
8016 rm -f conftest.er1
8017 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019 (exit $ac_status); } && {
8020 test -z "$ac_c_werror_flag" ||
8021 test ! -s conftest.err
8022 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 ac_lo=0 ac_mid=0
8024 while :; do
8025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008026/* confdefs.h. */
8027_ACEOF
8028cat confdefs.h >>conftest.$ac_ext
8029cat >>conftest.$ac_ext <<_ACEOF
8030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008031$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008032 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008033int
8034main ()
8035{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008037test_array [0] = 0
8038
8039 ;
8040 return 0;
8041}
8042_ACEOF
8043rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044if { (ac_try="$ac_compile"
8045case "(($ac_try" in
8046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8047 *) ac_try_echo=$ac_try;;
8048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 (exit $ac_status); } && {
8057 test -z "$ac_c_werror_flag" ||
8058 test ! -s conftest.err
8059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_hi=$ac_mid; break
8061else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008063sed 's/^/| /' conftest.$ac_ext >&5
8064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065 ac_lo=`expr $ac_mid + 1`
8066 if test $ac_lo -le $ac_mid; then
8067 ac_lo= ac_hi=
8068 break
8069 fi
8070 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072
8073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 done
8075else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008077sed 's/^/| /' conftest.$ac_ext >&5
8078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* confdefs.h. */
8081_ACEOF
8082cat confdefs.h >>conftest.$ac_ext
8083cat >>conftest.$ac_ext <<_ACEOF
8084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008085$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008086 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008087int
8088main ()
8089{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008091test_array [0] = 0
8092
8093 ;
8094 return 0;
8095}
8096_ACEOF
8097rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098if { (ac_try="$ac_compile"
8099case "(($ac_try" in
8100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8101 *) ac_try_echo=$ac_try;;
8102esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008106 grep -v '^ *+' conftest.er1 >conftest.err
8107 rm -f conftest.er1
8108 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110 (exit $ac_status); } && {
8111 test -z "$ac_c_werror_flag" ||
8112 test ! -s conftest.err
8113 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ac_hi=-1 ac_mid=-1
8115 while :; do
8116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008117/* confdefs.h. */
8118_ACEOF
8119cat confdefs.h >>conftest.$ac_ext
8120cat >>conftest.$ac_ext <<_ACEOF
8121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008122$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008123 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008124int
8125main ()
8126{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008127static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008128test_array [0] = 0
8129
8130 ;
8131 return 0;
8132}
8133_ACEOF
8134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008135if { (ac_try="$ac_compile"
8136case "(($ac_try" in
8137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8138 *) ac_try_echo=$ac_try;;
8139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008143 grep -v '^ *+' conftest.er1 >conftest.err
8144 rm -f conftest.er1
8145 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147 (exit $ac_status); } && {
8148 test -z "$ac_c_werror_flag" ||
8149 test ! -s conftest.err
8150 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ac_lo=$ac_mid; break
8152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008154sed 's/^/| /' conftest.$ac_ext >&5
8155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008156 ac_hi=`expr '(' $ac_mid ')' - 1`
8157 if test $ac_mid -le $ac_hi; then
8158 ac_lo= ac_hi=
8159 break
8160 fi
8161 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163
8164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008165 done
8166else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008168sed 's/^/| /' conftest.$ac_ext >&5
8169
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008170 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172
8173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008175
8176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008177# Binary search between lo and hi bounds.
8178while test "x$ac_lo" != "x$ac_hi"; do
8179 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008181/* confdefs.h. */
8182_ACEOF
8183cat confdefs.h >>conftest.$ac_ext
8184cat >>conftest.$ac_ext <<_ACEOF
8185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008186$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008187 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008188int
8189main ()
8190{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008192test_array [0] = 0
8193
8194 ;
8195 return 0;
8196}
8197_ACEOF
8198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199if { (ac_try="$ac_compile"
8200case "(($ac_try" in
8201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8202 *) ac_try_echo=$ac_try;;
8203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008207 grep -v '^ *+' conftest.er1 >conftest.err
8208 rm -f conftest.er1
8209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211 (exit $ac_status); } && {
8212 test -z "$ac_c_werror_flag" ||
8213 test ! -s conftest.err
8214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ac_hi=$ac_mid
8216else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008218sed 's/^/| /' conftest.$ac_ext >&5
8219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222
8223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008224done
8225case $ac_lo in
8226?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008228 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008229See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008230echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008231See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008232 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233 else
8234 ac_cv_sizeof_long=0
8235 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008236esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008237else
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008239/* confdefs.h. */
8240_ACEOF
8241cat confdefs.h >>conftest.$ac_ext
8242cat >>conftest.$ac_ext <<_ACEOF
8243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008244$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008245 typedef long ac__type_sizeof_;
8246static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8247static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008248#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008249#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008250int
8251main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008252{
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
8254 FILE *f = fopen ("conftest.val", "w");
8255 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008257 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008260 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008262 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 }
8264 else
8265 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008267 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008269 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008272
8273 ;
8274 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008275}
Martin v. Löwis11437992002-04-12 09:54:03 +00008276_ACEOF
8277rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278if { (ac_try="$ac_link"
8279case "(($ac_try" in
8280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8281 *) ac_try_echo=$ac_try;;
8282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008287 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008288 { (case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 (exit $ac_status); }; }; then
8297 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008299 echo "$as_me: program exited with status $ac_status" >&5
8300echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008301sed 's/^/| /' conftest.$ac_ext >&5
8302
Martin v. Löwis11437992002-04-12 09:54:03 +00008303( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008305 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008306See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008307echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008308See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008309 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310 else
8311 ac_cv_sizeof_long=0
8312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314rm -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 +00008315fi
8316rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008317fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008318{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8319echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320
8321
8322
Martin v. Löwis11437992002-04-12 09:54:03 +00008323cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008324#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008325_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008326
8327
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008328{ echo "$as_me:$LINENO: checking for void *" >&5
8329echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8330if test "${ac_cv_type_void_p+set}" = set; then
8331 echo $ECHO_N "(cached) $ECHO_C" >&6
8332else
8333 cat >conftest.$ac_ext <<_ACEOF
8334/* confdefs.h. */
8335_ACEOF
8336cat confdefs.h >>conftest.$ac_ext
8337cat >>conftest.$ac_ext <<_ACEOF
8338/* end confdefs.h. */
8339$ac_includes_default
8340typedef void * ac__type_new_;
8341int
8342main ()
8343{
8344if ((ac__type_new_ *) 0)
8345 return 0;
8346if (sizeof (ac__type_new_))
8347 return 0;
8348 ;
8349 return 0;
8350}
8351_ACEOF
8352rm -f conftest.$ac_objext
8353if { (ac_try="$ac_compile"
8354case "(($ac_try" in
8355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8356 *) ac_try_echo=$ac_try;;
8357esac
8358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8359 (eval "$ac_compile") 2>conftest.er1
8360 ac_status=$?
8361 grep -v '^ *+' conftest.er1 >conftest.err
8362 rm -f conftest.er1
8363 cat conftest.err >&5
8364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8365 (exit $ac_status); } && {
8366 test -z "$ac_c_werror_flag" ||
8367 test ! -s conftest.err
8368 } && test -s conftest.$ac_objext; then
8369 ac_cv_type_void_p=yes
8370else
8371 echo "$as_me: failed program was:" >&5
8372sed 's/^/| /' conftest.$ac_ext >&5
8373
8374 ac_cv_type_void_p=no
8375fi
8376
8377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8378fi
8379{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8380echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8381
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382# The cast to long int works around a bug in the HP C Compiler
8383# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8384# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8385# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008386{ echo "$as_me:$LINENO: checking size of void *" >&5
8387echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008388if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008389 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008390else
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 if test "$cross_compiling" = yes; then
8392 # Depending upon the size, compute the lo and hi bounds.
8393cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008394/* confdefs.h. */
8395_ACEOF
8396cat confdefs.h >>conftest.$ac_ext
8397cat >>conftest.$ac_ext <<_ACEOF
8398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008399$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008400 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008401int
8402main ()
8403{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008404static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008405test_array [0] = 0
8406
8407 ;
8408 return 0;
8409}
8410_ACEOF
8411rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412if { (ac_try="$ac_compile"
8413case "(($ac_try" in
8414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8415 *) ac_try_echo=$ac_try;;
8416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008420 grep -v '^ *+' conftest.er1 >conftest.err
8421 rm -f conftest.er1
8422 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424 (exit $ac_status); } && {
8425 test -z "$ac_c_werror_flag" ||
8426 test ! -s conftest.err
8427 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 ac_lo=0 ac_mid=0
8429 while :; do
8430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008431/* confdefs.h. */
8432_ACEOF
8433cat confdefs.h >>conftest.$ac_ext
8434cat >>conftest.$ac_ext <<_ACEOF
8435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008436$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008437 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008438int
8439main ()
8440{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008442test_array [0] = 0
8443
8444 ;
8445 return 0;
8446}
8447_ACEOF
8448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449if { (ac_try="$ac_compile"
8450case "(($ac_try" in
8451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8452 *) ac_try_echo=$ac_try;;
8453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008457 grep -v '^ *+' conftest.er1 >conftest.err
8458 rm -f conftest.er1
8459 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 (exit $ac_status); } && {
8462 test -z "$ac_c_werror_flag" ||
8463 test ! -s conftest.err
8464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_hi=$ac_mid; break
8466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008468sed 's/^/| /' conftest.$ac_ext >&5
8469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470 ac_lo=`expr $ac_mid + 1`
8471 if test $ac_lo -le $ac_mid; then
8472 ac_lo= ac_hi=
8473 break
8474 fi
8475 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477
8478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 done
8480else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008482sed 's/^/| /' conftest.$ac_ext >&5
8483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008485/* confdefs.h. */
8486_ACEOF
8487cat confdefs.h >>conftest.$ac_ext
8488cat >>conftest.$ac_ext <<_ACEOF
8489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008490$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008491 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008492int
8493main ()
8494{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008496test_array [0] = 0
8497
8498 ;
8499 return 0;
8500}
8501_ACEOF
8502rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503if { (ac_try="$ac_compile"
8504case "(($ac_try" in
8505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8506 *) ac_try_echo=$ac_try;;
8507esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008511 grep -v '^ *+' conftest.er1 >conftest.err
8512 rm -f conftest.er1
8513 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515 (exit $ac_status); } && {
8516 test -z "$ac_c_werror_flag" ||
8517 test ! -s conftest.err
8518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_hi=-1 ac_mid=-1
8520 while :; do
8521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008522/* confdefs.h. */
8523_ACEOF
8524cat confdefs.h >>conftest.$ac_ext
8525cat >>conftest.$ac_ext <<_ACEOF
8526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008527$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008528 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008529int
8530main ()
8531{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008532static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008533test_array [0] = 0
8534
8535 ;
8536 return 0;
8537}
8538_ACEOF
8539rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540if { (ac_try="$ac_compile"
8541case "(($ac_try" in
8542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8543 *) ac_try_echo=$ac_try;;
8544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008548 grep -v '^ *+' conftest.er1 >conftest.err
8549 rm -f conftest.er1
8550 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552 (exit $ac_status); } && {
8553 test -z "$ac_c_werror_flag" ||
8554 test ! -s conftest.err
8555 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 ac_lo=$ac_mid; break
8557else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008559sed 's/^/| /' conftest.$ac_ext >&5
8560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561 ac_hi=`expr '(' $ac_mid ')' - 1`
8562 if test $ac_mid -le $ac_hi; then
8563 ac_lo= ac_hi=
8564 break
8565 fi
8566 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568
8569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 done
8571else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008573sed 's/^/| /' conftest.$ac_ext >&5
8574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577
8578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580
8581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008582# Binary search between lo and hi bounds.
8583while test "x$ac_lo" != "x$ac_hi"; do
8584 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008586/* confdefs.h. */
8587_ACEOF
8588cat confdefs.h >>conftest.$ac_ext
8589cat >>conftest.$ac_ext <<_ACEOF
8590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008591$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008592 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008593int
8594main ()
8595{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008597test_array [0] = 0
8598
8599 ;
8600 return 0;
8601}
8602_ACEOF
8603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604if { (ac_try="$ac_compile"
8605case "(($ac_try" in
8606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8607 *) ac_try_echo=$ac_try;;
8608esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008612 grep -v '^ *+' conftest.er1 >conftest.err
8613 rm -f conftest.er1
8614 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616 (exit $ac_status); } && {
8617 test -z "$ac_c_werror_flag" ||
8618 test ! -s conftest.err
8619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ac_hi=$ac_mid
8621else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008623sed 's/^/| /' conftest.$ac_ext >&5
8624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627
8628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008629done
8630case $ac_lo in
8631?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008633 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008634See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008635echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008636See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008637 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638 else
8639 ac_cv_sizeof_void_p=0
8640 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008641esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008642else
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008644/* confdefs.h. */
8645_ACEOF
8646cat confdefs.h >>conftest.$ac_ext
8647cat >>conftest.$ac_ext <<_ACEOF
8648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008649$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008650 typedef void * ac__type_sizeof_;
8651static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8652static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008653#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008654#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008655int
8656main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008657{
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
8659 FILE *f = fopen ("conftest.val", "w");
8660 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008662 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008665 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008667 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 }
8669 else
8670 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008672 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008674 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008677
8678 ;
8679 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008680}
Martin v. Löwis11437992002-04-12 09:54:03 +00008681_ACEOF
8682rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683if { (ac_try="$ac_link"
8684case "(($ac_try" in
8685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8686 *) ac_try_echo=$ac_try;;
8687esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008690 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693 { (case "(($ac_try" in
8694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8695 *) ac_try_echo=$ac_try;;
8696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 (exit $ac_status); }; }; then
8702 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008704 echo "$as_me: program exited with status $ac_status" >&5
8705echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008706sed 's/^/| /' conftest.$ac_ext >&5
8707
Martin v. Löwis11437992002-04-12 09:54:03 +00008708( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008710 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008711See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008712echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008713See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008714 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715 else
8716 ac_cv_sizeof_void_p=0
8717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719rm -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 +00008720fi
8721rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008722fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008723{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8724echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008725
8726
8727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008729#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008730_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008731
8732
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008733{ echo "$as_me:$LINENO: checking for short" >&5
8734echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8735if test "${ac_cv_type_short+set}" = set; then
8736 echo $ECHO_N "(cached) $ECHO_C" >&6
8737else
8738 cat >conftest.$ac_ext <<_ACEOF
8739/* confdefs.h. */
8740_ACEOF
8741cat confdefs.h >>conftest.$ac_ext
8742cat >>conftest.$ac_ext <<_ACEOF
8743/* end confdefs.h. */
8744$ac_includes_default
8745typedef short ac__type_new_;
8746int
8747main ()
8748{
8749if ((ac__type_new_ *) 0)
8750 return 0;
8751if (sizeof (ac__type_new_))
8752 return 0;
8753 ;
8754 return 0;
8755}
8756_ACEOF
8757rm -f conftest.$ac_objext
8758if { (ac_try="$ac_compile"
8759case "(($ac_try" in
8760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8761 *) ac_try_echo=$ac_try;;
8762esac
8763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8764 (eval "$ac_compile") 2>conftest.er1
8765 ac_status=$?
8766 grep -v '^ *+' conftest.er1 >conftest.err
8767 rm -f conftest.er1
8768 cat conftest.err >&5
8769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8770 (exit $ac_status); } && {
8771 test -z "$ac_c_werror_flag" ||
8772 test ! -s conftest.err
8773 } && test -s conftest.$ac_objext; then
8774 ac_cv_type_short=yes
8775else
8776 echo "$as_me: failed program was:" >&5
8777sed 's/^/| /' conftest.$ac_ext >&5
8778
8779 ac_cv_type_short=no
8780fi
8781
8782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8783fi
8784{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8785echo "${ECHO_T}$ac_cv_type_short" >&6; }
8786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787# The cast to long int works around a bug in the HP C Compiler
8788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8790# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008791{ echo "$as_me:$LINENO: checking size of short" >&5
8792echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008793if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008794 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008795else
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 if test "$cross_compiling" = yes; then
8797 # Depending upon the size, compute the lo and hi bounds.
8798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008799/* confdefs.h. */
8800_ACEOF
8801cat confdefs.h >>conftest.$ac_ext
8802cat >>conftest.$ac_ext <<_ACEOF
8803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008804$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008805 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008806int
8807main ()
8808{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008809static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008810test_array [0] = 0
8811
8812 ;
8813 return 0;
8814}
8815_ACEOF
8816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817if { (ac_try="$ac_compile"
8818case "(($ac_try" in
8819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8820 *) ac_try_echo=$ac_try;;
8821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008825 grep -v '^ *+' conftest.er1 >conftest.err
8826 rm -f conftest.er1
8827 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829 (exit $ac_status); } && {
8830 test -z "$ac_c_werror_flag" ||
8831 test ! -s conftest.err
8832 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_lo=0 ac_mid=0
8834 while :; do
8835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* confdefs.h. */
8837_ACEOF
8838cat confdefs.h >>conftest.$ac_ext
8839cat >>conftest.$ac_ext <<_ACEOF
8840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008842 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843int
8844main ()
8845{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008847test_array [0] = 0
8848
8849 ;
8850 return 0;
8851}
8852_ACEOF
8853rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854if { (ac_try="$ac_compile"
8855case "(($ac_try" in
8856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8857 *) ac_try_echo=$ac_try;;
8858esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008862 grep -v '^ *+' conftest.er1 >conftest.err
8863 rm -f conftest.er1
8864 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 (exit $ac_status); } && {
8867 test -z "$ac_c_werror_flag" ||
8868 test ! -s conftest.err
8869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_hi=$ac_mid; break
8871else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008873sed 's/^/| /' conftest.$ac_ext >&5
8874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875 ac_lo=`expr $ac_mid + 1`
8876 if test $ac_lo -le $ac_mid; then
8877 ac_lo= ac_hi=
8878 break
8879 fi
8880 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882
8883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 done
8885else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008887sed 's/^/| /' conftest.$ac_ext >&5
8888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* confdefs.h. */
8891_ACEOF
8892cat confdefs.h >>conftest.$ac_ext
8893cat >>conftest.$ac_ext <<_ACEOF
8894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008895$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008896 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008897int
8898main ()
8899{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008900static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008901test_array [0] = 0
8902
8903 ;
8904 return 0;
8905}
8906_ACEOF
8907rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908if { (ac_try="$ac_compile"
8909case "(($ac_try" in
8910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8911 *) ac_try_echo=$ac_try;;
8912esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008916 grep -v '^ *+' conftest.er1 >conftest.err
8917 rm -f conftest.er1
8918 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920 (exit $ac_status); } && {
8921 test -z "$ac_c_werror_flag" ||
8922 test ! -s conftest.err
8923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_hi=-1 ac_mid=-1
8925 while :; do
8926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008927/* confdefs.h. */
8928_ACEOF
8929cat confdefs.h >>conftest.$ac_ext
8930cat >>conftest.$ac_ext <<_ACEOF
8931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008932$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008933 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
8936{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008937static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008938test_array [0] = 0
8939
8940 ;
8941 return 0;
8942}
8943_ACEOF
8944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945if { (ac_try="$ac_compile"
8946case "(($ac_try" in
8947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8948 *) ac_try_echo=$ac_try;;
8949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008953 grep -v '^ *+' conftest.er1 >conftest.err
8954 rm -f conftest.er1
8955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957 (exit $ac_status); } && {
8958 test -z "$ac_c_werror_flag" ||
8959 test ! -s conftest.err
8960 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_lo=$ac_mid; break
8962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008964sed 's/^/| /' conftest.$ac_ext >&5
8965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008966 ac_hi=`expr '(' $ac_mid ')' - 1`
8967 if test $ac_mid -le $ac_hi; then
8968 ac_lo= ac_hi=
8969 break
8970 fi
8971 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973
8974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 done
8976else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008978sed 's/^/| /' conftest.$ac_ext >&5
8979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982
8983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985
8986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008987# Binary search between lo and hi bounds.
8988while test "x$ac_lo" != "x$ac_hi"; do
8989 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008991/* confdefs.h. */
8992_ACEOF
8993cat confdefs.h >>conftest.$ac_ext
8994cat >>conftest.$ac_ext <<_ACEOF
8995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008996$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008997 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008998int
8999main ()
9000{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009002test_array [0] = 0
9003
9004 ;
9005 return 0;
9006}
9007_ACEOF
9008rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009if { (ac_try="$ac_compile"
9010case "(($ac_try" in
9011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9012 *) ac_try_echo=$ac_try;;
9013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009017 grep -v '^ *+' conftest.er1 >conftest.err
9018 rm -f conftest.er1
9019 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021 (exit $ac_status); } && {
9022 test -z "$ac_c_werror_flag" ||
9023 test ! -s conftest.err
9024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ac_hi=$ac_mid
9026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009028sed 's/^/| /' conftest.$ac_ext >&5
9029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009030 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032
9033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009034done
9035case $ac_lo in
9036?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009038 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009039See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009040echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009041See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009042 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009043 else
9044 ac_cv_sizeof_short=0
9045 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009046esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009047else
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009049/* confdefs.h. */
9050_ACEOF
9051cat confdefs.h >>conftest.$ac_ext
9052cat >>conftest.$ac_ext <<_ACEOF
9053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009054$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009055 typedef short ac__type_sizeof_;
9056static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9057static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009058#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009059#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009060int
9061main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009062{
Martin v. Löwis11437992002-04-12 09:54:03 +00009063
9064 FILE *f = fopen ("conftest.val", "w");
9065 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009067 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009068 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009069 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009070 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009071 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009072 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 }
9074 else
9075 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009077 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009078 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009079 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009082
9083 ;
9084 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009085}
Martin v. Löwis11437992002-04-12 09:54:03 +00009086_ACEOF
9087rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009088if { (ac_try="$ac_link"
9089case "(($ac_try" in
9090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9091 *) ac_try_echo=$ac_try;;
9092esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009095 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009098 { (case "(($ac_try" in
9099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9100 *) ac_try_echo=$ac_try;;
9101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009103 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 (exit $ac_status); }; }; then
9107 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009108else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009109 echo "$as_me: program exited with status $ac_status" >&5
9110echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009111sed 's/^/| /' conftest.$ac_ext >&5
9112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009115 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009116See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009117echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009118See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009119 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120 else
9121 ac_cv_sizeof_short=0
9122 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009124rm -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 +00009125fi
9126rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009127fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009128{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9129echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009130
9131
9132
Martin v. Löwis11437992002-04-12 09:54:03 +00009133cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009134#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009136
9137
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009138{ echo "$as_me:$LINENO: checking for float" >&5
9139echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9140if test "${ac_cv_type_float+set}" = set; then
9141 echo $ECHO_N "(cached) $ECHO_C" >&6
9142else
9143 cat >conftest.$ac_ext <<_ACEOF
9144/* confdefs.h. */
9145_ACEOF
9146cat confdefs.h >>conftest.$ac_ext
9147cat >>conftest.$ac_ext <<_ACEOF
9148/* end confdefs.h. */
9149$ac_includes_default
9150typedef float ac__type_new_;
9151int
9152main ()
9153{
9154if ((ac__type_new_ *) 0)
9155 return 0;
9156if (sizeof (ac__type_new_))
9157 return 0;
9158 ;
9159 return 0;
9160}
9161_ACEOF
9162rm -f conftest.$ac_objext
9163if { (ac_try="$ac_compile"
9164case "(($ac_try" in
9165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9166 *) ac_try_echo=$ac_try;;
9167esac
9168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9169 (eval "$ac_compile") 2>conftest.er1
9170 ac_status=$?
9171 grep -v '^ *+' conftest.er1 >conftest.err
9172 rm -f conftest.er1
9173 cat conftest.err >&5
9174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9175 (exit $ac_status); } && {
9176 test -z "$ac_c_werror_flag" ||
9177 test ! -s conftest.err
9178 } && test -s conftest.$ac_objext; then
9179 ac_cv_type_float=yes
9180else
9181 echo "$as_me: failed program was:" >&5
9182sed 's/^/| /' conftest.$ac_ext >&5
9183
9184 ac_cv_type_float=no
9185fi
9186
9187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9188fi
9189{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9190echo "${ECHO_T}$ac_cv_type_float" >&6; }
9191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009192# The cast to long int works around a bug in the HP C Compiler
9193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9195# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009196{ echo "$as_me:$LINENO: checking size of float" >&5
9197echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009198if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009199 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009200else
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 if test "$cross_compiling" = yes; then
9202 # Depending upon the size, compute the lo and hi bounds.
9203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009204/* confdefs.h. */
9205_ACEOF
9206cat confdefs.h >>conftest.$ac_ext
9207cat >>conftest.$ac_ext <<_ACEOF
9208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009209$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009210 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009211int
9212main ()
9213{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009214static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009215test_array [0] = 0
9216
9217 ;
9218 return 0;
9219}
9220_ACEOF
9221rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222if { (ac_try="$ac_compile"
9223case "(($ac_try" in
9224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9225 *) ac_try_echo=$ac_try;;
9226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009230 grep -v '^ *+' conftest.er1 >conftest.err
9231 rm -f conftest.er1
9232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234 (exit $ac_status); } && {
9235 test -z "$ac_c_werror_flag" ||
9236 test ! -s conftest.err
9237 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 ac_lo=0 ac_mid=0
9239 while :; do
9240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009241/* confdefs.h. */
9242_ACEOF
9243cat confdefs.h >>conftest.$ac_ext
9244cat >>conftest.$ac_ext <<_ACEOF
9245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009246$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009247 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009248int
9249main ()
9250{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009252test_array [0] = 0
9253
9254 ;
9255 return 0;
9256}
9257_ACEOF
9258rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259if { (ac_try="$ac_compile"
9260case "(($ac_try" in
9261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9262 *) ac_try_echo=$ac_try;;
9263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009267 grep -v '^ *+' conftest.er1 >conftest.err
9268 rm -f conftest.er1
9269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 (exit $ac_status); } && {
9272 test -z "$ac_c_werror_flag" ||
9273 test ! -s conftest.err
9274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_hi=$ac_mid; break
9276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009278sed 's/^/| /' conftest.$ac_ext >&5
9279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280 ac_lo=`expr $ac_mid + 1`
9281 if test $ac_lo -le $ac_mid; then
9282 ac_lo= ac_hi=
9283 break
9284 fi
9285 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287
9288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 done
9290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009292sed 's/^/| /' conftest.$ac_ext >&5
9293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009295/* confdefs.h. */
9296_ACEOF
9297cat confdefs.h >>conftest.$ac_ext
9298cat >>conftest.$ac_ext <<_ACEOF
9299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009300$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009301 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009302int
9303main ()
9304{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009306test_array [0] = 0
9307
9308 ;
9309 return 0;
9310}
9311_ACEOF
9312rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313if { (ac_try="$ac_compile"
9314case "(($ac_try" in
9315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9316 *) ac_try_echo=$ac_try;;
9317esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009321 grep -v '^ *+' conftest.er1 >conftest.err
9322 rm -f conftest.er1
9323 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009325 (exit $ac_status); } && {
9326 test -z "$ac_c_werror_flag" ||
9327 test ! -s conftest.err
9328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 ac_hi=-1 ac_mid=-1
9330 while :; do
9331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009332/* confdefs.h. */
9333_ACEOF
9334cat confdefs.h >>conftest.$ac_ext
9335cat >>conftest.$ac_ext <<_ACEOF
9336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009337$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009338 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009339int
9340main ()
9341{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009343test_array [0] = 0
9344
9345 ;
9346 return 0;
9347}
9348_ACEOF
9349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009350if { (ac_try="$ac_compile"
9351case "(($ac_try" in
9352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9353 *) ac_try_echo=$ac_try;;
9354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009358 grep -v '^ *+' conftest.er1 >conftest.err
9359 rm -f conftest.er1
9360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362 (exit $ac_status); } && {
9363 test -z "$ac_c_werror_flag" ||
9364 test ! -s conftest.err
9365 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_lo=$ac_mid; break
9367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009369sed 's/^/| /' conftest.$ac_ext >&5
9370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371 ac_hi=`expr '(' $ac_mid ')' - 1`
9372 if test $ac_mid -le $ac_hi; then
9373 ac_lo= ac_hi=
9374 break
9375 fi
9376 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009378
9379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 done
9381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009383sed 's/^/| /' conftest.$ac_ext >&5
9384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009385 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387
9388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009390
9391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009392# Binary search between lo and hi bounds.
9393while test "x$ac_lo" != "x$ac_hi"; do
9394 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009396/* confdefs.h. */
9397_ACEOF
9398cat confdefs.h >>conftest.$ac_ext
9399cat >>conftest.$ac_ext <<_ACEOF
9400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009401$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009402 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009403int
9404main ()
9405{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009407test_array [0] = 0
9408
9409 ;
9410 return 0;
9411}
9412_ACEOF
9413rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414if { (ac_try="$ac_compile"
9415case "(($ac_try" in
9416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9417 *) ac_try_echo=$ac_try;;
9418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009422 grep -v '^ *+' conftest.er1 >conftest.err
9423 rm -f conftest.er1
9424 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426 (exit $ac_status); } && {
9427 test -z "$ac_c_werror_flag" ||
9428 test ! -s conftest.err
9429 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ac_hi=$ac_mid
9431else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009433sed 's/^/| /' conftest.$ac_ext >&5
9434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437
9438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009439done
9440case $ac_lo in
9441?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009443 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009444See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009445echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009446See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009447 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448 else
9449 ac_cv_sizeof_float=0
9450 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009451esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009452else
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009454/* confdefs.h. */
9455_ACEOF
9456cat confdefs.h >>conftest.$ac_ext
9457cat >>conftest.$ac_ext <<_ACEOF
9458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009459$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009460 typedef float ac__type_sizeof_;
9461static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9462static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009463#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009464#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009465int
9466main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009467{
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
9469 FILE *f = fopen ("conftest.val", "w");
9470 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009472 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009475 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009477 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 }
9479 else
9480 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009482 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009484 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
9488 ;
9489 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009490}
Martin v. Löwis11437992002-04-12 09:54:03 +00009491_ACEOF
9492rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493if { (ac_try="$ac_link"
9494case "(($ac_try" in
9495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9496 *) ac_try_echo=$ac_try;;
9497esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503 { (case "(($ac_try" in
9504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9505 *) ac_try_echo=$ac_try;;
9506esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 (exit $ac_status); }; }; then
9512 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009513else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009514 echo "$as_me: program exited with status $ac_status" >&5
9515echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009516sed 's/^/| /' conftest.$ac_ext >&5
9517
Martin v. Löwis11437992002-04-12 09:54:03 +00009518( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009520 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009521See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009522echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009523See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009524 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525 else
9526 ac_cv_sizeof_float=0
9527 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529rm -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 +00009530fi
9531rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009532fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009533{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9534echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535
9536
9537
Martin v. Löwis11437992002-04-12 09:54:03 +00009538cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009539#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009540_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009541
9542
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009543{ echo "$as_me:$LINENO: checking for double" >&5
9544echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9545if test "${ac_cv_type_double+set}" = set; then
9546 echo $ECHO_N "(cached) $ECHO_C" >&6
9547else
9548 cat >conftest.$ac_ext <<_ACEOF
9549/* confdefs.h. */
9550_ACEOF
9551cat confdefs.h >>conftest.$ac_ext
9552cat >>conftest.$ac_ext <<_ACEOF
9553/* end confdefs.h. */
9554$ac_includes_default
9555typedef double ac__type_new_;
9556int
9557main ()
9558{
9559if ((ac__type_new_ *) 0)
9560 return 0;
9561if (sizeof (ac__type_new_))
9562 return 0;
9563 ;
9564 return 0;
9565}
9566_ACEOF
9567rm -f conftest.$ac_objext
9568if { (ac_try="$ac_compile"
9569case "(($ac_try" in
9570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9571 *) ac_try_echo=$ac_try;;
9572esac
9573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9574 (eval "$ac_compile") 2>conftest.er1
9575 ac_status=$?
9576 grep -v '^ *+' conftest.er1 >conftest.err
9577 rm -f conftest.er1
9578 cat conftest.err >&5
9579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9580 (exit $ac_status); } && {
9581 test -z "$ac_c_werror_flag" ||
9582 test ! -s conftest.err
9583 } && test -s conftest.$ac_objext; then
9584 ac_cv_type_double=yes
9585else
9586 echo "$as_me: failed program was:" >&5
9587sed 's/^/| /' conftest.$ac_ext >&5
9588
9589 ac_cv_type_double=no
9590fi
9591
9592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9593fi
9594{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9595echo "${ECHO_T}$ac_cv_type_double" >&6; }
9596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597# The cast to long int works around a bug in the HP C Compiler
9598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9600# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009601{ echo "$as_me:$LINENO: checking size of double" >&5
9602echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009603if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009604 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009605else
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 if test "$cross_compiling" = yes; then
9607 # Depending upon the size, compute the lo and hi bounds.
9608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009609/* confdefs.h. */
9610_ACEOF
9611cat confdefs.h >>conftest.$ac_ext
9612cat >>conftest.$ac_ext <<_ACEOF
9613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009614$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009615 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009616int
9617main ()
9618{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009620test_array [0] = 0
9621
9622 ;
9623 return 0;
9624}
9625_ACEOF
9626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627if { (ac_try="$ac_compile"
9628case "(($ac_try" in
9629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9630 *) ac_try_echo=$ac_try;;
9631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009635 grep -v '^ *+' conftest.er1 >conftest.err
9636 rm -f conftest.er1
9637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639 (exit $ac_status); } && {
9640 test -z "$ac_c_werror_flag" ||
9641 test ! -s conftest.err
9642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ac_lo=0 ac_mid=0
9644 while :; do
9645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* confdefs.h. */
9647_ACEOF
9648cat confdefs.h >>conftest.$ac_ext
9649cat >>conftest.$ac_ext <<_ACEOF
9650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009652 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009653int
9654main ()
9655{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009657test_array [0] = 0
9658
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664if { (ac_try="$ac_compile"
9665case "(($ac_try" in
9666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9667 *) ac_try_echo=$ac_try;;
9668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009672 grep -v '^ *+' conftest.er1 >conftest.err
9673 rm -f conftest.er1
9674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 (exit $ac_status); } && {
9677 test -z "$ac_c_werror_flag" ||
9678 test ! -s conftest.err
9679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_hi=$ac_mid; break
9681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009683sed 's/^/| /' conftest.$ac_ext >&5
9684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685 ac_lo=`expr $ac_mid + 1`
9686 if test $ac_lo -le $ac_mid; then
9687 ac_lo= ac_hi=
9688 break
9689 fi
9690 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692
9693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 done
9695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009697sed 's/^/| /' conftest.$ac_ext >&5
9698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009700/* confdefs.h. */
9701_ACEOF
9702cat confdefs.h >>conftest.$ac_ext
9703cat >>conftest.$ac_ext <<_ACEOF
9704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009705$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009706 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009707int
9708main ()
9709{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009711test_array [0] = 0
9712
9713 ;
9714 return 0;
9715}
9716_ACEOF
9717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718if { (ac_try="$ac_compile"
9719case "(($ac_try" in
9720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9721 *) ac_try_echo=$ac_try;;
9722esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009726 grep -v '^ *+' conftest.er1 >conftest.err
9727 rm -f conftest.er1
9728 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730 (exit $ac_status); } && {
9731 test -z "$ac_c_werror_flag" ||
9732 test ! -s conftest.err
9733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_hi=-1 ac_mid=-1
9735 while :; do
9736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009737/* confdefs.h. */
9738_ACEOF
9739cat confdefs.h >>conftest.$ac_ext
9740cat >>conftest.$ac_ext <<_ACEOF
9741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009742$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009743 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
9746{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009748test_array [0] = 0
9749
9750 ;
9751 return 0;
9752}
9753_ACEOF
9754rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009755if { (ac_try="$ac_compile"
9756case "(($ac_try" in
9757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9758 *) ac_try_echo=$ac_try;;
9759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009763 grep -v '^ *+' conftest.er1 >conftest.err
9764 rm -f conftest.er1
9765 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767 (exit $ac_status); } && {
9768 test -z "$ac_c_werror_flag" ||
9769 test ! -s conftest.err
9770 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 ac_lo=$ac_mid; break
9772else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009774sed 's/^/| /' conftest.$ac_ext >&5
9775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776 ac_hi=`expr '(' $ac_mid ')' - 1`
9777 if test $ac_mid -le $ac_hi; then
9778 ac_lo= ac_hi=
9779 break
9780 fi
9781 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783
9784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 done
9786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009788sed 's/^/| /' conftest.$ac_ext >&5
9789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009795
9796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009797# Binary search between lo and hi bounds.
9798while test "x$ac_lo" != "x$ac_hi"; do
9799 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009801/* confdefs.h. */
9802_ACEOF
9803cat confdefs.h >>conftest.$ac_ext
9804cat >>conftest.$ac_ext <<_ACEOF
9805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009807 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009808int
9809main ()
9810{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009812test_array [0] = 0
9813
9814 ;
9815 return 0;
9816}
9817_ACEOF
9818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819if { (ac_try="$ac_compile"
9820case "(($ac_try" in
9821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9822 *) ac_try_echo=$ac_try;;
9823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009827 grep -v '^ *+' conftest.er1 >conftest.err
9828 rm -f conftest.er1
9829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831 (exit $ac_status); } && {
9832 test -z "$ac_c_werror_flag" ||
9833 test ! -s conftest.err
9834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ac_hi=$ac_mid
9836else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009838sed 's/^/| /' conftest.$ac_ext >&5
9839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842
9843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009844done
9845case $ac_lo in
9846?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009849See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009850echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009851See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009852 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853 else
9854 ac_cv_sizeof_double=0
9855 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009856esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009857else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009859/* confdefs.h. */
9860_ACEOF
9861cat confdefs.h >>conftest.$ac_ext
9862cat >>conftest.$ac_ext <<_ACEOF
9863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009864$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009865 typedef double ac__type_sizeof_;
9866static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9867static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009868#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009869#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009870int
9871main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009872{
Martin v. Löwis11437992002-04-12 09:54:03 +00009873
9874 FILE *f = fopen ("conftest.val", "w");
9875 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009877 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009882 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009883 }
9884 else
9885 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009887 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009889 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009892
9893 ;
9894 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009895}
Martin v. Löwis11437992002-04-12 09:54:03 +00009896_ACEOF
9897rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898if { (ac_try="$ac_link"
9899case "(($ac_try" in
9900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9901 *) ac_try_echo=$ac_try;;
9902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009905 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908 { (case "(($ac_try" in
9909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9910 *) ac_try_echo=$ac_try;;
9911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 (exit $ac_status); }; }; then
9917 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009919 echo "$as_me: program exited with status $ac_status" >&5
9920echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009921sed 's/^/| /' conftest.$ac_ext >&5
9922
Martin v. Löwis11437992002-04-12 09:54:03 +00009923( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009925 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009926See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009927echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009928See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009929 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930 else
9931 ac_cv_sizeof_double=0
9932 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934rm -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 +00009935fi
9936rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009938{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9939echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940
9941
9942
Martin v. Löwis11437992002-04-12 09:54:03 +00009943cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009944#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009945_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009946
9947
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009948{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9949echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9950if test "${ac_cv_type_fpos_t+set}" = set; then
9951 echo $ECHO_N "(cached) $ECHO_C" >&6
9952else
9953 cat >conftest.$ac_ext <<_ACEOF
9954/* confdefs.h. */
9955_ACEOF
9956cat confdefs.h >>conftest.$ac_ext
9957cat >>conftest.$ac_ext <<_ACEOF
9958/* end confdefs.h. */
9959$ac_includes_default
9960typedef fpos_t ac__type_new_;
9961int
9962main ()
9963{
9964if ((ac__type_new_ *) 0)
9965 return 0;
9966if (sizeof (ac__type_new_))
9967 return 0;
9968 ;
9969 return 0;
9970}
9971_ACEOF
9972rm -f conftest.$ac_objext
9973if { (ac_try="$ac_compile"
9974case "(($ac_try" in
9975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9976 *) ac_try_echo=$ac_try;;
9977esac
9978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9979 (eval "$ac_compile") 2>conftest.er1
9980 ac_status=$?
9981 grep -v '^ *+' conftest.er1 >conftest.err
9982 rm -f conftest.er1
9983 cat conftest.err >&5
9984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9985 (exit $ac_status); } && {
9986 test -z "$ac_c_werror_flag" ||
9987 test ! -s conftest.err
9988 } && test -s conftest.$ac_objext; then
9989 ac_cv_type_fpos_t=yes
9990else
9991 echo "$as_me: failed program was:" >&5
9992sed 's/^/| /' conftest.$ac_ext >&5
9993
9994 ac_cv_type_fpos_t=no
9995fi
9996
9997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9998fi
9999{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10000echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002# The cast to long int works around a bug in the HP C Compiler
10003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10005# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010006{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10007echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010008if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010009 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010010else
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 if test "$cross_compiling" = yes; then
10012 # Depending upon the size, compute the lo and hi bounds.
10013cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010014/* confdefs.h. */
10015_ACEOF
10016cat confdefs.h >>conftest.$ac_ext
10017cat >>conftest.$ac_ext <<_ACEOF
10018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010019$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010020 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010021int
10022main ()
10023{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010024static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010025test_array [0] = 0
10026
10027 ;
10028 return 0;
10029}
10030_ACEOF
10031rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032if { (ac_try="$ac_compile"
10033case "(($ac_try" in
10034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10035 *) ac_try_echo=$ac_try;;
10036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010040 grep -v '^ *+' conftest.er1 >conftest.err
10041 rm -f conftest.er1
10042 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044 (exit $ac_status); } && {
10045 test -z "$ac_c_werror_flag" ||
10046 test ! -s conftest.err
10047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_lo=0 ac_mid=0
10049 while :; do
10050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* confdefs.h. */
10052_ACEOF
10053cat confdefs.h >>conftest.$ac_ext
10054cat >>conftest.$ac_ext <<_ACEOF
10055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010057 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010058int
10059main ()
10060{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010062test_array [0] = 0
10063
10064 ;
10065 return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069if { (ac_try="$ac_compile"
10070case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;;
10073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010077 grep -v '^ *+' conftest.er1 >conftest.err
10078 rm -f conftest.er1
10079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 (exit $ac_status); } && {
10082 test -z "$ac_c_werror_flag" ||
10083 test ! -s conftest.err
10084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_hi=$ac_mid; break
10086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010088sed 's/^/| /' conftest.$ac_ext >&5
10089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090 ac_lo=`expr $ac_mid + 1`
10091 if test $ac_lo -le $ac_mid; then
10092 ac_lo= ac_hi=
10093 break
10094 fi
10095 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097
10098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 done
10100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010102sed 's/^/| /' conftest.$ac_ext >&5
10103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010105/* confdefs.h. */
10106_ACEOF
10107cat confdefs.h >>conftest.$ac_ext
10108cat >>conftest.$ac_ext <<_ACEOF
10109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010110$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010111 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010112int
10113main ()
10114{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010115static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010116test_array [0] = 0
10117
10118 ;
10119 return 0;
10120}
10121_ACEOF
10122rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123if { (ac_try="$ac_compile"
10124case "(($ac_try" in
10125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10126 *) ac_try_echo=$ac_try;;
10127esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010131 grep -v '^ *+' conftest.er1 >conftest.err
10132 rm -f conftest.er1
10133 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135 (exit $ac_status); } && {
10136 test -z "$ac_c_werror_flag" ||
10137 test ! -s conftest.err
10138 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_hi=-1 ac_mid=-1
10140 while :; do
10141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* confdefs.h. */
10143_ACEOF
10144cat confdefs.h >>conftest.$ac_ext
10145cat >>conftest.$ac_ext <<_ACEOF
10146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010148 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010149int
10150main ()
10151{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010153test_array [0] = 0
10154
10155 ;
10156 return 0;
10157}
10158_ACEOF
10159rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160if { (ac_try="$ac_compile"
10161case "(($ac_try" in
10162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10163 *) ac_try_echo=$ac_try;;
10164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010168 grep -v '^ *+' conftest.er1 >conftest.err
10169 rm -f conftest.er1
10170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172 (exit $ac_status); } && {
10173 test -z "$ac_c_werror_flag" ||
10174 test ! -s conftest.err
10175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ac_lo=$ac_mid; break
10177else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010179sed 's/^/| /' conftest.$ac_ext >&5
10180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181 ac_hi=`expr '(' $ac_mid ')' - 1`
10182 if test $ac_mid -le $ac_hi; then
10183 ac_lo= ac_hi=
10184 break
10185 fi
10186 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188
10189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 done
10191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010193sed 's/^/| /' conftest.$ac_ext >&5
10194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197
10198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200
10201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010202# Binary search between lo and hi bounds.
10203while test "x$ac_lo" != "x$ac_hi"; do
10204 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010206/* confdefs.h. */
10207_ACEOF
10208cat confdefs.h >>conftest.$ac_ext
10209cat >>conftest.$ac_ext <<_ACEOF
10210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010211$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010212 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010213int
10214main ()
10215{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010217test_array [0] = 0
10218
10219 ;
10220 return 0;
10221}
10222_ACEOF
10223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224if { (ac_try="$ac_compile"
10225case "(($ac_try" in
10226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10227 *) ac_try_echo=$ac_try;;
10228esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010232 grep -v '^ *+' conftest.er1 >conftest.err
10233 rm -f conftest.er1
10234 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236 (exit $ac_status); } && {
10237 test -z "$ac_c_werror_flag" ||
10238 test ! -s conftest.err
10239 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ac_hi=$ac_mid
10241else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010243sed 's/^/| /' conftest.$ac_ext >&5
10244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247
10248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010249done
10250case $ac_lo in
10251?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010253 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010254See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010255echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010256See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010257 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258 else
10259 ac_cv_sizeof_fpos_t=0
10260 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010261esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010262else
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010264/* confdefs.h. */
10265_ACEOF
10266cat confdefs.h >>conftest.$ac_ext
10267cat >>conftest.$ac_ext <<_ACEOF
10268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010269$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010270 typedef fpos_t ac__type_sizeof_;
10271static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10272static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010273#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010274#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010275int
10276main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010277{
Martin v. Löwis11437992002-04-12 09:54:03 +000010278
10279 FILE *f = fopen ("conftest.val", "w");
10280 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010282 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010285 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010287 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 }
10289 else
10290 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010292 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010294 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010297
10298 ;
10299 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010300}
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
10302rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303if { (ac_try="$ac_link"
10304case "(($ac_try" in
10305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10306 *) ac_try_echo=$ac_try;;
10307esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010313 { (case "(($ac_try" in
10314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315 *) ac_try_echo=$ac_try;;
10316esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 (exit $ac_status); }; }; then
10322 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010324 echo "$as_me: program exited with status $ac_status" >&5
10325echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010326sed 's/^/| /' conftest.$ac_ext >&5
10327
Martin v. Löwis11437992002-04-12 09:54:03 +000010328( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010330 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010331See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010332echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010333See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010334 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335 else
10336 ac_cv_sizeof_fpos_t=0
10337 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010339rm -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 +000010340fi
10341rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010342fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010343{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10344echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010345
10346
10347
Martin v. Löwis11437992002-04-12 09:54:03 +000010348cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010349#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010350_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010351
Michael W. Hudson54241132001-12-07 15:38:26 +000010352
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010353{ echo "$as_me:$LINENO: checking for size_t" >&5
10354echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10355if test "${ac_cv_type_size_t+set}" = set; then
10356 echo $ECHO_N "(cached) $ECHO_C" >&6
10357else
10358 cat >conftest.$ac_ext <<_ACEOF
10359/* confdefs.h. */
10360_ACEOF
10361cat confdefs.h >>conftest.$ac_ext
10362cat >>conftest.$ac_ext <<_ACEOF
10363/* end confdefs.h. */
10364$ac_includes_default
10365typedef size_t ac__type_new_;
10366int
10367main ()
10368{
10369if ((ac__type_new_ *) 0)
10370 return 0;
10371if (sizeof (ac__type_new_))
10372 return 0;
10373 ;
10374 return 0;
10375}
10376_ACEOF
10377rm -f conftest.$ac_objext
10378if { (ac_try="$ac_compile"
10379case "(($ac_try" in
10380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10381 *) ac_try_echo=$ac_try;;
10382esac
10383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10384 (eval "$ac_compile") 2>conftest.er1
10385 ac_status=$?
10386 grep -v '^ *+' conftest.er1 >conftest.err
10387 rm -f conftest.er1
10388 cat conftest.err >&5
10389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390 (exit $ac_status); } && {
10391 test -z "$ac_c_werror_flag" ||
10392 test ! -s conftest.err
10393 } && test -s conftest.$ac_objext; then
10394 ac_cv_type_size_t=yes
10395else
10396 echo "$as_me: failed program was:" >&5
10397sed 's/^/| /' conftest.$ac_ext >&5
10398
10399 ac_cv_type_size_t=no
10400fi
10401
10402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10403fi
10404{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10405echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407# The cast to long int works around a bug in the HP C Compiler
10408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10410# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010411{ echo "$as_me:$LINENO: checking size of size_t" >&5
10412echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010413if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010414 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010415else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010416 if test "$cross_compiling" = yes; then
10417 # Depending upon the size, compute the lo and hi bounds.
10418cat >conftest.$ac_ext <<_ACEOF
10419/* confdefs.h. */
10420_ACEOF
10421cat confdefs.h >>conftest.$ac_ext
10422cat >>conftest.$ac_ext <<_ACEOF
10423/* end confdefs.h. */
10424$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010425 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010426int
10427main ()
10428{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430test_array [0] = 0
10431
10432 ;
10433 return 0;
10434}
10435_ACEOF
10436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437if { (ac_try="$ac_compile"
10438case "(($ac_try" in
10439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10440 *) ac_try_echo=$ac_try;;
10441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444 ac_status=$?
10445 grep -v '^ *+' conftest.er1 >conftest.err
10446 rm -f conftest.er1
10447 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449 (exit $ac_status); } && {
10450 test -z "$ac_c_werror_flag" ||
10451 test ! -s conftest.err
10452 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453 ac_lo=0 ac_mid=0
10454 while :; do
10455 cat >conftest.$ac_ext <<_ACEOF
10456/* confdefs.h. */
10457_ACEOF
10458cat confdefs.h >>conftest.$ac_ext
10459cat >>conftest.$ac_ext <<_ACEOF
10460/* end confdefs.h. */
10461$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010462 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463int
10464main ()
10465{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467test_array [0] = 0
10468
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474if { (ac_try="$ac_compile"
10475case "(($ac_try" in
10476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10477 *) ac_try_echo=$ac_try;;
10478esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 ac_status=$?
10482 grep -v '^ *+' conftest.er1 >conftest.err
10483 rm -f conftest.er1
10484 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486 (exit $ac_status); } && {
10487 test -z "$ac_c_werror_flag" ||
10488 test ! -s conftest.err
10489 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490 ac_hi=$ac_mid; break
10491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010492 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010493sed 's/^/| /' conftest.$ac_ext >&5
10494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495 ac_lo=`expr $ac_mid + 1`
10496 if test $ac_lo -le $ac_mid; then
10497 ac_lo= ac_hi=
10498 break
10499 fi
10500 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502
10503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504 done
10505else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010506 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507sed 's/^/| /' conftest.$ac_ext >&5
10508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010509 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510/* confdefs.h. */
10511_ACEOF
10512cat confdefs.h >>conftest.$ac_ext
10513cat >>conftest.$ac_ext <<_ACEOF
10514/* end confdefs.h. */
10515$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010516 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010517int
10518main ()
10519{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521test_array [0] = 0
10522
10523 ;
10524 return 0;
10525}
10526_ACEOF
10527rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528if { (ac_try="$ac_compile"
10529case "(($ac_try" in
10530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10531 *) ac_try_echo=$ac_try;;
10532esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535 ac_status=$?
10536 grep -v '^ *+' conftest.er1 >conftest.err
10537 rm -f conftest.er1
10538 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010540 (exit $ac_status); } && {
10541 test -z "$ac_c_werror_flag" ||
10542 test ! -s conftest.err
10543 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544 ac_hi=-1 ac_mid=-1
10545 while :; do
10546 cat >conftest.$ac_ext <<_ACEOF
10547/* confdefs.h. */
10548_ACEOF
10549cat confdefs.h >>conftest.$ac_ext
10550cat >>conftest.$ac_ext <<_ACEOF
10551/* end confdefs.h. */
10552$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010553 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010554int
10555main ()
10556{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010557static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558test_array [0] = 0
10559
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565if { (ac_try="$ac_compile"
10566case "(($ac_try" in
10567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10568 *) ac_try_echo=$ac_try;;
10569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572 ac_status=$?
10573 grep -v '^ *+' conftest.er1 >conftest.err
10574 rm -f conftest.er1
10575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577 (exit $ac_status); } && {
10578 test -z "$ac_c_werror_flag" ||
10579 test ! -s conftest.err
10580 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581 ac_lo=$ac_mid; break
10582else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010583 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010584sed 's/^/| /' conftest.$ac_ext >&5
10585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586 ac_hi=`expr '(' $ac_mid ')' - 1`
10587 if test $ac_mid -le $ac_hi; then
10588 ac_lo= ac_hi=
10589 break
10590 fi
10591 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593
10594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595 done
10596else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010597 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010598sed 's/^/| /' conftest.$ac_ext >&5
10599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602
10603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605
10606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607# Binary search between lo and hi bounds.
10608while test "x$ac_lo" != "x$ac_hi"; do
10609 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10610 cat >conftest.$ac_ext <<_ACEOF
10611/* confdefs.h. */
10612_ACEOF
10613cat confdefs.h >>conftest.$ac_ext
10614cat >>conftest.$ac_ext <<_ACEOF
10615/* end confdefs.h. */
10616$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010617 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010618int
10619main ()
10620{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622test_array [0] = 0
10623
10624 ;
10625 return 0;
10626}
10627_ACEOF
10628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629if { (ac_try="$ac_compile"
10630case "(($ac_try" in
10631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10632 *) ac_try_echo=$ac_try;;
10633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636 ac_status=$?
10637 grep -v '^ *+' conftest.er1 >conftest.err
10638 rm -f conftest.er1
10639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641 (exit $ac_status); } && {
10642 test -z "$ac_c_werror_flag" ||
10643 test ! -s conftest.err
10644 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645 ac_hi=$ac_mid
10646else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010647 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648sed 's/^/| /' conftest.$ac_ext >&5
10649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652
10653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654done
10655case $ac_lo in
10656?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010658 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010660echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010662 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663 else
10664 ac_cv_sizeof_size_t=0
10665 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666esac
10667else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668 cat >conftest.$ac_ext <<_ACEOF
10669/* confdefs.h. */
10670_ACEOF
10671cat confdefs.h >>conftest.$ac_ext
10672cat >>conftest.$ac_ext <<_ACEOF
10673/* end confdefs.h. */
10674$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010675 typedef size_t ac__type_sizeof_;
10676static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10677static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678#include <stdio.h>
10679#include <stdlib.h>
10680int
10681main ()
10682{
10683
10684 FILE *f = fopen ("conftest.val", "w");
10685 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010687 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010690 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010692 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693 }
10694 else
10695 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010697 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010699 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010700 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702
10703 ;
10704 return 0;
10705}
10706_ACEOF
10707rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708if { (ac_try="$ac_link"
10709case "(($ac_try" in
10710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10711 *) ac_try_echo=$ac_try;;
10712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010715 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718 { (case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726 (exit $ac_status); }; }; then
10727 ac_cv_sizeof_size_t=`cat conftest.val`
10728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010729 echo "$as_me: program exited with status $ac_status" >&5
10730echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010731sed 's/^/| /' conftest.$ac_ext >&5
10732
10733( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010735 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010736See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010737echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010738See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010739 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740 else
10741 ac_cv_sizeof_size_t=0
10742 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744rm -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 +000010745fi
10746rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010748{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10749echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750
10751
10752
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753cat >>confdefs.h <<_ACEOF
10754#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10755_ACEOF
10756
10757
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010758{ echo "$as_me:$LINENO: checking for pid_t" >&5
10759echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10760if test "${ac_cv_type_pid_t+set}" = set; then
10761 echo $ECHO_N "(cached) $ECHO_C" >&6
10762else
10763 cat >conftest.$ac_ext <<_ACEOF
10764/* confdefs.h. */
10765_ACEOF
10766cat confdefs.h >>conftest.$ac_ext
10767cat >>conftest.$ac_ext <<_ACEOF
10768/* end confdefs.h. */
10769$ac_includes_default
10770typedef pid_t ac__type_new_;
10771int
10772main ()
10773{
10774if ((ac__type_new_ *) 0)
10775 return 0;
10776if (sizeof (ac__type_new_))
10777 return 0;
10778 ;
10779 return 0;
10780}
10781_ACEOF
10782rm -f conftest.$ac_objext
10783if { (ac_try="$ac_compile"
10784case "(($ac_try" in
10785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10786 *) ac_try_echo=$ac_try;;
10787esac
10788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10789 (eval "$ac_compile") 2>conftest.er1
10790 ac_status=$?
10791 grep -v '^ *+' conftest.er1 >conftest.err
10792 rm -f conftest.er1
10793 cat conftest.err >&5
10794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10795 (exit $ac_status); } && {
10796 test -z "$ac_c_werror_flag" ||
10797 test ! -s conftest.err
10798 } && test -s conftest.$ac_objext; then
10799 ac_cv_type_pid_t=yes
10800else
10801 echo "$as_me: failed program was:" >&5
10802sed 's/^/| /' conftest.$ac_ext >&5
10803
10804 ac_cv_type_pid_t=no
10805fi
10806
10807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10808fi
10809{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10810echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10811
Christian Heimes400adb02008-02-01 08:12:03 +000010812# The cast to long int works around a bug in the HP C Compiler
10813# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10814# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10815# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010816{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10817echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010818if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010819 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010820else
10821 if test "$cross_compiling" = yes; then
10822 # Depending upon the size, compute the lo and hi bounds.
10823cat >conftest.$ac_ext <<_ACEOF
10824/* confdefs.h. */
10825_ACEOF
10826cat confdefs.h >>conftest.$ac_ext
10827cat >>conftest.$ac_ext <<_ACEOF
10828/* end confdefs.h. */
10829$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010830 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010831int
10832main ()
10833{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010835test_array [0] = 0
10836
10837 ;
10838 return 0;
10839}
10840_ACEOF
10841rm -f conftest.$ac_objext
10842if { (ac_try="$ac_compile"
10843case "(($ac_try" in
10844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10845 *) ac_try_echo=$ac_try;;
10846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010848 (eval "$ac_compile") 2>conftest.er1
10849 ac_status=$?
10850 grep -v '^ *+' conftest.er1 >conftest.err
10851 rm -f conftest.er1
10852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010854 (exit $ac_status); } && {
10855 test -z "$ac_c_werror_flag" ||
10856 test ! -s conftest.err
10857 } && test -s conftest.$ac_objext; then
10858 ac_lo=0 ac_mid=0
10859 while :; do
10860 cat >conftest.$ac_ext <<_ACEOF
10861/* confdefs.h. */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h. */
10866$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010867 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010868int
10869main ()
10870{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010872test_array [0] = 0
10873
10874 ;
10875 return 0;
10876}
10877_ACEOF
10878rm -f conftest.$ac_objext
10879if { (ac_try="$ac_compile"
10880case "(($ac_try" in
10881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10882 *) ac_try_echo=$ac_try;;
10883esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010885 (eval "$ac_compile") 2>conftest.er1
10886 ac_status=$?
10887 grep -v '^ *+' conftest.er1 >conftest.err
10888 rm -f conftest.er1
10889 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891 (exit $ac_status); } && {
10892 test -z "$ac_c_werror_flag" ||
10893 test ! -s conftest.err
10894 } && test -s conftest.$ac_objext; then
10895 ac_hi=$ac_mid; break
10896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010897 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010898sed 's/^/| /' conftest.$ac_ext >&5
10899
10900 ac_lo=`expr $ac_mid + 1`
10901 if test $ac_lo -le $ac_mid; then
10902 ac_lo= ac_hi=
10903 break
10904 fi
10905 ac_mid=`expr 2 '*' $ac_mid + 1`
10906fi
10907
10908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909 done
10910else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010911 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010912sed 's/^/| /' conftest.$ac_ext >&5
10913
10914 cat >conftest.$ac_ext <<_ACEOF
10915/* confdefs.h. */
10916_ACEOF
10917cat confdefs.h >>conftest.$ac_ext
10918cat >>conftest.$ac_ext <<_ACEOF
10919/* end confdefs.h. */
10920$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010921 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010922int
10923main ()
10924{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010925static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010926test_array [0] = 0
10927
10928 ;
10929 return 0;
10930}
10931_ACEOF
10932rm -f conftest.$ac_objext
10933if { (ac_try="$ac_compile"
10934case "(($ac_try" in
10935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10936 *) ac_try_echo=$ac_try;;
10937esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010939 (eval "$ac_compile") 2>conftest.er1
10940 ac_status=$?
10941 grep -v '^ *+' conftest.er1 >conftest.err
10942 rm -f conftest.er1
10943 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010945 (exit $ac_status); } && {
10946 test -z "$ac_c_werror_flag" ||
10947 test ! -s conftest.err
10948 } && test -s conftest.$ac_objext; then
10949 ac_hi=-1 ac_mid=-1
10950 while :; do
10951 cat >conftest.$ac_ext <<_ACEOF
10952/* confdefs.h. */
10953_ACEOF
10954cat confdefs.h >>conftest.$ac_ext
10955cat >>conftest.$ac_ext <<_ACEOF
10956/* end confdefs.h. */
10957$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010958 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010959int
10960main ()
10961{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010962static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010963test_array [0] = 0
10964
10965 ;
10966 return 0;
10967}
10968_ACEOF
10969rm -f conftest.$ac_objext
10970if { (ac_try="$ac_compile"
10971case "(($ac_try" in
10972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10973 *) ac_try_echo=$ac_try;;
10974esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010976 (eval "$ac_compile") 2>conftest.er1
10977 ac_status=$?
10978 grep -v '^ *+' conftest.er1 >conftest.err
10979 rm -f conftest.er1
10980 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010982 (exit $ac_status); } && {
10983 test -z "$ac_c_werror_flag" ||
10984 test ! -s conftest.err
10985 } && test -s conftest.$ac_objext; then
10986 ac_lo=$ac_mid; break
10987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010988 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010989sed 's/^/| /' conftest.$ac_ext >&5
10990
10991 ac_hi=`expr '(' $ac_mid ')' - 1`
10992 if test $ac_mid -le $ac_hi; then
10993 ac_lo= ac_hi=
10994 break
10995 fi
10996 ac_mid=`expr 2 '*' $ac_mid`
10997fi
10998
10999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11000 done
11001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011002 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011003sed 's/^/| /' conftest.$ac_ext >&5
11004
11005 ac_lo= ac_hi=
11006fi
11007
11008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11009fi
11010
11011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11012# Binary search between lo and hi bounds.
11013while test "x$ac_lo" != "x$ac_hi"; do
11014 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11015 cat >conftest.$ac_ext <<_ACEOF
11016/* confdefs.h. */
11017_ACEOF
11018cat confdefs.h >>conftest.$ac_ext
11019cat >>conftest.$ac_ext <<_ACEOF
11020/* end confdefs.h. */
11021$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011022 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011023int
11024main ()
11025{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011026static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011027test_array [0] = 0
11028
11029 ;
11030 return 0;
11031}
11032_ACEOF
11033rm -f conftest.$ac_objext
11034if { (ac_try="$ac_compile"
11035case "(($ac_try" in
11036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11037 *) ac_try_echo=$ac_try;;
11038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011040 (eval "$ac_compile") 2>conftest.er1
11041 ac_status=$?
11042 grep -v '^ *+' conftest.er1 >conftest.err
11043 rm -f conftest.er1
11044 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011046 (exit $ac_status); } && {
11047 test -z "$ac_c_werror_flag" ||
11048 test ! -s conftest.err
11049 } && test -s conftest.$ac_objext; then
11050 ac_hi=$ac_mid
11051else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011052 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011053sed 's/^/| /' conftest.$ac_ext >&5
11054
11055 ac_lo=`expr '(' $ac_mid ')' + 1`
11056fi
11057
11058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11059done
11060case $ac_lo in
11061?*) ac_cv_sizeof_pid_t=$ac_lo;;
11062'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011063 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011064See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011065echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011066See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011067 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011068 else
11069 ac_cv_sizeof_pid_t=0
11070 fi ;;
11071esac
11072else
11073 cat >conftest.$ac_ext <<_ACEOF
11074/* confdefs.h. */
11075_ACEOF
11076cat confdefs.h >>conftest.$ac_ext
11077cat >>conftest.$ac_ext <<_ACEOF
11078/* end confdefs.h. */
11079$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011080 typedef pid_t ac__type_sizeof_;
11081static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11082static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011083#include <stdio.h>
11084#include <stdlib.h>
11085int
11086main ()
11087{
11088
11089 FILE *f = fopen ("conftest.val", "w");
11090 if (! f)
11091 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011092 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011093 {
11094 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011095 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011096 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011097 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011098 }
11099 else
11100 {
11101 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011102 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011103 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011104 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011105 }
11106 return ferror (f) || fclose (f) != 0;
11107
11108 ;
11109 return 0;
11110}
11111_ACEOF
11112rm -f conftest$ac_exeext
11113if { (ac_try="$ac_link"
11114case "(($ac_try" in
11115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11116 *) ac_try_echo=$ac_try;;
11117esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011119 (eval "$ac_link") 2>&5
11120 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11123 { (case "(($ac_try" in
11124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11125 *) ac_try_echo=$ac_try;;
11126esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011128 (eval "$ac_try") 2>&5
11129 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011131 (exit $ac_status); }; }; then
11132 ac_cv_sizeof_pid_t=`cat conftest.val`
11133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011134 echo "$as_me: program exited with status $ac_status" >&5
11135echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011136sed 's/^/| /' conftest.$ac_ext >&5
11137
11138( exit $ac_status )
11139if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011140 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011141See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011142echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011143See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011144 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011145 else
11146 ac_cv_sizeof_pid_t=0
11147 fi
11148fi
11149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11150fi
11151rm -f conftest.val
11152fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011153{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11154echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011155
11156
11157
11158cat >>confdefs.h <<_ACEOF
11159#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11160_ACEOF
11161
11162
Michael W. Hudson54241132001-12-07 15:38:26 +000011163
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011164{ echo "$as_me:$LINENO: checking for long long support" >&5
11165echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011166have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* confdefs.h. */
11169_ACEOF
11170cat confdefs.h >>conftest.$ac_ext
11171cat >>conftest.$ac_ext <<_ACEOF
11172/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011173
Martin v. Löwis11437992002-04-12 09:54:03 +000011174int
11175main ()
11176{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011177long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 ;
11179 return 0;
11180}
11181_ACEOF
11182rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183if { (ac_try="$ac_compile"
11184case "(($ac_try" in
11185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11186 *) ac_try_echo=$ac_try;;
11187esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011191 grep -v '^ *+' conftest.er1 >conftest.err
11192 rm -f conftest.er1
11193 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195 (exit $ac_status); } && {
11196 test -z "$ac_c_werror_flag" ||
11197 test ! -s conftest.err
11198 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
11200
11201cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011202#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011203_ACEOF
11204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011205 have_long_long=yes
11206
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011209sed 's/^/| /' conftest.$ac_ext >&5
11210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011211
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213
11214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011215{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11216echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011217if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011218{ echo "$as_me:$LINENO: checking for long long" >&5
11219echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11220if test "${ac_cv_type_long_long+set}" = set; then
11221 echo $ECHO_N "(cached) $ECHO_C" >&6
11222else
11223 cat >conftest.$ac_ext <<_ACEOF
11224/* confdefs.h. */
11225_ACEOF
11226cat confdefs.h >>conftest.$ac_ext
11227cat >>conftest.$ac_ext <<_ACEOF
11228/* end confdefs.h. */
11229$ac_includes_default
11230typedef long long ac__type_new_;
11231int
11232main ()
11233{
11234if ((ac__type_new_ *) 0)
11235 return 0;
11236if (sizeof (ac__type_new_))
11237 return 0;
11238 ;
11239 return 0;
11240}
11241_ACEOF
11242rm -f conftest.$ac_objext
11243if { (ac_try="$ac_compile"
11244case "(($ac_try" in
11245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11246 *) ac_try_echo=$ac_try;;
11247esac
11248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11249 (eval "$ac_compile") 2>conftest.er1
11250 ac_status=$?
11251 grep -v '^ *+' conftest.er1 >conftest.err
11252 rm -f conftest.er1
11253 cat conftest.err >&5
11254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11255 (exit $ac_status); } && {
11256 test -z "$ac_c_werror_flag" ||
11257 test ! -s conftest.err
11258 } && test -s conftest.$ac_objext; then
11259 ac_cv_type_long_long=yes
11260else
11261 echo "$as_me: failed program was:" >&5
11262sed 's/^/| /' conftest.$ac_ext >&5
11263
11264 ac_cv_type_long_long=no
11265fi
11266
11267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11268fi
11269{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11270echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011272# The cast to long int works around a bug in the HP C Compiler
11273# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11274# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11275# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011276{ echo "$as_me:$LINENO: checking size of long long" >&5
11277echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011278if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011279 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011280else
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 if test "$cross_compiling" = yes; then
11282 # Depending upon the size, compute the lo and hi bounds.
11283cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011284/* confdefs.h. */
11285_ACEOF
11286cat confdefs.h >>conftest.$ac_ext
11287cat >>conftest.$ac_ext <<_ACEOF
11288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011289$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011290 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011291int
11292main ()
11293{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011294static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011295test_array [0] = 0
11296
11297 ;
11298 return 0;
11299}
11300_ACEOF
11301rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302if { (ac_try="$ac_compile"
11303case "(($ac_try" in
11304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11305 *) ac_try_echo=$ac_try;;
11306esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011310 grep -v '^ *+' conftest.er1 >conftest.err
11311 rm -f conftest.er1
11312 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314 (exit $ac_status); } && {
11315 test -z "$ac_c_werror_flag" ||
11316 test ! -s conftest.err
11317 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ac_lo=0 ac_mid=0
11319 while :; do
11320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* confdefs.h. */
11322_ACEOF
11323cat confdefs.h >>conftest.$ac_ext
11324cat >>conftest.$ac_ext <<_ACEOF
11325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011326$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011327 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
11329main ()
11330{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011332test_array [0] = 0
11333
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339if { (ac_try="$ac_compile"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 (exit $ac_status); } && {
11352 test -z "$ac_c_werror_flag" ||
11353 test ! -s conftest.err
11354 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ac_hi=$ac_mid; break
11356else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011358sed 's/^/| /' conftest.$ac_ext >&5
11359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360 ac_lo=`expr $ac_mid + 1`
11361 if test $ac_lo -le $ac_mid; then
11362 ac_lo= ac_hi=
11363 break
11364 fi
11365 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367
11368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 done
11370else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011372sed 's/^/| /' conftest.$ac_ext >&5
11373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011375/* confdefs.h. */
11376_ACEOF
11377cat confdefs.h >>conftest.$ac_ext
11378cat >>conftest.$ac_ext <<_ACEOF
11379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011380$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011381 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011382int
11383main ()
11384{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011386test_array [0] = 0
11387
11388 ;
11389 return 0;
11390}
11391_ACEOF
11392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393if { (ac_try="$ac_compile"
11394case "(($ac_try" in
11395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11396 *) ac_try_echo=$ac_try;;
11397esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011401 grep -v '^ *+' conftest.er1 >conftest.err
11402 rm -f conftest.er1
11403 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405 (exit $ac_status); } && {
11406 test -z "$ac_c_werror_flag" ||
11407 test ! -s conftest.err
11408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ac_hi=-1 ac_mid=-1
11410 while :; do
11411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* confdefs.h. */
11413_ACEOF
11414cat confdefs.h >>conftest.$ac_ext
11415cat >>conftest.$ac_ext <<_ACEOF
11416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011417$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011418 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011419int
11420main ()
11421{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011423test_array [0] = 0
11424
11425 ;
11426 return 0;
11427}
11428_ACEOF
11429rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430if { (ac_try="$ac_compile"
11431case "(($ac_try" in
11432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11433 *) ac_try_echo=$ac_try;;
11434esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011438 grep -v '^ *+' conftest.er1 >conftest.err
11439 rm -f conftest.er1
11440 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442 (exit $ac_status); } && {
11443 test -z "$ac_c_werror_flag" ||
11444 test ! -s conftest.err
11445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ac_lo=$ac_mid; break
11447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011449sed 's/^/| /' conftest.$ac_ext >&5
11450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451 ac_hi=`expr '(' $ac_mid ')' - 1`
11452 if test $ac_mid -le $ac_hi; then
11453 ac_lo= ac_hi=
11454 break
11455 fi
11456 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458
11459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 done
11461else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011463sed 's/^/| /' conftest.$ac_ext >&5
11464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467
11468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011470
11471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011472# Binary search between lo and hi bounds.
11473while test "x$ac_lo" != "x$ac_hi"; do
11474 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011476/* confdefs.h. */
11477_ACEOF
11478cat confdefs.h >>conftest.$ac_ext
11479cat >>conftest.$ac_ext <<_ACEOF
11480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011481$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011482 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011483int
11484main ()
11485{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011486static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011487test_array [0] = 0
11488
11489 ;
11490 return 0;
11491}
11492_ACEOF
11493rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494if { (ac_try="$ac_compile"
11495case "(($ac_try" in
11496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11497 *) ac_try_echo=$ac_try;;
11498esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011502 grep -v '^ *+' conftest.er1 >conftest.err
11503 rm -f conftest.er1
11504 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506 (exit $ac_status); } && {
11507 test -z "$ac_c_werror_flag" ||
11508 test ! -s conftest.err
11509 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 ac_hi=$ac_mid
11511else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011513sed 's/^/| /' conftest.$ac_ext >&5
11514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517
11518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011519done
11520case $ac_lo in
11521?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011523 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011524See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011525echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011526See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011527 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528 else
11529 ac_cv_sizeof_long_long=0
11530 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011531esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011532else
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011534/* confdefs.h. */
11535_ACEOF
11536cat confdefs.h >>conftest.$ac_ext
11537cat >>conftest.$ac_ext <<_ACEOF
11538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011539$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011540 typedef long long ac__type_sizeof_;
11541static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11542static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011543#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011544#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011545int
11546main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011547{
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
11549 FILE *f = fopen ("conftest.val", "w");
11550 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011552 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011555 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011557 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 }
11559 else
11560 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011562 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011564 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
11568 ;
11569 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011570}
Martin v. Löwis11437992002-04-12 09:54:03 +000011571_ACEOF
11572rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573if { (ac_try="$ac_link"
11574case "(($ac_try" in
11575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11576 *) ac_try_echo=$ac_try;;
11577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583 { (case "(($ac_try" in
11584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11585 *) ac_try_echo=$ac_try;;
11586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 (exit $ac_status); }; }; then
11592 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011593else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011594 echo "$as_me: program exited with status $ac_status" >&5
11595echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011596sed 's/^/| /' conftest.$ac_ext >&5
11597
Martin v. Löwis11437992002-04-12 09:54:03 +000011598( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011599if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011600 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011601See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011602echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011603See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011604 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605 else
11606 ac_cv_sizeof_long_long=0
11607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011609rm -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 +000011610fi
11611rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011612fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011613{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11614echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615
11616
11617
Martin v. Löwis11437992002-04-12 09:54:03 +000011618cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011619#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011620_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011621
Michael W. Hudson54241132001-12-07 15:38:26 +000011622
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011623fi
11624
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011625{ echo "$as_me:$LINENO: checking for long double support" >&5
11626echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011627have_long_double=no
11628cat >conftest.$ac_ext <<_ACEOF
11629/* confdefs.h. */
11630_ACEOF
11631cat confdefs.h >>conftest.$ac_ext
11632cat >>conftest.$ac_ext <<_ACEOF
11633/* end confdefs.h. */
11634
11635int
11636main ()
11637{
11638long double x; x = (long double)0;
11639 ;
11640 return 0;
11641}
11642_ACEOF
11643rm -f conftest.$ac_objext
11644if { (ac_try="$ac_compile"
11645case "(($ac_try" in
11646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11647 *) ac_try_echo=$ac_try;;
11648esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011650 (eval "$ac_compile") 2>conftest.er1
11651 ac_status=$?
11652 grep -v '^ *+' conftest.er1 >conftest.err
11653 rm -f conftest.er1
11654 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011656 (exit $ac_status); } && {
11657 test -z "$ac_c_werror_flag" ||
11658 test ! -s conftest.err
11659 } && test -s conftest.$ac_objext; then
11660
11661
11662cat >>confdefs.h <<\_ACEOF
11663#define HAVE_LONG_DOUBLE 1
11664_ACEOF
11665
11666 have_long_double=yes
11667
11668else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011669 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011670sed 's/^/| /' conftest.$ac_ext >&5
11671
11672
11673fi
11674
11675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011676{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11677echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011678if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011679{ echo "$as_me:$LINENO: checking for long double" >&5
11680echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11681if test "${ac_cv_type_long_double+set}" = set; then
11682 echo $ECHO_N "(cached) $ECHO_C" >&6
11683else
11684 cat >conftest.$ac_ext <<_ACEOF
11685/* confdefs.h. */
11686_ACEOF
11687cat confdefs.h >>conftest.$ac_ext
11688cat >>conftest.$ac_ext <<_ACEOF
11689/* end confdefs.h. */
11690$ac_includes_default
11691typedef long double ac__type_new_;
11692int
11693main ()
11694{
11695if ((ac__type_new_ *) 0)
11696 return 0;
11697if (sizeof (ac__type_new_))
11698 return 0;
11699 ;
11700 return 0;
11701}
11702_ACEOF
11703rm -f conftest.$ac_objext
11704if { (ac_try="$ac_compile"
11705case "(($ac_try" in
11706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11707 *) ac_try_echo=$ac_try;;
11708esac
11709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11710 (eval "$ac_compile") 2>conftest.er1
11711 ac_status=$?
11712 grep -v '^ *+' conftest.er1 >conftest.err
11713 rm -f conftest.er1
11714 cat conftest.err >&5
11715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716 (exit $ac_status); } && {
11717 test -z "$ac_c_werror_flag" ||
11718 test ! -s conftest.err
11719 } && test -s conftest.$ac_objext; then
11720 ac_cv_type_long_double=yes
11721else
11722 echo "$as_me: failed program was:" >&5
11723sed 's/^/| /' conftest.$ac_ext >&5
11724
11725 ac_cv_type_long_double=no
11726fi
11727
11728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11729fi
11730{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11731echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11732
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011733# The cast to long int works around a bug in the HP C Compiler
11734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11736# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011737{ echo "$as_me:$LINENO: checking size of long double" >&5
11738echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011739if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011740 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011741else
11742 if test "$cross_compiling" = yes; then
11743 # Depending upon the size, compute the lo and hi bounds.
11744cat >conftest.$ac_ext <<_ACEOF
11745/* confdefs.h. */
11746_ACEOF
11747cat confdefs.h >>conftest.$ac_ext
11748cat >>conftest.$ac_ext <<_ACEOF
11749/* end confdefs.h. */
11750$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011751 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752int
11753main ()
11754{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011756test_array [0] = 0
11757
11758 ;
11759 return 0;
11760}
11761_ACEOF
11762rm -f conftest.$ac_objext
11763if { (ac_try="$ac_compile"
11764case "(($ac_try" in
11765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11766 *) ac_try_echo=$ac_try;;
11767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011769 (eval "$ac_compile") 2>conftest.er1
11770 ac_status=$?
11771 grep -v '^ *+' conftest.er1 >conftest.err
11772 rm -f conftest.er1
11773 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011775 (exit $ac_status); } && {
11776 test -z "$ac_c_werror_flag" ||
11777 test ! -s conftest.err
11778 } && test -s conftest.$ac_objext; then
11779 ac_lo=0 ac_mid=0
11780 while :; do
11781 cat >conftest.$ac_ext <<_ACEOF
11782/* confdefs.h. */
11783_ACEOF
11784cat confdefs.h >>conftest.$ac_ext
11785cat >>conftest.$ac_ext <<_ACEOF
11786/* end confdefs.h. */
11787$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011788 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011789int
11790main ()
11791{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793test_array [0] = 0
11794
11795 ;
11796 return 0;
11797}
11798_ACEOF
11799rm -f conftest.$ac_objext
11800if { (ac_try="$ac_compile"
11801case "(($ac_try" in
11802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11803 *) ac_try_echo=$ac_try;;
11804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011806 (eval "$ac_compile") 2>conftest.er1
11807 ac_status=$?
11808 grep -v '^ *+' conftest.er1 >conftest.err
11809 rm -f conftest.er1
11810 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812 (exit $ac_status); } && {
11813 test -z "$ac_c_werror_flag" ||
11814 test ! -s conftest.err
11815 } && test -s conftest.$ac_objext; then
11816 ac_hi=$ac_mid; break
11817else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011818 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011819sed 's/^/| /' conftest.$ac_ext >&5
11820
11821 ac_lo=`expr $ac_mid + 1`
11822 if test $ac_lo -le $ac_mid; then
11823 ac_lo= ac_hi=
11824 break
11825 fi
11826 ac_mid=`expr 2 '*' $ac_mid + 1`
11827fi
11828
11829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11830 done
11831else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011832 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011833sed 's/^/| /' conftest.$ac_ext >&5
11834
11835 cat >conftest.$ac_ext <<_ACEOF
11836/* confdefs.h. */
11837_ACEOF
11838cat confdefs.h >>conftest.$ac_ext
11839cat >>conftest.$ac_ext <<_ACEOF
11840/* end confdefs.h. */
11841$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011842 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011843int
11844main ()
11845{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011847test_array [0] = 0
11848
11849 ;
11850 return 0;
11851}
11852_ACEOF
11853rm -f conftest.$ac_objext
11854if { (ac_try="$ac_compile"
11855case "(($ac_try" in
11856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11857 *) ac_try_echo=$ac_try;;
11858esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011860 (eval "$ac_compile") 2>conftest.er1
11861 ac_status=$?
11862 grep -v '^ *+' conftest.er1 >conftest.err
11863 rm -f conftest.er1
11864 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011866 (exit $ac_status); } && {
11867 test -z "$ac_c_werror_flag" ||
11868 test ! -s conftest.err
11869 } && test -s conftest.$ac_objext; then
11870 ac_hi=-1 ac_mid=-1
11871 while :; do
11872 cat >conftest.$ac_ext <<_ACEOF
11873/* confdefs.h. */
11874_ACEOF
11875cat confdefs.h >>conftest.$ac_ext
11876cat >>conftest.$ac_ext <<_ACEOF
11877/* end confdefs.h. */
11878$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011879 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011880int
11881main ()
11882{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011883static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011884test_array [0] = 0
11885
11886 ;
11887 return 0;
11888}
11889_ACEOF
11890rm -f conftest.$ac_objext
11891if { (ac_try="$ac_compile"
11892case "(($ac_try" in
11893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11894 *) ac_try_echo=$ac_try;;
11895esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011897 (eval "$ac_compile") 2>conftest.er1
11898 ac_status=$?
11899 grep -v '^ *+' conftest.er1 >conftest.err
11900 rm -f conftest.er1
11901 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011903 (exit $ac_status); } && {
11904 test -z "$ac_c_werror_flag" ||
11905 test ! -s conftest.err
11906 } && test -s conftest.$ac_objext; then
11907 ac_lo=$ac_mid; break
11908else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011909 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011910sed 's/^/| /' conftest.$ac_ext >&5
11911
11912 ac_hi=`expr '(' $ac_mid ')' - 1`
11913 if test $ac_mid -le $ac_hi; then
11914 ac_lo= ac_hi=
11915 break
11916 fi
11917 ac_mid=`expr 2 '*' $ac_mid`
11918fi
11919
11920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11921 done
11922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011923 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011924sed 's/^/| /' conftest.$ac_ext >&5
11925
11926 ac_lo= ac_hi=
11927fi
11928
11929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930fi
11931
11932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11933# Binary search between lo and hi bounds.
11934while test "x$ac_lo" != "x$ac_hi"; do
11935 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11936 cat >conftest.$ac_ext <<_ACEOF
11937/* confdefs.h. */
11938_ACEOF
11939cat confdefs.h >>conftest.$ac_ext
11940cat >>conftest.$ac_ext <<_ACEOF
11941/* end confdefs.h. */
11942$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011943 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011944int
11945main ()
11946{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948test_array [0] = 0
11949
11950 ;
11951 return 0;
11952}
11953_ACEOF
11954rm -f conftest.$ac_objext
11955if { (ac_try="$ac_compile"
11956case "(($ac_try" in
11957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11958 *) ac_try_echo=$ac_try;;
11959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961 (eval "$ac_compile") 2>conftest.er1
11962 ac_status=$?
11963 grep -v '^ *+' conftest.er1 >conftest.err
11964 rm -f conftest.er1
11965 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011967 (exit $ac_status); } && {
11968 test -z "$ac_c_werror_flag" ||
11969 test ! -s conftest.err
11970 } && test -s conftest.$ac_objext; then
11971 ac_hi=$ac_mid
11972else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011973 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011974sed 's/^/| /' conftest.$ac_ext >&5
11975
11976 ac_lo=`expr '(' $ac_mid ')' + 1`
11977fi
11978
11979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11980done
11981case $ac_lo in
11982?*) ac_cv_sizeof_long_double=$ac_lo;;
11983'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011984 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011985See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011986echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011987See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011988 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011989 else
11990 ac_cv_sizeof_long_double=0
11991 fi ;;
11992esac
11993else
11994 cat >conftest.$ac_ext <<_ACEOF
11995/* confdefs.h. */
11996_ACEOF
11997cat confdefs.h >>conftest.$ac_ext
11998cat >>conftest.$ac_ext <<_ACEOF
11999/* end confdefs.h. */
12000$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012001 typedef long double ac__type_sizeof_;
12002static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12003static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012004#include <stdio.h>
12005#include <stdlib.h>
12006int
12007main ()
12008{
12009
12010 FILE *f = fopen ("conftest.val", "w");
12011 if (! f)
12012 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012013 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012014 {
12015 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012016 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012017 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012018 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012019 }
12020 else
12021 {
12022 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012023 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012024 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012025 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012026 }
12027 return ferror (f) || fclose (f) != 0;
12028
12029 ;
12030 return 0;
12031}
12032_ACEOF
12033rm -f conftest$ac_exeext
12034if { (ac_try="$ac_link"
12035case "(($ac_try" in
12036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12037 *) ac_try_echo=$ac_try;;
12038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012040 (eval "$ac_link") 2>&5
12041 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12044 { (case "(($ac_try" in
12045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12046 *) ac_try_echo=$ac_try;;
12047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012049 (eval "$ac_try") 2>&5
12050 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012052 (exit $ac_status); }; }; then
12053 ac_cv_sizeof_long_double=`cat conftest.val`
12054else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012055 echo "$as_me: program exited with status $ac_status" >&5
12056echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012057sed 's/^/| /' conftest.$ac_ext >&5
12058
12059( exit $ac_status )
12060if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012061 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012062See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012063echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012064See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012065 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012066 else
12067 ac_cv_sizeof_long_double=0
12068 fi
12069fi
12070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12071fi
12072rm -f conftest.val
12073fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012074{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12075echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012076
12077
12078
12079cat >>confdefs.h <<_ACEOF
12080#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12081_ACEOF
12082
12083
12084fi
12085
12086
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012087{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12088echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012089have_c99_bool=no
12090cat >conftest.$ac_ext <<_ACEOF
12091/* confdefs.h. */
12092_ACEOF
12093cat confdefs.h >>conftest.$ac_ext
12094cat >>conftest.$ac_ext <<_ACEOF
12095/* end confdefs.h. */
12096
12097int
12098main ()
12099{
12100_Bool x; x = (_Bool)0;
12101 ;
12102 return 0;
12103}
12104_ACEOF
12105rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012106if { (ac_try="$ac_compile"
12107case "(($ac_try" in
12108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12109 *) ac_try_echo=$ac_try;;
12110esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012113 ac_status=$?
12114 grep -v '^ *+' conftest.er1 >conftest.err
12115 rm -f conftest.er1
12116 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118 (exit $ac_status); } && {
12119 test -z "$ac_c_werror_flag" ||
12120 test ! -s conftest.err
12121 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012122
12123
12124cat >>confdefs.h <<\_ACEOF
12125#define HAVE_C99_BOOL 1
12126_ACEOF
12127
12128 have_c99_bool=yes
12129
12130else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012131 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012132sed 's/^/| /' conftest.$ac_ext >&5
12133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134
Thomas Woutersb2137042007-02-01 18:02:27 +000012135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136
12137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012138{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12139echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012140if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012141{ echo "$as_me:$LINENO: checking for _Bool" >&5
12142echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12143if test "${ac_cv_type__Bool+set}" = set; then
12144 echo $ECHO_N "(cached) $ECHO_C" >&6
12145else
12146 cat >conftest.$ac_ext <<_ACEOF
12147/* confdefs.h. */
12148_ACEOF
12149cat confdefs.h >>conftest.$ac_ext
12150cat >>conftest.$ac_ext <<_ACEOF
12151/* end confdefs.h. */
12152$ac_includes_default
12153typedef _Bool ac__type_new_;
12154int
12155main ()
12156{
12157if ((ac__type_new_ *) 0)
12158 return 0;
12159if (sizeof (ac__type_new_))
12160 return 0;
12161 ;
12162 return 0;
12163}
12164_ACEOF
12165rm -f conftest.$ac_objext
12166if { (ac_try="$ac_compile"
12167case "(($ac_try" in
12168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12169 *) ac_try_echo=$ac_try;;
12170esac
12171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12172 (eval "$ac_compile") 2>conftest.er1
12173 ac_status=$?
12174 grep -v '^ *+' conftest.er1 >conftest.err
12175 rm -f conftest.er1
12176 cat conftest.err >&5
12177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12178 (exit $ac_status); } && {
12179 test -z "$ac_c_werror_flag" ||
12180 test ! -s conftest.err
12181 } && test -s conftest.$ac_objext; then
12182 ac_cv_type__Bool=yes
12183else
12184 echo "$as_me: failed program was:" >&5
12185sed 's/^/| /' conftest.$ac_ext >&5
12186
12187 ac_cv_type__Bool=no
12188fi
12189
12190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12191fi
12192{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12193echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195# The cast to long int works around a bug in the HP C Compiler
12196# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12197# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12198# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012199{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12200echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012201if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012202 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012203else
12204 if test "$cross_compiling" = yes; then
12205 # Depending upon the size, compute the lo and hi bounds.
12206cat >conftest.$ac_ext <<_ACEOF
12207/* confdefs.h. */
12208_ACEOF
12209cat confdefs.h >>conftest.$ac_ext
12210cat >>conftest.$ac_ext <<_ACEOF
12211/* end confdefs.h. */
12212$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012213 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012214int
12215main ()
12216{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012218test_array [0] = 0
12219
12220 ;
12221 return 0;
12222}
12223_ACEOF
12224rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225if { (ac_try="$ac_compile"
12226case "(($ac_try" in
12227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12228 *) ac_try_echo=$ac_try;;
12229esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012232 ac_status=$?
12233 grep -v '^ *+' conftest.er1 >conftest.err
12234 rm -f conftest.er1
12235 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237 (exit $ac_status); } && {
12238 test -z "$ac_c_werror_flag" ||
12239 test ! -s conftest.err
12240 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012241 ac_lo=0 ac_mid=0
12242 while :; do
12243 cat >conftest.$ac_ext <<_ACEOF
12244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
12249$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012250 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012251int
12252main ()
12253{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012255test_array [0] = 0
12256
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262if { (ac_try="$ac_compile"
12263case "(($ac_try" in
12264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265 *) ac_try_echo=$ac_try;;
12266esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012269 ac_status=$?
12270 grep -v '^ *+' conftest.er1 >conftest.err
12271 rm -f conftest.er1
12272 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 (exit $ac_status); } && {
12275 test -z "$ac_c_werror_flag" ||
12276 test ! -s conftest.err
12277 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012278 ac_hi=$ac_mid; break
12279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012280 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012281sed 's/^/| /' conftest.$ac_ext >&5
12282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283 ac_lo=`expr $ac_mid + 1`
12284 if test $ac_lo -le $ac_mid; then
12285 ac_lo= ac_hi=
12286 break
12287 fi
12288 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290
12291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012292 done
12293else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012294 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012295sed 's/^/| /' conftest.$ac_ext >&5
12296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012297 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012298/* confdefs.h. */
12299_ACEOF
12300cat confdefs.h >>conftest.$ac_ext
12301cat >>conftest.$ac_ext <<_ACEOF
12302/* end confdefs.h. */
12303$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012304 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012305int
12306main ()
12307{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012309test_array [0] = 0
12310
12311 ;
12312 return 0;
12313}
12314_ACEOF
12315rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316if { (ac_try="$ac_compile"
12317case "(($ac_try" in
12318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12319 *) ac_try_echo=$ac_try;;
12320esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012323 ac_status=$?
12324 grep -v '^ *+' conftest.er1 >conftest.err
12325 rm -f conftest.er1
12326 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328 (exit $ac_status); } && {
12329 test -z "$ac_c_werror_flag" ||
12330 test ! -s conftest.err
12331 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012332 ac_hi=-1 ac_mid=-1
12333 while :; do
12334 cat >conftest.$ac_ext <<_ACEOF
12335/* confdefs.h. */
12336_ACEOF
12337cat confdefs.h >>conftest.$ac_ext
12338cat >>conftest.$ac_ext <<_ACEOF
12339/* end confdefs.h. */
12340$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012341 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012342int
12343main ()
12344{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012345static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012346test_array [0] = 0
12347
12348 ;
12349 return 0;
12350}
12351_ACEOF
12352rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012353if { (ac_try="$ac_compile"
12354case "(($ac_try" in
12355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12356 *) ac_try_echo=$ac_try;;
12357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012360 ac_status=$?
12361 grep -v '^ *+' conftest.er1 >conftest.err
12362 rm -f conftest.er1
12363 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365 (exit $ac_status); } && {
12366 test -z "$ac_c_werror_flag" ||
12367 test ! -s conftest.err
12368 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012369 ac_lo=$ac_mid; break
12370else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012371 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012372sed 's/^/| /' conftest.$ac_ext >&5
12373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374 ac_hi=`expr '(' $ac_mid ')' - 1`
12375 if test $ac_mid -le $ac_hi; then
12376 ac_lo= ac_hi=
12377 break
12378 fi
12379 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381
12382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012383 done
12384else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012385 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012386sed 's/^/| /' conftest.$ac_ext >&5
12387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390
12391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393
12394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012395# Binary search between lo and hi bounds.
12396while test "x$ac_lo" != "x$ac_hi"; do
12397 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12398 cat >conftest.$ac_ext <<_ACEOF
12399/* confdefs.h. */
12400_ACEOF
12401cat confdefs.h >>conftest.$ac_ext
12402cat >>conftest.$ac_ext <<_ACEOF
12403/* end confdefs.h. */
12404$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012405 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012406int
12407main ()
12408{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012410test_array [0] = 0
12411
12412 ;
12413 return 0;
12414}
12415_ACEOF
12416rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417if { (ac_try="$ac_compile"
12418case "(($ac_try" in
12419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12420 *) ac_try_echo=$ac_try;;
12421esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012424 ac_status=$?
12425 grep -v '^ *+' conftest.er1 >conftest.err
12426 rm -f conftest.er1
12427 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429 (exit $ac_status); } && {
12430 test -z "$ac_c_werror_flag" ||
12431 test ! -s conftest.err
12432 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012433 ac_hi=$ac_mid
12434else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012435 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012436sed 's/^/| /' conftest.$ac_ext >&5
12437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440
12441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012442done
12443case $ac_lo in
12444?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012446 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012447See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012448echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012449See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012450 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451 else
12452 ac_cv_sizeof__Bool=0
12453 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012454esac
12455else
12456 cat >conftest.$ac_ext <<_ACEOF
12457/* confdefs.h. */
12458_ACEOF
12459cat confdefs.h >>conftest.$ac_ext
12460cat >>conftest.$ac_ext <<_ACEOF
12461/* end confdefs.h. */
12462$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012463 typedef _Bool ac__type_sizeof_;
12464static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12465static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012466#include <stdio.h>
12467#include <stdlib.h>
12468int
12469main ()
12470{
12471
12472 FILE *f = fopen ("conftest.val", "w");
12473 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012475 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012476 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012478 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012480 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012481 }
12482 else
12483 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012487 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012488 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012490
12491 ;
12492 return 0;
12493}
12494_ACEOF
12495rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012496if { (ac_try="$ac_link"
12497case "(($ac_try" in
12498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12499 *) ac_try_echo=$ac_try;;
12500esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012503 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506 { (case "(($ac_try" in
12507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12508 *) ac_try_echo=$ac_try;;
12509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012512 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012514 (exit $ac_status); }; }; then
12515 ac_cv_sizeof__Bool=`cat conftest.val`
12516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012517 echo "$as_me: program exited with status $ac_status" >&5
12518echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012519sed 's/^/| /' conftest.$ac_ext >&5
12520
12521( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012523 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012524See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012525echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012526See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528 else
12529 ac_cv_sizeof__Bool=0
12530 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532rm -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 +000012533fi
12534rm -f conftest.val
12535fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012536{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12537echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538
12539
12540
Thomas Woutersb2137042007-02-01 18:02:27 +000012541cat >>confdefs.h <<_ACEOF
12542#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12543_ACEOF
12544
12545
12546fi
12547
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012548{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12549echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012550if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012551 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012552else
12553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012554/* confdefs.h. */
12555_ACEOF
12556cat confdefs.h >>conftest.$ac_ext
12557cat >>conftest.$ac_ext <<_ACEOF
12558/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012559#ifdef HAVE_STDINT_H
12560 #include <stdint.h>
12561 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012562
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012563typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012564int
12565main ()
12566{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012567if ((ac__type_new_ *) 0)
12568 return 0;
12569if (sizeof (ac__type_new_))
12570 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012571 ;
12572 return 0;
12573}
12574_ACEOF
12575rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576if { (ac_try="$ac_compile"
12577case "(($ac_try" in
12578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12579 *) ac_try_echo=$ac_try;;
12580esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012584 grep -v '^ *+' conftest.er1 >conftest.err
12585 rm -f conftest.er1
12586 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588 (exit $ac_status); } && {
12589 test -z "$ac_c_werror_flag" ||
12590 test ! -s conftest.err
12591 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012592 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012593else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012595sed 's/^/| /' conftest.$ac_ext >&5
12596
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012597 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599
12600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012601fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012602{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12603echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12604if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012605
12606cat >>confdefs.h <<_ACEOF
12607#define HAVE_UINTPTR_T 1
12608_ACEOF
12609
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012610{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12611echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12612if test "${ac_cv_type_uintptr_t+set}" = set; then
12613 echo $ECHO_N "(cached) $ECHO_C" >&6
12614else
12615 cat >conftest.$ac_ext <<_ACEOF
12616/* confdefs.h. */
12617_ACEOF
12618cat confdefs.h >>conftest.$ac_ext
12619cat >>conftest.$ac_ext <<_ACEOF
12620/* end confdefs.h. */
12621$ac_includes_default
12622typedef uintptr_t ac__type_new_;
12623int
12624main ()
12625{
12626if ((ac__type_new_ *) 0)
12627 return 0;
12628if (sizeof (ac__type_new_))
12629 return 0;
12630 ;
12631 return 0;
12632}
12633_ACEOF
12634rm -f conftest.$ac_objext
12635if { (ac_try="$ac_compile"
12636case "(($ac_try" in
12637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12638 *) ac_try_echo=$ac_try;;
12639esac
12640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12641 (eval "$ac_compile") 2>conftest.er1
12642 ac_status=$?
12643 grep -v '^ *+' conftest.er1 >conftest.err
12644 rm -f conftest.er1
12645 cat conftest.err >&5
12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647 (exit $ac_status); } && {
12648 test -z "$ac_c_werror_flag" ||
12649 test ! -s conftest.err
12650 } && test -s conftest.$ac_objext; then
12651 ac_cv_type_uintptr_t=yes
12652else
12653 echo "$as_me: failed program was:" >&5
12654sed 's/^/| /' conftest.$ac_ext >&5
12655
12656 ac_cv_type_uintptr_t=no
12657fi
12658
12659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12660fi
12661{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12662echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664# The cast to long int works around a bug in the HP C Compiler
12665# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12666# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12667# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012668{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12669echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012670if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012671 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012672else
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 if test "$cross_compiling" = yes; then
12674 # Depending upon the size, compute the lo and hi bounds.
12675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* confdefs.h. */
12677_ACEOF
12678cat confdefs.h >>conftest.$ac_ext
12679cat >>conftest.$ac_ext <<_ACEOF
12680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012681$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012682 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012683int
12684main ()
12685{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012686static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012687test_array [0] = 0
12688
12689 ;
12690 return 0;
12691}
12692_ACEOF
12693rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694if { (ac_try="$ac_compile"
12695case "(($ac_try" in
12696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12697 *) ac_try_echo=$ac_try;;
12698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012702 grep -v '^ *+' conftest.er1 >conftest.err
12703 rm -f conftest.er1
12704 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012706 (exit $ac_status); } && {
12707 test -z "$ac_c_werror_flag" ||
12708 test ! -s conftest.err
12709 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ac_lo=0 ac_mid=0
12711 while :; do
12712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* confdefs.h. */
12714_ACEOF
12715cat confdefs.h >>conftest.$ac_ext
12716cat >>conftest.$ac_ext <<_ACEOF
12717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012718$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012719 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012720int
12721main ()
12722{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012724test_array [0] = 0
12725
12726 ;
12727 return 0;
12728}
12729_ACEOF
12730rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731if { (ac_try="$ac_compile"
12732case "(($ac_try" in
12733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12734 *) ac_try_echo=$ac_try;;
12735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012739 grep -v '^ *+' conftest.er1 >conftest.err
12740 rm -f conftest.er1
12741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743 (exit $ac_status); } && {
12744 test -z "$ac_c_werror_flag" ||
12745 test ! -s conftest.err
12746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_hi=$ac_mid; break
12748else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012750sed 's/^/| /' conftest.$ac_ext >&5
12751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012752 ac_lo=`expr $ac_mid + 1`
12753 if test $ac_lo -le $ac_mid; then
12754 ac_lo= ac_hi=
12755 break
12756 fi
12757 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759
12760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 done
12762else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012764sed 's/^/| /' conftest.$ac_ext >&5
12765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012767/* confdefs.h. */
12768_ACEOF
12769cat confdefs.h >>conftest.$ac_ext
12770cat >>conftest.$ac_ext <<_ACEOF
12771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012772$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012773 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012774int
12775main ()
12776{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012778test_array [0] = 0
12779
12780 ;
12781 return 0;
12782}
12783_ACEOF
12784rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785if { (ac_try="$ac_compile"
12786case "(($ac_try" in
12787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12788 *) ac_try_echo=$ac_try;;
12789esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012793 grep -v '^ *+' conftest.er1 >conftest.err
12794 rm -f conftest.er1
12795 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797 (exit $ac_status); } && {
12798 test -z "$ac_c_werror_flag" ||
12799 test ! -s conftest.err
12800 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ac_hi=-1 ac_mid=-1
12802 while :; do
12803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012804/* confdefs.h. */
12805_ACEOF
12806cat confdefs.h >>conftest.$ac_ext
12807cat >>conftest.$ac_ext <<_ACEOF
12808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012809$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012810 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012811int
12812main ()
12813{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012815test_array [0] = 0
12816
12817 ;
12818 return 0;
12819}
12820_ACEOF
12821rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822if { (ac_try="$ac_compile"
12823case "(($ac_try" in
12824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12825 *) ac_try_echo=$ac_try;;
12826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012830 grep -v '^ *+' conftest.er1 >conftest.err
12831 rm -f conftest.er1
12832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834 (exit $ac_status); } && {
12835 test -z "$ac_c_werror_flag" ||
12836 test ! -s conftest.err
12837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 ac_lo=$ac_mid; break
12839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012841sed 's/^/| /' conftest.$ac_ext >&5
12842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843 ac_hi=`expr '(' $ac_mid ')' - 1`
12844 if test $ac_mid -le $ac_hi; then
12845 ac_lo= ac_hi=
12846 break
12847 fi
12848 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850
12851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 done
12853else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012855sed 's/^/| /' conftest.$ac_ext >&5
12856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859
12860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862
12863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012864# Binary search between lo and hi bounds.
12865while test "x$ac_lo" != "x$ac_hi"; do
12866 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012868/* confdefs.h. */
12869_ACEOF
12870cat confdefs.h >>conftest.$ac_ext
12871cat >>conftest.$ac_ext <<_ACEOF
12872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012873$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012874 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012875int
12876main ()
12877{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012878static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012879test_array [0] = 0
12880
12881 ;
12882 return 0;
12883}
12884_ACEOF
12885rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886if { (ac_try="$ac_compile"
12887case "(($ac_try" in
12888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12889 *) ac_try_echo=$ac_try;;
12890esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012894 grep -v '^ *+' conftest.er1 >conftest.err
12895 rm -f conftest.er1
12896 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898 (exit $ac_status); } && {
12899 test -z "$ac_c_werror_flag" ||
12900 test ! -s conftest.err
12901 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ac_hi=$ac_mid
12903else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012905sed 's/^/| /' conftest.$ac_ext >&5
12906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909
12910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012911done
12912case $ac_lo in
12913?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012915 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012916See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012917echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012918See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012919 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920 else
12921 ac_cv_sizeof_uintptr_t=0
12922 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012923esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012924else
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012926/* confdefs.h. */
12927_ACEOF
12928cat confdefs.h >>conftest.$ac_ext
12929cat >>conftest.$ac_ext <<_ACEOF
12930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012931$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012932 typedef uintptr_t ac__type_sizeof_;
12933static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12934static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012935#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012936#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012937int
12938main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012939{
Martin v. Löwis11437992002-04-12 09:54:03 +000012940
12941 FILE *f = fopen ("conftest.val", "w");
12942 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012944 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012947 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012949 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 }
12951 else
12952 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012954 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012956 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
12960 ;
12961 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012962}
Martin v. Löwis11437992002-04-12 09:54:03 +000012963_ACEOF
12964rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965if { (ac_try="$ac_link"
12966case "(($ac_try" in
12967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12968 *) ac_try_echo=$ac_try;;
12969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012975 { (case "(($ac_try" in
12976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12977 *) ac_try_echo=$ac_try;;
12978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 (exit $ac_status); }; }; then
12984 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012985else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012986 echo "$as_me: program exited with status $ac_status" >&5
12987echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012988sed 's/^/| /' conftest.$ac_ext >&5
12989
Martin v. Löwis11437992002-04-12 09:54:03 +000012990( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012992 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012993See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012994echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012995See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012996 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997 else
12998 ac_cv_sizeof_uintptr_t=0
12999 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001rm -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 +000013002fi
13003rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013004fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013005{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13006echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013007
13008
13009
Martin v. Löwis11437992002-04-12 09:54:03 +000013010cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013011#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013012_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013013
Michael W. Hudson54241132001-12-07 15:38:26 +000013014
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013015fi
13016
Thomas Wouters89f507f2006-12-13 04:49:30 +000013017
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013018{ echo "$as_me:$LINENO: checking for off_t" >&5
13019echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13020if test "${ac_cv_type_off_t+set}" = set; then
13021 echo $ECHO_N "(cached) $ECHO_C" >&6
13022else
13023 cat >conftest.$ac_ext <<_ACEOF
13024/* confdefs.h. */
13025_ACEOF
13026cat confdefs.h >>conftest.$ac_ext
13027cat >>conftest.$ac_ext <<_ACEOF
13028/* end confdefs.h. */
13029
13030#ifdef HAVE_SYS_TYPES_H
13031#include <sys/types.h>
13032#endif
13033
13034
13035typedef off_t ac__type_new_;
13036int
13037main ()
13038{
13039if ((ac__type_new_ *) 0)
13040 return 0;
13041if (sizeof (ac__type_new_))
13042 return 0;
13043 ;
13044 return 0;
13045}
13046_ACEOF
13047rm -f conftest.$ac_objext
13048if { (ac_try="$ac_compile"
13049case "(($ac_try" in
13050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13051 *) ac_try_echo=$ac_try;;
13052esac
13053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13054 (eval "$ac_compile") 2>conftest.er1
13055 ac_status=$?
13056 grep -v '^ *+' conftest.er1 >conftest.err
13057 rm -f conftest.er1
13058 cat conftest.err >&5
13059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060 (exit $ac_status); } && {
13061 test -z "$ac_c_werror_flag" ||
13062 test ! -s conftest.err
13063 } && test -s conftest.$ac_objext; then
13064 ac_cv_type_off_t=yes
13065else
13066 echo "$as_me: failed program was:" >&5
13067sed 's/^/| /' conftest.$ac_ext >&5
13068
13069 ac_cv_type_off_t=no
13070fi
13071
13072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13073fi
13074{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13075echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13076
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077# The cast to long int works around a bug in the HP C Compiler
13078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13080# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013081{ echo "$as_me:$LINENO: checking size of off_t" >&5
13082echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013083if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013084 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013085else
13086 if test "$cross_compiling" = yes; then
13087 # Depending upon the size, compute the lo and hi bounds.
13088cat >conftest.$ac_ext <<_ACEOF
13089/* confdefs.h. */
13090_ACEOF
13091cat confdefs.h >>conftest.$ac_ext
13092cat >>conftest.$ac_ext <<_ACEOF
13093/* end confdefs.h. */
13094
13095#ifdef HAVE_SYS_TYPES_H
13096#include <sys/types.h>
13097#endif
13098
13099
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013100 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013101int
13102main ()
13103{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013104static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013105test_array [0] = 0
13106
13107 ;
13108 return 0;
13109}
13110_ACEOF
13111rm -f conftest.$ac_objext
13112if { (ac_try="$ac_compile"
13113case "(($ac_try" in
13114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13115 *) ac_try_echo=$ac_try;;
13116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118 (eval "$ac_compile") 2>conftest.er1
13119 ac_status=$?
13120 grep -v '^ *+' conftest.er1 >conftest.err
13121 rm -f conftest.er1
13122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013124 (exit $ac_status); } && {
13125 test -z "$ac_c_werror_flag" ||
13126 test ! -s conftest.err
13127 } && test -s conftest.$ac_objext; then
13128 ac_lo=0 ac_mid=0
13129 while :; do
13130 cat >conftest.$ac_ext <<_ACEOF
13131/* confdefs.h. */
13132_ACEOF
13133cat confdefs.h >>conftest.$ac_ext
13134cat >>conftest.$ac_ext <<_ACEOF
13135/* end confdefs.h. */
13136
13137#ifdef HAVE_SYS_TYPES_H
13138#include <sys/types.h>
13139#endif
13140
13141
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013142 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013143int
13144main ()
13145{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013146static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147test_array [0] = 0
13148
13149 ;
13150 return 0;
13151}
13152_ACEOF
13153rm -f conftest.$ac_objext
13154if { (ac_try="$ac_compile"
13155case "(($ac_try" in
13156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13157 *) ac_try_echo=$ac_try;;
13158esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013160 (eval "$ac_compile") 2>conftest.er1
13161 ac_status=$?
13162 grep -v '^ *+' conftest.er1 >conftest.err
13163 rm -f conftest.er1
13164 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013166 (exit $ac_status); } && {
13167 test -z "$ac_c_werror_flag" ||
13168 test ! -s conftest.err
13169 } && test -s conftest.$ac_objext; then
13170 ac_hi=$ac_mid; break
13171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013172 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013173sed 's/^/| /' conftest.$ac_ext >&5
13174
13175 ac_lo=`expr $ac_mid + 1`
13176 if test $ac_lo -le $ac_mid; then
13177 ac_lo= ac_hi=
13178 break
13179 fi
13180 ac_mid=`expr 2 '*' $ac_mid + 1`
13181fi
13182
13183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13184 done
13185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013186 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013187sed 's/^/| /' conftest.$ac_ext >&5
13188
13189 cat >conftest.$ac_ext <<_ACEOF
13190/* confdefs.h. */
13191_ACEOF
13192cat confdefs.h >>conftest.$ac_ext
13193cat >>conftest.$ac_ext <<_ACEOF
13194/* end confdefs.h. */
13195
13196#ifdef HAVE_SYS_TYPES_H
13197#include <sys/types.h>
13198#endif
13199
13200
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013201 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202int
13203main ()
13204{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013205static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013206test_array [0] = 0
13207
13208 ;
13209 return 0;
13210}
13211_ACEOF
13212rm -f conftest.$ac_objext
13213if { (ac_try="$ac_compile"
13214case "(($ac_try" in
13215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13216 *) ac_try_echo=$ac_try;;
13217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013219 (eval "$ac_compile") 2>conftest.er1
13220 ac_status=$?
13221 grep -v '^ *+' conftest.er1 >conftest.err
13222 rm -f conftest.er1
13223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013225 (exit $ac_status); } && {
13226 test -z "$ac_c_werror_flag" ||
13227 test ! -s conftest.err
13228 } && test -s conftest.$ac_objext; then
13229 ac_hi=-1 ac_mid=-1
13230 while :; do
13231 cat >conftest.$ac_ext <<_ACEOF
13232/* confdefs.h. */
13233_ACEOF
13234cat confdefs.h >>conftest.$ac_ext
13235cat >>conftest.$ac_ext <<_ACEOF
13236/* end confdefs.h. */
13237
13238#ifdef HAVE_SYS_TYPES_H
13239#include <sys/types.h>
13240#endif
13241
13242
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013243 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013244int
13245main ()
13246{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013247static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248test_array [0] = 0
13249
13250 ;
13251 return 0;
13252}
13253_ACEOF
13254rm -f conftest.$ac_objext
13255if { (ac_try="$ac_compile"
13256case "(($ac_try" in
13257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13258 *) ac_try_echo=$ac_try;;
13259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013261 (eval "$ac_compile") 2>conftest.er1
13262 ac_status=$?
13263 grep -v '^ *+' conftest.er1 >conftest.err
13264 rm -f conftest.er1
13265 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267 (exit $ac_status); } && {
13268 test -z "$ac_c_werror_flag" ||
13269 test ! -s conftest.err
13270 } && test -s conftest.$ac_objext; then
13271 ac_lo=$ac_mid; break
13272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013273 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013274sed 's/^/| /' conftest.$ac_ext >&5
13275
13276 ac_hi=`expr '(' $ac_mid ')' - 1`
13277 if test $ac_mid -le $ac_hi; then
13278 ac_lo= ac_hi=
13279 break
13280 fi
13281 ac_mid=`expr 2 '*' $ac_mid`
13282fi
13283
13284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13285 done
13286else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013287 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013288sed 's/^/| /' conftest.$ac_ext >&5
13289
13290 ac_lo= ac_hi=
13291fi
13292
13293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13294fi
13295
13296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13297# Binary search between lo and hi bounds.
13298while test "x$ac_lo" != "x$ac_hi"; do
13299 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13300 cat >conftest.$ac_ext <<_ACEOF
13301/* confdefs.h. */
13302_ACEOF
13303cat confdefs.h >>conftest.$ac_ext
13304cat >>conftest.$ac_ext <<_ACEOF
13305/* end confdefs.h. */
13306
13307#ifdef HAVE_SYS_TYPES_H
13308#include <sys/types.h>
13309#endif
13310
13311
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013312 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013313int
13314main ()
13315{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013317test_array [0] = 0
13318
13319 ;
13320 return 0;
13321}
13322_ACEOF
13323rm -f conftest.$ac_objext
13324if { (ac_try="$ac_compile"
13325case "(($ac_try" in
13326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13327 *) ac_try_echo=$ac_try;;
13328esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013330 (eval "$ac_compile") 2>conftest.er1
13331 ac_status=$?
13332 grep -v '^ *+' conftest.er1 >conftest.err
13333 rm -f conftest.er1
13334 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013336 (exit $ac_status); } && {
13337 test -z "$ac_c_werror_flag" ||
13338 test ! -s conftest.err
13339 } && test -s conftest.$ac_objext; then
13340 ac_hi=$ac_mid
13341else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013342 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013343sed 's/^/| /' conftest.$ac_ext >&5
13344
13345 ac_lo=`expr '(' $ac_mid ')' + 1`
13346fi
13347
13348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13349done
13350case $ac_lo in
13351?*) ac_cv_sizeof_off_t=$ac_lo;;
13352'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013353 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013354See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013355echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013356See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013357 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013358 else
13359 ac_cv_sizeof_off_t=0
13360 fi ;;
13361esac
13362else
13363 cat >conftest.$ac_ext <<_ACEOF
13364/* confdefs.h. */
13365_ACEOF
13366cat confdefs.h >>conftest.$ac_ext
13367cat >>conftest.$ac_ext <<_ACEOF
13368/* end confdefs.h. */
13369
13370#ifdef HAVE_SYS_TYPES_H
13371#include <sys/types.h>
13372#endif
13373
13374
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013375 typedef off_t ac__type_sizeof_;
13376static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13377static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013378#include <stdio.h>
13379#include <stdlib.h>
13380int
13381main ()
13382{
13383
13384 FILE *f = fopen ("conftest.val", "w");
13385 if (! f)
13386 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013387 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013388 {
13389 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013390 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013391 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013392 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393 }
13394 else
13395 {
13396 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013397 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013398 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013399 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013400 }
13401 return ferror (f) || fclose (f) != 0;
13402
13403 ;
13404 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013405}
Martin v. Löwis11437992002-04-12 09:54:03 +000013406_ACEOF
13407rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408if { (ac_try="$ac_link"
13409case "(($ac_try" in
13410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13411 *) ac_try_echo=$ac_try;;
13412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418 { (case "(($ac_try" in
13419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13420 *) ac_try_echo=$ac_try;;
13421esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013427 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013428else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013429 echo "$as_me: program exited with status $ac_status" >&5
13430echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013431sed 's/^/| /' conftest.$ac_ext >&5
13432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013434if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013435 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013436See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013437echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013438See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013439 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440 else
13441 ac_cv_sizeof_off_t=0
13442 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444rm -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 +000013445fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013446rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013447fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013448{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13449echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013451
13452
Martin v. Löwis11437992002-04-12 09:54:03 +000013453cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013454#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013455_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013456
Michael W. Hudson54241132001-12-07 15:38:26 +000013457
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013458
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013459{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13460echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013461if test "$have_long_long" = yes
13462then
13463if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013464 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013465
Martin v. Löwis11437992002-04-12 09:54:03 +000013466cat >>confdefs.h <<\_ACEOF
13467#define HAVE_LARGEFILE_SUPPORT 1
13468_ACEOF
13469
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013470 { echo "$as_me:$LINENO: result: yes" >&5
13471echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013473 { echo "$as_me:$LINENO: result: no" >&5
13474echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013475fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013476else
13477 { echo "$as_me:$LINENO: result: no" >&5
13478echo "${ECHO_T}no" >&6; }
13479fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013480
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013481{ echo "$as_me:$LINENO: checking for time_t" >&5
13482echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13483if test "${ac_cv_type_time_t+set}" = set; then
13484 echo $ECHO_N "(cached) $ECHO_C" >&6
13485else
13486 cat >conftest.$ac_ext <<_ACEOF
13487/* confdefs.h. */
13488_ACEOF
13489cat confdefs.h >>conftest.$ac_ext
13490cat >>conftest.$ac_ext <<_ACEOF
13491/* end confdefs.h. */
13492
13493#ifdef HAVE_SYS_TYPES_H
13494#include <sys/types.h>
13495#endif
13496#ifdef HAVE_TIME_H
13497#include <time.h>
13498#endif
13499
13500
13501typedef time_t ac__type_new_;
13502int
13503main ()
13504{
13505if ((ac__type_new_ *) 0)
13506 return 0;
13507if (sizeof (ac__type_new_))
13508 return 0;
13509 ;
13510 return 0;
13511}
13512_ACEOF
13513rm -f conftest.$ac_objext
13514if { (ac_try="$ac_compile"
13515case "(($ac_try" in
13516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13517 *) ac_try_echo=$ac_try;;
13518esac
13519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13520 (eval "$ac_compile") 2>conftest.er1
13521 ac_status=$?
13522 grep -v '^ *+' conftest.er1 >conftest.err
13523 rm -f conftest.er1
13524 cat conftest.err >&5
13525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13526 (exit $ac_status); } && {
13527 test -z "$ac_c_werror_flag" ||
13528 test ! -s conftest.err
13529 } && test -s conftest.$ac_objext; then
13530 ac_cv_type_time_t=yes
13531else
13532 echo "$as_me: failed program was:" >&5
13533sed 's/^/| /' conftest.$ac_ext >&5
13534
13535 ac_cv_type_time_t=no
13536fi
13537
13538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13539fi
13540{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13541echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13542
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013543# The cast to long int works around a bug in the HP C Compiler
13544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13546# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013547{ echo "$as_me:$LINENO: checking size of time_t" >&5
13548echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013549if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013550 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013551else
13552 if test "$cross_compiling" = yes; then
13553 # Depending upon the size, compute the lo and hi bounds.
13554cat >conftest.$ac_ext <<_ACEOF
13555/* confdefs.h. */
13556_ACEOF
13557cat confdefs.h >>conftest.$ac_ext
13558cat >>conftest.$ac_ext <<_ACEOF
13559/* end confdefs.h. */
13560
13561#ifdef HAVE_SYS_TYPES_H
13562#include <sys/types.h>
13563#endif
13564#ifdef HAVE_TIME_H
13565#include <time.h>
13566#endif
13567
13568
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013569 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013570int
13571main ()
13572{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013573static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013574test_array [0] = 0
13575
13576 ;
13577 return 0;
13578}
13579_ACEOF
13580rm -f conftest.$ac_objext
13581if { (ac_try="$ac_compile"
13582case "(($ac_try" in
13583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13584 *) ac_try_echo=$ac_try;;
13585esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013587 (eval "$ac_compile") 2>conftest.er1
13588 ac_status=$?
13589 grep -v '^ *+' conftest.er1 >conftest.err
13590 rm -f conftest.er1
13591 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013593 (exit $ac_status); } && {
13594 test -z "$ac_c_werror_flag" ||
13595 test ! -s conftest.err
13596 } && test -s conftest.$ac_objext; then
13597 ac_lo=0 ac_mid=0
13598 while :; do
13599 cat >conftest.$ac_ext <<_ACEOF
13600/* confdefs.h. */
13601_ACEOF
13602cat confdefs.h >>conftest.$ac_ext
13603cat >>conftest.$ac_ext <<_ACEOF
13604/* end confdefs.h. */
13605
13606#ifdef HAVE_SYS_TYPES_H
13607#include <sys/types.h>
13608#endif
13609#ifdef HAVE_TIME_H
13610#include <time.h>
13611#endif
13612
13613
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013614 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013615int
13616main ()
13617{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013619test_array [0] = 0
13620
13621 ;
13622 return 0;
13623}
13624_ACEOF
13625rm -f conftest.$ac_objext
13626if { (ac_try="$ac_compile"
13627case "(($ac_try" in
13628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13629 *) ac_try_echo=$ac_try;;
13630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013632 (eval "$ac_compile") 2>conftest.er1
13633 ac_status=$?
13634 grep -v '^ *+' conftest.er1 >conftest.err
13635 rm -f conftest.er1
13636 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013638 (exit $ac_status); } && {
13639 test -z "$ac_c_werror_flag" ||
13640 test ! -s conftest.err
13641 } && test -s conftest.$ac_objext; then
13642 ac_hi=$ac_mid; break
13643else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013644 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013645sed 's/^/| /' conftest.$ac_ext >&5
13646
13647 ac_lo=`expr $ac_mid + 1`
13648 if test $ac_lo -le $ac_mid; then
13649 ac_lo= ac_hi=
13650 break
13651 fi
13652 ac_mid=`expr 2 '*' $ac_mid + 1`
13653fi
13654
13655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13656 done
13657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013658 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013659sed 's/^/| /' conftest.$ac_ext >&5
13660
13661 cat >conftest.$ac_ext <<_ACEOF
13662/* confdefs.h. */
13663_ACEOF
13664cat confdefs.h >>conftest.$ac_ext
13665cat >>conftest.$ac_ext <<_ACEOF
13666/* end confdefs.h. */
13667
13668#ifdef HAVE_SYS_TYPES_H
13669#include <sys/types.h>
13670#endif
13671#ifdef HAVE_TIME_H
13672#include <time.h>
13673#endif
13674
13675
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013676 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013677int
13678main ()
13679{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013681test_array [0] = 0
13682
13683 ;
13684 return 0;
13685}
13686_ACEOF
13687rm -f conftest.$ac_objext
13688if { (ac_try="$ac_compile"
13689case "(($ac_try" in
13690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13691 *) ac_try_echo=$ac_try;;
13692esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013694 (eval "$ac_compile") 2>conftest.er1
13695 ac_status=$?
13696 grep -v '^ *+' conftest.er1 >conftest.err
13697 rm -f conftest.er1
13698 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013700 (exit $ac_status); } && {
13701 test -z "$ac_c_werror_flag" ||
13702 test ! -s conftest.err
13703 } && test -s conftest.$ac_objext; then
13704 ac_hi=-1 ac_mid=-1
13705 while :; do
13706 cat >conftest.$ac_ext <<_ACEOF
13707/* confdefs.h. */
13708_ACEOF
13709cat confdefs.h >>conftest.$ac_ext
13710cat >>conftest.$ac_ext <<_ACEOF
13711/* end confdefs.h. */
13712
13713#ifdef HAVE_SYS_TYPES_H
13714#include <sys/types.h>
13715#endif
13716#ifdef HAVE_TIME_H
13717#include <time.h>
13718#endif
13719
13720
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013721 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013722int
13723main ()
13724{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013726test_array [0] = 0
13727
13728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext
13733if { (ac_try="$ac_compile"
13734case "(($ac_try" in
13735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13736 *) ac_try_echo=$ac_try;;
13737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013739 (eval "$ac_compile") 2>conftest.er1
13740 ac_status=$?
13741 grep -v '^ *+' conftest.er1 >conftest.err
13742 rm -f conftest.er1
13743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013745 (exit $ac_status); } && {
13746 test -z "$ac_c_werror_flag" ||
13747 test ! -s conftest.err
13748 } && test -s conftest.$ac_objext; then
13749 ac_lo=$ac_mid; break
13750else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013751 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013752sed 's/^/| /' conftest.$ac_ext >&5
13753
13754 ac_hi=`expr '(' $ac_mid ')' - 1`
13755 if test $ac_mid -le $ac_hi; then
13756 ac_lo= ac_hi=
13757 break
13758 fi
13759 ac_mid=`expr 2 '*' $ac_mid`
13760fi
13761
13762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763 done
13764else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013765 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013766sed 's/^/| /' conftest.$ac_ext >&5
13767
13768 ac_lo= ac_hi=
13769fi
13770
13771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13772fi
13773
13774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775# Binary search between lo and hi bounds.
13776while test "x$ac_lo" != "x$ac_hi"; do
13777 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13778 cat >conftest.$ac_ext <<_ACEOF
13779/* confdefs.h. */
13780_ACEOF
13781cat confdefs.h >>conftest.$ac_ext
13782cat >>conftest.$ac_ext <<_ACEOF
13783/* end confdefs.h. */
13784
13785#ifdef HAVE_SYS_TYPES_H
13786#include <sys/types.h>
13787#endif
13788#ifdef HAVE_TIME_H
13789#include <time.h>
13790#endif
13791
13792
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013793 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013794int
13795main ()
13796{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013797static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013798test_array [0] = 0
13799
13800 ;
13801 return 0;
13802}
13803_ACEOF
13804rm -f conftest.$ac_objext
13805if { (ac_try="$ac_compile"
13806case "(($ac_try" in
13807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13808 *) ac_try_echo=$ac_try;;
13809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013811 (eval "$ac_compile") 2>conftest.er1
13812 ac_status=$?
13813 grep -v '^ *+' conftest.er1 >conftest.err
13814 rm -f conftest.er1
13815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013817 (exit $ac_status); } && {
13818 test -z "$ac_c_werror_flag" ||
13819 test ! -s conftest.err
13820 } && test -s conftest.$ac_objext; then
13821 ac_hi=$ac_mid
13822else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013823 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013824sed 's/^/| /' conftest.$ac_ext >&5
13825
13826 ac_lo=`expr '(' $ac_mid ')' + 1`
13827fi
13828
13829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13830done
13831case $ac_lo in
13832?*) ac_cv_sizeof_time_t=$ac_lo;;
13833'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013834 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013835See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013836echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013837See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013838 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013839 else
13840 ac_cv_sizeof_time_t=0
13841 fi ;;
13842esac
13843else
13844 cat >conftest.$ac_ext <<_ACEOF
13845/* confdefs.h. */
13846_ACEOF
13847cat confdefs.h >>conftest.$ac_ext
13848cat >>conftest.$ac_ext <<_ACEOF
13849/* end confdefs.h. */
13850
13851#ifdef HAVE_SYS_TYPES_H
13852#include <sys/types.h>
13853#endif
13854#ifdef HAVE_TIME_H
13855#include <time.h>
13856#endif
13857
13858
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013859 typedef time_t ac__type_sizeof_;
13860static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13861static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013862#include <stdio.h>
13863#include <stdlib.h>
13864int
13865main ()
13866{
13867
13868 FILE *f = fopen ("conftest.val", "w");
13869 if (! f)
13870 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013871 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013872 {
13873 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013874 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013875 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013876 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013877 }
13878 else
13879 {
13880 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013882 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013883 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013884 }
13885 return ferror (f) || fclose (f) != 0;
13886
13887 ;
13888 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013889}
Martin v. Löwis11437992002-04-12 09:54:03 +000013890_ACEOF
13891rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892if { (ac_try="$ac_link"
13893case "(($ac_try" in
13894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13895 *) ac_try_echo=$ac_try;;
13896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 { (case "(($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_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013911 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013912else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013913 echo "$as_me: program exited with status $ac_status" >&5
13914echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013915sed 's/^/| /' conftest.$ac_ext >&5
13916
Martin v. Löwis11437992002-04-12 09:54:03 +000013917( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013918if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013920See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013921echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013922See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013923 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013924 else
13925 ac_cv_sizeof_time_t=0
13926 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928rm -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 +000013929fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013930rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013931fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013932{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13933echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013934
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013935
13936
Martin v. Löwis11437992002-04-12 09:54:03 +000013937cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013938#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013939_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013940
Michael W. Hudson54241132001-12-07 15:38:26 +000013941
13942
Trent Mick635f6fb2000-08-23 21:33:05 +000013943# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013944ac_save_cc="$CC"
13945if test "$ac_cv_kpthread" = "yes"
13946then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013947elif test "$ac_cv_kthread" = "yes"
13948then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013949elif test "$ac_cv_pthread" = "yes"
13950then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013951fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013952
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013953{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13954echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013955have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013956cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013957/* confdefs.h. */
13958_ACEOF
13959cat confdefs.h >>conftest.$ac_ext
13960cat >>conftest.$ac_ext <<_ACEOF
13961/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013962#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013963int
13964main ()
13965{
Guido van Rossum12580492000-09-24 16:47:19 +000013966pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 ;
13968 return 0;
13969}
13970_ACEOF
13971rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013972if { (ac_try="$ac_compile"
13973case "(($ac_try" in
13974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13975 *) ac_try_echo=$ac_try;;
13976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013980 grep -v '^ *+' conftest.er1 >conftest.err
13981 rm -f conftest.er1
13982 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984 (exit $ac_status); } && {
13985 test -z "$ac_c_werror_flag" ||
13986 test ! -s conftest.err
13987 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013988 have_pthread_t=yes
13989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013991sed 's/^/| /' conftest.$ac_ext >&5
13992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993
Trent Mick635f6fb2000-08-23 21:33:05 +000013994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995
13996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013997{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13998echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013999if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014000 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14001echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14002if test "${ac_cv_type_pthread_t+set}" = set; then
14003 echo $ECHO_N "(cached) $ECHO_C" >&6
14004else
14005 cat >conftest.$ac_ext <<_ACEOF
14006/* confdefs.h. */
14007_ACEOF
14008cat confdefs.h >>conftest.$ac_ext
14009cat >>conftest.$ac_ext <<_ACEOF
14010/* end confdefs.h. */
14011
14012#ifdef HAVE_PTHREAD_H
14013#include <pthread.h>
14014#endif
14015
14016
14017typedef pthread_t ac__type_new_;
14018int
14019main ()
14020{
14021if ((ac__type_new_ *) 0)
14022 return 0;
14023if (sizeof (ac__type_new_))
14024 return 0;
14025 ;
14026 return 0;
14027}
14028_ACEOF
14029rm -f conftest.$ac_objext
14030if { (ac_try="$ac_compile"
14031case "(($ac_try" in
14032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14033 *) ac_try_echo=$ac_try;;
14034esac
14035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14036 (eval "$ac_compile") 2>conftest.er1
14037 ac_status=$?
14038 grep -v '^ *+' conftest.er1 >conftest.err
14039 rm -f conftest.er1
14040 cat conftest.err >&5
14041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14042 (exit $ac_status); } && {
14043 test -z "$ac_c_werror_flag" ||
14044 test ! -s conftest.err
14045 } && test -s conftest.$ac_objext; then
14046 ac_cv_type_pthread_t=yes
14047else
14048 echo "$as_me: failed program was:" >&5
14049sed 's/^/| /' conftest.$ac_ext >&5
14050
14051 ac_cv_type_pthread_t=no
14052fi
14053
14054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14055fi
14056{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14057echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14058
14059# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014060# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14061# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14062# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014063{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14064echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014065if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014066 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014067else
14068 if test "$cross_compiling" = yes; then
14069 # Depending upon the size, compute the lo and hi bounds.
14070cat >conftest.$ac_ext <<_ACEOF
14071/* confdefs.h. */
14072_ACEOF
14073cat confdefs.h >>conftest.$ac_ext
14074cat >>conftest.$ac_ext <<_ACEOF
14075/* end confdefs.h. */
14076
14077#ifdef HAVE_PTHREAD_H
14078#include <pthread.h>
14079#endif
14080
14081
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014082 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014083int
14084main ()
14085{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014086static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014087test_array [0] = 0
14088
14089 ;
14090 return 0;
14091}
14092_ACEOF
14093rm -f conftest.$ac_objext
14094if { (ac_try="$ac_compile"
14095case "(($ac_try" in
14096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14097 *) ac_try_echo=$ac_try;;
14098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014100 (eval "$ac_compile") 2>conftest.er1
14101 ac_status=$?
14102 grep -v '^ *+' conftest.er1 >conftest.err
14103 rm -f conftest.er1
14104 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014106 (exit $ac_status); } && {
14107 test -z "$ac_c_werror_flag" ||
14108 test ! -s conftest.err
14109 } && test -s conftest.$ac_objext; then
14110 ac_lo=0 ac_mid=0
14111 while :; do
14112 cat >conftest.$ac_ext <<_ACEOF
14113/* confdefs.h. */
14114_ACEOF
14115cat confdefs.h >>conftest.$ac_ext
14116cat >>conftest.$ac_ext <<_ACEOF
14117/* end confdefs.h. */
14118
14119#ifdef HAVE_PTHREAD_H
14120#include <pthread.h>
14121#endif
14122
14123
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014124 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014125int
14126main ()
14127{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014128static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014129test_array [0] = 0
14130
14131 ;
14132 return 0;
14133}
14134_ACEOF
14135rm -f conftest.$ac_objext
14136if { (ac_try="$ac_compile"
14137case "(($ac_try" in
14138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14139 *) ac_try_echo=$ac_try;;
14140esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014142 (eval "$ac_compile") 2>conftest.er1
14143 ac_status=$?
14144 grep -v '^ *+' conftest.er1 >conftest.err
14145 rm -f conftest.er1
14146 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014148 (exit $ac_status); } && {
14149 test -z "$ac_c_werror_flag" ||
14150 test ! -s conftest.err
14151 } && test -s conftest.$ac_objext; then
14152 ac_hi=$ac_mid; break
14153else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014154 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014155sed 's/^/| /' conftest.$ac_ext >&5
14156
14157 ac_lo=`expr $ac_mid + 1`
14158 if test $ac_lo -le $ac_mid; then
14159 ac_lo= ac_hi=
14160 break
14161 fi
14162 ac_mid=`expr 2 '*' $ac_mid + 1`
14163fi
14164
14165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14166 done
14167else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014168 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014169sed 's/^/| /' conftest.$ac_ext >&5
14170
14171 cat >conftest.$ac_ext <<_ACEOF
14172/* confdefs.h. */
14173_ACEOF
14174cat confdefs.h >>conftest.$ac_ext
14175cat >>conftest.$ac_ext <<_ACEOF
14176/* end confdefs.h. */
14177
14178#ifdef HAVE_PTHREAD_H
14179#include <pthread.h>
14180#endif
14181
14182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014183 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184int
14185main ()
14186{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014187static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188test_array [0] = 0
14189
14190 ;
14191 return 0;
14192}
14193_ACEOF
14194rm -f conftest.$ac_objext
14195if { (ac_try="$ac_compile"
14196case "(($ac_try" in
14197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14198 *) ac_try_echo=$ac_try;;
14199esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014201 (eval "$ac_compile") 2>conftest.er1
14202 ac_status=$?
14203 grep -v '^ *+' conftest.er1 >conftest.err
14204 rm -f conftest.er1
14205 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014207 (exit $ac_status); } && {
14208 test -z "$ac_c_werror_flag" ||
14209 test ! -s conftest.err
14210 } && test -s conftest.$ac_objext; then
14211 ac_hi=-1 ac_mid=-1
14212 while :; do
14213 cat >conftest.$ac_ext <<_ACEOF
14214/* confdefs.h. */
14215_ACEOF
14216cat confdefs.h >>conftest.$ac_ext
14217cat >>conftest.$ac_ext <<_ACEOF
14218/* end confdefs.h. */
14219
14220#ifdef HAVE_PTHREAD_H
14221#include <pthread.h>
14222#endif
14223
14224
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014225 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014226int
14227main ()
14228{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014229static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014230test_array [0] = 0
14231
14232 ;
14233 return 0;
14234}
14235_ACEOF
14236rm -f conftest.$ac_objext
14237if { (ac_try="$ac_compile"
14238case "(($ac_try" in
14239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14240 *) ac_try_echo=$ac_try;;
14241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014243 (eval "$ac_compile") 2>conftest.er1
14244 ac_status=$?
14245 grep -v '^ *+' conftest.er1 >conftest.err
14246 rm -f conftest.er1
14247 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014249 (exit $ac_status); } && {
14250 test -z "$ac_c_werror_flag" ||
14251 test ! -s conftest.err
14252 } && test -s conftest.$ac_objext; then
14253 ac_lo=$ac_mid; break
14254else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014255 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014256sed 's/^/| /' conftest.$ac_ext >&5
14257
14258 ac_hi=`expr '(' $ac_mid ')' - 1`
14259 if test $ac_mid -le $ac_hi; then
14260 ac_lo= ac_hi=
14261 break
14262 fi
14263 ac_mid=`expr 2 '*' $ac_mid`
14264fi
14265
14266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14267 done
14268else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014269 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014270sed 's/^/| /' conftest.$ac_ext >&5
14271
14272 ac_lo= ac_hi=
14273fi
14274
14275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14276fi
14277
14278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14279# Binary search between lo and hi bounds.
14280while test "x$ac_lo" != "x$ac_hi"; do
14281 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14282 cat >conftest.$ac_ext <<_ACEOF
14283/* confdefs.h. */
14284_ACEOF
14285cat confdefs.h >>conftest.$ac_ext
14286cat >>conftest.$ac_ext <<_ACEOF
14287/* end confdefs.h. */
14288
14289#ifdef HAVE_PTHREAD_H
14290#include <pthread.h>
14291#endif
14292
14293
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014294 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014295int
14296main ()
14297{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014299test_array [0] = 0
14300
14301 ;
14302 return 0;
14303}
14304_ACEOF
14305rm -f conftest.$ac_objext
14306if { (ac_try="$ac_compile"
14307case "(($ac_try" in
14308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14309 *) ac_try_echo=$ac_try;;
14310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014312 (eval "$ac_compile") 2>conftest.er1
14313 ac_status=$?
14314 grep -v '^ *+' conftest.er1 >conftest.err
14315 rm -f conftest.er1
14316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014318 (exit $ac_status); } && {
14319 test -z "$ac_c_werror_flag" ||
14320 test ! -s conftest.err
14321 } && test -s conftest.$ac_objext; then
14322 ac_hi=$ac_mid
14323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014324 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014325sed 's/^/| /' conftest.$ac_ext >&5
14326
14327 ac_lo=`expr '(' $ac_mid ')' + 1`
14328fi
14329
14330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14331done
14332case $ac_lo in
14333?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14334'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014335 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014336See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014337echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014339 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014340 else
14341 ac_cv_sizeof_pthread_t=0
14342 fi ;;
14343esac
14344else
14345 cat >conftest.$ac_ext <<_ACEOF
14346/* confdefs.h. */
14347_ACEOF
14348cat confdefs.h >>conftest.$ac_ext
14349cat >>conftest.$ac_ext <<_ACEOF
14350/* end confdefs.h. */
14351
14352#ifdef HAVE_PTHREAD_H
14353#include <pthread.h>
14354#endif
14355
14356
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014357 typedef pthread_t ac__type_sizeof_;
14358static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14359static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014360#include <stdio.h>
14361#include <stdlib.h>
14362int
14363main ()
14364{
14365
14366 FILE *f = fopen ("conftest.val", "w");
14367 if (! f)
14368 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014369 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014370 {
14371 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014372 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014373 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014374 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014375 }
14376 else
14377 {
14378 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014379 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014380 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014381 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014382 }
14383 return ferror (f) || fclose (f) != 0;
14384
14385 ;
14386 return 0;
14387}
Martin v. Löwis11437992002-04-12 09:54:03 +000014388_ACEOF
14389rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390if { (ac_try="$ac_link"
14391case "(($ac_try" in
14392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14393 *) ac_try_echo=$ac_try;;
14394esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014397 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400 { (case "(($ac_try" in
14401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14402 *) ac_try_echo=$ac_try;;
14403esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014406 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014409 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014410else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014411 echo "$as_me: program exited with status $ac_status" >&5
14412echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014413sed 's/^/| /' conftest.$ac_ext >&5
14414
Martin v. Löwis11437992002-04-12 09:54:03 +000014415( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014416if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014417 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014418See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014419echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014420See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014421 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014422 else
14423 ac_cv_sizeof_pthread_t=0
14424 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426rm -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 +000014427fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014428rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014429fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014430{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14431echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014433
14434
Martin v. Löwis11437992002-04-12 09:54:03 +000014435cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014436#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014437_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014438
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014439
Trent Mick635f6fb2000-08-23 21:33:05 +000014440fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014441CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014442
Michael W. Hudson54241132001-12-07 15:38:26 +000014443
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014444case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014445 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014446 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14447 ;;
14448 Darwin/*)
14449 OTHER_LIBTOOL_OPT=""
14450 ;;
14451esac
14452
14453
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014454ARCH_RUN_32BIT=""
14455
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014456case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014457 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014458 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14459 if test "${enable_universalsdk}"; then
14460 :
14461 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014462 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014463 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014464 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014465 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014466 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014467 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014468 if test ${gcc_version} '<' 4.0
14469 then
14470 LIBTOOL_CRUFT="-lcc_dynamic"
14471 else
14472 LIBTOOL_CRUFT=""
14473 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014474 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014475 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014476else
14477 cat >conftest.$ac_ext <<_ACEOF
14478/* confdefs.h. */
14479_ACEOF
14480cat confdefs.h >>conftest.$ac_ext
14481cat >>conftest.$ac_ext <<_ACEOF
14482/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014483
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014484 #include <unistd.h>
14485 int main(int argc, char*argv[])
14486 {
14487 if (sizeof(long) == 4) {
14488 return 0;
14489 } else {
14490 return 1;
14491 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014492 }
14493
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014494_ACEOF
14495rm -f conftest$ac_exeext
14496if { (ac_try="$ac_link"
14497case "(($ac_try" in
14498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14499 *) ac_try_echo=$ac_try;;
14500esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014502 (eval "$ac_link") 2>&5
14503 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14506 { (case "(($ac_try" in
14507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14508 *) ac_try_echo=$ac_try;;
14509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014511 (eval "$ac_try") 2>&5
14512 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014514 (exit $ac_status); }; }; then
14515 ac_osx_32bit=yes
14516else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014517 echo "$as_me: program exited with status $ac_status" >&5
14518echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014519sed 's/^/| /' conftest.$ac_ext >&5
14520
14521( exit $ac_status )
14522ac_osx_32bit=no
14523fi
14524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14525fi
14526
14527
14528
14529 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014530 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014531 i386)
14532 MACOSX_DEFAULT_ARCH="i386"
14533 ;;
14534 ppc)
14535 MACOSX_DEFAULT_ARCH="ppc"
14536 ;;
14537 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014538 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14539echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014540 { (exit 1); exit 1; }; }
14541 ;;
14542 esac
14543 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014544 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014545 i386)
14546 MACOSX_DEFAULT_ARCH="x86_64"
14547 ;;
14548 ppc)
14549 MACOSX_DEFAULT_ARCH="ppc64"
14550 ;;
14551 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014552 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14553echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014554 { (exit 1); exit 1; }; }
14555 ;;
14556 esac
14557
14558 #ARCH_RUN_32BIT="true"
14559 fi
14560
14561 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014562 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014563 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014564esac
14565
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014566{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14567echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014568if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014569then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014570 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014572 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014573
Martin v. Löwis11437992002-04-12 09:54:03 +000014574cat >>confdefs.h <<\_ACEOF
14575#define WITH_NEXT_FRAMEWORK 1
14576_ACEOF
14577
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014578 { echo "$as_me:$LINENO: result: yes" >&5
14579echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014580 if test $enable_shared = "yes"
14581 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014582 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14583echo "$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 +000014584 { (exit 1); exit 1; }; }
14585 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014587 { echo "$as_me:$LINENO: result: no" >&5
14588echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014589fi
14590
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014591{ echo "$as_me:$LINENO: checking for dyld" >&5
14592echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014593case $ac_sys_system/$ac_sys_release in
14594 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596cat >>confdefs.h <<\_ACEOF
14597#define WITH_DYLD 1
14598_ACEOF
14599
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014600 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14601echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014602 ;;
14603 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014604 { echo "$as_me:$LINENO: result: no" >&5
14605echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014606 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014607esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014608
Guido van Rossum0a516c91994-09-12 10:58:40 +000014609# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014610
Michael W. Hudson54241132001-12-07 15:38:26 +000014611
14612
14613
14614
Guido van Rossum0a516c91994-09-12 10:58:40 +000014615# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014616# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014617{ echo "$as_me:$LINENO: checking SO" >&5
14618echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014619if test -z "$SO"
14620then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014621 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014622 hp*|HP*)
14623 case `uname -m` in
14624 ia64) SO=.so;;
14625 *) SO=.sl;;
14626 esac
14627 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014628 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014629 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014630 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014631else
14632 # this might also be a termcap variable, see #610332
14633 echo
14634 echo '====================================================================='
14635 echo '+ +'
14636 echo '+ WARNING: You have set SO in your environment. +'
14637 echo '+ Do you really mean to change the extension for shared libraries? +'
14638 echo '+ Continuing in 10 seconds to let you to ponder. +'
14639 echo '+ +'
14640 echo '====================================================================='
14641 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014642fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014643{ echo "$as_me:$LINENO: result: $SO" >&5
14644echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014645
Georg Brandlb1441c72009-01-03 22:33:39 +000014646
Thomas Wouters477c8d52006-05-27 19:21:47 +000014647cat >>confdefs.h <<_ACEOF
14648#define SHLIB_EXT "$SO"
14649_ACEOF
14650
Guido van Rossum0a516c91994-09-12 10:58:40 +000014651# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014652# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014653# (Shared libraries in this instance are shared modules to be loaded into
14654# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014655{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14656echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657if test -z "$LDSHARED"
14658then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014659 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014660 AIX*)
14661 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014662 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014663 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014664 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014665 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014667 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014668 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014669 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014670 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014671 hp*|HP*)
14672 if test "$GCC" = "yes"
14673 then LDSHARED='$(CC) -shared'
14674 else LDSHARED='ld -b';
14675 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014676 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014677 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014678 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14679 if test "$enable_framework" ; then
14680 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014681 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14682 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014683 else
14684 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014685 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014686 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014687 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014688 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14689 if test "$enable_framework" ; then
14690 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014691 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14692 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014693 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014694 # No framework, use the Python app as bundle-loader
14695 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014696 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014697 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014698 Darwin/*)
14699 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14700 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014701
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014702 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014703 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014704 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014705 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014706 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014707 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14708 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014709 else
14710 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14711 if test "$enable_framework" ; then
14712 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014713 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14714 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014715 else
14716 # No framework, use the Python app as bundle-loader
14717 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14718 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14719 fi
14720 fi
14721 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014722 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014723 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014724 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014725 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014726 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014727 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014728 else
14729 LDSHARED="ld -Bshareable ${LDFLAGS}"
14730 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014731 OpenBSD*)
14732 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14733 then
14734 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14735 else
14736 case `uname -r` in
14737 [01].* | 2.[0-7] | 2.[0-7].*)
14738 LDSHARED="ld -Bshareable ${LDFLAGS}"
14739 ;;
14740 *)
14741 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14742 ;;
14743 esac
14744 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014745 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014746 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014747 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014748 then LDSHARED='$(CC) -shared'
14749 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014750 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014751 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014752 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014753 *) LDSHARED="ld";;
14754 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014755fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014756{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14757echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014758BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014759# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014760# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014761{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14762echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014763if test -z "$CCSHARED"
14764then
Guido van Rossum07397971997-04-29 21:49:50 +000014765 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014766 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014767 then CCSHARED="-fPIC";
14768 elif test `uname -p` = sparc;
14769 then CCSHARED="-xcode=pic32";
14770 else CCSHARED="-Kpic";
14771 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014772 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014773 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014774 else CCSHARED="+z";
14775 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014776 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014777 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014778 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014779 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014780 if test "$GCC" = "yes"
14781 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014782 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014783 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014784 SCO_SV*)
14785 if test "$GCC" = "yes"
14786 then CCSHARED="-fPIC"
14787 else CCSHARED="-Kpic -belf"
14788 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014789 IRIX*/6*) case $CC in
14790 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014791 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014792 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014793 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014794fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014795{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14796echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014798# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014799{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14800echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014801if test -z "$LINKFORSHARED"
14802then
Guido van Rossum07397971997-04-29 21:49:50 +000014803 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014804 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014805 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014806 LINKFORSHARED="-Wl,-E -Wl,+s";;
14807# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014808 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014809 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014810 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014811 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014812 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014813 if test "$enable_framework"
14814 then
Jack Jansenda49e192005-01-07 13:08:22 +000014815 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014816 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014817 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014818 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014819 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014820 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014821 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014822 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14823 then
14824 LINKFORSHARED="-Wl,--export-dynamic"
14825 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014826 SunOS/5*) case $CC in
14827 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014828 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014829 then
14830 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014831 fi;;
14832 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014833 CYGWIN*)
14834 if test $enable_shared = "no"
14835 then
14836 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14837 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014838 QNX*)
14839 # -Wl,-E causes the symbols to be added to the dynamic
14840 # symbol table so that they can be found when a module
14841 # is loaded. -N 2048K causes the stack size to be set
14842 # to 2048 kilobytes so that the stack doesn't overflow
14843 # when running test_compile.py.
14844 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014845 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014846fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014847{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14848echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014849
Michael W. Hudson54241132001-12-07 15:38:26 +000014850
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014851
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014852{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14853echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014854if test ! "$LIBRARY" = "$LDLIBRARY"
14855then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014856 case $ac_sys_system in
14857 CYGWIN*)
14858 # Cygwin needs CCSHARED when building extension DLLs
14859 # but not when building the interpreter DLL.
14860 CFLAGSFORSHARED='';;
14861 *)
14862 CFLAGSFORSHARED='$(CCSHARED)'
14863 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014864fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014865{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14866echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014867
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014868# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14869# library (with --enable-shared).
14870# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014871# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14872# if it is not required, since it creates a dependency of the shared library
14873# to LIBS. This, in turn, means that applications linking the shared libpython
14874# don't need to link LIBS explicitly. The default should be only changed
14875# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014876
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014877{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14878echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014879case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014880 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014881 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014883{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14884echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014885
14886
Guido van Rossum627b2d71993-12-24 10:39:16 +000014887# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014889{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14890echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014891if test "${ac_cv_lib_dl_dlopen+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="-ldl $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 dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014910int
14911main ()
14912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913return dlopen ();
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_dl_dlopen=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_dl_dlopen=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_dl_dlopen" >&5
14949echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14950if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 cat >>confdefs.h <<_ACEOF
14952#define HAVE_LIBDL 1
14953_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014954
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014955 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014957fi
14958 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014959
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014960{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14961echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014962if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014963 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014964else
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014966LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014968/* confdefs.h. */
14969_ACEOF
14970cat confdefs.h >>conftest.$ac_ext
14971cat >>conftest.$ac_ext <<_ACEOF
14972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014974/* Override any GCC internal prototype to avoid an error.
14975 Use char because int might match the return type of a GCC
14976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014977#ifdef __cplusplus
14978extern "C"
14979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014980char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014981int
14982main ()
14983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ;
14986 return 0;
14987}
14988_ACEOF
14989rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990if { (ac_try="$ac_link"
14991case "(($ac_try" in
14992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14993 *) ac_try_echo=$ac_try;;
14994esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014998 grep -v '^ *+' conftest.er1 >conftest.err
14999 rm -f conftest.er1
15000 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 (exit $ac_status); } && {
15003 test -z "$ac_c_werror_flag" ||
15004 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015005 } && test -s conftest$ac_exeext &&
15006 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015010sed 's/^/| /' conftest.$ac_ext >&5
15011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014
15015rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015017LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015018fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015019{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15020echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15021if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015022 cat >>confdefs.h <<_ACEOF
15023#define HAVE_LIBDLD 1
15024_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015025
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015026 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015027
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015028fi
15029 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015030
Georg Brandlb1441c72009-01-03 22:33:39 +000015031# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015032if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015033 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15034echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015035if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015037else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015038 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015040/* confdefs.h. */
15041_ACEOF
15042cat confdefs.h >>conftest.$ac_ext
15043cat >>conftest.$ac_ext <<_ACEOF
15044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046/* Override any GCC internal prototype to avoid an error.
15047 Use char because int might match the return type of a GCC
15048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015049#ifdef __cplusplus
15050extern "C"
15051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015052char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015053int
15054main ()
15055{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 ;
15058 return 0;
15059}
15060_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061for ac_lib in '' pthread rt posix4; do
15062 if test -z "$ac_lib"; then
15063 ac_res="none required"
15064 else
15065 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015066 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067 fi
15068 rm -f conftest.$ac_objext conftest$ac_exeext
15069if { (ac_try="$ac_link"
15070case "(($ac_try" in
15071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15072 *) ac_try_echo=$ac_try;;
15073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015076 ac_status=$?
15077 grep -v '^ *+' conftest.er1 >conftest.err
15078 rm -f conftest.er1
15079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081 (exit $ac_status); } && {
15082 test -z "$ac_c_werror_flag" ||
15083 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015084 } && test -s conftest$ac_exeext &&
15085 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015087else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015088 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015089sed 's/^/| /' conftest.$ac_ext >&5
15090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091
Thomas Wouters477c8d52006-05-27 19:21:47 +000015092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093
15094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15095 conftest$ac_exeext
15096 if test "${ac_cv_search_sem_init+set}" = set; then
15097 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099done
15100if test "${ac_cv_search_sem_init+set}" = set; then
15101 :
15102else
15103 ac_cv_search_sem_init=no
15104fi
15105rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015106LIBS=$ac_func_search_save_LIBS
15107fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015108{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15109echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110ac_res=$ac_cv_search_sem_init
15111if test "$ac_res" != no; then
15112 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015113
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015114fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015115 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015116 # posix4 on Solaris 2.6
15117 # pthread (first!) on Linux
15118fi
15119
Martin v. Löwis19d17342003-06-14 21:03:05 +000015120# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015121{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15122echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015123if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015125else
15126 ac_check_lib_save_LIBS=$LIBS
15127LIBS="-lintl $LIBS"
15128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015129/* confdefs.h. */
15130_ACEOF
15131cat confdefs.h >>conftest.$ac_ext
15132cat >>conftest.$ac_ext <<_ACEOF
15133/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135/* Override any GCC internal prototype to avoid an error.
15136 Use char because int might match the return type of a GCC
15137 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015138#ifdef __cplusplus
15139extern "C"
15140#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015141char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015142int
15143main ()
15144{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015146 ;
15147 return 0;
15148}
15149_ACEOF
15150rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151if { (ac_try="$ac_link"
15152case "(($ac_try" in
15153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15154 *) ac_try_echo=$ac_try;;
15155esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015159 grep -v '^ *+' conftest.er1 >conftest.err
15160 rm -f conftest.er1
15161 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163 (exit $ac_status); } && {
15164 test -z "$ac_c_werror_flag" ||
15165 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015166 } && test -s conftest$ac_exeext &&
15167 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015168 ac_cv_lib_intl_textdomain=yes
15169else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015171sed 's/^/| /' conftest.$ac_ext >&5
15172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175
15176rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015178LIBS=$ac_check_lib_save_LIBS
15179fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015180{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15181echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15182if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015183
15184cat >>confdefs.h <<\_ACEOF
15185#define WITH_LIBINTL 1
15186_ACEOF
15187
Brett Cannonc6d936e2009-06-07 20:09:53 +000015188 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015189fi
15190
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015191
15192# checks for system dependent C++ extensions support
15193case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015194 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15195echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015197/* confdefs.h. */
15198_ACEOF
15199cat confdefs.h >>conftest.$ac_ext
15200cat >>conftest.$ac_ext <<_ACEOF
15201/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015202#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015203int
15204main ()
15205{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015206loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ;
15208 return 0;
15209}
15210_ACEOF
15211rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212if { (ac_try="$ac_link"
15213case "(($ac_try" in
15214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15215 *) ac_try_echo=$ac_try;;
15216esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015220 grep -v '^ *+' conftest.er1 >conftest.err
15221 rm -f conftest.er1
15222 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224 (exit $ac_status); } && {
15225 test -z "$ac_c_werror_flag" ||
15226 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015227 } && test -s conftest$ac_exeext &&
15228 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230cat >>confdefs.h <<\_ACEOF
15231#define AIX_GENUINE_CPLUSPLUS 1
15232_ACEOF
15233
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015234 { echo "$as_me:$LINENO: result: yes" >&5
15235echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015238sed 's/^/| /' conftest.$ac_ext >&5
15239
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015240 { echo "$as_me:$LINENO: result: no" >&5
15241echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015243
15244rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015245 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015246 *) ;;
15247esac
15248
Guido van Rossum70c7f481998-03-26 18:44:10 +000015249# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015250{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15251echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015252if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015254else
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015256LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015258/* confdefs.h. */
15259_ACEOF
15260cat confdefs.h >>conftest.$ac_ext
15261cat >>conftest.$ac_ext <<_ACEOF
15262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264/* Override any GCC internal prototype to avoid an error.
15265 Use char because int might match the return type of a GCC
15266 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015267#ifdef __cplusplus
15268extern "C"
15269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015270char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015271int
15272main ()
15273{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 ;
15276 return 0;
15277}
15278_ACEOF
15279rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280if { (ac_try="$ac_link"
15281case "(($ac_try" in
15282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15283 *) ac_try_echo=$ac_try;;
15284esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015288 grep -v '^ *+' conftest.er1 >conftest.err
15289 rm -f conftest.er1
15290 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292 (exit $ac_status); } && {
15293 test -z "$ac_c_werror_flag" ||
15294 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015295 } && test -s conftest$ac_exeext &&
15296 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015297 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015300sed 's/^/| /' conftest.$ac_ext >&5
15301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304
15305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015307LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015308fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015309{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15310echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15311if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015312 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015313fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015314 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015315{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15316echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015317if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015319else
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015321LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015322cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015323/* confdefs.h. */
15324_ACEOF
15325cat confdefs.h >>conftest.$ac_ext
15326cat >>conftest.$ac_ext <<_ACEOF
15327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329/* Override any GCC internal prototype to avoid an error.
15330 Use char because int might match the return type of a GCC
15331 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015332#ifdef __cplusplus
15333extern "C"
15334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015335char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015336int
15337main ()
15338{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 ;
15341 return 0;
15342}
15343_ACEOF
15344rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345if { (ac_try="$ac_link"
15346case "(($ac_try" in
15347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15348 *) ac_try_echo=$ac_try;;
15349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015353 grep -v '^ *+' conftest.er1 >conftest.err
15354 rm -f conftest.er1
15355 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357 (exit $ac_status); } && {
15358 test -z "$ac_c_werror_flag" ||
15359 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015360 } && test -s conftest$ac_exeext &&
15361 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015362 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015365sed 's/^/| /' conftest.$ac_ext >&5
15366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369
15370rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015371 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015372LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015373fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015374{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15375echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15376if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015377 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015378fi
15379 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015380
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015381{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15382echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015385if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015387{ echo "$as_me:$LINENO: result: $withval" >&5
15388echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015389LIBS="$withval $LIBS"
15390
15391else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015392 { echo "$as_me:$LINENO: result: no" >&5
15393echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394fi
15395
Guido van Rossum7f43da71994-08-01 12:15:30 +000015396
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015397# Check for use of the system expat library
15398{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15399echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15400
15401# Check whether --with-system_expat was given.
15402if test "${with_system_expat+set}" = set; then
15403 withval=$with_system_expat;
15404fi
15405
15406
15407{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15408echo "${ECHO_T}$with_system_expat" >&6; }
15409
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015410# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015411{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15412echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015414# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015415if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015416 withval=$with_system_ffi;
15417fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015418
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015419
Benjamin Petersond78735d2010-01-01 16:04:23 +000015420if test "$with_system_ffi" = "yes"; then
15421 if test -n "$ac_tool_prefix"; then
15422 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15423set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15424{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15425echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15426if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15427 echo $ECHO_N "(cached) $ECHO_C" >&6
15428else
15429 case $PKG_CONFIG in
15430 [\\/]* | ?:[\\/]*)
15431 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15432 ;;
15433 *)
15434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15435for as_dir in $PATH
15436do
15437 IFS=$as_save_IFS
15438 test -z "$as_dir" && as_dir=.
15439 for ac_exec_ext in '' $ac_executable_extensions; do
15440 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15441 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15442 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15443 break 2
15444 fi
15445done
15446done
15447IFS=$as_save_IFS
15448
15449 ;;
15450esac
15451fi
15452PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15453if test -n "$PKG_CONFIG"; then
15454 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15455echo "${ECHO_T}$PKG_CONFIG" >&6; }
15456else
15457 { echo "$as_me:$LINENO: result: no" >&5
15458echo "${ECHO_T}no" >&6; }
15459fi
15460
15461
15462fi
15463if test -z "$ac_cv_path_PKG_CONFIG"; then
15464 ac_pt_PKG_CONFIG=$PKG_CONFIG
15465 # Extract the first word of "pkg-config", so it can be a program name with args.
15466set dummy pkg-config; ac_word=$2
15467{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15468echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15469if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15470 echo $ECHO_N "(cached) $ECHO_C" >&6
15471else
15472 case $ac_pt_PKG_CONFIG in
15473 [\\/]* | ?:[\\/]*)
15474 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15475 ;;
15476 *)
15477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15478for as_dir in $PATH
15479do
15480 IFS=$as_save_IFS
15481 test -z "$as_dir" && as_dir=.
15482 for ac_exec_ext in '' $ac_executable_extensions; do
15483 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15484 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15485 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15486 break 2
15487 fi
15488done
15489done
15490IFS=$as_save_IFS
15491
15492 ;;
15493esac
15494fi
15495ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15496if test -n "$ac_pt_PKG_CONFIG"; then
15497 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15498echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15499else
15500 { echo "$as_me:$LINENO: result: no" >&5
15501echo "${ECHO_T}no" >&6; }
15502fi
15503
15504 if test "x$ac_pt_PKG_CONFIG" = x; then
15505 PKG_CONFIG=""
15506 else
15507 case $cross_compiling:$ac_tool_warned in
15508yes:)
15509{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15510whose name does not start with the host triplet. If you think this
15511configuration is useful to you, please write to autoconf@gnu.org." >&5
15512echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15513whose name does not start with the host triplet. If you think this
15514configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15515ac_tool_warned=yes ;;
15516esac
15517 PKG_CONFIG=$ac_pt_PKG_CONFIG
15518 fi
15519else
15520 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15521fi
15522
15523 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15524else
15525 LIBFFI_INCLUDEDIR=""
15526fi
15527
15528
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015529{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15530echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015531
Matthias Klose55708cc2009-04-30 08:06:49 +000015532# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015533{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15534echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015535
15536# Check whether --with-dbmliborder was given.
15537if test "${with_dbmliborder+set}" = set; then
15538 withval=$with_dbmliborder;
15539if test x$with_dbmliborder = xyes
15540then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015541{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15542echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015543 { (exit 1); exit 1; }; }
15544else
15545 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15546 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15547 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015548 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15549echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015550 { (exit 1); exit 1; }; }
15551 fi
15552 done
15553fi
15554fi
15555
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015556{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15557echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015558
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015559# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015560
15561
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015562{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15563echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015566if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567 withval=$with_signal_module;
15568fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015569
15570
15571if test -z "$with_signal_module"
15572then with_signal_module="yes"
15573fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015574{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15575echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015576
15577if test "${with_signal_module}" = "yes"; then
15578 USE_SIGNAL_MODULE=""
15579 SIGNAL_OBJS=""
15580else
15581 USE_SIGNAL_MODULE="#"
15582 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15583fi
15584
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015585# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015586
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015587USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015588
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015589{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15590echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
Guido van Rossumec2f0731997-01-22 20:54:01 +000015592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015593# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015594if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015596{ echo "$as_me:$LINENO: result: $withval" >&5
15597echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015598LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015599if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015600 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015601fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015602else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015603 { echo "$as_me:$LINENO: result: no" >&5
15604echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605fi
15606
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608# Templates for things AC_DEFINEd more than once.
15609# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015610
15611
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
15613
15614
15615
15616
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015617{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15618echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015621if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622 withval=$with_threads;
15623fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015624
15625
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015626# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015628# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015629if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630 withval=$with_thread; with_threads=$with_thread
15631fi
15632
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015633
15634if test -z "$with_threads"
15635then with_threads="yes"
15636fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015637{ echo "$as_me:$LINENO: result: $with_threads" >&5
15638echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015639
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015640
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015641if test "$with_threads" = "no"
15642then
15643 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015644elif test "$ac_cv_pthread_is_default" = yes
15645then
Martin v. Löwis11437992002-04-12 09:54:03 +000015646 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015647#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015649
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015650 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015652#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015653_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654
15655 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015657elif test "$ac_cv_kpthread" = "yes"
15658then
15659 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015660 if test "$ac_cv_cxx_thread" = "yes"; then
15661 CXX="$CXX -Kpthread"
15662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015664#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015667 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015668 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015669elif test "$ac_cv_kthread" = "yes"
15670then
15671 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015672 if test "$ac_cv_cxx_thread" = "yes"; then
15673 CXX="$CXX -Kthread"
15674 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015675 cat >>confdefs.h <<\_ACEOF
15676#define WITH_THREAD 1
15677_ACEOF
15678
15679 posix_threads=yes
15680 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015681elif test "$ac_cv_pthread" = "yes"
15682then
15683 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015684 if test "$ac_cv_cxx_thread" = "yes"; then
15685 CXX="$CXX -pthread"
15686 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687 cat >>confdefs.h <<\_ACEOF
15688#define WITH_THREAD 1
15689_ACEOF
15690
15691 posix_threads=yes
15692 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015693else
15694 if test ! -z "$with_threads" -a -d "$with_threads"
15695 then LDFLAGS="$LDFLAGS -L$with_threads"
15696 fi
15697 if test ! -z "$withval" -a -d "$withval"
15698 then LDFLAGS="$LDFLAGS -L$withval"
15699 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015700
15701 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015702 # define _POSIX_THREADS in unistd.h. Some apparently don't
15703 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015704 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15705echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015707/* confdefs.h. */
15708_ACEOF
15709cat confdefs.h >>conftest.$ac_ext
15710cat >>conftest.$ac_ext <<_ACEOF
15711/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015712
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015713#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015714#ifdef _POSIX_THREADS
15715yes
15716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
15718_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015720 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015721 unistd_defines_pthreads=yes
15722else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015723 unistd_defines_pthreads=no
15724fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000015725rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015726
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015727 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15728echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015729
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015731#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015733
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015735 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15736echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015737if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015739fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015740{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15741echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015742else
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015744{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15745echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015747/* confdefs.h. */
15748_ACEOF
15749cat confdefs.h >>conftest.$ac_ext
15750cat >>conftest.$ac_ext <<_ACEOF
15751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015752$ac_includes_default
15753#include <cthreads.h>
15754_ACEOF
15755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756if { (ac_try="$ac_compile"
15757case "(($ac_try" in
15758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15759 *) ac_try_echo=$ac_try;;
15760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015764 grep -v '^ *+' conftest.er1 >conftest.err
15765 rm -f conftest.er1
15766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768 (exit $ac_status); } && {
15769 test -z "$ac_c_werror_flag" ||
15770 test ! -s conftest.err
15771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 ac_header_compiler=yes
15773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015775sed 's/^/| /' conftest.$ac_ext >&5
15776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779
15780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015781{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15782echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
15784# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015785{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15786echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015788/* confdefs.h. */
15789_ACEOF
15790cat confdefs.h >>conftest.$ac_ext
15791cat >>conftest.$ac_ext <<_ACEOF
15792/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015793#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015794_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015795if { (ac_try="$ac_cpp conftest.$ac_ext"
15796case "(($ac_try" in
15797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15798 *) ac_try_echo=$ac_try;;
15799esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015803 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 rm -f conftest.er1
15805 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807 (exit $ac_status); } >/dev/null && {
15808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15809 test ! -s conftest.err
15810 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 ac_header_preproc=yes
15812else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015814sed 's/^/| /' conftest.$ac_ext >&5
15815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818
Martin v. Löwis11437992002-04-12 09:54:03 +000015819rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015820{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15821echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
15823# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015824case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15825 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015826 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15827echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15828 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15829echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015830 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015831 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015832 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015833 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15834echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15835 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15836echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15838echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15839 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15840echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15841 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15842echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15843 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15844echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015845 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015846## -------------------------------------- ##
15847## Report this to http://bugs.python.org/ ##
15848## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015849_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015851 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015853{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15854echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015855if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015856 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015857else
15858 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015859fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015860{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15861echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015862
15863fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015864if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015866#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015870#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873
15874cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015875#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015876_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015877
15878 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015879 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015880else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015883 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15884echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015885if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015887fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015888{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15889echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015890else
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015892{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15893echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015895/* confdefs.h. */
15896_ACEOF
15897cat confdefs.h >>conftest.$ac_ext
15898cat >>conftest.$ac_ext <<_ACEOF
15899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015900$ac_includes_default
15901#include <mach/cthreads.h>
15902_ACEOF
15903rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015904if { (ac_try="$ac_compile"
15905case "(($ac_try" in
15906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15907 *) ac_try_echo=$ac_try;;
15908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015912 grep -v '^ *+' conftest.er1 >conftest.err
15913 rm -f conftest.er1
15914 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015916 (exit $ac_status); } && {
15917 test -z "$ac_c_werror_flag" ||
15918 test ! -s conftest.err
15919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 ac_header_compiler=yes
15921else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015923sed 's/^/| /' conftest.$ac_ext >&5
15924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927
15928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015929{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15930echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015931
15932# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015933{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15934echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015936/* confdefs.h. */
15937_ACEOF
15938cat confdefs.h >>conftest.$ac_ext
15939cat >>conftest.$ac_ext <<_ACEOF
15940/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015941#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015943if { (ac_try="$ac_cpp conftest.$ac_ext"
15944case "(($ac_try" in
15945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15946 *) ac_try_echo=$ac_try;;
15947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015949 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015950 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015951 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 rm -f conftest.er1
15953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955 (exit $ac_status); } >/dev/null && {
15956 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15957 test ! -s conftest.err
15958 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ac_header_preproc=yes
15960else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015962sed 's/^/| /' conftest.$ac_ext >&5
15963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966
Martin v. Löwis11437992002-04-12 09:54:03 +000015967rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015968{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15969echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015970
15971# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015972case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15973 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015974 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15975echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15976 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15977echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015978 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015979 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015980 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015981 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15982echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15983 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15984echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15985 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15986echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15987 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15988echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15989 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15990echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15991 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15992echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015993 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015994## -------------------------------------- ##
15995## Report this to http://bugs.python.org/ ##
15996## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015997_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015998 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015999 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016001{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16002echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016003if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016004 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016005else
16006 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016007fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016008{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16009echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010
16011fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016012if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016014#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016015_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016016
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021
16022cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016023#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016024_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016025
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016026 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016027else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016028
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016029 # Just looking for pthread_create in libpthread is not enough:
16030 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16031 # So we really have to include pthread.h, and then link.
16032 _libs=$LIBS
16033 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016034 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16035echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016037/* confdefs.h. */
16038_ACEOF
16039cat confdefs.h >>conftest.$ac_ext
16040cat >>conftest.$ac_ext <<_ACEOF
16041/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016042#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016043
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016044void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016045int
16046main ()
16047{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016048
16049pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 ;
16051 return 0;
16052}
16053_ACEOF
16054rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016055if { (ac_try="$ac_link"
16056case "(($ac_try" in
16057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16058 *) ac_try_echo=$ac_try;;
16059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016061 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016063 grep -v '^ *+' conftest.er1 >conftest.err
16064 rm -f conftest.er1
16065 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016067 (exit $ac_status); } && {
16068 test -z "$ac_c_werror_flag" ||
16069 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016070 } && test -s conftest$ac_exeext &&
16071 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016072
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016073 { echo "$as_me:$LINENO: result: yes" >&5
16074echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016075 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016076#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016077_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016078
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016079 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016080 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016083sed 's/^/| /' conftest.$ac_ext >&5
16084
Martin v. Löwis11437992002-04-12 09:54:03 +000016085
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016086 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016087 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16088echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016089if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016091else
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016093/* confdefs.h. */
16094_ACEOF
16095cat confdefs.h >>conftest.$ac_ext
16096cat >>conftest.$ac_ext <<_ACEOF
16097/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016098/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16099 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16100#define pthread_detach innocuous_pthread_detach
16101
Guido van Rossumad678af1998-10-02 14:42:15 +000016102/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016103 which can conflict with char pthread_detach (); below.
16104 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016105 <limits.h> exists even on freestanding compilers. */
16106
16107#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016108# include <limits.h>
16109#else
16110# include <assert.h>
16111#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016112
16113#undef pthread_detach
16114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016115/* Override any GCC internal prototype to avoid an error.
16116 Use char because int might match the return type of a GCC
16117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016118#ifdef __cplusplus
16119extern "C"
16120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016121char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016122/* The GNU C library defines this for functions which it implements
16123 to always fail with ENOSYS. Some functions are actually named
16124 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016126choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016127#endif
16128
Skip Montanaro6dead952003-09-25 14:50:04 +000016129int
16130main ()
16131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016132return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 ;
16134 return 0;
16135}
16136_ACEOF
16137rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138if { (ac_try="$ac_link"
16139case "(($ac_try" in
16140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16141 *) ac_try_echo=$ac_try;;
16142esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016144 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016146 grep -v '^ *+' conftest.er1 >conftest.err
16147 rm -f conftest.er1
16148 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150 (exit $ac_status); } && {
16151 test -z "$ac_c_werror_flag" ||
16152 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016153 } && test -s conftest$ac_exeext &&
16154 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016156else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016158sed 's/^/| /' conftest.$ac_ext >&5
16159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016160 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162
16163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016164 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016165fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016166{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16167echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16168if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016170#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016171_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016172
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016173 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016174 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016175else
Guido van Rossumad678af1998-10-02 14:42:15 +000016176
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016177 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16178echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016179if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016181else
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016183LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016185/* confdefs.h. */
16186_ACEOF
16187cat confdefs.h >>conftest.$ac_ext
16188cat >>conftest.$ac_ext <<_ACEOF
16189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191/* Override any GCC internal prototype to avoid an error.
16192 Use char because int might match the return type of a GCC
16193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016194#ifdef __cplusplus
16195extern "C"
16196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016197char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016198int
16199main ()
16200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016201return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016202 ;
16203 return 0;
16204}
16205_ACEOF
16206rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207if { (ac_try="$ac_link"
16208case "(($ac_try" in
16209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16210 *) ac_try_echo=$ac_try;;
16211esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016215 grep -v '^ *+' conftest.er1 >conftest.err
16216 rm -f conftest.er1
16217 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 (exit $ac_status); } && {
16220 test -z "$ac_c_werror_flag" ||
16221 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016222 } && test -s conftest$ac_exeext &&
16223 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016224 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016225else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016227sed 's/^/| /' conftest.$ac_ext >&5
16228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016229 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231
16232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016234LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016235fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016236{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16237echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16238if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016239 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016240#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016241_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016242
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016243 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016244 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016245 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016246else
Greg Steinadf63d62000-07-05 10:38:09 +000016247
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016248 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16249echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016250if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016251 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016252else
Martin v. Löwis11437992002-04-12 09:54:03 +000016253 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016254LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016255cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016256/* confdefs.h. */
16257_ACEOF
16258cat confdefs.h >>conftest.$ac_ext
16259cat >>conftest.$ac_ext <<_ACEOF
16260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016262/* Override any GCC internal prototype to avoid an error.
16263 Use char because int might match the return type of a GCC
16264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016265#ifdef __cplusplus
16266extern "C"
16267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016268char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016269int
16270main ()
16271{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016273 ;
16274 return 0;
16275}
16276_ACEOF
16277rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278if { (ac_try="$ac_link"
16279case "(($ac_try" in
16280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16281 *) ac_try_echo=$ac_try;;
16282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016286 grep -v '^ *+' conftest.er1 >conftest.err
16287 rm -f conftest.er1
16288 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 (exit $ac_status); } && {
16291 test -z "$ac_c_werror_flag" ||
16292 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016293 } && test -s conftest$ac_exeext &&
16294 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016298sed 's/^/| /' conftest.$ac_ext >&5
16299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302
16303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016304 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016305LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016306fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016307{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16308echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16309if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016311#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016312_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016313
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016314 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016315 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016316 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016317else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016319 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16320echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016321if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016323else
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016325LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016327/* confdefs.h. */
16328_ACEOF
16329cat confdefs.h >>conftest.$ac_ext
16330cat >>conftest.$ac_ext <<_ACEOF
16331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333/* Override any GCC internal prototype to avoid an error.
16334 Use char because int might match the return type of a GCC
16335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016336#ifdef __cplusplus
16337extern "C"
16338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016339char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016340int
16341main ()
16342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 ;
16345 return 0;
16346}
16347_ACEOF
16348rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349if { (ac_try="$ac_link"
16350case "(($ac_try" in
16351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16352 *) ac_try_echo=$ac_try;;
16353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016357 grep -v '^ *+' conftest.er1 >conftest.err
16358 rm -f conftest.er1
16359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361 (exit $ac_status); } && {
16362 test -z "$ac_c_werror_flag" ||
16363 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016364 } && test -s conftest$ac_exeext &&
16365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016369sed 's/^/| /' conftest.$ac_ext >&5
16370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016371 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373
16374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016376LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016377fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016378{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16379echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16380if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016382#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016383_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016385 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016386 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016387 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016388else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016390 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16391echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016392if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016394else
Martin v. Löwis11437992002-04-12 09:54:03 +000016395 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016396LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016398/* confdefs.h. */
16399_ACEOF
16400cat confdefs.h >>conftest.$ac_ext
16401cat >>conftest.$ac_ext <<_ACEOF
16402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404/* Override any GCC internal prototype to avoid an error.
16405 Use char because int might match the return type of a GCC
16406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016407#ifdef __cplusplus
16408extern "C"
16409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016410char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016411int
16412main ()
16413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016414return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016415 ;
16416 return 0;
16417}
16418_ACEOF
16419rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016420if { (ac_try="$ac_link"
16421case "(($ac_try" in
16422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16423 *) ac_try_echo=$ac_try;;
16424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016426 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016428 grep -v '^ *+' conftest.er1 >conftest.err
16429 rm -f conftest.er1
16430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016432 (exit $ac_status); } && {
16433 test -z "$ac_c_werror_flag" ||
16434 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016435 } && test -s conftest$ac_exeext &&
16436 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016437 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016440sed 's/^/| /' conftest.$ac_ext >&5
16441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444
16445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016447LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016448fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016449{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16450echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16451if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016452 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016453#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016454_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016455
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016456 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016457 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016458 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016459else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016460
Martin v. Löwis130fb172001-07-19 11:00:41 +000016461 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016462fi
16463
Guido van Rossum627b2d71993-12-24 10:39:16 +000016464
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016465fi
16466
Guido van Rossum0be3e491997-05-22 20:33:33 +000016467fi
16468
Guido van Rossum49545951997-12-02 19:28:29 +000016469fi
16470
Guido van Rossumb93a8621998-05-07 13:27:32 +000016471fi
16472
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016474
16475rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016476 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016477fi
16478
Martin v. Löwis11437992002-04-12 09:54:03 +000016479
16480fi
16481
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016482
Michael W. Hudson54241132001-12-07 15:38:26 +000016483
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016484 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16485echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016486if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016487 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016488else
Martin v. Löwis11437992002-04-12 09:54:03 +000016489 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016490LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016492/* confdefs.h. */
16493_ACEOF
16494cat confdefs.h >>conftest.$ac_ext
16495cat >>conftest.$ac_ext <<_ACEOF
16496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016498/* Override any GCC internal prototype to avoid an error.
16499 Use char because int might match the return type of a GCC
16500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016501#ifdef __cplusplus
16502extern "C"
16503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016504char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016505int
16506main ()
16507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016509 ;
16510 return 0;
16511}
16512_ACEOF
16513rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514if { (ac_try="$ac_link"
16515case "(($ac_try" in
16516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16517 *) ac_try_echo=$ac_try;;
16518esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016522 grep -v '^ *+' conftest.er1 >conftest.err
16523 rm -f conftest.er1
16524 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526 (exit $ac_status); } && {
16527 test -z "$ac_c_werror_flag" ||
16528 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016529 } && test -s conftest$ac_exeext &&
16530 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016532else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016534sed 's/^/| /' conftest.$ac_ext >&5
16535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538
16539rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016542fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016543{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16544echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16545if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016546 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016547#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016549
Martin v. Löwis130fb172001-07-19 11:00:41 +000016550 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016551 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016552 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016553fi
16554
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016555
Neal Norwitza978ab02002-11-02 16:58:05 +000016556 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016557 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16558echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016559if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016561else
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016563LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016565/* confdefs.h. */
16566_ACEOF
16567cat confdefs.h >>conftest.$ac_ext
16568cat >>conftest.$ac_ext <<_ACEOF
16569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016571/* Override any GCC internal prototype to avoid an error.
16572 Use char because int might match the return type of a GCC
16573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016574#ifdef __cplusplus
16575extern "C"
16576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016577char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016578int
16579main ()
16580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016582 ;
16583 return 0;
16584}
16585_ACEOF
16586rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587if { (ac_try="$ac_link"
16588case "(($ac_try" in
16589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16590 *) ac_try_echo=$ac_try;;
16591esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016593 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016595 grep -v '^ *+' conftest.er1 >conftest.err
16596 rm -f conftest.er1
16597 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599 (exit $ac_status); } && {
16600 test -z "$ac_c_werror_flag" ||
16601 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016602 } && test -s conftest$ac_exeext &&
16603 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016604 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016605else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016607sed 's/^/| /' conftest.$ac_ext >&5
16608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611
16612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016614LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016615fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016616{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16617echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16618if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016620#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016621_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016622
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016623 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016624 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016625 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016626fi
16627
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016628 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016629
Martin v. Löwis130fb172001-07-19 11:00:41 +000016630 if test "$USE_THREAD_MODULE" != "#"
16631 then
16632 # If the above checks didn't disable threads, (at least) OSF1
16633 # needs this '-threads' argument during linking.
16634 case $ac_sys_system in
16635 OSF1) LDLAST=-threads;;
16636 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016637 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016638fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016639
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016640if test "$posix_threads" = "yes"; then
16641 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016642
16643cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016644#define _POSIX_THREADS 1
16645_ACEOF
16646
16647 fi
16648
16649 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16650 case $ac_sys_system/$ac_sys_release in
16651 SunOS/5.6)
16652cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016653#define HAVE_PTHREAD_DESTRUCTOR 1
16654_ACEOF
16655
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016656 ;;
16657 SunOS/5.8)
16658cat >>confdefs.h <<\_ACEOF
16659#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16660_ACEOF
16661
16662 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016663 AIX/5)
16664cat >>confdefs.h <<\_ACEOF
16665#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16666_ACEOF
16667
16668 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016669 esac
16670
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016671 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16672echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016673 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016674 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016675else
16676 if test "$cross_compiling" = yes; then
16677 ac_cv_pthread_system_supported=no
16678else
16679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016680/* confdefs.h. */
16681_ACEOF
16682cat confdefs.h >>conftest.$ac_ext
16683cat >>conftest.$ac_ext <<_ACEOF
16684/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016685#include <pthread.h>
16686 void *foo(void *parm) {
16687 return NULL;
16688 }
16689 main() {
16690 pthread_attr_t attr;
16691 pthread_t id;
16692 if (pthread_attr_init(&attr)) exit(-1);
16693 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16694 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16695 exit(0);
16696 }
16697_ACEOF
16698rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699if { (ac_try="$ac_link"
16700case "(($ac_try" in
16701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16702 *) ac_try_echo=$ac_try;;
16703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016706 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709 { (case "(($ac_try" in
16710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16711 *) ac_try_echo=$ac_try;;
16712esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016714 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016715 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016717 (exit $ac_status); }; }; then
16718 ac_cv_pthread_system_supported=yes
16719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016720 echo "$as_me: program exited with status $ac_status" >&5
16721echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016722sed 's/^/| /' conftest.$ac_ext >&5
16723
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016724( exit $ac_status )
16725ac_cv_pthread_system_supported=no
16726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727rm -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 +000016728fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016730
16731
Guido van Rossum627b2d71993-12-24 10:39:16 +000016732fi
16733
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016734 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16735echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016736 if test "$ac_cv_pthread_system_supported" = "yes"; then
16737
16738cat >>confdefs.h <<\_ACEOF
16739#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16740_ACEOF
16741
16742 fi
16743
16744for ac_func in pthread_sigmask
16745do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016746as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16747{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16748echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016750 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016751else
16752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016753/* confdefs.h. */
16754_ACEOF
16755cat confdefs.h >>conftest.$ac_ext
16756cat >>conftest.$ac_ext <<_ACEOF
16757/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016758/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16759 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16760#define $ac_func innocuous_$ac_func
16761
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016762/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016763 which can conflict with char $ac_func (); below.
16764 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016765 <limits.h> exists even on freestanding compilers. */
16766
16767#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016768# include <limits.h>
16769#else
16770# include <assert.h>
16771#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016772
16773#undef $ac_func
16774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016775/* Override any GCC internal prototype to avoid an error.
16776 Use char because int might match the return type of a GCC
16777 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016778#ifdef __cplusplus
16779extern "C"
16780#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016781char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016782/* The GNU C library defines this for functions which it implements
16783 to always fail with ENOSYS. Some functions are actually named
16784 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016786choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016787#endif
16788
Skip Montanaro6dead952003-09-25 14:50:04 +000016789int
16790main ()
16791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016792return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016793 ;
16794 return 0;
16795}
16796_ACEOF
16797rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798if { (ac_try="$ac_link"
16799case "(($ac_try" in
16800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16801 *) ac_try_echo=$ac_try;;
16802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016806 grep -v '^ *+' conftest.er1 >conftest.err
16807 rm -f conftest.er1
16808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810 (exit $ac_status); } && {
16811 test -z "$ac_c_werror_flag" ||
16812 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016813 } && test -s conftest$ac_exeext &&
16814 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016815 eval "$as_ac_var=yes"
16816else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016818sed 's/^/| /' conftest.$ac_ext >&5
16819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016820 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016822
16823rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016825fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016826ac_res=`eval echo '${'$as_ac_var'}'`
16827 { echo "$as_me:$LINENO: result: $ac_res" >&5
16828echo "${ECHO_T}$ac_res" >&6; }
16829if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016830 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016831#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016832_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016833 case $ac_sys_system in
16834 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016835
Jason Tishlerfac083d2003-07-22 15:20:49 +000016836cat >>confdefs.h <<\_ACEOF
16837#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16838_ACEOF
16839
16840 ;;
16841 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016842fi
16843done
16844
16845fi
16846
16847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016848# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016849
16850
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016851{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16852echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016854if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016856 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016857 { echo "$as_me:$LINENO: result: no" >&5
16858echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016859 ipv6=no
16860 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016861 *) { echo "$as_me:$LINENO: result: yes" >&5
16862echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016863 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016864#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016866
16867 ipv6=yes
16868 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016869 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016870else
Martin v. Löwis11437992002-04-12 09:54:03 +000016871
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016872 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016873 { echo "$as_me:$LINENO: result: no" >&5
16874echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016875 ipv6=no
16876
16877else
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016879/* confdefs.h. */
16880_ACEOF
16881cat confdefs.h >>conftest.$ac_ext
16882cat >>conftest.$ac_ext <<_ACEOF
16883/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016884 /* AF_INET6 available check */
16885#include <sys/types.h>
16886#include <sys/socket.h>
16887main()
16888{
16889 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16890 exit(1);
16891 else
16892 exit(0);
16893}
16894
Martin v. Löwis11437992002-04-12 09:54:03 +000016895_ACEOF
16896rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897if { (ac_try="$ac_link"
16898case "(($ac_try" in
16899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16900 *) ac_try_echo=$ac_try;;
16901esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016904 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907 { (case "(($ac_try" in
16908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16909 *) ac_try_echo=$ac_try;;
16910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016916 { echo "$as_me:$LINENO: result: yes" >&5
16917echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016918 ipv6=yes
16919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016920 echo "$as_me: program exited with status $ac_status" >&5
16921echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016922sed 's/^/| /' conftest.$ac_ext >&5
16923
Martin v. Löwis11437992002-04-12 09:54:03 +000016924( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016925{ echo "$as_me:$LINENO: result: no" >&5
16926echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016927 ipv6=no
16928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016929rm -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 +000016930fi
16931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932
16933
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016934if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016935 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16936echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016937 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016938/* confdefs.h. */
16939_ACEOF
16940cat confdefs.h >>conftest.$ac_ext
16941cat >>conftest.$ac_ext <<_ACEOF
16942/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016943#include <sys/types.h>
16944#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016945int
16946main ()
16947{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016948struct sockaddr_in6 x;
16949x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016950 ;
16951 return 0;
16952}
16953_ACEOF
16954rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955if { (ac_try="$ac_compile"
16956case "(($ac_try" in
16957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16958 *) ac_try_echo=$ac_try;;
16959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016963 grep -v '^ *+' conftest.er1 >conftest.err
16964 rm -f conftest.er1
16965 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 (exit $ac_status); } && {
16968 test -z "$ac_c_werror_flag" ||
16969 test ! -s conftest.err
16970 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016971 { echo "$as_me:$LINENO: result: yes" >&5
16972echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016973 ipv6=yes
16974else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016976sed 's/^/| /' conftest.$ac_ext >&5
16977
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016978 { echo "$as_me:$LINENO: result: no" >&5
16979echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016980 ipv6=no
16981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982
16983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016984fi
16985
16986if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016987 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016988#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016989_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016990
16991fi
16992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993fi
16994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016995
16996ipv6type=unknown
16997ipv6lib=none
16998ipv6trylibc=no
16999
17000if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017001 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17002echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017003 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17004 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017005 case $i in
17006 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017008/* confdefs.h. */
17009_ACEOF
17010cat confdefs.h >>conftest.$ac_ext
17011cat >>conftest.$ac_ext <<_ACEOF
17012/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017014#include <netinet/in.h>
17015#ifdef IPV6_INRIA_VERSION
17016yes
17017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017018_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017020 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017021 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017022fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017023rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017024
17025 ;;
17026 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017028/* confdefs.h. */
17029_ACEOF
17030cat confdefs.h >>conftest.$ac_ext
17031cat >>conftest.$ac_ext <<_ACEOF
17032/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017033
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017034#include <netinet/in.h>
17035#ifdef __KAME__
17036yes
17037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017038_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017040 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017041 ipv6type=$i;
17042 ipv6lib=inet6
17043 ipv6libdir=/usr/local/v6/lib
17044 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017045fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017046rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017047
17048 ;;
17049 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017051/* confdefs.h. */
17052_ACEOF
17053cat confdefs.h >>conftest.$ac_ext
17054cat >>conftest.$ac_ext <<_ACEOF
17055/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017056
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017057#include <features.h>
17058#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17059yes
17060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017061_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017063 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017064 ipv6type=$i;
17065 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017066fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017067rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017068
17069 ;;
17070 linux-inet6)
17071 if test -d /usr/inet6; then
17072 ipv6type=$i
17073 ipv6lib=inet6
17074 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017075 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017076 fi
17077 ;;
17078 solaris)
17079 if test -f /etc/netconfig; then
17080 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17081 ipv6type=$i
17082 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017083 fi
17084 fi
17085 ;;
17086 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017088/* confdefs.h. */
17089_ACEOF
17090cat confdefs.h >>conftest.$ac_ext
17091cat >>conftest.$ac_ext <<_ACEOF
17092/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017093
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017094#include <sys/param.h>
17095#ifdef _TOSHIBA_INET6
17096yes
17097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017098_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017100 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017101 ipv6type=$i;
17102 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017103 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017104fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017105rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017106
17107 ;;
17108 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017110/* confdefs.h. */
17111_ACEOF
17112cat confdefs.h >>conftest.$ac_ext
17113cat >>conftest.$ac_ext <<_ACEOF
17114/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017116#include </usr/local/v6/include/sys/v6config.h>
17117#ifdef __V6D__
17118yes
17119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017120_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017122 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017123 ipv6type=$i;
17124 ipv6lib=v6;
17125 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017126 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017127fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017128rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017129
17130 ;;
17131 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017133/* confdefs.h. */
17134_ACEOF
17135cat confdefs.h >>conftest.$ac_ext
17136cat >>conftest.$ac_ext <<_ACEOF
17137/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017138
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017139#include <sys/param.h>
17140#ifdef _ZETA_MINAMI_INET6
17141yes
17142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017143_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017145 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017146 ipv6type=$i;
17147 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017148 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017149fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000017150rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017151
17152 ;;
17153 esac
17154 if test "$ipv6type" != "unknown"; then
17155 break
17156 fi
17157 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017158 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17159echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017160fi
17161
17162if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17163 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17164 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17165 echo "using lib$ipv6lib"
17166 else
17167 if test $ipv6trylibc = "yes"; then
17168 echo "using libc"
17169 else
17170 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17171 echo "You need to fetch lib$ipv6lib.a from appropriate"
17172 echo 'ipv6 kit and compile beforehand.'
17173 exit 1
17174 fi
17175 fi
17176fi
17177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017178{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17179echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017180cat >conftest.$ac_ext <<_ACEOF
17181/* confdefs.h. */
17182_ACEOF
17183cat confdefs.h >>conftest.$ac_ext
17184cat >>conftest.$ac_ext <<_ACEOF
17185/* end confdefs.h. */
17186#include <Carbon/Carbon.h>
17187int
17188main ()
17189{
17190FSIORefNum fRef = 0
17191 ;
17192 return 0;
17193}
17194_ACEOF
17195rm -f conftest.$ac_objext
17196if { (ac_try="$ac_compile"
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
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017202 (eval "$ac_compile") 2>conftest.er1
17203 ac_status=$?
17204 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
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017208 (exit $ac_status); } && {
17209 test -z "$ac_c_werror_flag" ||
17210 test ! -s conftest.err
17211 } && test -s conftest.$ac_objext; then
17212
17213cat >>confdefs.h <<\_ACEOF
17214#define HAVE_OSX105_SDK 1
17215_ACEOF
17216
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017217 { echo "$as_me:$LINENO: result: yes" >&5
17218echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017219else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017220 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017221sed 's/^/| /' conftest.$ac_ext >&5
17222
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017223 { echo "$as_me:$LINENO: result: no" >&5
17224echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017225
17226fi
17227
17228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17229
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017230# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017231{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17232echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017235if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236 withval=$with_doc_strings;
17237fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017238
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017239
17240if test -z "$with_doc_strings"
17241then with_doc_strings="yes"
17242fi
17243if test "$with_doc_strings" != "no"
17244then
17245
17246cat >>confdefs.h <<\_ACEOF
17247#define WITH_DOC_STRINGS 1
17248_ACEOF
17249
17250fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017251{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17252echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017253
Neil Schemenauera35c6882001-02-27 04:45:05 +000017254# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017255{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17256echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017259if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017261if test "$withval" != no
17262then
17263
17264cat >>confdefs.h <<\_ACEOF
17265#define WITH_TSC 1
17266_ACEOF
17267
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017268 { echo "$as_me:$LINENO: result: yes" >&5
17269echo "${ECHO_T}yes" >&6; }
17270else { echo "$as_me:$LINENO: result: no" >&5
17271echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017272fi
17273else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017274 { echo "$as_me:$LINENO: result: no" >&5
17275echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276fi
17277
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017278
17279# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017280{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17281echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017284if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285 withval=$with_pymalloc;
17286fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017287
Neil Schemenauera35c6882001-02-27 04:45:05 +000017288
Neil Schemenauer16c22972002-03-22 15:34:49 +000017289if test -z "$with_pymalloc"
17290then with_pymalloc="yes"
17291fi
17292if test "$with_pymalloc" != "no"
17293then
Martin v. Löwis11437992002-04-12 09:54:03 +000017294
17295cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017296#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017297_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017298
17299fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017300{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17301echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017302
Benjamin Peterson05159c42009-12-03 03:01:27 +000017303# Check for Valgrind support
17304{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17305echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17306
17307# Check whether --with-valgrind was given.
17308if test "${with_valgrind+set}" = set; then
17309 withval=$with_valgrind;
17310else
17311 with_valgrind=no
17312fi
17313
17314{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17315echo "${ECHO_T}$with_valgrind" >&6; }
17316if test "$with_valgrind" != no; then
17317 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17318 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17319echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17320if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17321 echo $ECHO_N "(cached) $ECHO_C" >&6
17322fi
17323{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17324echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17325else
17326 # Is the header compilable?
17327{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17328echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17329cat >conftest.$ac_ext <<_ACEOF
17330/* confdefs.h. */
17331_ACEOF
17332cat confdefs.h >>conftest.$ac_ext
17333cat >>conftest.$ac_ext <<_ACEOF
17334/* end confdefs.h. */
17335$ac_includes_default
17336#include <valgrind/valgrind.h>
17337_ACEOF
17338rm -f conftest.$ac_objext
17339if { (ac_try="$ac_compile"
17340case "(($ac_try" in
17341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17342 *) ac_try_echo=$ac_try;;
17343esac
17344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17345 (eval "$ac_compile") 2>conftest.er1
17346 ac_status=$?
17347 grep -v '^ *+' conftest.er1 >conftest.err
17348 rm -f conftest.er1
17349 cat conftest.err >&5
17350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17351 (exit $ac_status); } && {
17352 test -z "$ac_c_werror_flag" ||
17353 test ! -s conftest.err
17354 } && test -s conftest.$ac_objext; then
17355 ac_header_compiler=yes
17356else
17357 echo "$as_me: failed program was:" >&5
17358sed 's/^/| /' conftest.$ac_ext >&5
17359
17360 ac_header_compiler=no
17361fi
17362
17363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17364{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17365echo "${ECHO_T}$ac_header_compiler" >&6; }
17366
17367# Is the header present?
17368{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17369echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17370cat >conftest.$ac_ext <<_ACEOF
17371/* confdefs.h. */
17372_ACEOF
17373cat confdefs.h >>conftest.$ac_ext
17374cat >>conftest.$ac_ext <<_ACEOF
17375/* end confdefs.h. */
17376#include <valgrind/valgrind.h>
17377_ACEOF
17378if { (ac_try="$ac_cpp conftest.$ac_ext"
17379case "(($ac_try" in
17380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17381 *) ac_try_echo=$ac_try;;
17382esac
17383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17384 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17385 ac_status=$?
17386 grep -v '^ *+' conftest.er1 >conftest.err
17387 rm -f conftest.er1
17388 cat conftest.err >&5
17389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17390 (exit $ac_status); } >/dev/null && {
17391 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17392 test ! -s conftest.err
17393 }; then
17394 ac_header_preproc=yes
17395else
17396 echo "$as_me: failed program was:" >&5
17397sed 's/^/| /' conftest.$ac_ext >&5
17398
17399 ac_header_preproc=no
17400fi
17401
17402rm -f conftest.err conftest.$ac_ext
17403{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17404echo "${ECHO_T}$ac_header_preproc" >&6; }
17405
17406# So? What about this header?
17407case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17408 yes:no: )
17409 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17410echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17411 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17412echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17413 ac_header_preproc=yes
17414 ;;
17415 no:yes:* )
17416 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17417echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17418 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17419echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17420 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17421echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17422 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17423echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17424 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17425echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17426 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17427echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17428 ( cat <<\_ASBOX
17429## -------------------------------------- ##
17430## Report this to http://bugs.python.org/ ##
17431## -------------------------------------- ##
17432_ASBOX
17433 ) | sed "s/^/$as_me: WARNING: /" >&2
17434 ;;
17435esac
17436{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17437echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17438if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17439 echo $ECHO_N "(cached) $ECHO_C" >&6
17440else
17441 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17442fi
17443{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17444echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17445
17446fi
17447if test $ac_cv_header_valgrind_valgrind_h = yes; then
17448
17449cat >>confdefs.h <<\_ACEOF
17450#define WITH_VALGRIND 1
17451_ACEOF
17452
17453else
17454 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17455echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17456 { (exit 1); exit 1; }; }
17457
17458fi
17459
17460
17461fi
17462
Barry Warsawef82cd72000-06-30 16:21:01 +000017463# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017464{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17465echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017468if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017470if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017471then
17472
17473cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017474#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017475_ACEOF
17476
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017477 { echo "$as_me:$LINENO: result: yes" >&5
17478echo "${ECHO_T}yes" >&6; }
17479else { echo "$as_me:$LINENO: result: no" >&5
17480echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017481fi
17482else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017483 { echo "$as_me:$LINENO: result: no" >&5
17484echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485fi
17486
Barry Warsawef82cd72000-06-30 16:21:01 +000017487
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017488# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017489
Guido van Rossum98935bf2001-09-05 19:13:16 +000017490DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017491
Guido van Rossume97ee181999-12-20 21:27:22 +000017492# the dlopen() function means we might want to use dynload_shlib.o. some
17493# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017494
Thomas Wouters3a584202000-08-05 23:28:51 +000017495for ac_func in dlopen
17496do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017497as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17498{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17499echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017502else
Martin v. Löwis11437992002-04-12 09:54:03 +000017503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017504/* confdefs.h. */
17505_ACEOF
17506cat confdefs.h >>conftest.$ac_ext
17507cat >>conftest.$ac_ext <<_ACEOF
17508/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017509/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17510 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17511#define $ac_func innocuous_$ac_func
17512
Guido van Rossume97ee181999-12-20 21:27:22 +000017513/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017514 which can conflict with char $ac_func (); below.
17515 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017516 <limits.h> exists even on freestanding compilers. */
17517
17518#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017519# include <limits.h>
17520#else
17521# include <assert.h>
17522#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017523
17524#undef $ac_func
17525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526/* Override any GCC internal prototype to avoid an error.
17527 Use char because int might match the return type of a GCC
17528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017529#ifdef __cplusplus
17530extern "C"
17531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017532char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017533/* The GNU C library defines this for functions which it implements
17534 to always fail with ENOSYS. Some functions are actually named
17535 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017537choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017538#endif
17539
Skip Montanaro6dead952003-09-25 14:50:04 +000017540int
17541main ()
17542{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017544 ;
17545 return 0;
17546}
17547_ACEOF
17548rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549if { (ac_try="$ac_link"
17550case "(($ac_try" in
17551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17552 *) ac_try_echo=$ac_try;;
17553esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017557 grep -v '^ *+' conftest.er1 >conftest.err
17558 rm -f conftest.er1
17559 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561 (exit $ac_status); } && {
17562 test -z "$ac_c_werror_flag" ||
17563 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017564 } && test -s conftest$ac_exeext &&
17565 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017566 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017567else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017569sed 's/^/| /' conftest.$ac_ext >&5
17570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573
17574rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017575 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017576fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017577ac_res=`eval echo '${'$as_ac_var'}'`
17578 { echo "$as_me:$LINENO: result: $ac_res" >&5
17579echo "${ECHO_T}$ac_res" >&6; }
17580if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017582#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017583_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017584
Guido van Rossume97ee181999-12-20 21:27:22 +000017585fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017586done
Guido van Rossume97ee181999-12-20 21:27:22 +000017587
Michael W. Hudson54241132001-12-07 15:38:26 +000017588
Guido van Rossume97ee181999-12-20 21:27:22 +000017589# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17590# loading of modules.
17591
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017592{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17593echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017594if test -z "$DYNLOADFILE"
17595then
17596 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017597 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17598 if test "$ac_cv_func_dlopen" = yes
17599 then DYNLOADFILE="dynload_shlib.o"
17600 else DYNLOADFILE="dynload_aix.o"
17601 fi
17602 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017603 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017604 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17605 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017606 *)
17607 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17608 # out any dynamic loading
17609 if test "$ac_cv_func_dlopen" = yes
17610 then DYNLOADFILE="dynload_shlib.o"
17611 else DYNLOADFILE="dynload_stub.o"
17612 fi
17613 ;;
17614 esac
17615fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017616{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17617echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017618if test "$DYNLOADFILE" != "dynload_stub.o"
17619then
Martin v. Löwis11437992002-04-12 09:54:03 +000017620
17621cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017622#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017623_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017624
17625fi
17626
Neil Schemenauer4e425612001-06-19 15:44:15 +000017627# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17628
Michael W. Hudson54241132001-12-07 15:38:26 +000017629
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017630{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17631echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017632if test -z "$MACHDEP_OBJS"
17633then
Jack Jansene578a632001-08-15 01:27:14 +000017634 MACHDEP_OBJS=$extra_machdep_objs
17635else
17636 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017637fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017638{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17639echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017640
Guido van Rossum627b2d71993-12-24 10:39:16 +000017641# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
Martin v. Löwisd6320502004-08-12 13:45:08 +000017713
Martin v. Löwisc3001752005-01-23 09:27:24 +000017714
17715
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017716
17717
Thomas Wouterscf297e42007-02-23 15:07:44 +000017718
17719
Gregory P. Smith25523d22007-09-03 16:44:55 +000017720
Christian Heimes4e30a842007-11-30 22:12:06 +000017721
Martin v. Löwis92fab752008-03-08 10:40:41 +000017722
Martin v. Löwis823725e2008-03-24 13:39:54 +000017723
17724
Benjamin Peterson965ce872009-04-05 21:24:58 +000017725
17726
17727
17728
Martin v. Löwis011e8422009-05-05 04:43:17 +000017729
Martin v. Löwis113a0852009-05-29 17:25:39 +000017730
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017731
17732
17733
17734
Antoine Pitroub7572f02009-12-02 20:46:48 +000017735
Martin v. Löwis823725e2008-03-24 13:39:54 +000017736for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17737 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017738 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017739 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017740 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017741 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017742 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017743 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17744 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017745 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17746 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017747 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017748 truncate uname unsetenv utimes waitpid wait3 wait4 \
17749 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017750do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017751as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17752{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17753echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017756else
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017758/* confdefs.h. */
17759_ACEOF
17760cat confdefs.h >>conftest.$ac_ext
17761cat >>conftest.$ac_ext <<_ACEOF
17762/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017763/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17764 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17765#define $ac_func innocuous_$ac_func
17766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017767/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017768 which can conflict with char $ac_func (); below.
17769 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017770 <limits.h> exists even on freestanding compilers. */
17771
17772#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017773# include <limits.h>
17774#else
17775# include <assert.h>
17776#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017777
17778#undef $ac_func
17779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780/* Override any GCC internal prototype to avoid an error.
17781 Use char because int might match the return type of a GCC
17782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017783#ifdef __cplusplus
17784extern "C"
17785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017786char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017787/* The GNU C library defines this for functions which it implements
17788 to always fail with ENOSYS. Some functions are actually named
17789 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017790#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017791choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017792#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017793
Skip Montanaro6dead952003-09-25 14:50:04 +000017794int
17795main ()
17796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017798 ;
17799 return 0;
17800}
17801_ACEOF
17802rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803if { (ac_try="$ac_link"
17804case "(($ac_try" in
17805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17806 *) ac_try_echo=$ac_try;;
17807esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017811 grep -v '^ *+' conftest.er1 >conftest.err
17812 rm -f conftest.er1
17813 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815 (exit $ac_status); } && {
17816 test -z "$ac_c_werror_flag" ||
17817 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017818 } && test -s conftest$ac_exeext &&
17819 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017823sed 's/^/| /' conftest.$ac_ext >&5
17824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827
17828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017829 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017830fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017831ac_res=`eval echo '${'$as_ac_var'}'`
17832 { echo "$as_me:$LINENO: result: $ac_res" >&5
17833echo "${ECHO_T}$ac_res" >&6; }
17834if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017835 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017836#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017837_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017838
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017839fi
17840done
17841
Michael W. Hudson54241132001-12-07 15:38:26 +000017842
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017843# For some functions, having a definition is not sufficient, since
17844# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017845{ echo "$as_me:$LINENO: checking for chroot" >&5
17846echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017848/* confdefs.h. */
17849_ACEOF
17850cat confdefs.h >>conftest.$ac_ext
17851cat >>conftest.$ac_ext <<_ACEOF
17852/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017853#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017854int
17855main ()
17856{
17857void *x=chroot
17858 ;
17859 return 0;
17860}
17861_ACEOF
17862rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863if { (ac_try="$ac_compile"
17864case "(($ac_try" in
17865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17866 *) ac_try_echo=$ac_try;;
17867esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017871 grep -v '^ *+' conftest.er1 >conftest.err
17872 rm -f conftest.er1
17873 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017875 (exit $ac_status); } && {
17876 test -z "$ac_c_werror_flag" ||
17877 test ! -s conftest.err
17878 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017879
17880cat >>confdefs.h <<\_ACEOF
17881#define HAVE_CHROOT 1
17882_ACEOF
17883
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017884 { echo "$as_me:$LINENO: result: yes" >&5
17885echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017886else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017888sed 's/^/| /' conftest.$ac_ext >&5
17889
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017890 { echo "$as_me:$LINENO: result: no" >&5
17891echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017892
17893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894
17895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017896{ echo "$as_me:$LINENO: checking for link" >&5
17897echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017899/* confdefs.h. */
17900_ACEOF
17901cat confdefs.h >>conftest.$ac_ext
17902cat >>conftest.$ac_ext <<_ACEOF
17903/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017904#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017905int
17906main ()
17907{
17908void *x=link
17909 ;
17910 return 0;
17911}
17912_ACEOF
17913rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914if { (ac_try="$ac_compile"
17915case "(($ac_try" in
17916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17917 *) ac_try_echo=$ac_try;;
17918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017922 grep -v '^ *+' conftest.er1 >conftest.err
17923 rm -f conftest.er1
17924 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 (exit $ac_status); } && {
17927 test -z "$ac_c_werror_flag" ||
17928 test ! -s conftest.err
17929 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017930
17931cat >>confdefs.h <<\_ACEOF
17932#define HAVE_LINK 1
17933_ACEOF
17934
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017935 { echo "$as_me:$LINENO: result: yes" >&5
17936echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017939sed 's/^/| /' conftest.$ac_ext >&5
17940
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017941 { echo "$as_me:$LINENO: result: no" >&5
17942echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017943
17944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945
17946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017947{ echo "$as_me:$LINENO: checking for symlink" >&5
17948echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017949cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017950/* confdefs.h. */
17951_ACEOF
17952cat confdefs.h >>conftest.$ac_ext
17953cat >>conftest.$ac_ext <<_ACEOF
17954/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017955#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017956int
17957main ()
17958{
17959void *x=symlink
17960 ;
17961 return 0;
17962}
17963_ACEOF
17964rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965if { (ac_try="$ac_compile"
17966case "(($ac_try" in
17967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17968 *) ac_try_echo=$ac_try;;
17969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017973 grep -v '^ *+' conftest.er1 >conftest.err
17974 rm -f conftest.er1
17975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017977 (exit $ac_status); } && {
17978 test -z "$ac_c_werror_flag" ||
17979 test ! -s conftest.err
17980 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017981
17982cat >>confdefs.h <<\_ACEOF
17983#define HAVE_SYMLINK 1
17984_ACEOF
17985
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017986 { echo "$as_me:$LINENO: result: yes" >&5
17987echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017990sed 's/^/| /' conftest.$ac_ext >&5
17991
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017992 { echo "$as_me:$LINENO: result: no" >&5
17993echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017994
17995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017996
17997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017998{ echo "$as_me:$LINENO: checking for fchdir" >&5
17999echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018000cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018001/* confdefs.h. */
18002_ACEOF
18003cat confdefs.h >>conftest.$ac_ext
18004cat >>conftest.$ac_ext <<_ACEOF
18005/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018006#include <unistd.h>
18007int
18008main ()
18009{
18010void *x=fchdir
18011 ;
18012 return 0;
18013}
18014_ACEOF
18015rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016if { (ac_try="$ac_compile"
18017case "(($ac_try" in
18018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18019 *) ac_try_echo=$ac_try;;
18020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018024 grep -v '^ *+' conftest.er1 >conftest.err
18025 rm -f conftest.er1
18026 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028 (exit $ac_status); } && {
18029 test -z "$ac_c_werror_flag" ||
18030 test ! -s conftest.err
18031 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018032
18033cat >>confdefs.h <<\_ACEOF
18034#define HAVE_FCHDIR 1
18035_ACEOF
18036
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018037 { echo "$as_me:$LINENO: result: yes" >&5
18038echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018039else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018041sed 's/^/| /' conftest.$ac_ext >&5
18042
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018043 { echo "$as_me:$LINENO: result: no" >&5
18044echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018045
18046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047
18048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018049{ echo "$as_me:$LINENO: checking for fsync" >&5
18050echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018051cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018052/* confdefs.h. */
18053_ACEOF
18054cat confdefs.h >>conftest.$ac_ext
18055cat >>conftest.$ac_ext <<_ACEOF
18056/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018057#include <unistd.h>
18058int
18059main ()
18060{
18061void *x=fsync
18062 ;
18063 return 0;
18064}
18065_ACEOF
18066rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067if { (ac_try="$ac_compile"
18068case "(($ac_try" in
18069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18070 *) ac_try_echo=$ac_try;;
18071esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018075 grep -v '^ *+' conftest.er1 >conftest.err
18076 rm -f conftest.er1
18077 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079 (exit $ac_status); } && {
18080 test -z "$ac_c_werror_flag" ||
18081 test ! -s conftest.err
18082 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018083
18084cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018085#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018086_ACEOF
18087
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018088 { echo "$as_me:$LINENO: result: yes" >&5
18089echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018090else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018092sed 's/^/| /' conftest.$ac_ext >&5
18093
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018094 { echo "$as_me:$LINENO: result: no" >&5
18095echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018096
18097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098
18099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018100{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18101echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018103/* confdefs.h. */
18104_ACEOF
18105cat confdefs.h >>conftest.$ac_ext
18106cat >>conftest.$ac_ext <<_ACEOF
18107/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018108#include <unistd.h>
18109int
18110main ()
18111{
18112void *x=fdatasync
18113 ;
18114 return 0;
18115}
18116_ACEOF
18117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118if { (ac_try="$ac_compile"
18119case "(($ac_try" in
18120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18121 *) ac_try_echo=$ac_try;;
18122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018126 grep -v '^ *+' conftest.er1 >conftest.err
18127 rm -f conftest.er1
18128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130 (exit $ac_status); } && {
18131 test -z "$ac_c_werror_flag" ||
18132 test ! -s conftest.err
18133 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018134
18135cat >>confdefs.h <<\_ACEOF
18136#define HAVE_FDATASYNC 1
18137_ACEOF
18138
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018139 { echo "$as_me:$LINENO: result: yes" >&5
18140echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018143sed 's/^/| /' conftest.$ac_ext >&5
18144
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018145 { echo "$as_me:$LINENO: result: no" >&5
18146echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018147
18148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149
18150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018151{ echo "$as_me:$LINENO: checking for epoll" >&5
18152echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018153cat >conftest.$ac_ext <<_ACEOF
18154/* confdefs.h. */
18155_ACEOF
18156cat confdefs.h >>conftest.$ac_ext
18157cat >>conftest.$ac_ext <<_ACEOF
18158/* end confdefs.h. */
18159#include <sys/epoll.h>
18160int
18161main ()
18162{
18163void *x=epoll_create
18164 ;
18165 return 0;
18166}
18167_ACEOF
18168rm -f conftest.$ac_objext
18169if { (ac_try="$ac_compile"
18170case "(($ac_try" in
18171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18172 *) ac_try_echo=$ac_try;;
18173esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018175 (eval "$ac_compile") 2>conftest.er1
18176 ac_status=$?
18177 grep -v '^ *+' conftest.er1 >conftest.err
18178 rm -f conftest.er1
18179 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018181 (exit $ac_status); } && {
18182 test -z "$ac_c_werror_flag" ||
18183 test ! -s conftest.err
18184 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018185
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018186cat >>confdefs.h <<\_ACEOF
18187#define HAVE_EPOLL 1
18188_ACEOF
18189
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018190 { echo "$as_me:$LINENO: result: yes" >&5
18191echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018192else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018193 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018194sed 's/^/| /' conftest.$ac_ext >&5
18195
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018196 { echo "$as_me:$LINENO: result: no" >&5
18197echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018198
18199fi
18200
18201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018202{ echo "$as_me:$LINENO: checking for kqueue" >&5
18203echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018204cat >conftest.$ac_ext <<_ACEOF
18205/* confdefs.h. */
18206_ACEOF
18207cat confdefs.h >>conftest.$ac_ext
18208cat >>conftest.$ac_ext <<_ACEOF
18209/* end confdefs.h. */
18210
18211#include <sys/types.h>
18212#include <sys/event.h>
18213
18214int
18215main ()
18216{
18217int x=kqueue()
18218 ;
18219 return 0;
18220}
18221_ACEOF
18222rm -f conftest.$ac_objext
18223if { (ac_try="$ac_compile"
18224case "(($ac_try" in
18225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18226 *) ac_try_echo=$ac_try;;
18227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018229 (eval "$ac_compile") 2>conftest.er1
18230 ac_status=$?
18231 grep -v '^ *+' conftest.er1 >conftest.err
18232 rm -f conftest.er1
18233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018235 (exit $ac_status); } && {
18236 test -z "$ac_c_werror_flag" ||
18237 test ! -s conftest.err
18238 } && test -s conftest.$ac_objext; then
18239
18240cat >>confdefs.h <<\_ACEOF
18241#define HAVE_KQUEUE 1
18242_ACEOF
18243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018244 { echo "$as_me:$LINENO: result: yes" >&5
18245echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018247 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018248sed 's/^/| /' conftest.$ac_ext >&5
18249
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018250 { echo "$as_me:$LINENO: result: no" >&5
18251echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018252
18253fi
18254
18255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018256# On some systems (eg. FreeBSD 5), we would find a definition of the
18257# functions ctermid_r, setgroups in the library, but no prototype
18258# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18259# address to avoid compiler warnings and potential miscompilations
18260# because of the missing prototypes.
18261
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018262{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18263echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018264cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018265/* confdefs.h. */
18266_ACEOF
18267cat confdefs.h >>conftest.$ac_ext
18268cat >>conftest.$ac_ext <<_ACEOF
18269/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018270
18271#include "confdefs.h"
18272#include <stdio.h>
18273
Martin v. Löwisd5843682002-11-21 20:41:28 +000018274int
18275main ()
18276{
18277void* p = ctermid_r
18278 ;
18279 return 0;
18280}
18281_ACEOF
18282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018283if { (ac_try="$ac_compile"
18284case "(($ac_try" in
18285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18286 *) ac_try_echo=$ac_try;;
18287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018291 grep -v '^ *+' conftest.er1 >conftest.err
18292 rm -f conftest.er1
18293 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018295 (exit $ac_status); } && {
18296 test -z "$ac_c_werror_flag" ||
18297 test ! -s conftest.err
18298 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018299
18300cat >>confdefs.h <<\_ACEOF
18301#define HAVE_CTERMID_R 1
18302_ACEOF
18303
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018304 { echo "$as_me:$LINENO: result: yes" >&5
18305echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018306else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018308sed 's/^/| /' conftest.$ac_ext >&5
18309
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018310 { echo "$as_me:$LINENO: result: no" >&5
18311echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018312
18313fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18316
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018317{ echo "$as_me:$LINENO: checking for flock" >&5
18318echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018320/* confdefs.h. */
18321_ACEOF
18322cat confdefs.h >>conftest.$ac_ext
18323cat >>conftest.$ac_ext <<_ACEOF
18324/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018325
18326#include "confdefs.h"
18327#include <sys/file.h>
18328
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018329int
18330main ()
18331{
18332void* p = flock
18333 ;
18334 return 0;
18335}
18336_ACEOF
18337rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018338if { (ac_try="$ac_compile"
18339case "(($ac_try" in
18340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18341 *) ac_try_echo=$ac_try;;
18342esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018346 grep -v '^ *+' conftest.er1 >conftest.err
18347 rm -f conftest.er1
18348 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018350 (exit $ac_status); } && {
18351 test -z "$ac_c_werror_flag" ||
18352 test ! -s conftest.err
18353 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018354
18355cat >>confdefs.h <<\_ACEOF
18356#define HAVE_FLOCK 1
18357_ACEOF
18358
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018359 { echo "$as_me:$LINENO: result: yes" >&5
18360echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018361else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018363sed 's/^/| /' conftest.$ac_ext >&5
18364
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018365 { echo "$as_me:$LINENO: result: no" >&5
18366echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018367
18368fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18371
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018372{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18373echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018375/* confdefs.h. */
18376_ACEOF
18377cat confdefs.h >>conftest.$ac_ext
18378cat >>conftest.$ac_ext <<_ACEOF
18379/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018380
18381#include "confdefs.h"
18382#include <unistd.h>
18383
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018384int
18385main ()
18386{
18387void* p = getpagesize
18388 ;
18389 return 0;
18390}
18391_ACEOF
18392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018393if { (ac_try="$ac_compile"
18394case "(($ac_try" in
18395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18396 *) ac_try_echo=$ac_try;;
18397esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018401 grep -v '^ *+' conftest.er1 >conftest.err
18402 rm -f conftest.er1
18403 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 (exit $ac_status); } && {
18406 test -z "$ac_c_werror_flag" ||
18407 test ! -s conftest.err
18408 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018409
18410cat >>confdefs.h <<\_ACEOF
18411#define HAVE_GETPAGESIZE 1
18412_ACEOF
18413
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018414 { echo "$as_me:$LINENO: result: yes" >&5
18415echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018418sed 's/^/| /' conftest.$ac_ext >&5
18419
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018420 { echo "$as_me:$LINENO: result: no" >&5
18421echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018422
18423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018424
18425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018426
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018427for ac_prog in true
18428do
18429 # Extract the first word of "$ac_prog", so it can be a program name with args.
18430set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018431{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18432echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018433if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018434 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018435else
18436 if test -n "$TRUE"; then
18437 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18438else
18439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18440for as_dir in $PATH
18441do
18442 IFS=$as_save_IFS
18443 test -z "$as_dir" && as_dir=.
18444 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445 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 +000018446 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018447 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018448 break 2
18449 fi
18450done
18451done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018453
18454fi
18455fi
18456TRUE=$ac_cv_prog_TRUE
18457if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018458 { echo "$as_me:$LINENO: result: $TRUE" >&5
18459echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018460else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018461 { echo "$as_me:$LINENO: result: no" >&5
18462echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018463fi
18464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018466 test -n "$TRUE" && break
18467done
18468test -n "$TRUE" || TRUE="/bin/true"
18469
18470
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018471{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18472echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018473if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018474 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018475else
18476 ac_check_lib_save_LIBS=$LIBS
18477LIBS="-lc $LIBS"
18478cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018479/* confdefs.h. */
18480_ACEOF
18481cat confdefs.h >>conftest.$ac_ext
18482cat >>conftest.$ac_ext <<_ACEOF
18483/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018485/* Override any GCC internal prototype to avoid an error.
18486 Use char because int might match the return type of a GCC
18487 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018488#ifdef __cplusplus
18489extern "C"
18490#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018491char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018492int
18493main ()
18494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018496 ;
18497 return 0;
18498}
18499_ACEOF
18500rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501if { (ac_try="$ac_link"
18502case "(($ac_try" in
18503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18504 *) ac_try_echo=$ac_try;;
18505esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018507 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018509 grep -v '^ *+' conftest.er1 >conftest.err
18510 rm -f conftest.er1
18511 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513 (exit $ac_status); } && {
18514 test -z "$ac_c_werror_flag" ||
18515 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018516 } && test -s conftest$ac_exeext &&
18517 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018518 ac_cv_lib_c_inet_aton=yes
18519else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018521sed 's/^/| /' conftest.$ac_ext >&5
18522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525
18526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018527 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018528LIBS=$ac_check_lib_save_LIBS
18529fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018530{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18531echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18532if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018533 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018534else
18535
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018536{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18537echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018538if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018539 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018540else
18541 ac_check_lib_save_LIBS=$LIBS
18542LIBS="-lresolv $LIBS"
18543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018544/* confdefs.h. */
18545_ACEOF
18546cat confdefs.h >>conftest.$ac_ext
18547cat >>conftest.$ac_ext <<_ACEOF
18548/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018550/* Override any GCC internal prototype to avoid an error.
18551 Use char because int might match the return type of a GCC
18552 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018553#ifdef __cplusplus
18554extern "C"
18555#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018556char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018557int
18558main ()
18559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018561 ;
18562 return 0;
18563}
18564_ACEOF
18565rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566if { (ac_try="$ac_link"
18567case "(($ac_try" in
18568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18569 *) ac_try_echo=$ac_try;;
18570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018572 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018574 grep -v '^ *+' conftest.er1 >conftest.err
18575 rm -f conftest.er1
18576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578 (exit $ac_status); } && {
18579 test -z "$ac_c_werror_flag" ||
18580 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018581 } && test -s conftest$ac_exeext &&
18582 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018583 ac_cv_lib_resolv_inet_aton=yes
18584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018586sed 's/^/| /' conftest.$ac_ext >&5
18587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018588 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590
18591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018593LIBS=$ac_check_lib_save_LIBS
18594fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018595{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18596echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18597if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018598 cat >>confdefs.h <<_ACEOF
18599#define HAVE_LIBRESOLV 1
18600_ACEOF
18601
18602 LIBS="-lresolv $LIBS"
18603
18604fi
18605
18606
18607fi
18608
18609
Christian Heimesd0764e22007-12-04 15:00:33 +000018610# On Tru64, chflags seems to be present, but calling it will
18611# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018612{ echo "$as_me:$LINENO: checking for chflags" >&5
18613echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018614if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018615 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018616else
18617 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018618 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018619else
18620 cat >conftest.$ac_ext <<_ACEOF
18621/* confdefs.h. */
18622_ACEOF
18623cat confdefs.h >>conftest.$ac_ext
18624cat >>conftest.$ac_ext <<_ACEOF
18625/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018626[
Christian Heimesd0764e22007-12-04 15:00:33 +000018627#include <sys/stat.h>
18628#include <unistd.h>
18629int main(int argc, char*argv[])
18630{
18631 if(chflags(argv[0], 0) != 0)
18632 return 1;
18633 return 0;
18634}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018635]
Christian Heimesd0764e22007-12-04 15:00:33 +000018636_ACEOF
18637rm -f conftest$ac_exeext
18638if { (ac_try="$ac_link"
18639case "(($ac_try" in
18640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18641 *) ac_try_echo=$ac_try;;
18642esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018644 (eval "$ac_link") 2>&5
18645 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18648 { (case "(($ac_try" in
18649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18650 *) ac_try_echo=$ac_try;;
18651esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018653 (eval "$ac_try") 2>&5
18654 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018656 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018657 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018658else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018659 echo "$as_me: program exited with status $ac_status" >&5
18660echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018661sed 's/^/| /' conftest.$ac_ext >&5
18662
18663( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018664ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018665fi
18666rm -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 +000018667fi
18668
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018669
18670
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018671fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018672{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18673echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018674if test "$ac_cv_have_chflags" = cross ; then
18675 { echo "$as_me:$LINENO: checking for chflags" >&5
18676echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18677if test "${ac_cv_func_chflags+set}" = set; then
18678 echo $ECHO_N "(cached) $ECHO_C" >&6
18679else
18680 cat >conftest.$ac_ext <<_ACEOF
18681/* confdefs.h. */
18682_ACEOF
18683cat confdefs.h >>conftest.$ac_ext
18684cat >>conftest.$ac_ext <<_ACEOF
18685/* end confdefs.h. */
18686/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18687 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18688#define chflags innocuous_chflags
18689
18690/* System header to define __stub macros and hopefully few prototypes,
18691 which can conflict with char chflags (); below.
18692 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18693 <limits.h> exists even on freestanding compilers. */
18694
18695#ifdef __STDC__
18696# include <limits.h>
18697#else
18698# include <assert.h>
18699#endif
18700
18701#undef chflags
18702
18703/* Override any GCC internal prototype to avoid an error.
18704 Use char because int might match the return type of a GCC
18705 builtin and then its argument prototype would still apply. */
18706#ifdef __cplusplus
18707extern "C"
18708#endif
18709char chflags ();
18710/* The GNU C library defines this for functions which it implements
18711 to always fail with ENOSYS. Some functions are actually named
18712 something starting with __ and the normal name is an alias. */
18713#if defined __stub_chflags || defined __stub___chflags
18714choke me
18715#endif
18716
18717int
18718main ()
18719{
18720return chflags ();
18721 ;
18722 return 0;
18723}
18724_ACEOF
18725rm -f conftest.$ac_objext conftest$ac_exeext
18726if { (ac_try="$ac_link"
18727case "(($ac_try" in
18728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18729 *) ac_try_echo=$ac_try;;
18730esac
18731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18732 (eval "$ac_link") 2>conftest.er1
18733 ac_status=$?
18734 grep -v '^ *+' conftest.er1 >conftest.err
18735 rm -f conftest.er1
18736 cat conftest.err >&5
18737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18738 (exit $ac_status); } && {
18739 test -z "$ac_c_werror_flag" ||
18740 test ! -s conftest.err
18741 } && test -s conftest$ac_exeext &&
18742 $as_test_x conftest$ac_exeext; then
18743 ac_cv_func_chflags=yes
18744else
18745 echo "$as_me: failed program was:" >&5
18746sed 's/^/| /' conftest.$ac_ext >&5
18747
18748 ac_cv_func_chflags=no
18749fi
18750
18751rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18752 conftest$ac_exeext conftest.$ac_ext
18753fi
18754{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18755echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18756if test $ac_cv_func_chflags = yes; then
18757 ac_cv_have_chflags="yes"
18758else
18759 ac_cv_have_chflags="no"
18760fi
18761
18762fi
18763if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018764
18765cat >>confdefs.h <<\_ACEOF
18766#define HAVE_CHFLAGS 1
18767_ACEOF
18768
18769fi
18770
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018771{ echo "$as_me:$LINENO: checking for lchflags" >&5
18772echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018773if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018774 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018775else
18776 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018777 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018778else
18779 cat >conftest.$ac_ext <<_ACEOF
18780/* confdefs.h. */
18781_ACEOF
18782cat confdefs.h >>conftest.$ac_ext
18783cat >>conftest.$ac_ext <<_ACEOF
18784/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018785[
Christian Heimesd0764e22007-12-04 15:00:33 +000018786#include <sys/stat.h>
18787#include <unistd.h>
18788int main(int argc, char*argv[])
18789{
18790 if(lchflags(argv[0], 0) != 0)
18791 return 1;
18792 return 0;
18793}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018794]
Christian Heimesd0764e22007-12-04 15:00:33 +000018795_ACEOF
18796rm -f conftest$ac_exeext
18797if { (ac_try="$ac_link"
18798case "(($ac_try" in
18799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18800 *) ac_try_echo=$ac_try;;
18801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018803 (eval "$ac_link") 2>&5
18804 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18807 { (case "(($ac_try" in
18808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18809 *) ac_try_echo=$ac_try;;
18810esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018812 (eval "$ac_try") 2>&5
18813 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018815 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018816 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018817else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018818 echo "$as_me: program exited with status $ac_status" >&5
18819echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018820sed 's/^/| /' conftest.$ac_ext >&5
18821
18822( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018823ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018824fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18826fi
18827
18828
Christian Heimesd0764e22007-12-04 15:00:33 +000018829
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018830fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018831{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18832echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018833if test "$ac_cv_have_lchflags" = cross ; then
18834 { echo "$as_me:$LINENO: checking for lchflags" >&5
18835echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18836if test "${ac_cv_func_lchflags+set}" = set; then
18837 echo $ECHO_N "(cached) $ECHO_C" >&6
18838else
18839 cat >conftest.$ac_ext <<_ACEOF
18840/* confdefs.h. */
18841_ACEOF
18842cat confdefs.h >>conftest.$ac_ext
18843cat >>conftest.$ac_ext <<_ACEOF
18844/* end confdefs.h. */
18845/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18846 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18847#define lchflags innocuous_lchflags
18848
18849/* System header to define __stub macros and hopefully few prototypes,
18850 which can conflict with char lchflags (); below.
18851 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18852 <limits.h> exists even on freestanding compilers. */
18853
18854#ifdef __STDC__
18855# include <limits.h>
18856#else
18857# include <assert.h>
18858#endif
18859
18860#undef lchflags
18861
18862/* Override any GCC internal prototype to avoid an error.
18863 Use char because int might match the return type of a GCC
18864 builtin and then its argument prototype would still apply. */
18865#ifdef __cplusplus
18866extern "C"
18867#endif
18868char lchflags ();
18869/* The GNU C library defines this for functions which it implements
18870 to always fail with ENOSYS. Some functions are actually named
18871 something starting with __ and the normal name is an alias. */
18872#if defined __stub_lchflags || defined __stub___lchflags
18873choke me
18874#endif
18875
18876int
18877main ()
18878{
18879return lchflags ();
18880 ;
18881 return 0;
18882}
18883_ACEOF
18884rm -f conftest.$ac_objext conftest$ac_exeext
18885if { (ac_try="$ac_link"
18886case "(($ac_try" in
18887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18888 *) ac_try_echo=$ac_try;;
18889esac
18890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18891 (eval "$ac_link") 2>conftest.er1
18892 ac_status=$?
18893 grep -v '^ *+' conftest.er1 >conftest.err
18894 rm -f conftest.er1
18895 cat conftest.err >&5
18896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18897 (exit $ac_status); } && {
18898 test -z "$ac_c_werror_flag" ||
18899 test ! -s conftest.err
18900 } && test -s conftest$ac_exeext &&
18901 $as_test_x conftest$ac_exeext; then
18902 ac_cv_func_lchflags=yes
18903else
18904 echo "$as_me: failed program was:" >&5
18905sed 's/^/| /' conftest.$ac_ext >&5
18906
18907 ac_cv_func_lchflags=no
18908fi
18909
18910rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18911 conftest$ac_exeext conftest.$ac_ext
18912fi
18913{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18914echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18915if test $ac_cv_func_lchflags = yes; then
18916 ac_cv_have_lchflags="yes"
18917else
18918 ac_cv_have_lchflags="no"
18919fi
18920
18921fi
18922if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018923
18924cat >>confdefs.h <<\_ACEOF
18925#define HAVE_LCHFLAGS 1
18926_ACEOF
18927
18928fi
18929
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018930case $ac_sys_system/$ac_sys_release in
18931Darwin/*)
18932 _CUR_CFLAGS="${CFLAGS}"
18933 _CUR_LDFLAGS="${LDFLAGS}"
18934 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18935 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18936 ;;
18937esac
18938
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018939{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18940echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018941if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018942 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018943else
18944 ac_check_lib_save_LIBS=$LIBS
18945LIBS="-lz $LIBS"
18946cat >conftest.$ac_ext <<_ACEOF
18947/* confdefs.h. */
18948_ACEOF
18949cat confdefs.h >>conftest.$ac_ext
18950cat >>conftest.$ac_ext <<_ACEOF
18951/* end confdefs.h. */
18952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018953/* Override any GCC internal prototype to avoid an error.
18954 Use char because int might match the return type of a GCC
18955 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018956#ifdef __cplusplus
18957extern "C"
18958#endif
18959char inflateCopy ();
18960int
18961main ()
18962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018963return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018964 ;
18965 return 0;
18966}
18967_ACEOF
18968rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018969if { (ac_try="$ac_link"
18970case "(($ac_try" in
18971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18972 *) ac_try_echo=$ac_try;;
18973esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018975 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018976 ac_status=$?
18977 grep -v '^ *+' conftest.er1 >conftest.err
18978 rm -f conftest.er1
18979 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018981 (exit $ac_status); } && {
18982 test -z "$ac_c_werror_flag" ||
18983 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018984 } && test -s conftest$ac_exeext &&
18985 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018986 ac_cv_lib_z_inflateCopy=yes
18987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018988 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018989sed 's/^/| /' conftest.$ac_ext >&5
18990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018991 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018993
18994rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018995 conftest$ac_exeext conftest.$ac_ext
18996LIBS=$ac_check_lib_save_LIBS
18997fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018998{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18999echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19000if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019001
19002cat >>confdefs.h <<\_ACEOF
19003#define HAVE_ZLIB_COPY 1
19004_ACEOF
19005
19006fi
19007
19008
19009case $ac_sys_system/$ac_sys_release in
19010Darwin/*)
19011 CFLAGS="${_CUR_CFLAGS}"
19012 LDFLAGS="${_CUR_LDFLAGS}"
19013 ;;
19014esac
19015
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019016{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19017echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019019/* confdefs.h. */
19020_ACEOF
19021cat confdefs.h >>conftest.$ac_ext
19022cat >>conftest.$ac_ext <<_ACEOF
19023/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019024
19025#include "confdefs.h"
19026#include <netdb.h>
19027
Martin v. Löwise9416172003-05-03 10:12:45 +000019028int
19029main ()
19030{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019031void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019032 ;
19033 return 0;
19034}
19035_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019036rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019037if { (ac_try="$ac_link"
19038case "(($ac_try" in
19039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19040 *) ac_try_echo=$ac_try;;
19041esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019043 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019045 grep -v '^ *+' conftest.er1 >conftest.err
19046 rm -f conftest.er1
19047 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019049 (exit $ac_status); } && {
19050 test -z "$ac_c_werror_flag" ||
19051 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019052 } && test -s conftest$ac_exeext &&
19053 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019054
19055cat >>confdefs.h <<\_ACEOF
19056#define HAVE_HSTRERROR 1
19057_ACEOF
19058
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019059 { echo "$as_me:$LINENO: result: yes" >&5
19060echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019061else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019063sed 's/^/| /' conftest.$ac_ext >&5
19064
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019065 { echo "$as_me:$LINENO: result: no" >&5
19066echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019067
19068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019069
19070rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019072
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019073{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19074echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019076/* confdefs.h. */
19077_ACEOF
19078cat confdefs.h >>conftest.$ac_ext
19079cat >>conftest.$ac_ext <<_ACEOF
19080/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019081
19082#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019083#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019084#include <sys/socket.h>
19085#include <netinet/in.h>
19086#include <arpa/inet.h>
19087
Martin v. Löwise9416172003-05-03 10:12:45 +000019088int
19089main ()
19090{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019091void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019092 ;
19093 return 0;
19094}
19095_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019096rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019097if { (ac_try="$ac_link"
19098case "(($ac_try" in
19099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19100 *) ac_try_echo=$ac_try;;
19101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019103 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019105 grep -v '^ *+' conftest.er1 >conftest.err
19106 rm -f conftest.er1
19107 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019109 (exit $ac_status); } && {
19110 test -z "$ac_c_werror_flag" ||
19111 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019112 } && test -s conftest$ac_exeext &&
19113 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019114
19115cat >>confdefs.h <<\_ACEOF
19116#define HAVE_INET_ATON 1
19117_ACEOF
19118
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019119 { echo "$as_me:$LINENO: result: yes" >&5
19120echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019121else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019123sed 's/^/| /' conftest.$ac_ext >&5
19124
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019125 { echo "$as_me:$LINENO: result: no" >&5
19126echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019127
19128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019129
19130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019132
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019133{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19134echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019135cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019136/* confdefs.h. */
19137_ACEOF
19138cat confdefs.h >>conftest.$ac_ext
19139cat >>conftest.$ac_ext <<_ACEOF
19140/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019141
19142#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019143#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019144#include <sys/socket.h>
19145#include <netinet/in.h>
19146#include <arpa/inet.h>
19147
Martin v. Löwise9416172003-05-03 10:12:45 +000019148int
19149main ()
19150{
19151void* p = inet_pton
19152 ;
19153 return 0;
19154}
19155_ACEOF
19156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019157if { (ac_try="$ac_compile"
19158case "(($ac_try" in
19159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19160 *) ac_try_echo=$ac_try;;
19161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019165 grep -v '^ *+' conftest.er1 >conftest.err
19166 rm -f conftest.er1
19167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019169 (exit $ac_status); } && {
19170 test -z "$ac_c_werror_flag" ||
19171 test ! -s conftest.err
19172 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019173
19174cat >>confdefs.h <<\_ACEOF
19175#define HAVE_INET_PTON 1
19176_ACEOF
19177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019178 { echo "$as_me:$LINENO: result: yes" >&5
19179echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019180else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019182sed 's/^/| /' conftest.$ac_ext >&5
19183
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019184 { echo "$as_me:$LINENO: result: no" >&5
19185echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019186
19187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019188
19189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019190
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019191# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019192{ echo "$as_me:$LINENO: checking for setgroups" >&5
19193echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019195/* confdefs.h. */
19196_ACEOF
19197cat confdefs.h >>conftest.$ac_ext
19198cat >>conftest.$ac_ext <<_ACEOF
19199/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019200
19201#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019202#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019203#ifdef HAVE_GRP_H
19204#include <grp.h>
19205#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019206
Martin v. Löwisd5843682002-11-21 20:41:28 +000019207int
19208main ()
19209{
19210void* p = setgroups
19211 ;
19212 return 0;
19213}
19214_ACEOF
19215rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019216if { (ac_try="$ac_compile"
19217case "(($ac_try" in
19218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19219 *) ac_try_echo=$ac_try;;
19220esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019224 grep -v '^ *+' conftest.er1 >conftest.err
19225 rm -f conftest.er1
19226 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019228 (exit $ac_status); } && {
19229 test -z "$ac_c_werror_flag" ||
19230 test ! -s conftest.err
19231 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019232
19233cat >>confdefs.h <<\_ACEOF
19234#define HAVE_SETGROUPS 1
19235_ACEOF
19236
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019237 { echo "$as_me:$LINENO: result: yes" >&5
19238echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019239else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019241sed 's/^/| /' conftest.$ac_ext >&5
19242
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019243 { echo "$as_me:$LINENO: result: no" >&5
19244echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019245
19246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019247
19248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019249
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019250# check for openpty and forkpty
19251
Martin v. Löwis11437992002-04-12 09:54:03 +000019252
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019253for ac_func in openpty
19254do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019255as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19256{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19257echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019258if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019260else
Martin v. Löwis11437992002-04-12 09:54:03 +000019261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019262/* confdefs.h. */
19263_ACEOF
19264cat confdefs.h >>conftest.$ac_ext
19265cat >>conftest.$ac_ext <<_ACEOF
19266/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019267/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19269#define $ac_func innocuous_$ac_func
19270
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019271/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019272 which can conflict with char $ac_func (); below.
19273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019274 <limits.h> exists even on freestanding compilers. */
19275
19276#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019277# include <limits.h>
19278#else
19279# include <assert.h>
19280#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019281
19282#undef $ac_func
19283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019284/* Override any GCC internal prototype to avoid an error.
19285 Use char because int might match the return type of a GCC
19286 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019287#ifdef __cplusplus
19288extern "C"
19289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019290char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019291/* The GNU C library defines this for functions which it implements
19292 to always fail with ENOSYS. Some functions are actually named
19293 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019294#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019295choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019296#endif
19297
Skip Montanaro6dead952003-09-25 14:50:04 +000019298int
19299main ()
19300{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019301return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019302 ;
19303 return 0;
19304}
19305_ACEOF
19306rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019307if { (ac_try="$ac_link"
19308case "(($ac_try" in
19309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19310 *) ac_try_echo=$ac_try;;
19311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019313 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019315 grep -v '^ *+' conftest.er1 >conftest.err
19316 rm -f conftest.er1
19317 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019319 (exit $ac_status); } && {
19320 test -z "$ac_c_werror_flag" ||
19321 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019322 } && test -s conftest$ac_exeext &&
19323 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019325else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019327sed 's/^/| /' conftest.$ac_ext >&5
19328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019329 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019331
19332rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019333 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019334fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019335ac_res=`eval echo '${'$as_ac_var'}'`
19336 { echo "$as_me:$LINENO: result: $ac_res" >&5
19337echo "${ECHO_T}$ac_res" >&6; }
19338if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019339 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019340#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019341_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019344 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19345echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019346if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019347 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019348else
Martin v. Löwis11437992002-04-12 09:54:03 +000019349 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019350LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019352/* confdefs.h. */
19353_ACEOF
19354cat confdefs.h >>conftest.$ac_ext
19355cat >>conftest.$ac_ext <<_ACEOF
19356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019358/* Override any GCC internal prototype to avoid an error.
19359 Use char because int might match the return type of a GCC
19360 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019361#ifdef __cplusplus
19362extern "C"
19363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019364char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019365int
19366main ()
19367{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019368return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019369 ;
19370 return 0;
19371}
19372_ACEOF
19373rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019374if { (ac_try="$ac_link"
19375case "(($ac_try" in
19376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19377 *) ac_try_echo=$ac_try;;
19378esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019380 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019382 grep -v '^ *+' conftest.er1 >conftest.err
19383 rm -f conftest.er1
19384 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019386 (exit $ac_status); } && {
19387 test -z "$ac_c_werror_flag" ||
19388 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019389 } && test -s conftest$ac_exeext &&
19390 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019391 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019392else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019394sed 's/^/| /' conftest.$ac_ext >&5
19395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019396 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019398
19399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019401LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019402fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019403{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19404echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19405if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019406 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019407#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019408_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019409 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019410else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019411 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19412echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019413if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019414 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019415else
19416 ac_check_lib_save_LIBS=$LIBS
19417LIBS="-lbsd $LIBS"
19418cat >conftest.$ac_ext <<_ACEOF
19419/* confdefs.h. */
19420_ACEOF
19421cat confdefs.h >>conftest.$ac_ext
19422cat >>conftest.$ac_ext <<_ACEOF
19423/* end confdefs.h. */
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öwisfd9a72a2006-01-08 10:07:33 +000019428#ifdef __cplusplus
19429extern "C"
19430#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019431char openpty ();
19432int
19433main ()
19434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019435return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019436 ;
19437 return 0;
19438}
19439_ACEOF
19440rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019441if { (ac_try="$ac_link"
19442case "(($ac_try" in
19443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19444 *) ac_try_echo=$ac_try;;
19445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019447 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019448 ac_status=$?
19449 grep -v '^ *+' conftest.er1 >conftest.err
19450 rm -f conftest.er1
19451 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019453 (exit $ac_status); } && {
19454 test -z "$ac_c_werror_flag" ||
19455 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019456 } && test -s conftest$ac_exeext &&
19457 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019458 ac_cv_lib_bsd_openpty=yes
19459else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019460 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019461sed 's/^/| /' conftest.$ac_ext >&5
19462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019463 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019465
19466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019467 conftest$ac_exeext conftest.$ac_ext
19468LIBS=$ac_check_lib_save_LIBS
19469fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019470{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19471echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19472if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019473 cat >>confdefs.h <<\_ACEOF
19474#define HAVE_OPENPTY 1
19475_ACEOF
19476 LIBS="$LIBS -lbsd"
19477fi
19478
19479
19480fi
19481
Fred Drake8cef4cf2000-06-28 16:40:38 +000019482
19483fi
19484done
19485
Martin v. Löwis11437992002-04-12 09:54:03 +000019486
Fred Drake8cef4cf2000-06-28 16:40:38 +000019487for ac_func in forkpty
19488do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019489as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19490{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19491echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019492if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019493 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019494else
Martin v. Löwis11437992002-04-12 09:54:03 +000019495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019496/* confdefs.h. */
19497_ACEOF
19498cat confdefs.h >>conftest.$ac_ext
19499cat >>conftest.$ac_ext <<_ACEOF
19500/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019501/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19502 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19503#define $ac_func innocuous_$ac_func
19504
Fred Drake8cef4cf2000-06-28 16:40:38 +000019505/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019506 which can conflict with char $ac_func (); below.
19507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019508 <limits.h> exists even on freestanding compilers. */
19509
19510#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019511# include <limits.h>
19512#else
19513# include <assert.h>
19514#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019515
19516#undef $ac_func
19517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019518/* Override any GCC internal prototype to avoid an error.
19519 Use char because int might match the return type of a GCC
19520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019521#ifdef __cplusplus
19522extern "C"
19523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019524char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019525/* The GNU C library defines this for functions which it implements
19526 to always fail with ENOSYS. Some functions are actually named
19527 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019528#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019529choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019530#endif
19531
Skip Montanaro6dead952003-09-25 14:50:04 +000019532int
19533main ()
19534{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019535return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019536 ;
19537 return 0;
19538}
19539_ACEOF
19540rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019541if { (ac_try="$ac_link"
19542case "(($ac_try" in
19543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19544 *) ac_try_echo=$ac_try;;
19545esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019547 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019549 grep -v '^ *+' conftest.er1 >conftest.err
19550 rm -f conftest.er1
19551 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019553 (exit $ac_status); } && {
19554 test -z "$ac_c_werror_flag" ||
19555 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019556 } && test -s conftest$ac_exeext &&
19557 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019559else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019561sed 's/^/| /' conftest.$ac_ext >&5
19562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019563 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019565
19566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019567 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019568fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019569ac_res=`eval echo '${'$as_ac_var'}'`
19570 { echo "$as_me:$LINENO: result: $ac_res" >&5
19571echo "${ECHO_T}$ac_res" >&6; }
19572if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019573 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019574#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019575_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019576
Fred Drake8cef4cf2000-06-28 16:40:38 +000019577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019578 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19579echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019580if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019581 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019582else
Martin v. Löwis11437992002-04-12 09:54:03 +000019583 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019584LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019585cat >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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019592/* Override any GCC internal prototype to avoid an error.
19593 Use char because int might match the return type of a GCC
19594 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019595#ifdef __cplusplus
19596extern "C"
19597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019598char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019599int
19600main ()
19601{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019602return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019603 ;
19604 return 0;
19605}
19606_ACEOF
19607rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019608if { (ac_try="$ac_link"
19609case "(($ac_try" in
19610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19611 *) ac_try_echo=$ac_try;;
19612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019614 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019616 grep -v '^ *+' conftest.er1 >conftest.err
19617 rm -f conftest.er1
19618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019620 (exit $ac_status); } && {
19621 test -z "$ac_c_werror_flag" ||
19622 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019623 } && test -s conftest$ac_exeext &&
19624 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019625 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019626else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019628sed 's/^/| /' conftest.$ac_ext >&5
19629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019630 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019632
19633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019635LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019636fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019637{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19638echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19639if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019641#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019642_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019643 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019644else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019645 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19646echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019647if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019648 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019649else
19650 ac_check_lib_save_LIBS=$LIBS
19651LIBS="-lbsd $LIBS"
19652cat >conftest.$ac_ext <<_ACEOF
19653/* confdefs.h. */
19654_ACEOF
19655cat confdefs.h >>conftest.$ac_ext
19656cat >>conftest.$ac_ext <<_ACEOF
19657/* end confdefs.h. */
19658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019659/* Override any GCC internal prototype to avoid an error.
19660 Use char because int might match the return type of a GCC
19661 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019662#ifdef __cplusplus
19663extern "C"
19664#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019665char forkpty ();
19666int
19667main ()
19668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019669return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019670 ;
19671 return 0;
19672}
19673_ACEOF
19674rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019675if { (ac_try="$ac_link"
19676case "(($ac_try" in
19677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19678 *) ac_try_echo=$ac_try;;
19679esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019681 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019682 ac_status=$?
19683 grep -v '^ *+' conftest.er1 >conftest.err
19684 rm -f conftest.er1
19685 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019687 (exit $ac_status); } && {
19688 test -z "$ac_c_werror_flag" ||
19689 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019690 } && test -s conftest$ac_exeext &&
19691 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019692 ac_cv_lib_bsd_forkpty=yes
19693else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019694 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019695sed 's/^/| /' conftest.$ac_ext >&5
19696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019697 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019699
19700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019701 conftest$ac_exeext conftest.$ac_ext
19702LIBS=$ac_check_lib_save_LIBS
19703fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019704{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19705echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19706if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019707 cat >>confdefs.h <<\_ACEOF
19708#define HAVE_FORKPTY 1
19709_ACEOF
19710 LIBS="$LIBS -lbsd"
19711fi
19712
19713
19714fi
19715
Fred Drake8cef4cf2000-06-28 16:40:38 +000019716
19717fi
19718done
19719
Jack Jansendd19cf82001-12-06 22:36:17 +000019720
Christian Heimesb186d002008-03-18 15:15:01 +000019721# Stuff for expat.
19722
19723for ac_func in memmove
19724do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019725as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19726{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19727echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019728if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019729 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019730else
19731 cat >conftest.$ac_ext <<_ACEOF
19732/* confdefs.h. */
19733_ACEOF
19734cat confdefs.h >>conftest.$ac_ext
19735cat >>conftest.$ac_ext <<_ACEOF
19736/* end confdefs.h. */
19737/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19738 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19739#define $ac_func innocuous_$ac_func
19740
19741/* System header to define __stub macros and hopefully few prototypes,
19742 which can conflict with char $ac_func (); below.
19743 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19744 <limits.h> exists even on freestanding compilers. */
19745
19746#ifdef __STDC__
19747# include <limits.h>
19748#else
19749# include <assert.h>
19750#endif
19751
19752#undef $ac_func
19753
19754/* Override any GCC internal prototype to avoid an error.
19755 Use char because int might match the return type of a GCC
19756 builtin and then its argument prototype would still apply. */
19757#ifdef __cplusplus
19758extern "C"
19759#endif
19760char $ac_func ();
19761/* The GNU C library defines this for functions which it implements
19762 to always fail with ENOSYS. Some functions are actually named
19763 something starting with __ and the normal name is an alias. */
19764#if defined __stub_$ac_func || defined __stub___$ac_func
19765choke me
19766#endif
19767
19768int
19769main ()
19770{
19771return $ac_func ();
19772 ;
19773 return 0;
19774}
19775_ACEOF
19776rm -f conftest.$ac_objext conftest$ac_exeext
19777if { (ac_try="$ac_link"
19778case "(($ac_try" in
19779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19780 *) ac_try_echo=$ac_try;;
19781esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019783 (eval "$ac_link") 2>conftest.er1
19784 ac_status=$?
19785 grep -v '^ *+' conftest.er1 >conftest.err
19786 rm -f conftest.er1
19787 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019789 (exit $ac_status); } && {
19790 test -z "$ac_c_werror_flag" ||
19791 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019792 } && test -s conftest$ac_exeext &&
19793 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019794 eval "$as_ac_var=yes"
19795else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019796 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019797sed 's/^/| /' conftest.$ac_ext >&5
19798
19799 eval "$as_ac_var=no"
19800fi
19801
19802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19803 conftest$ac_exeext conftest.$ac_ext
19804fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019805ac_res=`eval echo '${'$as_ac_var'}'`
19806 { echo "$as_me:$LINENO: result: $ac_res" >&5
19807echo "${ECHO_T}$ac_res" >&6; }
19808if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019809 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019810#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019811_ACEOF
19812
19813fi
19814done
19815
19816
Michael W. Hudson54241132001-12-07 15:38:26 +000019817# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019818
19819
19820
19821
19822
19823
Fred Drake8cef4cf2000-06-28 16:40:38 +000019824for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19825do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019826as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19827{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19828echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019829if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019830 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019831else
Martin v. Löwis11437992002-04-12 09:54:03 +000019832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019833/* confdefs.h. */
19834_ACEOF
19835cat confdefs.h >>conftest.$ac_ext
19836cat >>conftest.$ac_ext <<_ACEOF
19837/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019838/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19839 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19840#define $ac_func innocuous_$ac_func
19841
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019842/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019843 which can conflict with char $ac_func (); below.
19844 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019845 <limits.h> exists even on freestanding compilers. */
19846
19847#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019848# include <limits.h>
19849#else
19850# include <assert.h>
19851#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019852
19853#undef $ac_func
19854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019855/* Override any GCC internal prototype to avoid an error.
19856 Use char because int might match the return type of a GCC
19857 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019858#ifdef __cplusplus
19859extern "C"
19860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019861char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019862/* The GNU C library defines this for functions which it implements
19863 to always fail with ENOSYS. Some functions are actually named
19864 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019865#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019866choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019867#endif
19868
Skip Montanaro6dead952003-09-25 14:50:04 +000019869int
19870main ()
19871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019872return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019873 ;
19874 return 0;
19875}
19876_ACEOF
19877rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019878if { (ac_try="$ac_link"
19879case "(($ac_try" in
19880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19881 *) ac_try_echo=$ac_try;;
19882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019884 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019886 grep -v '^ *+' conftest.er1 >conftest.err
19887 rm -f conftest.er1
19888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019890 (exit $ac_status); } && {
19891 test -z "$ac_c_werror_flag" ||
19892 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019893 } && test -s conftest$ac_exeext &&
19894 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019895 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019898sed 's/^/| /' conftest.$ac_ext >&5
19899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019900 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019902
19903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019904 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019905fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019906ac_res=`eval echo '${'$as_ac_var'}'`
19907 { echo "$as_me:$LINENO: result: $ac_res" >&5
19908echo "${ECHO_T}$ac_res" >&6; }
19909if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019910 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019911#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019912_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019913
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019914fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019915done
19916
Michael W. Hudson54241132001-12-07 15:38:26 +000019917
Martin v. Löwis11437992002-04-12 09:54:03 +000019918
19919
19920
Christian Heimesb186d002008-03-18 15:15:01 +000019921for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019922do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019923as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19924{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19925echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019926if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019928else
Martin v. Löwis11437992002-04-12 09:54:03 +000019929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019930/* confdefs.h. */
19931_ACEOF
19932cat confdefs.h >>conftest.$ac_ext
19933cat >>conftest.$ac_ext <<_ACEOF
19934/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019935/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19936 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19937#define $ac_func innocuous_$ac_func
19938
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019939/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019940 which can conflict with char $ac_func (); below.
19941 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019942 <limits.h> exists even on freestanding compilers. */
19943
19944#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019945# include <limits.h>
19946#else
19947# include <assert.h>
19948#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019949
19950#undef $ac_func
19951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019952/* Override any GCC internal prototype to avoid an error.
19953 Use char because int might match the return type of a GCC
19954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019955#ifdef __cplusplus
19956extern "C"
19957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019958char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019959/* The GNU C library defines this for functions which it implements
19960 to always fail with ENOSYS. Some functions are actually named
19961 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019962#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019963choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019964#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019965
Skip Montanaro6dead952003-09-25 14:50:04 +000019966int
19967main ()
19968{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019969return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019970 ;
19971 return 0;
19972}
19973_ACEOF
19974rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019975if { (ac_try="$ac_link"
19976case "(($ac_try" in
19977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19978 *) ac_try_echo=$ac_try;;
19979esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019981 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019983 grep -v '^ *+' conftest.er1 >conftest.err
19984 rm -f conftest.er1
19985 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019987 (exit $ac_status); } && {
19988 test -z "$ac_c_werror_flag" ||
19989 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019990 } && test -s conftest$ac_exeext &&
19991 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019992 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019995sed 's/^/| /' conftest.$ac_ext >&5
19996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019997 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019999
20000rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020002fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020003ac_res=`eval echo '${'$as_ac_var'}'`
20004 { echo "$as_me:$LINENO: result: $ac_res" >&5
20005echo "${ECHO_T}$ac_res" >&6; }
20006if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020007 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020008#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020009_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020010
Martin v. Löwis1142de32002-03-29 16:28:31 +000020011else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020012 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020013 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020014 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20015 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020016esac
20017
Martin v. Löwis1142de32002-03-29 16:28:31 +000020018fi
20019done
20020
20021
Martin v. Löwis11437992002-04-12 09:54:03 +000020022
Martin v. Löwis1142de32002-03-29 16:28:31 +000020023for ac_func in getpgrp
20024do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020025as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20026{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20027echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020028if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020029 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020030else
Martin v. Löwis11437992002-04-12 09:54:03 +000020031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020032/* confdefs.h. */
20033_ACEOF
20034cat confdefs.h >>conftest.$ac_ext
20035cat >>conftest.$ac_ext <<_ACEOF
20036/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020037/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20038 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20039#define $ac_func innocuous_$ac_func
20040
Martin v. Löwis1142de32002-03-29 16:28:31 +000020041/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020042 which can conflict with char $ac_func (); below.
20043 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020044 <limits.h> exists even on freestanding compilers. */
20045
20046#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020047# include <limits.h>
20048#else
20049# include <assert.h>
20050#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020051
20052#undef $ac_func
20053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020054/* Override any GCC internal prototype to avoid an error.
20055 Use char because int might match the return type of a GCC
20056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020057#ifdef __cplusplus
20058extern "C"
20059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020060char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020061/* The GNU C library defines this for functions which it implements
20062 to always fail with ENOSYS. Some functions are actually named
20063 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020064#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020065choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020066#endif
20067
Skip Montanaro6dead952003-09-25 14:50:04 +000020068int
20069main ()
20070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020071return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020072 ;
20073 return 0;
20074}
20075_ACEOF
20076rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020077if { (ac_try="$ac_link"
20078case "(($ac_try" in
20079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20080 *) ac_try_echo=$ac_try;;
20081esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020083 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020085 grep -v '^ *+' conftest.er1 >conftest.err
20086 rm -f conftest.er1
20087 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020089 (exit $ac_status); } && {
20090 test -z "$ac_c_werror_flag" ||
20091 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020092 } && test -s conftest$ac_exeext &&
20093 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020094 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020097sed 's/^/| /' conftest.$ac_ext >&5
20098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020099 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020101
20102rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020103 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020104fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020105ac_res=`eval echo '${'$as_ac_var'}'`
20106 { echo "$as_me:$LINENO: result: $ac_res" >&5
20107echo "${ECHO_T}$ac_res" >&6; }
20108if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020109 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020110#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020111_ACEOF
20112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020113/* confdefs.h. */
20114_ACEOF
20115cat confdefs.h >>conftest.$ac_ext
20116cat >>conftest.$ac_ext <<_ACEOF
20117/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020118#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020119int
20120main ()
20121{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020122getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020123 ;
20124 return 0;
20125}
20126_ACEOF
20127rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020128if { (ac_try="$ac_compile"
20129case "(($ac_try" in
20130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20131 *) ac_try_echo=$ac_try;;
20132esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020136 grep -v '^ *+' conftest.er1 >conftest.err
20137 rm -f conftest.er1
20138 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020140 (exit $ac_status); } && {
20141 test -z "$ac_c_werror_flag" ||
20142 test ! -s conftest.err
20143 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020144
20145cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020146#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020147_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020148
Martin v. Löwis11437992002-04-12 09:54:03 +000020149
Guido van Rossumf78abae1997-01-21 22:02:36 +000020150else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020152sed 's/^/| /' conftest.$ac_ext >&5
20153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020154
Guido van Rossum627b2d71993-12-24 10:39:16 +000020155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020156
20157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020158
Guido van Rossum627b2d71993-12-24 10:39:16 +000020159fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020160done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020161
Jack Jansen150753c2003-03-29 22:07:47 +000020162
20163for ac_func in setpgrp
20164do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020165as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20166{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20167echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020168if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020170else
Martin v. Löwis11437992002-04-12 09:54:03 +000020171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020172/* confdefs.h. */
20173_ACEOF
20174cat confdefs.h >>conftest.$ac_ext
20175cat >>conftest.$ac_ext <<_ACEOF
20176/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020177/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20178 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20179#define $ac_func innocuous_$ac_func
20180
Jack Jansen150753c2003-03-29 22:07:47 +000020181/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020182 which can conflict with char $ac_func (); below.
20183 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020184 <limits.h> exists even on freestanding compilers. */
20185
20186#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020187# include <limits.h>
20188#else
20189# include <assert.h>
20190#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020191
20192#undef $ac_func
20193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020194/* Override any GCC internal prototype to avoid an error.
20195 Use char because int might match the return type of a GCC
20196 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020197#ifdef __cplusplus
20198extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020199#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020200char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020201/* The GNU C library defines this for functions which it implements
20202 to always fail with ENOSYS. Some functions are actually named
20203 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020204#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020205choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020206#endif
20207
Skip Montanaro6dead952003-09-25 14:50:04 +000020208int
20209main ()
20210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020211return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020212 ;
20213 return 0;
20214}
20215_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020216rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020217if { (ac_try="$ac_link"
20218case "(($ac_try" in
20219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20220 *) ac_try_echo=$ac_try;;
20221esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020223 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020225 grep -v '^ *+' conftest.er1 >conftest.err
20226 rm -f conftest.er1
20227 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020229 (exit $ac_status); } && {
20230 test -z "$ac_c_werror_flag" ||
20231 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020232 } && test -s conftest$ac_exeext &&
20233 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020234 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020237sed 's/^/| /' conftest.$ac_ext >&5
20238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020239 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020241
20242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020243 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020244fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020245ac_res=`eval echo '${'$as_ac_var'}'`
20246 { echo "$as_me:$LINENO: result: $ac_res" >&5
20247echo "${ECHO_T}$ac_res" >&6; }
20248if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020249 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020250#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020251_ACEOF
20252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020253/* confdefs.h. */
20254_ACEOF
20255cat confdefs.h >>conftest.$ac_ext
20256cat >>conftest.$ac_ext <<_ACEOF
20257/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020258#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020259int
20260main ()
20261{
20262setpgrp(0,0);
20263 ;
20264 return 0;
20265}
20266_ACEOF
20267rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020268if { (ac_try="$ac_compile"
20269case "(($ac_try" in
20270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20271 *) ac_try_echo=$ac_try;;
20272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020274 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020276 grep -v '^ *+' conftest.er1 >conftest.err
20277 rm -f conftest.er1
20278 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020280 (exit $ac_status); } && {
20281 test -z "$ac_c_werror_flag" ||
20282 test ! -s conftest.err
20283 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020284
20285cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020286#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020287_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020288
Jack Jansen150753c2003-03-29 22:07:47 +000020289
20290else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020292sed 's/^/| /' conftest.$ac_ext >&5
20293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020294
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020296
20297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020298
20299fi
20300done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020301
Martin v. Löwis11437992002-04-12 09:54:03 +000020302
Thomas Wouters3a584202000-08-05 23:28:51 +000020303for ac_func in gettimeofday
20304do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020305as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20306{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20307echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020308if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020309 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020310else
Martin v. Löwis11437992002-04-12 09:54:03 +000020311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020312/* confdefs.h. */
20313_ACEOF
20314cat confdefs.h >>conftest.$ac_ext
20315cat >>conftest.$ac_ext <<_ACEOF
20316/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020317/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20318 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20319#define $ac_func innocuous_$ac_func
20320
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020321/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020322 which can conflict with char $ac_func (); below.
20323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020324 <limits.h> exists even on freestanding compilers. */
20325
20326#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020327# include <limits.h>
20328#else
20329# include <assert.h>
20330#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020331
20332#undef $ac_func
20333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020334/* Override any GCC internal prototype to avoid an error.
20335 Use char because int might match the return type of a GCC
20336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020337#ifdef __cplusplus
20338extern "C"
20339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020340char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020341/* The GNU C library defines this for functions which it implements
20342 to always fail with ENOSYS. Some functions are actually named
20343 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020344#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020345choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020346#endif
20347
Skip Montanaro6dead952003-09-25 14:50:04 +000020348int
20349main ()
20350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020351return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020352 ;
20353 return 0;
20354}
20355_ACEOF
20356rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020357if { (ac_try="$ac_link"
20358case "(($ac_try" in
20359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20360 *) ac_try_echo=$ac_try;;
20361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020363 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020365 grep -v '^ *+' conftest.er1 >conftest.err
20366 rm -f conftest.er1
20367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020369 (exit $ac_status); } && {
20370 test -z "$ac_c_werror_flag" ||
20371 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020372 } && test -s conftest$ac_exeext &&
20373 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020374 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020375else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020377sed 's/^/| /' conftest.$ac_ext >&5
20378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020379 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020381
20382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020383 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020384fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020385ac_res=`eval echo '${'$as_ac_var'}'`
20386 { echo "$as_me:$LINENO: result: $ac_res" >&5
20387echo "${ECHO_T}$ac_res" >&6; }
20388if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020389 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020390#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020391_ACEOF
20392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020393/* confdefs.h. */
20394_ACEOF
20395cat confdefs.h >>conftest.$ac_ext
20396cat >>conftest.$ac_ext <<_ACEOF
20397/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020398#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020399int
20400main ()
20401{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020402gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020403 ;
20404 return 0;
20405}
20406_ACEOF
20407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020408if { (ac_try="$ac_compile"
20409case "(($ac_try" in
20410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20411 *) ac_try_echo=$ac_try;;
20412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020416 grep -v '^ *+' conftest.er1 >conftest.err
20417 rm -f conftest.er1
20418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020420 (exit $ac_status); } && {
20421 test -z "$ac_c_werror_flag" ||
20422 test ! -s conftest.err
20423 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020424 :
20425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020427sed 's/^/| /' conftest.$ac_ext >&5
20428
Martin v. Löwis11437992002-04-12 09:54:03 +000020429
20430cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020431#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020432_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020433
Martin v. Löwis11437992002-04-12 09:54:03 +000020434
Guido van Rossum627b2d71993-12-24 10:39:16 +000020435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020436
20437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020439fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020440done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020441
Michael W. Hudson54241132001-12-07 15:38:26 +000020442
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020443{ echo "$as_me:$LINENO: checking for major" >&5
20444echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020445cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020446/* confdefs.h. */
20447_ACEOF
20448cat confdefs.h >>conftest.$ac_ext
20449cat >>conftest.$ac_ext <<_ACEOF
20450/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020451
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020452#if defined(MAJOR_IN_MKDEV)
20453#include <sys/mkdev.h>
20454#elif defined(MAJOR_IN_SYSMACROS)
20455#include <sys/sysmacros.h>
20456#else
20457#include <sys/types.h>
20458#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020459
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020460int
20461main ()
20462{
20463
20464 makedev(major(0),minor(0));
20465
20466 ;
20467 return 0;
20468}
20469_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020470rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020471if { (ac_try="$ac_link"
20472case "(($ac_try" in
20473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20474 *) ac_try_echo=$ac_try;;
20475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020477 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020479 grep -v '^ *+' conftest.er1 >conftest.err
20480 rm -f conftest.er1
20481 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020483 (exit $ac_status); } && {
20484 test -z "$ac_c_werror_flag" ||
20485 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020486 } && test -s conftest$ac_exeext &&
20487 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020488
20489
20490cat >>confdefs.h <<\_ACEOF
20491#define HAVE_DEVICE_MACROS 1
20492_ACEOF
20493
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020494 { echo "$as_me:$LINENO: result: yes" >&5
20495echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020496
20497else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020499sed 's/^/| /' conftest.$ac_ext >&5
20500
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020501
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020502 { echo "$as_me:$LINENO: result: no" >&5
20503echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020504
20505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020506
20507rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020508 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020509
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020510# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020511# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020512{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20513echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020515/* confdefs.h. */
20516_ACEOF
20517cat confdefs.h >>conftest.$ac_ext
20518cat >>conftest.$ac_ext <<_ACEOF
20519/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020520
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020521#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020522#include <sys/socket.h>
20523#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020524#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020525
Martin v. Löwis11437992002-04-12 09:54:03 +000020526int
20527main ()
20528{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020529getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020530 ;
20531 return 0;
20532}
20533_ACEOF
20534rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020535if { (ac_try="$ac_link"
20536case "(($ac_try" in
20537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20538 *) ac_try_echo=$ac_try;;
20539esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020541 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020543 grep -v '^ *+' conftest.er1 >conftest.err
20544 rm -f conftest.er1
20545 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020547 (exit $ac_status); } && {
20548 test -z "$ac_c_werror_flag" ||
20549 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020550 } && test -s conftest$ac_exeext &&
20551 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020552 have_getaddrinfo=yes
20553else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020554 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020555sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020556
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020557 have_getaddrinfo=no
20558fi
20559
20560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20561 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020562{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20563echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020564if test $have_getaddrinfo = yes
20565then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020566 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20567echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020568 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020569 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020570else
20571 if test "$cross_compiling" = yes; then
20572 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020573else
Martin v. Löwis11437992002-04-12 09:54:03 +000020574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020575/* confdefs.h. */
20576_ACEOF
20577cat confdefs.h >>conftest.$ac_ext
20578cat >>conftest.$ac_ext <<_ACEOF
20579/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020580
20581#include <sys/types.h>
20582#include <netdb.h>
20583#include <string.h>
20584#include <sys/socket.h>
20585#include <netinet/in.h>
20586
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020587int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020588{
20589 int passive, gaierr, inet4 = 0, inet6 = 0;
20590 struct addrinfo hints, *ai, *aitop;
20591 char straddr[INET6_ADDRSTRLEN], strport[16];
20592
20593 for (passive = 0; passive <= 1; passive++) {
20594 memset(&hints, 0, sizeof(hints));
20595 hints.ai_family = AF_UNSPEC;
20596 hints.ai_flags = passive ? AI_PASSIVE : 0;
20597 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020598 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020599 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20600 (void)gai_strerror(gaierr);
20601 goto bad;
20602 }
20603 for (ai = aitop; ai; ai = ai->ai_next) {
20604 if (ai->ai_addr == NULL ||
20605 ai->ai_addrlen == 0 ||
20606 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20607 straddr, sizeof(straddr), strport, sizeof(strport),
20608 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20609 goto bad;
20610 }
20611 switch (ai->ai_family) {
20612 case AF_INET:
20613 if (strcmp(strport, "54321") != 0) {
20614 goto bad;
20615 }
20616 if (passive) {
20617 if (strcmp(straddr, "0.0.0.0") != 0) {
20618 goto bad;
20619 }
20620 } else {
20621 if (strcmp(straddr, "127.0.0.1") != 0) {
20622 goto bad;
20623 }
20624 }
20625 inet4++;
20626 break;
20627 case AF_INET6:
20628 if (strcmp(strport, "54321") != 0) {
20629 goto bad;
20630 }
20631 if (passive) {
20632 if (strcmp(straddr, "::") != 0) {
20633 goto bad;
20634 }
20635 } else {
20636 if (strcmp(straddr, "::1") != 0) {
20637 goto bad;
20638 }
20639 }
20640 inet6++;
20641 break;
20642 case AF_UNSPEC:
20643 goto bad;
20644 break;
20645 default:
20646 /* another family support? */
20647 break;
20648 }
20649 }
20650 }
20651
20652 if (!(inet4 == 0 || inet4 == 2))
20653 goto bad;
20654 if (!(inet6 == 0 || inet6 == 2))
20655 goto bad;
20656
20657 if (aitop)
20658 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020659 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020660
20661 bad:
20662 if (aitop)
20663 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020664 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020665}
20666
Martin v. Löwis11437992002-04-12 09:54:03 +000020667_ACEOF
20668rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020669if { (ac_try="$ac_link"
20670case "(($ac_try" in
20671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20672 *) ac_try_echo=$ac_try;;
20673esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020675 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020676 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020679 { (case "(($ac_try" in
20680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20681 *) ac_try_echo=$ac_try;;
20682esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020684 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020685 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020687 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020688 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020689else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020690 echo "$as_me: program exited with status $ac_status" >&5
20691echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020692sed 's/^/| /' conftest.$ac_ext >&5
20693
Martin v. Löwis11437992002-04-12 09:54:03 +000020694( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020695ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020697rm -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 +000020698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020699
20700
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020701fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020702
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020704
Mark Dickinson2df5d282009-12-31 21:22:50 +000020705if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020706then
20707 if test $ipv6 = yes
20708 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020709 echo 'Fatal: You must get working getaddrinfo() function.'
20710 echo ' or you can specify "--disable-ipv6"'.
20711 exit 1
20712 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020713else
Martin v. Löwis11437992002-04-12 09:54:03 +000020714
20715cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020716#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020717_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020718
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020720
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020721for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020722do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020723as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20724{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20725echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020726if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020728else
Martin v. Löwis11437992002-04-12 09:54:03 +000020729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020730/* confdefs.h. */
20731_ACEOF
20732cat confdefs.h >>conftest.$ac_ext
20733cat >>conftest.$ac_ext <<_ACEOF
20734/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020735/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20736 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20737#define $ac_func innocuous_$ac_func
20738
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020739/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020740 which can conflict with char $ac_func (); below.
20741 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020742 <limits.h> exists even on freestanding compilers. */
20743
20744#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020745# include <limits.h>
20746#else
20747# include <assert.h>
20748#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020749
20750#undef $ac_func
20751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020752/* Override any GCC internal prototype to avoid an error.
20753 Use char because int might match the return type of a GCC
20754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020755#ifdef __cplusplus
20756extern "C"
20757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020758char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020759/* The GNU C library defines this for functions which it implements
20760 to always fail with ENOSYS. Some functions are actually named
20761 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020762#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020763choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020764#endif
20765
Skip Montanaro6dead952003-09-25 14:50:04 +000020766int
20767main ()
20768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020769return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020770 ;
20771 return 0;
20772}
20773_ACEOF
20774rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020775if { (ac_try="$ac_link"
20776case "(($ac_try" in
20777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20778 *) ac_try_echo=$ac_try;;
20779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020781 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020783 grep -v '^ *+' conftest.er1 >conftest.err
20784 rm -f conftest.er1
20785 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020787 (exit $ac_status); } && {
20788 test -z "$ac_c_werror_flag" ||
20789 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020790 } && test -s conftest$ac_exeext &&
20791 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020792 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020795sed 's/^/| /' conftest.$ac_ext >&5
20796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020797 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020799
20800rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020801 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020802fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020803ac_res=`eval echo '${'$as_ac_var'}'`
20804 { echo "$as_me:$LINENO: result: $ac_res" >&5
20805echo "${ECHO_T}$ac_res" >&6; }
20806if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020807 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020808#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020809_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020810
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020811fi
20812done
20813
Michael W. Hudson54241132001-12-07 15:38:26 +000020814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020815# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020816{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20817echo $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 +000020818if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020820else
Martin v. Löwis11437992002-04-12 09:54:03 +000020821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020822/* confdefs.h. */
20823_ACEOF
20824cat confdefs.h >>conftest.$ac_ext
20825cat >>conftest.$ac_ext <<_ACEOF
20826/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020827#include <sys/types.h>
20828#include <sys/time.h>
20829#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020830
Martin v. Löwis11437992002-04-12 09:54:03 +000020831int
20832main ()
20833{
20834if ((struct tm *) 0)
20835return 0;
20836 ;
20837 return 0;
20838}
20839_ACEOF
20840rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020841if { (ac_try="$ac_compile"
20842case "(($ac_try" in
20843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20844 *) ac_try_echo=$ac_try;;
20845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020849 grep -v '^ *+' conftest.er1 >conftest.err
20850 rm -f conftest.er1
20851 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020853 (exit $ac_status); } && {
20854 test -z "$ac_c_werror_flag" ||
20855 test ! -s conftest.err
20856 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020857 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020858else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020860sed 's/^/| /' conftest.$ac_ext >&5
20861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020862 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020864
20865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020866fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020867{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20868echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020869if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020870
20871cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020872#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020873_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020874
20875fi
20876
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020877{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20878echo $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 +000020879if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020880 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020881else
Martin v. Löwis11437992002-04-12 09:54:03 +000020882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020883/* confdefs.h. */
20884_ACEOF
20885cat confdefs.h >>conftest.$ac_ext
20886cat >>conftest.$ac_ext <<_ACEOF
20887/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020888#include <sys/types.h>
20889#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020890
Martin v. Löwis11437992002-04-12 09:54:03 +000020891int
20892main ()
20893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020894struct tm tm;
20895 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020896 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020897 ;
20898 return 0;
20899}
20900_ACEOF
20901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020902if { (ac_try="$ac_compile"
20903case "(($ac_try" in
20904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20905 *) ac_try_echo=$ac_try;;
20906esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020910 grep -v '^ *+' conftest.er1 >conftest.err
20911 rm -f conftest.er1
20912 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914 (exit $ac_status); } && {
20915 test -z "$ac_c_werror_flag" ||
20916 test ! -s conftest.err
20917 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020918 ac_cv_struct_tm=time.h
20919else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020921sed 's/^/| /' conftest.$ac_ext >&5
20922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020923 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020925
20926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020927fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020928{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20929echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020930if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020931
20932cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020933#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020934_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020935
20936fi
20937
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020938{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20939echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020940if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020941 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020942else
Martin v. Löwis11437992002-04-12 09:54:03 +000020943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020944/* confdefs.h. */
20945_ACEOF
20946cat confdefs.h >>conftest.$ac_ext
20947cat >>conftest.$ac_ext <<_ACEOF
20948/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020949#include <sys/types.h>
20950#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020951
20952
Martin v. Löwis11437992002-04-12 09:54:03 +000020953int
20954main ()
20955{
20956static struct tm ac_aggr;
20957if (ac_aggr.tm_zone)
20958return 0;
20959 ;
20960 return 0;
20961}
20962_ACEOF
20963rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020964if { (ac_try="$ac_compile"
20965case "(($ac_try" in
20966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20967 *) ac_try_echo=$ac_try;;
20968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020972 grep -v '^ *+' conftest.er1 >conftest.err
20973 rm -f conftest.er1
20974 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020976 (exit $ac_status); } && {
20977 test -z "$ac_c_werror_flag" ||
20978 test ! -s conftest.err
20979 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020980 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020981else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020983sed 's/^/| /' conftest.$ac_ext >&5
20984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020986/* confdefs.h. */
20987_ACEOF
20988cat confdefs.h >>conftest.$ac_ext
20989cat >>conftest.$ac_ext <<_ACEOF
20990/* end confdefs.h. */
20991#include <sys/types.h>
20992#include <$ac_cv_struct_tm>
20993
20994
20995int
20996main ()
20997{
20998static struct tm ac_aggr;
20999if (sizeof ac_aggr.tm_zone)
21000return 0;
21001 ;
21002 return 0;
21003}
21004_ACEOF
21005rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021006if { (ac_try="$ac_compile"
21007case "(($ac_try" in
21008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21009 *) ac_try_echo=$ac_try;;
21010esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021012 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021014 grep -v '^ *+' conftest.er1 >conftest.err
21015 rm -f conftest.er1
21016 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021018 (exit $ac_status); } && {
21019 test -z "$ac_c_werror_flag" ||
21020 test ! -s conftest.err
21021 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021022 ac_cv_member_struct_tm_tm_zone=yes
21023else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021025sed 's/^/| /' conftest.$ac_ext >&5
21026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021027 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021029
21030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021032
21033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021034fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021035{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21036echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21037if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021038
21039cat >>confdefs.h <<_ACEOF
21040#define HAVE_STRUCT_TM_TM_ZONE 1
21041_ACEOF
21042
21043
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021044fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021045
Martin v. Löwis11437992002-04-12 09:54:03 +000021046if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21047
21048cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021049#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021050_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021051
21052else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021053 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21054echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021055if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021056 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021057else
21058 cat >conftest.$ac_ext <<_ACEOF
21059/* confdefs.h. */
21060_ACEOF
21061cat confdefs.h >>conftest.$ac_ext
21062cat >>conftest.$ac_ext <<_ACEOF
21063/* end confdefs.h. */
21064#include <time.h>
21065
21066int
21067main ()
21068{
21069#ifndef tzname
21070 (void) tzname;
21071#endif
21072
21073 ;
21074 return 0;
21075}
21076_ACEOF
21077rm -f conftest.$ac_objext
21078if { (ac_try="$ac_compile"
21079case "(($ac_try" in
21080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21081 *) ac_try_echo=$ac_try;;
21082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021084 (eval "$ac_compile") 2>conftest.er1
21085 ac_status=$?
21086 grep -v '^ *+' conftest.er1 >conftest.err
21087 rm -f conftest.er1
21088 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021090 (exit $ac_status); } && {
21091 test -z "$ac_c_werror_flag" ||
21092 test ! -s conftest.err
21093 } && test -s conftest.$ac_objext; then
21094 ac_cv_have_decl_tzname=yes
21095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021096 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021097sed 's/^/| /' conftest.$ac_ext >&5
21098
21099 ac_cv_have_decl_tzname=no
21100fi
21101
21102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21103fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021104{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21105echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21106if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021107
21108cat >>confdefs.h <<_ACEOF
21109#define HAVE_DECL_TZNAME 1
21110_ACEOF
21111
21112
21113else
21114 cat >>confdefs.h <<_ACEOF
21115#define HAVE_DECL_TZNAME 0
21116_ACEOF
21117
21118
21119fi
21120
21121
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021122 { echo "$as_me:$LINENO: checking for tzname" >&5
21123echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021124if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021125 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021126else
Martin v. Löwis11437992002-04-12 09:54:03 +000021127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021128/* confdefs.h. */
21129_ACEOF
21130cat confdefs.h >>conftest.$ac_ext
21131cat >>conftest.$ac_ext <<_ACEOF
21132/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021133#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021134#if !HAVE_DECL_TZNAME
21135extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021137
Martin v. Löwis11437992002-04-12 09:54:03 +000021138int
21139main ()
21140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021141return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021142 ;
21143 return 0;
21144}
21145_ACEOF
21146rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021147if { (ac_try="$ac_link"
21148case "(($ac_try" in
21149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21150 *) ac_try_echo=$ac_try;;
21151esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021153 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021155 grep -v '^ *+' conftest.er1 >conftest.err
21156 rm -f conftest.er1
21157 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021159 (exit $ac_status); } && {
21160 test -z "$ac_c_werror_flag" ||
21161 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021162 } && test -s conftest$ac_exeext &&
21163 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021164 ac_cv_var_tzname=yes
21165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021167sed 's/^/| /' conftest.$ac_ext >&5
21168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021169 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021171
21172rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021173 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021174fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021175{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21176echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021177 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021178
21179cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021180#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021181_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021183 fi
21184fi
21185
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021186{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21187echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021188if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021189 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021190else
21191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021192/* confdefs.h. */
21193_ACEOF
21194cat confdefs.h >>conftest.$ac_ext
21195cat >>conftest.$ac_ext <<_ACEOF
21196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021197$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021198int
21199main ()
21200{
21201static struct stat ac_aggr;
21202if (ac_aggr.st_rdev)
21203return 0;
21204 ;
21205 return 0;
21206}
21207_ACEOF
21208rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021209if { (ac_try="$ac_compile"
21210case "(($ac_try" in
21211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21212 *) ac_try_echo=$ac_try;;
21213esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021217 grep -v '^ *+' conftest.er1 >conftest.err
21218 rm -f conftest.er1
21219 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021221 (exit $ac_status); } && {
21222 test -z "$ac_c_werror_flag" ||
21223 test ! -s conftest.err
21224 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021225 ac_cv_member_struct_stat_st_rdev=yes
21226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021228sed 's/^/| /' conftest.$ac_ext >&5
21229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021231/* confdefs.h. */
21232_ACEOF
21233cat confdefs.h >>conftest.$ac_ext
21234cat >>conftest.$ac_ext <<_ACEOF
21235/* end confdefs.h. */
21236$ac_includes_default
21237int
21238main ()
21239{
21240static struct stat ac_aggr;
21241if (sizeof ac_aggr.st_rdev)
21242return 0;
21243 ;
21244 return 0;
21245}
21246_ACEOF
21247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021248if { (ac_try="$ac_compile"
21249case "(($ac_try" in
21250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21251 *) ac_try_echo=$ac_try;;
21252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021254 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021256 grep -v '^ *+' conftest.er1 >conftest.err
21257 rm -f conftest.er1
21258 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021260 (exit $ac_status); } && {
21261 test -z "$ac_c_werror_flag" ||
21262 test ! -s conftest.err
21263 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021264 ac_cv_member_struct_stat_st_rdev=yes
21265else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021267sed 's/^/| /' conftest.$ac_ext >&5
21268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021269 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021271
21272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021274
21275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021276fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021277{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21278echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21279if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021280
21281cat >>confdefs.h <<_ACEOF
21282#define HAVE_STRUCT_STAT_ST_RDEV 1
21283_ACEOF
21284
21285
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021286fi
21287
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021288{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21289echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021290if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021292else
Martin v. Löwis11437992002-04-12 09:54:03 +000021293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021294/* confdefs.h. */
21295_ACEOF
21296cat confdefs.h >>conftest.$ac_ext
21297cat >>conftest.$ac_ext <<_ACEOF
21298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021299$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021300int
21301main ()
21302{
21303static struct stat ac_aggr;
21304if (ac_aggr.st_blksize)
21305return 0;
21306 ;
21307 return 0;
21308}
21309_ACEOF
21310rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021311if { (ac_try="$ac_compile"
21312case "(($ac_try" in
21313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21314 *) ac_try_echo=$ac_try;;
21315esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021319 grep -v '^ *+' conftest.er1 >conftest.err
21320 rm -f conftest.er1
21321 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021323 (exit $ac_status); } && {
21324 test -z "$ac_c_werror_flag" ||
21325 test ! -s conftest.err
21326 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021327 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021328else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021330sed 's/^/| /' conftest.$ac_ext >&5
21331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021333/* confdefs.h. */
21334_ACEOF
21335cat confdefs.h >>conftest.$ac_ext
21336cat >>conftest.$ac_ext <<_ACEOF
21337/* end confdefs.h. */
21338$ac_includes_default
21339int
21340main ()
21341{
21342static struct stat ac_aggr;
21343if (sizeof ac_aggr.st_blksize)
21344return 0;
21345 ;
21346 return 0;
21347}
21348_ACEOF
21349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021350if { (ac_try="$ac_compile"
21351case "(($ac_try" in
21352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21353 *) ac_try_echo=$ac_try;;
21354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021356 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021358 grep -v '^ *+' conftest.er1 >conftest.err
21359 rm -f conftest.er1
21360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021362 (exit $ac_status); } && {
21363 test -z "$ac_c_werror_flag" ||
21364 test ! -s conftest.err
21365 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021366 ac_cv_member_struct_stat_st_blksize=yes
21367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021369sed 's/^/| /' conftest.$ac_ext >&5
21370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021371 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021373
21374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376
21377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021378fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021379{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21380echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21381if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021382
Martin v. Löwis11437992002-04-12 09:54:03 +000021383cat >>confdefs.h <<_ACEOF
21384#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21385_ACEOF
21386
21387
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021388fi
21389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021390{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21391echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021392if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021393 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021394else
21395 cat >conftest.$ac_ext <<_ACEOF
21396/* confdefs.h. */
21397_ACEOF
21398cat confdefs.h >>conftest.$ac_ext
21399cat >>conftest.$ac_ext <<_ACEOF
21400/* end confdefs.h. */
21401$ac_includes_default
21402int
21403main ()
21404{
21405static struct stat ac_aggr;
21406if (ac_aggr.st_flags)
21407return 0;
21408 ;
21409 return 0;
21410}
21411_ACEOF
21412rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021413if { (ac_try="$ac_compile"
21414case "(($ac_try" in
21415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21416 *) ac_try_echo=$ac_try;;
21417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021419 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021420 ac_status=$?
21421 grep -v '^ *+' conftest.er1 >conftest.err
21422 rm -f conftest.er1
21423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021425 (exit $ac_status); } && {
21426 test -z "$ac_c_werror_flag" ||
21427 test ! -s conftest.err
21428 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021429 ac_cv_member_struct_stat_st_flags=yes
21430else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021431 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021432sed 's/^/| /' conftest.$ac_ext >&5
21433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021434 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021435/* confdefs.h. */
21436_ACEOF
21437cat confdefs.h >>conftest.$ac_ext
21438cat >>conftest.$ac_ext <<_ACEOF
21439/* end confdefs.h. */
21440$ac_includes_default
21441int
21442main ()
21443{
21444static struct stat ac_aggr;
21445if (sizeof ac_aggr.st_flags)
21446return 0;
21447 ;
21448 return 0;
21449}
21450_ACEOF
21451rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021452if { (ac_try="$ac_compile"
21453case "(($ac_try" in
21454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21455 *) ac_try_echo=$ac_try;;
21456esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021458 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021459 ac_status=$?
21460 grep -v '^ *+' conftest.er1 >conftest.err
21461 rm -f conftest.er1
21462 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021464 (exit $ac_status); } && {
21465 test -z "$ac_c_werror_flag" ||
21466 test ! -s conftest.err
21467 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021468 ac_cv_member_struct_stat_st_flags=yes
21469else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021470 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021471sed 's/^/| /' conftest.$ac_ext >&5
21472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021473 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021475
21476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021478
21479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021480fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021481{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21482echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21483if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021484
21485cat >>confdefs.h <<_ACEOF
21486#define HAVE_STRUCT_STAT_ST_FLAGS 1
21487_ACEOF
21488
21489
21490fi
21491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021492{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21493echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021494if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021495 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021496else
21497 cat >conftest.$ac_ext <<_ACEOF
21498/* confdefs.h. */
21499_ACEOF
21500cat confdefs.h >>conftest.$ac_ext
21501cat >>conftest.$ac_ext <<_ACEOF
21502/* end confdefs.h. */
21503$ac_includes_default
21504int
21505main ()
21506{
21507static struct stat ac_aggr;
21508if (ac_aggr.st_gen)
21509return 0;
21510 ;
21511 return 0;
21512}
21513_ACEOF
21514rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021515if { (ac_try="$ac_compile"
21516case "(($ac_try" in
21517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21518 *) ac_try_echo=$ac_try;;
21519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021521 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021522 ac_status=$?
21523 grep -v '^ *+' conftest.er1 >conftest.err
21524 rm -f conftest.er1
21525 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021527 (exit $ac_status); } && {
21528 test -z "$ac_c_werror_flag" ||
21529 test ! -s conftest.err
21530 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021531 ac_cv_member_struct_stat_st_gen=yes
21532else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021533 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021534sed 's/^/| /' conftest.$ac_ext >&5
21535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021536 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021537/* confdefs.h. */
21538_ACEOF
21539cat confdefs.h >>conftest.$ac_ext
21540cat >>conftest.$ac_ext <<_ACEOF
21541/* end confdefs.h. */
21542$ac_includes_default
21543int
21544main ()
21545{
21546static struct stat ac_aggr;
21547if (sizeof ac_aggr.st_gen)
21548return 0;
21549 ;
21550 return 0;
21551}
21552_ACEOF
21553rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021554if { (ac_try="$ac_compile"
21555case "(($ac_try" in
21556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21557 *) ac_try_echo=$ac_try;;
21558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021560 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021561 ac_status=$?
21562 grep -v '^ *+' conftest.er1 >conftest.err
21563 rm -f conftest.er1
21564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021566 (exit $ac_status); } && {
21567 test -z "$ac_c_werror_flag" ||
21568 test ! -s conftest.err
21569 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021570 ac_cv_member_struct_stat_st_gen=yes
21571else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021572 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021573sed 's/^/| /' conftest.$ac_ext >&5
21574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021575 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021577
21578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021580
21581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021582fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021583{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21584echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21585if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021586
21587cat >>confdefs.h <<_ACEOF
21588#define HAVE_STRUCT_STAT_ST_GEN 1
21589_ACEOF
21590
21591
21592fi
21593
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021594{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21595echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021596if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021597 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021598else
21599 cat >conftest.$ac_ext <<_ACEOF
21600/* confdefs.h. */
21601_ACEOF
21602cat confdefs.h >>conftest.$ac_ext
21603cat >>conftest.$ac_ext <<_ACEOF
21604/* end confdefs.h. */
21605$ac_includes_default
21606int
21607main ()
21608{
21609static struct stat ac_aggr;
21610if (ac_aggr.st_birthtime)
21611return 0;
21612 ;
21613 return 0;
21614}
21615_ACEOF
21616rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021617if { (ac_try="$ac_compile"
21618case "(($ac_try" in
21619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21620 *) ac_try_echo=$ac_try;;
21621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021624 ac_status=$?
21625 grep -v '^ *+' conftest.er1 >conftest.err
21626 rm -f conftest.er1
21627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021629 (exit $ac_status); } && {
21630 test -z "$ac_c_werror_flag" ||
21631 test ! -s conftest.err
21632 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021633 ac_cv_member_struct_stat_st_birthtime=yes
21634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021635 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021636sed 's/^/| /' conftest.$ac_ext >&5
21637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021638 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021639/* confdefs.h. */
21640_ACEOF
21641cat confdefs.h >>conftest.$ac_ext
21642cat >>conftest.$ac_ext <<_ACEOF
21643/* end confdefs.h. */
21644$ac_includes_default
21645int
21646main ()
21647{
21648static struct stat ac_aggr;
21649if (sizeof ac_aggr.st_birthtime)
21650return 0;
21651 ;
21652 return 0;
21653}
21654_ACEOF
21655rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021656if { (ac_try="$ac_compile"
21657case "(($ac_try" in
21658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21659 *) ac_try_echo=$ac_try;;
21660esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021662 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021663 ac_status=$?
21664 grep -v '^ *+' conftest.er1 >conftest.err
21665 rm -f conftest.er1
21666 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021668 (exit $ac_status); } && {
21669 test -z "$ac_c_werror_flag" ||
21670 test ! -s conftest.err
21671 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021672 ac_cv_member_struct_stat_st_birthtime=yes
21673else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021674 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021675sed 's/^/| /' conftest.$ac_ext >&5
21676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021677 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021679
21680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021682
21683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021684fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021685{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21686echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21687if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021688
21689cat >>confdefs.h <<_ACEOF
21690#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21691_ACEOF
21692
21693
21694fi
21695
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021696{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21697echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021698if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021699 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021700else
Martin v. Löwis11437992002-04-12 09:54:03 +000021701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021702/* confdefs.h. */
21703_ACEOF
21704cat confdefs.h >>conftest.$ac_ext
21705cat >>conftest.$ac_ext <<_ACEOF
21706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021707$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021708int
21709main ()
21710{
21711static struct stat ac_aggr;
21712if (ac_aggr.st_blocks)
21713return 0;
21714 ;
21715 return 0;
21716}
21717_ACEOF
21718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021719if { (ac_try="$ac_compile"
21720case "(($ac_try" in
21721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21722 *) ac_try_echo=$ac_try;;
21723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021727 grep -v '^ *+' conftest.er1 >conftest.err
21728 rm -f conftest.er1
21729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021731 (exit $ac_status); } && {
21732 test -z "$ac_c_werror_flag" ||
21733 test ! -s conftest.err
21734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021735 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021736else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021738sed 's/^/| /' conftest.$ac_ext >&5
21739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021741/* confdefs.h. */
21742_ACEOF
21743cat confdefs.h >>conftest.$ac_ext
21744cat >>conftest.$ac_ext <<_ACEOF
21745/* end confdefs.h. */
21746$ac_includes_default
21747int
21748main ()
21749{
21750static struct stat ac_aggr;
21751if (sizeof ac_aggr.st_blocks)
21752return 0;
21753 ;
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
Skip Montanaro6dead952003-09-25 14:50:04 +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
Skip Montanaro6dead952003-09-25 14:50:04 +000021774 ac_cv_member_struct_stat_st_blocks=yes
21775else
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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021779 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021781
21782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021784
21785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021786fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021787{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21788echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21789if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021790
Martin v. Löwis11437992002-04-12 09:54:03 +000021791cat >>confdefs.h <<_ACEOF
21792#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21793_ACEOF
21794
21795
21796cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021797#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021798_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021799
21800else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021801 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021802 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021803 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21804 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021805esac
21806
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021807fi
21808
Michael W. Hudson54241132001-12-07 15:38:26 +000021809
Martin v. Löwis11437992002-04-12 09:54:03 +000021810
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021811{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21812echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021813if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021815else
Martin v. Löwis11437992002-04-12 09:54:03 +000021816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021817/* confdefs.h. */
21818_ACEOF
21819cat confdefs.h >>conftest.$ac_ext
21820cat >>conftest.$ac_ext <<_ACEOF
21821/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021822#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021823int
21824main ()
21825{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021826return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021827 ;
21828 return 0;
21829}
21830_ACEOF
21831rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021832if { (ac_try="$ac_compile"
21833case "(($ac_try" in
21834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21835 *) ac_try_echo=$ac_try;;
21836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021840 grep -v '^ *+' conftest.er1 >conftest.err
21841 rm -f conftest.er1
21842 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021844 (exit $ac_status); } && {
21845 test -z "$ac_c_werror_flag" ||
21846 test ! -s conftest.err
21847 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021848 ac_cv_header_time_altzone=yes
21849else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021851sed 's/^/| /' conftest.$ac_ext >&5
21852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021853 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021854fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21857fi
21858
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021859{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21860echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021861if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021862
21863cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021864#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021865_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021866
21867fi
21868
Guido van Rossumda88dad1995-01-26 00:46:29 +000021869was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021870{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21871echo $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 +000021872cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021873/* confdefs.h. */
21874_ACEOF
21875cat confdefs.h >>conftest.$ac_ext
21876cat >>conftest.$ac_ext <<_ACEOF
21877/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021878
21879#include <sys/types.h>
21880#include <sys/select.h>
21881#include <sys/time.h>
21882
Martin v. Löwis11437992002-04-12 09:54:03 +000021883int
21884main ()
21885{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021886;
Martin v. Löwis11437992002-04-12 09:54:03 +000021887 ;
21888 return 0;
21889}
21890_ACEOF
21891rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021892if { (ac_try="$ac_compile"
21893case "(($ac_try" in
21894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21895 *) ac_try_echo=$ac_try;;
21896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021900 grep -v '^ *+' conftest.er1 >conftest.err
21901 rm -f conftest.er1
21902 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021904 (exit $ac_status); } && {
21905 test -z "$ac_c_werror_flag" ||
21906 test ! -s conftest.err
21907 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021908
21909
21910cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021911#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021912_ACEOF
21913
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021914 was_it_defined=yes
21915
Guido van Rossumf78abae1997-01-21 22:02:36 +000021916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021918sed 's/^/| /' conftest.$ac_ext >&5
21919
Thomas Wouters477c8d52006-05-27 19:21:47 +000021920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021921fi
21922
21923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021924{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21925echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021926
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021927{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21928echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021929if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021930 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021931else
Martin v. Löwis11437992002-04-12 09:54:03 +000021932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021933/* confdefs.h. */
21934_ACEOF
21935cat confdefs.h >>conftest.$ac_ext
21936cat >>conftest.$ac_ext <<_ACEOF
21937/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021938
21939# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021940int
21941main ()
21942{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021943struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021944 ;
21945 return 0;
21946}
21947_ACEOF
21948rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021949if { (ac_try="$ac_compile"
21950case "(($ac_try" in
21951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21952 *) ac_try_echo=$ac_try;;
21953esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021957 grep -v '^ *+' conftest.er1 >conftest.err
21958 rm -f conftest.er1
21959 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021961 (exit $ac_status); } && {
21962 test -z "$ac_c_werror_flag" ||
21963 test ! -s conftest.err
21964 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021965 ac_cv_struct_addrinfo=yes
21966else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021968sed 's/^/| /' conftest.$ac_ext >&5
21969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021970 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021971fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21974fi
21975
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021976{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21977echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021978if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021979
21980cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021981#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021982_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021983
21984fi
21985
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021986{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21987echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021988if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021989 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021990else
Martin v. Löwis11437992002-04-12 09:54:03 +000021991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021992/* confdefs.h. */
21993_ACEOF
21994cat confdefs.h >>conftest.$ac_ext
21995cat >>conftest.$ac_ext <<_ACEOF
21996/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021997
21998# include <sys/types.h>
21999# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022000int
22001main ()
22002{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022003struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022004 ;
22005 return 0;
22006}
22007_ACEOF
22008rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022009if { (ac_try="$ac_compile"
22010case "(($ac_try" in
22011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22012 *) ac_try_echo=$ac_try;;
22013esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022017 grep -v '^ *+' conftest.er1 >conftest.err
22018 rm -f conftest.er1
22019 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022021 (exit $ac_status); } && {
22022 test -z "$ac_c_werror_flag" ||
22023 test ! -s conftest.err
22024 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022025 ac_cv_struct_sockaddr_storage=yes
22026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022028sed 's/^/| /' conftest.$ac_ext >&5
22029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022030 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022031fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22034fi
22035
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022036{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22037echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022038if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022039
22040cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022041#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022042_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022043
22044fi
22045
Guido van Rossum627b2d71993-12-24 10:39:16 +000022046# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022047
Michael W. Hudson54241132001-12-07 15:38:26 +000022048
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022049{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22050echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022051if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022052 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022053else
Martin v. Löwis11437992002-04-12 09:54:03 +000022054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022055/* confdefs.h. */
22056_ACEOF
22057cat confdefs.h >>conftest.$ac_ext
22058cat >>conftest.$ac_ext <<_ACEOF
22059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022060$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022061int
22062main ()
22063{
22064static int test_array [1 - 2 * !(((char) -1) < 0)];
22065test_array [0] = 0
22066
22067 ;
22068 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022069}
Martin v. Löwis11437992002-04-12 09:54:03 +000022070_ACEOF
22071rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022072if { (ac_try="$ac_compile"
22073case "(($ac_try" in
22074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22075 *) ac_try_echo=$ac_try;;
22076esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022080 grep -v '^ *+' conftest.er1 >conftest.err
22081 rm -f conftest.er1
22082 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022084 (exit $ac_status); } && {
22085 test -z "$ac_c_werror_flag" ||
22086 test ! -s conftest.err
22087 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022088 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022089else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022091sed 's/^/| /' conftest.$ac_ext >&5
22092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022093 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022095
22096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022097fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022098{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22099echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022100if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022101 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022102#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022103_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022104
22105fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022106
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022107{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22108echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022109if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022110 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022111else
22112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022113/* confdefs.h. */
22114_ACEOF
22115cat confdefs.h >>conftest.$ac_ext
22116cat >>conftest.$ac_ext <<_ACEOF
22117/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022118
Martin v. Löwis11437992002-04-12 09:54:03 +000022119int
22120main ()
22121{
22122/* FIXME: Include the comments suggested by Paul. */
22123#ifndef __cplusplus
22124 /* Ultrix mips cc rejects this. */
22125 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022126 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022127 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022128 char const *const *pcpcc;
22129 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022130 /* NEC SVR4.0.2 mips cc rejects this. */
22131 struct point {int x, y;};
22132 static struct point const zero = {0,0};
22133 /* AIX XL C 1.02.0.0 rejects this.
22134 It does not let you subtract one const X* pointer from another in
22135 an arm of an if-expression whose if-part is not a constant
22136 expression */
22137 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022138 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022139 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022140 ++pcpcc;
22141 ppc = (char**) pcpcc;
22142 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022143 { /* SCO 3.2v4 cc rejects this. */
22144 char *t;
22145 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022146
Martin v. Löwis11437992002-04-12 09:54:03 +000022147 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022148 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022149 }
22150 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22151 int x[] = {25, 17};
22152 const int *foo = &x[0];
22153 ++foo;
22154 }
22155 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22156 typedef const int *iptr;
22157 iptr p = 0;
22158 ++p;
22159 }
22160 { /* AIX XL C 1.02.0.0 rejects this saying
22161 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22162 struct s { int j; const int *ap[3]; };
22163 struct s *b; b->j = 5;
22164 }
22165 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22166 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022167 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022168 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022169 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022170#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022171
Martin v. Löwis11437992002-04-12 09:54:03 +000022172 ;
22173 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022174}
Martin v. Löwis11437992002-04-12 09:54:03 +000022175_ACEOF
22176rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022177if { (ac_try="$ac_compile"
22178case "(($ac_try" in
22179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22180 *) ac_try_echo=$ac_try;;
22181esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022185 grep -v '^ *+' conftest.er1 >conftest.err
22186 rm -f conftest.er1
22187 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022189 (exit $ac_status); } && {
22190 test -z "$ac_c_werror_flag" ||
22191 test ! -s conftest.err
22192 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022193 ac_cv_c_const=yes
22194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022196sed 's/^/| /' conftest.$ac_ext >&5
22197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022198 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022200
22201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022202fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022203{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22204echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022205if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022206
22207cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022208#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022209_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022210
22211fi
22212
Michael W. Hudson54241132001-12-07 15:38:26 +000022213
Guido van Rossumda88dad1995-01-26 00:46:29 +000022214works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022215{ echo "$as_me:$LINENO: checking for working volatile" >&5
22216echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022218/* confdefs.h. */
22219_ACEOF
22220cat confdefs.h >>conftest.$ac_ext
22221cat >>conftest.$ac_ext <<_ACEOF
22222/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022223
Martin v. Löwis11437992002-04-12 09:54:03 +000022224int
22225main ()
22226{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022227volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022228 ;
22229 return 0;
22230}
22231_ACEOF
22232rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022233if { (ac_try="$ac_compile"
22234case "(($ac_try" in
22235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22236 *) ac_try_echo=$ac_try;;
22237esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022241 grep -v '^ *+' conftest.er1 >conftest.err
22242 rm -f conftest.er1
22243 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022245 (exit $ac_status); } && {
22246 test -z "$ac_c_werror_flag" ||
22247 test ! -s conftest.err
22248 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022249 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022252sed 's/^/| /' conftest.$ac_ext >&5
22253
Martin v. Löwis11437992002-04-12 09:54:03 +000022254
22255cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022256#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022257_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022258
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022259
Guido van Rossum627b2d71993-12-24 10:39:16 +000022260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022261
22262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022263{ echo "$as_me:$LINENO: result: $works" >&5
22264echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022265
Guido van Rossumda88dad1995-01-26 00:46:29 +000022266works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022267{ echo "$as_me:$LINENO: checking for working signed char" >&5
22268echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022270/* confdefs.h. */
22271_ACEOF
22272cat confdefs.h >>conftest.$ac_ext
22273cat >>conftest.$ac_ext <<_ACEOF
22274/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022275
Martin v. Löwis11437992002-04-12 09:54:03 +000022276int
22277main ()
22278{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022279signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022280 ;
22281 return 0;
22282}
22283_ACEOF
22284rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022285if { (ac_try="$ac_compile"
22286case "(($ac_try" in
22287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22288 *) ac_try_echo=$ac_try;;
22289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022293 grep -v '^ *+' conftest.er1 >conftest.err
22294 rm -f conftest.er1
22295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022297 (exit $ac_status); } && {
22298 test -z "$ac_c_werror_flag" ||
22299 test ! -s conftest.err
22300 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022301 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022304sed 's/^/| /' conftest.$ac_ext >&5
22305
Martin v. Löwis11437992002-04-12 09:54:03 +000022306
22307cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022308#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022309_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022310
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022311
Guido van Rossum7f43da71994-08-01 12:15:30 +000022312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022313
22314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022315{ echo "$as_me:$LINENO: result: $works" >&5
22316echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022317
Guido van Rossumda88dad1995-01-26 00:46:29 +000022318have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022319{ echo "$as_me:$LINENO: checking for prototypes" >&5
22320echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022322/* confdefs.h. */
22323_ACEOF
22324cat confdefs.h >>conftest.$ac_ext
22325cat >>conftest.$ac_ext <<_ACEOF
22326/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022327int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022328int
22329main ()
22330{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022331return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022332 ;
22333 return 0;
22334}
22335_ACEOF
22336rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022337if { (ac_try="$ac_compile"
22338case "(($ac_try" in
22339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22340 *) ac_try_echo=$ac_try;;
22341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022345 grep -v '^ *+' conftest.er1 >conftest.err
22346 rm -f conftest.er1
22347 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022349 (exit $ac_status); } && {
22350 test -z "$ac_c_werror_flag" ||
22351 test ! -s conftest.err
22352 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022353
22354
22355cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022356#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022357_ACEOF
22358
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022359 have_prototypes=yes
22360
Guido van Rossumf78abae1997-01-21 22:02:36 +000022361else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022363sed 's/^/| /' conftest.$ac_ext >&5
22364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022365
Guido van Rossum7f43da71994-08-01 12:15:30 +000022366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022367
22368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022369{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22370echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022371
Guido van Rossumda88dad1995-01-26 00:46:29 +000022372works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022373{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22374echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022375cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022376/* confdefs.h. */
22377_ACEOF
22378cat confdefs.h >>conftest.$ac_ext
22379cat >>conftest.$ac_ext <<_ACEOF
22380/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022381
22382#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022383int foo(int x, ...) {
22384 va_list va;
22385 va_start(va, x);
22386 va_arg(va, int);
22387 va_arg(va, char *);
22388 va_arg(va, double);
22389 return 0;
22390}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022391
Martin v. Löwis11437992002-04-12 09:54:03 +000022392int
22393main ()
22394{
Guido van Rossum90eea071996-08-30 20:58:57 +000022395return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022396 ;
22397 return 0;
22398}
22399_ACEOF
22400rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022401if { (ac_try="$ac_compile"
22402case "(($ac_try" in
22403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22404 *) ac_try_echo=$ac_try;;
22405esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022409 grep -v '^ *+' conftest.er1 >conftest.err
22410 rm -f conftest.er1
22411 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022413 (exit $ac_status); } && {
22414 test -z "$ac_c_werror_flag" ||
22415 test ! -s conftest.err
22416 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022417
22418
22419cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022420#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022421_ACEOF
22422
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022423 works=yes
22424
Guido van Rossumf78abae1997-01-21 22:02:36 +000022425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022427sed 's/^/| /' conftest.$ac_ext >&5
22428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022429
Guido van Rossum627b2d71993-12-24 10:39:16 +000022430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022431
22432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022433{ echo "$as_me:$LINENO: result: $works" >&5
22434echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022435
Martin v. Löwisd6320502004-08-12 13:45:08 +000022436# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022437{ echo "$as_me:$LINENO: checking for socketpair" >&5
22438echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022439cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022440/* confdefs.h. */
22441_ACEOF
22442cat confdefs.h >>conftest.$ac_ext
22443cat >>conftest.$ac_ext <<_ACEOF
22444/* end confdefs.h. */
22445
22446#include <sys/types.h>
22447#include <sys/socket.h>
22448
22449int
22450main ()
22451{
22452void *x=socketpair
22453 ;
22454 return 0;
22455}
22456_ACEOF
22457rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022458if { (ac_try="$ac_compile"
22459case "(($ac_try" in
22460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22461 *) ac_try_echo=$ac_try;;
22462esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022466 grep -v '^ *+' conftest.er1 >conftest.err
22467 rm -f conftest.er1
22468 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022470 (exit $ac_status); } && {
22471 test -z "$ac_c_werror_flag" ||
22472 test ! -s conftest.err
22473 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022474
22475cat >>confdefs.h <<\_ACEOF
22476#define HAVE_SOCKETPAIR 1
22477_ACEOF
22478
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022479 { echo "$as_me:$LINENO: result: yes" >&5
22480echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022482 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022483sed 's/^/| /' conftest.$ac_ext >&5
22484
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022485 { echo "$as_me:$LINENO: result: no" >&5
22486echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022487
22488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022489
22490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022491
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022492# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022493{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22494echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022496/* confdefs.h. */
22497_ACEOF
22498cat confdefs.h >>conftest.$ac_ext
22499cat >>conftest.$ac_ext <<_ACEOF
22500/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022501#include <sys/types.h>
22502#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022503int
22504main ()
22505{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022506struct sockaddr x;
22507x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022508 ;
22509 return 0;
22510}
22511_ACEOF
22512rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022513if { (ac_try="$ac_compile"
22514case "(($ac_try" in
22515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22516 *) ac_try_echo=$ac_try;;
22517esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022521 grep -v '^ *+' conftest.er1 >conftest.err
22522 rm -f conftest.er1
22523 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022525 (exit $ac_status); } && {
22526 test -z "$ac_c_werror_flag" ||
22527 test ! -s conftest.err
22528 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022529 { echo "$as_me:$LINENO: result: yes" >&5
22530echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022531
22532cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022533#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022534_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022535
22536else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022538sed 's/^/| /' conftest.$ac_ext >&5
22539
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022540 { echo "$as_me:$LINENO: result: no" >&5
22541echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022543
22544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022545
Guido van Rossumda88dad1995-01-26 00:46:29 +000022546va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022547{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22548echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022549cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022550/* confdefs.h. */
22551_ACEOF
22552cat confdefs.h >>conftest.$ac_ext
22553cat >>conftest.$ac_ext <<_ACEOF
22554/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022555
22556#ifdef HAVE_STDARG_PROTOTYPES
22557#include <stdarg.h>
22558#else
22559#include <varargs.h>
22560#endif
22561
Martin v. Löwis11437992002-04-12 09:54:03 +000022562int
22563main ()
22564{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022565va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022566 ;
22567 return 0;
22568}
22569_ACEOF
22570rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022571if { (ac_try="$ac_compile"
22572case "(($ac_try" in
22573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22574 *) ac_try_echo=$ac_try;;
22575esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022579 grep -v '^ *+' conftest.er1 >conftest.err
22580 rm -f conftest.er1
22581 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022583 (exit $ac_status); } && {
22584 test -z "$ac_c_werror_flag" ||
22585 test ! -s conftest.err
22586 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022587 :
22588else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022590sed 's/^/| /' conftest.$ac_ext >&5
22591
Martin v. Löwis11437992002-04-12 09:54:03 +000022592
22593
22594cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022595#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022596_ACEOF
22597
Guido van Rossumda88dad1995-01-26 00:46:29 +000022598 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022599
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022601
22602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022603{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22604echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022605
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022606# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022607
22608
22609
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022610{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22611echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022612if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022614else
Martin v. Löwis11437992002-04-12 09:54:03 +000022615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022616/* confdefs.h. */
22617_ACEOF
22618cat confdefs.h >>conftest.$ac_ext
22619cat >>conftest.$ac_ext <<_ACEOF
22620/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022621/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22622 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22623#define gethostbyname_r innocuous_gethostbyname_r
22624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022625/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022626 which can conflict with char gethostbyname_r (); below.
22627 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022628 <limits.h> exists even on freestanding compilers. */
22629
22630#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022631# include <limits.h>
22632#else
22633# include <assert.h>
22634#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022635
22636#undef gethostbyname_r
22637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022638/* Override any GCC internal prototype to avoid an error.
22639 Use char because int might match the return type of a GCC
22640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022641#ifdef __cplusplus
22642extern "C"
22643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022644char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022645/* The GNU C library defines this for functions which it implements
22646 to always fail with ENOSYS. Some functions are actually named
22647 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022648#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022649choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022650#endif
22651
Skip Montanaro6dead952003-09-25 14:50:04 +000022652int
22653main ()
22654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022655return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022656 ;
22657 return 0;
22658}
22659_ACEOF
22660rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022661if { (ac_try="$ac_link"
22662case "(($ac_try" in
22663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22664 *) ac_try_echo=$ac_try;;
22665esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022667 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022669 grep -v '^ *+' conftest.er1 >conftest.err
22670 rm -f conftest.er1
22671 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022673 (exit $ac_status); } && {
22674 test -z "$ac_c_werror_flag" ||
22675 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022676 } && test -s conftest$ac_exeext &&
22677 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022678 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022681sed 's/^/| /' conftest.$ac_ext >&5
22682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022683 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022685
22686rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022687 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022689{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22690echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22691if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022692
Martin v. Löwis11437992002-04-12 09:54:03 +000022693 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022694#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022695_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022696
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022697 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22698echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022699 OLD_CFLAGS=$CFLAGS
22700 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022702/* confdefs.h. */
22703_ACEOF
22704cat confdefs.h >>conftest.$ac_ext
22705cat >>conftest.$ac_ext <<_ACEOF
22706/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022707
22708# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022709
Martin v. Löwis11437992002-04-12 09:54:03 +000022710int
22711main ()
22712{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022713
22714 char *name;
22715 struct hostent *he, *res;
22716 char buffer[2048];
22717 int buflen = 2048;
22718 int h_errnop;
22719
22720 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022721
22722 ;
22723 return 0;
22724}
22725_ACEOF
22726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022727if { (ac_try="$ac_compile"
22728case "(($ac_try" in
22729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22730 *) ac_try_echo=$ac_try;;
22731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022735 grep -v '^ *+' conftest.er1 >conftest.err
22736 rm -f conftest.er1
22737 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022739 (exit $ac_status); } && {
22740 test -z "$ac_c_werror_flag" ||
22741 test ! -s conftest.err
22742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022743
22744 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022745#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022746_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022747
Martin v. Löwis11437992002-04-12 09:54:03 +000022748
22749cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022750#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022751_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022752
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022753 { echo "$as_me:$LINENO: result: yes" >&5
22754echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022755
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022756else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022758sed 's/^/| /' conftest.$ac_ext >&5
22759
Martin v. Löwis11437992002-04-12 09:54:03 +000022760
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022761 { echo "$as_me:$LINENO: result: no" >&5
22762echo "${ECHO_T}no" >&6; }
22763 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22764echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022766/* confdefs.h. */
22767_ACEOF
22768cat confdefs.h >>conftest.$ac_ext
22769cat >>conftest.$ac_ext <<_ACEOF
22770/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022771
22772# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022773
Martin v. Löwis11437992002-04-12 09:54:03 +000022774int
22775main ()
22776{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022777
22778 char *name;
22779 struct hostent *he;
22780 char buffer[2048];
22781 int buflen = 2048;
22782 int h_errnop;
22783
22784 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022785
22786 ;
22787 return 0;
22788}
22789_ACEOF
22790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022791if { (ac_try="$ac_compile"
22792case "(($ac_try" in
22793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22794 *) ac_try_echo=$ac_try;;
22795esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022799 grep -v '^ *+' conftest.er1 >conftest.err
22800 rm -f conftest.er1
22801 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022803 (exit $ac_status); } && {
22804 test -z "$ac_c_werror_flag" ||
22805 test ! -s conftest.err
22806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022807
22808 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022809#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022810_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022811
Martin v. Löwis11437992002-04-12 09:54:03 +000022812
22813cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022814#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022815_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022816
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022817 { echo "$as_me:$LINENO: result: yes" >&5
22818echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022819
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022820else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022822sed 's/^/| /' conftest.$ac_ext >&5
22823
Martin v. Löwis11437992002-04-12 09:54:03 +000022824
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022825 { echo "$as_me:$LINENO: result: no" >&5
22826echo "${ECHO_T}no" >&6; }
22827 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22828echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022830/* confdefs.h. */
22831_ACEOF
22832cat confdefs.h >>conftest.$ac_ext
22833cat >>conftest.$ac_ext <<_ACEOF
22834/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022835
22836# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022837
Martin v. Löwis11437992002-04-12 09:54:03 +000022838int
22839main ()
22840{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022841
22842 char *name;
22843 struct hostent *he;
22844 struct hostent_data data;
22845
22846 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022847
22848 ;
22849 return 0;
22850}
22851_ACEOF
22852rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022853if { (ac_try="$ac_compile"
22854case "(($ac_try" in
22855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22856 *) ac_try_echo=$ac_try;;
22857esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022861 grep -v '^ *+' conftest.er1 >conftest.err
22862 rm -f conftest.er1
22863 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022865 (exit $ac_status); } && {
22866 test -z "$ac_c_werror_flag" ||
22867 test ! -s conftest.err
22868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022869
22870 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022871#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022872_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022873
Martin v. Löwis11437992002-04-12 09:54:03 +000022874
22875cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022876#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022877_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022878
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022879 { echo "$as_me:$LINENO: result: yes" >&5
22880echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022881
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022882else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022884sed 's/^/| /' conftest.$ac_ext >&5
22885
Martin v. Löwis11437992002-04-12 09:54:03 +000022886
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022887 { echo "$as_me:$LINENO: result: no" >&5
22888echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022889
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022891
22892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022893
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022895
22896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022897
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022899
22900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022901 CFLAGS=$OLD_CFLAGS
22902
22903else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022904
Martin v. Löwis11437992002-04-12 09:54:03 +000022905
22906for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022907do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022908as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22909{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22910echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022911if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022912 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022913else
Martin v. Löwis11437992002-04-12 09:54:03 +000022914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022915/* confdefs.h. */
22916_ACEOF
22917cat confdefs.h >>conftest.$ac_ext
22918cat >>conftest.$ac_ext <<_ACEOF
22919/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022920/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22921 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22922#define $ac_func innocuous_$ac_func
22923
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022924/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022925 which can conflict with char $ac_func (); below.
22926 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022927 <limits.h> exists even on freestanding compilers. */
22928
22929#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022930# include <limits.h>
22931#else
22932# include <assert.h>
22933#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022934
22935#undef $ac_func
22936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022937/* Override any GCC internal prototype to avoid an error.
22938 Use char because int might match the return type of a GCC
22939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022940#ifdef __cplusplus
22941extern "C"
22942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022943char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022944/* The GNU C library defines this for functions which it implements
22945 to always fail with ENOSYS. Some functions are actually named
22946 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022947#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022948choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022949#endif
22950
Skip Montanaro6dead952003-09-25 14:50:04 +000022951int
22952main ()
22953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022954return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022955 ;
22956 return 0;
22957}
22958_ACEOF
22959rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022960if { (ac_try="$ac_link"
22961case "(($ac_try" in
22962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22963 *) ac_try_echo=$ac_try;;
22964esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022966 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022968 grep -v '^ *+' conftest.er1 >conftest.err
22969 rm -f conftest.er1
22970 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022972 (exit $ac_status); } && {
22973 test -z "$ac_c_werror_flag" ||
22974 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022975 } && test -s conftest$ac_exeext &&
22976 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022977 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022980sed 's/^/| /' conftest.$ac_ext >&5
22981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022982 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022984
22985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022986 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022987fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022988ac_res=`eval echo '${'$as_ac_var'}'`
22989 { echo "$as_me:$LINENO: result: $ac_res" >&5
22990echo "${ECHO_T}$ac_res" >&6; }
22991if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022992 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022993#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022994_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022995
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022996fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022997done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022998
Michael W. Hudson54241132001-12-07 15:38:26 +000022999
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023000fi
23001
Michael W. Hudson54241132001-12-07 15:38:26 +000023002
23003
23004
23005
23006
23007
Guido van Rossum627b2d71993-12-24 10:39:16 +000023008# checks for system services
23009# (none yet)
23010
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023011# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023012{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23013echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023014if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023015 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023016else
Martin v. Löwis11437992002-04-12 09:54:03 +000023017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023018/* confdefs.h. */
23019_ACEOF
23020cat confdefs.h >>conftest.$ac_ext
23021cat >>conftest.$ac_ext <<_ACEOF
23022/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023023/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23024 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23025#define __fpu_control innocuous___fpu_control
23026
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023027/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023028 which can conflict with char __fpu_control (); below.
23029 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023030 <limits.h> exists even on freestanding compilers. */
23031
23032#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023033# include <limits.h>
23034#else
23035# include <assert.h>
23036#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023037
23038#undef __fpu_control
23039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023040/* Override any GCC internal prototype to avoid an error.
23041 Use char because int might match the return type of a GCC
23042 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023043#ifdef __cplusplus
23044extern "C"
23045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023046char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023047/* The GNU C library defines this for functions which it implements
23048 to always fail with ENOSYS. Some functions are actually named
23049 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023050#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023051choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023052#endif
23053
Skip Montanaro6dead952003-09-25 14:50:04 +000023054int
23055main ()
23056{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023057return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023058 ;
23059 return 0;
23060}
23061_ACEOF
23062rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023063if { (ac_try="$ac_link"
23064case "(($ac_try" in
23065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23066 *) ac_try_echo=$ac_try;;
23067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023071 grep -v '^ *+' conftest.er1 >conftest.err
23072 rm -f conftest.er1
23073 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023075 (exit $ac_status); } && {
23076 test -z "$ac_c_werror_flag" ||
23077 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023078 } && test -s conftest$ac_exeext &&
23079 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023080 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023083sed 's/^/| /' conftest.$ac_ext >&5
23084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023085 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023087
23088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023089 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023090fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023091{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23092echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23093if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023094 :
23095else
Martin v. Löwis11437992002-04-12 09:54:03 +000023096
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023097{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23098echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023099if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023100 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023101else
Martin v. Löwis11437992002-04-12 09:54:03 +000023102 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023103LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023105/* confdefs.h. */
23106_ACEOF
23107cat confdefs.h >>conftest.$ac_ext
23108cat >>conftest.$ac_ext <<_ACEOF
23109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023111/* Override any GCC internal prototype to avoid an error.
23112 Use char because int might match the return type of a GCC
23113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023114#ifdef __cplusplus
23115extern "C"
23116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023117char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023118int
23119main ()
23120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023121return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023122 ;
23123 return 0;
23124}
23125_ACEOF
23126rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023127if { (ac_try="$ac_link"
23128case "(($ac_try" in
23129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23130 *) ac_try_echo=$ac_try;;
23131esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023133 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023135 grep -v '^ *+' conftest.er1 >conftest.err
23136 rm -f conftest.er1
23137 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023139 (exit $ac_status); } && {
23140 test -z "$ac_c_werror_flag" ||
23141 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023142 } && test -s conftest$ac_exeext &&
23143 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023144 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023145else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023147sed 's/^/| /' conftest.$ac_ext >&5
23148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023149 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023151
23152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023154LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023155fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023156{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23157echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23158if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023159 cat >>confdefs.h <<_ACEOF
23160#define HAVE_LIBIEEE 1
23161_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023162
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023163 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023164
Guido van Rossum627b2d71993-12-24 10:39:16 +000023165fi
23166
Michael W. Hudson54241132001-12-07 15:38:26 +000023167
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023168fi
23169
Michael W. Hudson54241132001-12-07 15:38:26 +000023170
Guido van Rossum7f253911997-05-09 02:42:48 +000023171# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023172{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23173echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023175# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023176if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023177 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023178if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023179then
23180
23181cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023182#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023183_ACEOF
23184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023185 { echo "$as_me:$LINENO: result: yes" >&5
23186echo "${ECHO_T}yes" >&6; }
23187else { echo "$as_me:$LINENO: result: no" >&5
23188echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023189fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023191 { echo "$as_me:$LINENO: result: no" >&5
23192echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023193fi
23194
Guido van Rossum7f253911997-05-09 02:42:48 +000023195
Guido van Rossum7f43da71994-08-01 12:15:30 +000023196# check for --with-libm=...
23197
Guido van Rossum563e7081996-09-10 18:20:48 +000023198case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023199Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023200*) LIBM=-lm
23201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023202{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23203echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023205# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023206if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023207 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023208if test "$withval" = no
23209then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023210 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23211echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023212elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023213then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023214 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23215echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23216else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23217echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023218 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023219fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023221 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23222echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023223fi
23224
Guido van Rossum7f43da71994-08-01 12:15:30 +000023225
23226# check for --with-libc=...
23227
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023228{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23229echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023231# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023232if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023233 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023234if test "$withval" = no
23235then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023236 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23237echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023238elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023239then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023240 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23241echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23242else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23243echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023244 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023245fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023247 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23248echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023249fi
23250
Guido van Rossum7f43da71994-08-01 12:15:30 +000023251
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023252# **************************************************
23253# * Check for various properties of floating point *
23254# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023255
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023256{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23257echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023258if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023259 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023260else
23261
23262if test "$cross_compiling" = yes; then
23263 ac_cv_little_endian_double=no
23264else
23265 cat >conftest.$ac_ext <<_ACEOF
23266/* confdefs.h. */
23267_ACEOF
23268cat confdefs.h >>conftest.$ac_ext
23269cat >>conftest.$ac_ext <<_ACEOF
23270/* end confdefs.h. */
23271
23272#include <string.h>
23273int main() {
23274 double x = 9006104071832581.0;
23275 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23276 return 0;
23277 else
23278 return 1;
23279}
23280
23281_ACEOF
23282rm -f conftest$ac_exeext
23283if { (ac_try="$ac_link"
23284case "(($ac_try" in
23285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23286 *) ac_try_echo=$ac_try;;
23287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023289 (eval "$ac_link") 2>&5
23290 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023292 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23293 { (case "(($ac_try" in
23294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23295 *) ac_try_echo=$ac_try;;
23296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023298 (eval "$ac_try") 2>&5
23299 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023301 (exit $ac_status); }; }; then
23302 ac_cv_little_endian_double=yes
23303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023304 echo "$as_me: program exited with status $ac_status" >&5
23305echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023306sed 's/^/| /' conftest.$ac_ext >&5
23307
23308( exit $ac_status )
23309ac_cv_little_endian_double=no
23310fi
23311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23312fi
23313
23314
23315fi
23316
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023317{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23318echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023319if test "$ac_cv_little_endian_double" = yes
23320then
23321
23322cat >>confdefs.h <<\_ACEOF
23323#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23324_ACEOF
23325
23326fi
23327
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023328{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23329echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023330if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023331 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023332else
23333
23334if test "$cross_compiling" = yes; then
23335 ac_cv_big_endian_double=no
23336else
23337 cat >conftest.$ac_ext <<_ACEOF
23338/* confdefs.h. */
23339_ACEOF
23340cat confdefs.h >>conftest.$ac_ext
23341cat >>conftest.$ac_ext <<_ACEOF
23342/* end confdefs.h. */
23343
23344#include <string.h>
23345int main() {
23346 double x = 9006104071832581.0;
23347 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23348 return 0;
23349 else
23350 return 1;
23351}
23352
23353_ACEOF
23354rm -f conftest$ac_exeext
23355if { (ac_try="$ac_link"
23356case "(($ac_try" in
23357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23358 *) ac_try_echo=$ac_try;;
23359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023361 (eval "$ac_link") 2>&5
23362 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023364 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23365 { (case "(($ac_try" in
23366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23367 *) ac_try_echo=$ac_try;;
23368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023370 (eval "$ac_try") 2>&5
23371 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023373 (exit $ac_status); }; }; then
23374 ac_cv_big_endian_double=yes
23375else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023376 echo "$as_me: program exited with status $ac_status" >&5
23377echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023378sed 's/^/| /' conftest.$ac_ext >&5
23379
23380( exit $ac_status )
23381ac_cv_big_endian_double=no
23382fi
23383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23384fi
23385
23386
23387fi
23388
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023389{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23390echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023391if test "$ac_cv_big_endian_double" = yes
23392then
23393
23394cat >>confdefs.h <<\_ACEOF
23395#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23396_ACEOF
23397
23398fi
23399
23400# Some ARM platforms use a mixed-endian representation for doubles.
23401# While Python doesn't currently have full support for these platforms
23402# (see e.g., issue 1762561), we can at least make sure that float <-> string
23403# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023404{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23405echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023406if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023407 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023408else
23409
23410if test "$cross_compiling" = yes; then
23411 ac_cv_mixed_endian_double=no
23412else
23413 cat >conftest.$ac_ext <<_ACEOF
23414/* confdefs.h. */
23415_ACEOF
23416cat confdefs.h >>conftest.$ac_ext
23417cat >>conftest.$ac_ext <<_ACEOF
23418/* end confdefs.h. */
23419
23420#include <string.h>
23421int main() {
23422 double x = 9006104071832581.0;
23423 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23424 return 0;
23425 else
23426 return 1;
23427}
23428
23429_ACEOF
23430rm -f conftest$ac_exeext
23431if { (ac_try="$ac_link"
23432case "(($ac_try" in
23433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23434 *) ac_try_echo=$ac_try;;
23435esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023437 (eval "$ac_link") 2>&5
23438 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23441 { (case "(($ac_try" in
23442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23443 *) ac_try_echo=$ac_try;;
23444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023446 (eval "$ac_try") 2>&5
23447 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023449 (exit $ac_status); }; }; then
23450 ac_cv_mixed_endian_double=yes
23451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023452 echo "$as_me: program exited with status $ac_status" >&5
23453echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023454sed 's/^/| /' conftest.$ac_ext >&5
23455
23456( exit $ac_status )
23457ac_cv_mixed_endian_double=no
23458fi
23459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23460fi
23461
23462
23463fi
23464
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023465{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23466echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023467if test "$ac_cv_mixed_endian_double" = yes
23468then
23469
23470cat >>confdefs.h <<\_ACEOF
23471#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23472_ACEOF
23473
23474fi
23475
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023476# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023477# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023478# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023479# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023480# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023481# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023482
23483# This inline assembler syntax may also work for suncc and icc,
23484# so we try it on all platforms.
23485
23486{ 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 +000023487echo $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 +000023488cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023489/* confdefs.h. */
23490_ACEOF
23491cat confdefs.h >>conftest.$ac_ext
23492cat >>conftest.$ac_ext <<_ACEOF
23493/* end confdefs.h. */
23494
23495int
23496main ()
23497{
23498
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023499 unsigned short cw;
23500 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23501 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023502
23503 ;
23504 return 0;
23505}
23506_ACEOF
23507rm -f conftest.$ac_objext
23508if { (ac_try="$ac_compile"
23509case "(($ac_try" in
23510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23511 *) ac_try_echo=$ac_try;;
23512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023514 (eval "$ac_compile") 2>conftest.er1
23515 ac_status=$?
23516 grep -v '^ *+' conftest.er1 >conftest.err
23517 rm -f conftest.er1
23518 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023520 (exit $ac_status); } && {
23521 test -z "$ac_c_werror_flag" ||
23522 test ! -s conftest.err
23523 } && test -s conftest.$ac_objext; then
23524 have_gcc_asm_for_x87=yes
23525else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023526 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023527sed 's/^/| /' conftest.$ac_ext >&5
23528
23529 have_gcc_asm_for_x87=no
23530fi
23531
23532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023533{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023534echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023535if test "$have_gcc_asm_for_x87" = yes
23536then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023537
23538cat >>confdefs.h <<\_ACEOF
23539#define HAVE_GCC_ASM_FOR_X87 1
23540_ACEOF
23541
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023542fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023543
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023544# Detect whether system arithmetic is subject to x87-style double
23545# rounding issues. The result of this test has little meaning on non
23546# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23547# mode is round-to-nearest and double rounding issues are present, and
23548# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023549{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23550echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023551# $BASECFLAGS may affect the result
23552ac_save_cc="$CC"
23553CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023554if test "$cross_compiling" = yes; then
23555 ac_cv_x87_double_rounding=no
23556else
23557 cat >conftest.$ac_ext <<_ACEOF
23558/* confdefs.h. */
23559_ACEOF
23560cat confdefs.h >>conftest.$ac_ext
23561cat >>conftest.$ac_ext <<_ACEOF
23562/* end confdefs.h. */
23563
23564#include <stdlib.h>
23565#include <math.h>
23566int main() {
23567 volatile double x, y, z;
23568 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23569 x = 0.99999999999999989; /* 1-2**-53 */
23570 y = 1./x;
23571 if (y != 1.)
23572 exit(0);
23573 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23574 x = 1e16;
23575 y = 2.99999;
23576 z = x + y;
23577 if (z != 1e16+4.)
23578 exit(0);
23579 /* both tests show evidence of double rounding */
23580 exit(1);
23581}
23582
23583_ACEOF
23584rm -f conftest$ac_exeext
23585if { (ac_try="$ac_link"
23586case "(($ac_try" in
23587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23588 *) ac_try_echo=$ac_try;;
23589esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023591 (eval "$ac_link") 2>&5
23592 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23595 { (case "(($ac_try" in
23596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23597 *) ac_try_echo=$ac_try;;
23598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023600 (eval "$ac_try") 2>&5
23601 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023603 (exit $ac_status); }; }; then
23604 ac_cv_x87_double_rounding=no
23605else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023606 echo "$as_me: program exited with status $ac_status" >&5
23607echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023608sed 's/^/| /' conftest.$ac_ext >&5
23609
23610( exit $ac_status )
23611ac_cv_x87_double_rounding=yes
23612fi
23613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23614fi
23615
23616
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023617CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023618{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23619echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023620if test "$ac_cv_x87_double_rounding" = yes
23621then
23622
23623cat >>confdefs.h <<\_ACEOF
23624#define X87_DOUBLE_ROUNDING 1
23625_ACEOF
23626
23627fi
23628
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023629# ************************************
23630# * Check for mathematical functions *
23631# ************************************
23632
23633LIBS_SAVE=$LIBS
23634LIBS="$LIBS $LIBM"
23635
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023636# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23637# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023638{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23639echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023640if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023641 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023642else
23643
23644if test "$cross_compiling" = yes; then
23645 ac_cv_tanh_preserves_zero_sign=no
23646else
23647 cat >conftest.$ac_ext <<_ACEOF
23648/* confdefs.h. */
23649_ACEOF
23650cat confdefs.h >>conftest.$ac_ext
23651cat >>conftest.$ac_ext <<_ACEOF
23652/* end confdefs.h. */
23653
23654#include <math.h>
23655#include <stdlib.h>
23656int main() {
23657 /* return 0 if either negative zeros don't exist
23658 on this platform or if negative zeros exist
23659 and tanh(-0.) == -0. */
23660 if (atan2(0., -1.) == atan2(-0., -1.) ||
23661 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23662 else exit(1);
23663}
23664
23665_ACEOF
23666rm -f conftest$ac_exeext
23667if { (ac_try="$ac_link"
23668case "(($ac_try" in
23669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23670 *) ac_try_echo=$ac_try;;
23671esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023673 (eval "$ac_link") 2>&5
23674 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023676 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23677 { (case "(($ac_try" in
23678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23679 *) ac_try_echo=$ac_try;;
23680esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023682 (eval "$ac_try") 2>&5
23683 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023685 (exit $ac_status); }; }; then
23686 ac_cv_tanh_preserves_zero_sign=yes
23687else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023688 echo "$as_me: program exited with status $ac_status" >&5
23689echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023690sed 's/^/| /' conftest.$ac_ext >&5
23691
23692( exit $ac_status )
23693ac_cv_tanh_preserves_zero_sign=no
23694fi
23695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23696fi
23697
23698
23699fi
23700
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023701{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23702echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023703if test "$ac_cv_tanh_preserves_zero_sign" = yes
23704then
23705
23706cat >>confdefs.h <<\_ACEOF
23707#define TANH_PRESERVES_ZERO_SIGN 1
23708_ACEOF
23709
23710fi
23711
23712
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023713
Michael W. Hudson54241132001-12-07 15:38:26 +000023714
Christian Heimes99170a52007-12-19 02:07:34 +000023715
23716
23717
23718
23719
Mark Dickinsonf2537862009-04-18 13:58:18 +000023720
Mark Dickinson9c113362009-09-05 10:36:23 +000023721for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23722do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023723as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23724{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23725echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023726if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023727 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023728else
23729 cat >conftest.$ac_ext <<_ACEOF
23730/* confdefs.h. */
23731_ACEOF
23732cat confdefs.h >>conftest.$ac_ext
23733cat >>conftest.$ac_ext <<_ACEOF
23734/* end confdefs.h. */
23735/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23736 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23737#define $ac_func innocuous_$ac_func
23738
23739/* System header to define __stub macros and hopefully few prototypes,
23740 which can conflict with char $ac_func (); below.
23741 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23742 <limits.h> exists even on freestanding compilers. */
23743
23744#ifdef __STDC__
23745# include <limits.h>
23746#else
23747# include <assert.h>
23748#endif
23749
23750#undef $ac_func
23751
23752/* Override any GCC internal prototype to avoid an error.
23753 Use char because int might match the return type of a GCC
23754 builtin and then its argument prototype would still apply. */
23755#ifdef __cplusplus
23756extern "C"
23757#endif
23758char $ac_func ();
23759/* The GNU C library defines this for functions which it implements
23760 to always fail with ENOSYS. Some functions are actually named
23761 something starting with __ and the normal name is an alias. */
23762#if defined __stub_$ac_func || defined __stub___$ac_func
23763choke me
23764#endif
23765
23766int
23767main ()
23768{
23769return $ac_func ();
23770 ;
23771 return 0;
23772}
23773_ACEOF
23774rm -f conftest.$ac_objext conftest$ac_exeext
23775if { (ac_try="$ac_link"
23776case "(($ac_try" in
23777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23778 *) ac_try_echo=$ac_try;;
23779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023781 (eval "$ac_link") 2>conftest.er1
23782 ac_status=$?
23783 grep -v '^ *+' conftest.er1 >conftest.err
23784 rm -f conftest.er1
23785 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023787 (exit $ac_status); } && {
23788 test -z "$ac_c_werror_flag" ||
23789 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023790 } && test -s conftest$ac_exeext &&
23791 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023792 eval "$as_ac_var=yes"
23793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023794 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023795sed 's/^/| /' conftest.$ac_ext >&5
23796
23797 eval "$as_ac_var=no"
23798fi
23799
23800rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23801 conftest$ac_exeext conftest.$ac_ext
23802fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023803ac_res=`eval echo '${'$as_ac_var'}'`
23804 { echo "$as_me:$LINENO: result: $ac_res" >&5
23805echo "${ECHO_T}$ac_res" >&6; }
23806if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023807 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023808#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023809_ACEOF
23810
23811fi
23812done
23813
23814
23815
23816
23817
23818
23819for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023820do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023821as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23822{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23823echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023824if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023825 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023826else
23827 cat >conftest.$ac_ext <<_ACEOF
23828/* confdefs.h. */
23829_ACEOF
23830cat confdefs.h >>conftest.$ac_ext
23831cat >>conftest.$ac_ext <<_ACEOF
23832/* end confdefs.h. */
23833/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23834 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23835#define $ac_func innocuous_$ac_func
23836
23837/* System header to define __stub macros and hopefully few prototypes,
23838 which can conflict with char $ac_func (); below.
23839 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23840 <limits.h> exists even on freestanding compilers. */
23841
23842#ifdef __STDC__
23843# include <limits.h>
23844#else
23845# include <assert.h>
23846#endif
23847
23848#undef $ac_func
23849
23850/* Override any GCC internal prototype to avoid an error.
23851 Use char because int might match the return type of a GCC
23852 builtin and then its argument prototype would still apply. */
23853#ifdef __cplusplus
23854extern "C"
23855#endif
23856char $ac_func ();
23857/* The GNU C library defines this for functions which it implements
23858 to always fail with ENOSYS. Some functions are actually named
23859 something starting with __ and the normal name is an alias. */
23860#if defined __stub_$ac_func || defined __stub___$ac_func
23861choke me
23862#endif
23863
23864int
23865main ()
23866{
23867return $ac_func ();
23868 ;
23869 return 0;
23870}
23871_ACEOF
23872rm -f conftest.$ac_objext conftest$ac_exeext
23873if { (ac_try="$ac_link"
23874case "(($ac_try" in
23875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23876 *) ac_try_echo=$ac_try;;
23877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023879 (eval "$ac_link") 2>conftest.er1
23880 ac_status=$?
23881 grep -v '^ *+' conftest.er1 >conftest.err
23882 rm -f conftest.er1
23883 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023885 (exit $ac_status); } && {
23886 test -z "$ac_c_werror_flag" ||
23887 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023888 } && test -s conftest$ac_exeext &&
23889 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023890 eval "$as_ac_var=yes"
23891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023892 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023893sed 's/^/| /' conftest.$ac_ext >&5
23894
23895 eval "$as_ac_var=no"
23896fi
23897
23898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23899 conftest$ac_exeext conftest.$ac_ext
23900fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023901ac_res=`eval echo '${'$as_ac_var'}'`
23902 { echo "$as_me:$LINENO: result: $ac_res" >&5
23903echo "${ECHO_T}$ac_res" >&6; }
23904if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023905 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023906#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023907_ACEOF
23908
23909fi
23910done
23911
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023912{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23913echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023914if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023915 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023916else
23917 cat >conftest.$ac_ext <<_ACEOF
23918/* confdefs.h. */
23919_ACEOF
23920cat confdefs.h >>conftest.$ac_ext
23921cat >>conftest.$ac_ext <<_ACEOF
23922/* end confdefs.h. */
23923#include <math.h>
23924
23925int
23926main ()
23927{
23928#ifndef isinf
23929 (void) isinf;
23930#endif
23931
23932 ;
23933 return 0;
23934}
23935_ACEOF
23936rm -f conftest.$ac_objext
23937if { (ac_try="$ac_compile"
23938case "(($ac_try" in
23939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23940 *) ac_try_echo=$ac_try;;
23941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023943 (eval "$ac_compile") 2>conftest.er1
23944 ac_status=$?
23945 grep -v '^ *+' conftest.er1 >conftest.err
23946 rm -f conftest.er1
23947 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023949 (exit $ac_status); } && {
23950 test -z "$ac_c_werror_flag" ||
23951 test ! -s conftest.err
23952 } && test -s conftest.$ac_objext; then
23953 ac_cv_have_decl_isinf=yes
23954else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023955 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023956sed 's/^/| /' conftest.$ac_ext >&5
23957
23958 ac_cv_have_decl_isinf=no
23959fi
23960
23961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23962fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023963{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23964echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23965if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023966
23967cat >>confdefs.h <<_ACEOF
23968#define HAVE_DECL_ISINF 1
23969_ACEOF
23970
23971
23972else
23973 cat >>confdefs.h <<_ACEOF
23974#define HAVE_DECL_ISINF 0
23975_ACEOF
23976
23977
23978fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023979{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23980echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023981if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023982 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023983else
23984 cat >conftest.$ac_ext <<_ACEOF
23985/* confdefs.h. */
23986_ACEOF
23987cat confdefs.h >>conftest.$ac_ext
23988cat >>conftest.$ac_ext <<_ACEOF
23989/* end confdefs.h. */
23990#include <math.h>
23991
23992int
23993main ()
23994{
23995#ifndef isnan
23996 (void) isnan;
23997#endif
23998
23999 ;
24000 return 0;
24001}
24002_ACEOF
24003rm -f conftest.$ac_objext
24004if { (ac_try="$ac_compile"
24005case "(($ac_try" in
24006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24007 *) ac_try_echo=$ac_try;;
24008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024010 (eval "$ac_compile") 2>conftest.er1
24011 ac_status=$?
24012 grep -v '^ *+' conftest.er1 >conftest.err
24013 rm -f conftest.er1
24014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024016 (exit $ac_status); } && {
24017 test -z "$ac_c_werror_flag" ||
24018 test ! -s conftest.err
24019 } && test -s conftest.$ac_objext; then
24020 ac_cv_have_decl_isnan=yes
24021else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024022 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024023sed 's/^/| /' conftest.$ac_ext >&5
24024
24025 ac_cv_have_decl_isnan=no
24026fi
24027
24028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24029fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024030{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24031echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24032if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024033
24034cat >>confdefs.h <<_ACEOF
24035#define HAVE_DECL_ISNAN 1
24036_ACEOF
24037
24038
24039else
24040 cat >>confdefs.h <<_ACEOF
24041#define HAVE_DECL_ISNAN 0
24042_ACEOF
24043
24044
24045fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024046{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24047echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024048if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024049 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024050else
24051 cat >conftest.$ac_ext <<_ACEOF
24052/* confdefs.h. */
24053_ACEOF
24054cat confdefs.h >>conftest.$ac_ext
24055cat >>conftest.$ac_ext <<_ACEOF
24056/* end confdefs.h. */
24057#include <math.h>
24058
24059int
24060main ()
24061{
24062#ifndef isfinite
24063 (void) isfinite;
24064#endif
24065
24066 ;
24067 return 0;
24068}
24069_ACEOF
24070rm -f conftest.$ac_objext
24071if { (ac_try="$ac_compile"
24072case "(($ac_try" in
24073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24074 *) ac_try_echo=$ac_try;;
24075esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024077 (eval "$ac_compile") 2>conftest.er1
24078 ac_status=$?
24079 grep -v '^ *+' conftest.er1 >conftest.err
24080 rm -f conftest.er1
24081 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024083 (exit $ac_status); } && {
24084 test -z "$ac_c_werror_flag" ||
24085 test ! -s conftest.err
24086 } && test -s conftest.$ac_objext; then
24087 ac_cv_have_decl_isfinite=yes
24088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024089 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024090sed 's/^/| /' conftest.$ac_ext >&5
24091
24092 ac_cv_have_decl_isfinite=no
24093fi
24094
24095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24096fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024097{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24098echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24099if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024100
24101cat >>confdefs.h <<_ACEOF
24102#define HAVE_DECL_ISFINITE 1
24103_ACEOF
24104
24105
24106else
24107 cat >>confdefs.h <<_ACEOF
24108#define HAVE_DECL_ISFINITE 0
24109_ACEOF
24110
24111
24112fi
24113
24114
Christian Heimes99170a52007-12-19 02:07:34 +000024115
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024116LIBS=$LIBS_SAVE
24117
Mark Dickinsona614f042009-11-28 12:48:43 +000024118# For multiprocessing module, check that sem_open
24119# actually works. For FreeBSD versions <= 7.2,
24120# the kernel module that provides POSIX semaphores
24121# isn't loaded by default, so an attempt to call
24122# sem_open results in a 'Signal 12' error.
24123{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24124echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24125if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24126 echo $ECHO_N "(cached) $ECHO_C" >&6
24127else
24128 if test "$cross_compiling" = yes; then
24129 ac_cv_posix_semaphores_enabled=yes
24130else
24131 cat >conftest.$ac_ext <<_ACEOF
24132/* confdefs.h. */
24133_ACEOF
24134cat confdefs.h >>conftest.$ac_ext
24135cat >>conftest.$ac_ext <<_ACEOF
24136/* end confdefs.h. */
24137
24138#include <unistd.h>
24139#include <fcntl.h>
24140#include <stdio.h>
24141#include <semaphore.h>
24142#include <sys/stat.h>
24143
24144int main(void) {
24145 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24146 if (a == SEM_FAILED) {
24147 perror("sem_open");
24148 return 1;
24149 }
24150 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024151 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024152 return 0;
24153}
24154
24155_ACEOF
24156rm -f conftest$ac_exeext
24157if { (ac_try="$ac_link"
24158case "(($ac_try" in
24159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24160 *) ac_try_echo=$ac_try;;
24161esac
24162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24163 (eval "$ac_link") 2>&5
24164 ac_status=$?
24165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24166 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24167 { (case "(($ac_try" in
24168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24169 *) ac_try_echo=$ac_try;;
24170esac
24171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24172 (eval "$ac_try") 2>&5
24173 ac_status=$?
24174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24175 (exit $ac_status); }; }; then
24176 ac_cv_posix_semaphores_enabled=yes
24177else
24178 echo "$as_me: program exited with status $ac_status" >&5
24179echo "$as_me: failed program was:" >&5
24180sed 's/^/| /' conftest.$ac_ext >&5
24181
24182( exit $ac_status )
24183ac_cv_posix_semaphores_enabled=no
24184fi
24185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24186fi
24187
24188
24189
24190fi
24191
24192{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24193echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24194if test $ac_cv_posix_semaphores_enabled = no
24195then
24196
24197cat >>confdefs.h <<\_ACEOF
24198#define POSIX_SEMAPHORES_NOT_ENABLED 1
24199_ACEOF
24200
24201fi
24202
Mark Dickinson10683072009-04-18 21:18:19 +000024203# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024204{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24205echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024206if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024207 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024208else
24209 if test "$cross_compiling" = yes; then
24210 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024211else
24212 cat >conftest.$ac_ext <<_ACEOF
24213/* confdefs.h. */
24214_ACEOF
24215cat confdefs.h >>conftest.$ac_ext
24216cat >>conftest.$ac_ext <<_ACEOF
24217/* end confdefs.h. */
24218
24219#include <unistd.h>
24220#include <fcntl.h>
24221#include <stdio.h>
24222#include <semaphore.h>
24223#include <sys/stat.h>
24224
24225int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024226 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024227 int count;
24228 int res;
24229 if(a==SEM_FAILED){
24230 perror("sem_open");
24231 return 1;
24232
24233 }
24234 res = sem_getvalue(a, &count);
24235 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024236 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024237 return res==-1 ? 1 : 0;
24238}
24239
Mark Dickinson10683072009-04-18 21:18:19 +000024240_ACEOF
24241rm -f conftest$ac_exeext
24242if { (ac_try="$ac_link"
24243case "(($ac_try" in
24244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24245 *) ac_try_echo=$ac_try;;
24246esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024248 (eval "$ac_link") 2>&5
24249 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24252 { (case "(($ac_try" in
24253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24254 *) ac_try_echo=$ac_try;;
24255esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024257 (eval "$ac_try") 2>&5
24258 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024260 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024261 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024262else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024263 echo "$as_me: program exited with status $ac_status" >&5
24264echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024265sed 's/^/| /' conftest.$ac_ext >&5
24266
24267( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024268ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024269fi
24270rm -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 +000024271fi
24272
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024273
24274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024275fi
24276
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024277{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24278echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024279if test $ac_cv_broken_sem_getvalue = yes
24280then
24281
24282cat >>confdefs.h <<\_ACEOF
24283#define HAVE_BROKEN_SEM_GETVALUE 1
24284_ACEOF
24285
24286fi
24287
Mark Dickinsonbd792642009-03-18 20:06:12 +000024288# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024289{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24290echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024291# Check whether --enable-big-digits was given.
24292if test "${enable_big_digits+set}" = set; then
24293 enableval=$enable_big_digits; case $enable_big_digits in
24294yes)
24295 enable_big_digits=30 ;;
24296no)
24297 enable_big_digits=15 ;;
2429815|30)
24299 ;;
24300*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024301 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24302echo "$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 +000024303 { (exit 1); exit 1; }; } ;;
24304esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024305{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24306echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024307
24308cat >>confdefs.h <<_ACEOF
24309#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24310_ACEOF
24311
24312
24313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024314 { echo "$as_me:$LINENO: result: no value specified" >&5
24315echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024316fi
24317
24318
Guido van Rossumef2255b2000-03-10 22:30:29 +000024319# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024320if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024321 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24322echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024323if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024324 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024325fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024326{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24327echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024328else
Martin v. Löwis11437992002-04-12 09:54:03 +000024329 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024330{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24331echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024333/* confdefs.h. */
24334_ACEOF
24335cat confdefs.h >>conftest.$ac_ext
24336cat >>conftest.$ac_ext <<_ACEOF
24337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024338$ac_includes_default
24339#include <wchar.h>
24340_ACEOF
24341rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024342if { (ac_try="$ac_compile"
24343case "(($ac_try" in
24344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24345 *) ac_try_echo=$ac_try;;
24346esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024348 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024350 grep -v '^ *+' conftest.er1 >conftest.err
24351 rm -f conftest.er1
24352 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024354 (exit $ac_status); } && {
24355 test -z "$ac_c_werror_flag" ||
24356 test ! -s conftest.err
24357 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024358 ac_header_compiler=yes
24359else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024361sed 's/^/| /' conftest.$ac_ext >&5
24362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024363 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024365
24366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024367{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24368echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024369
24370# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024371{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24372echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024374/* confdefs.h. */
24375_ACEOF
24376cat confdefs.h >>conftest.$ac_ext
24377cat >>conftest.$ac_ext <<_ACEOF
24378/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024379#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024380_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024381if { (ac_try="$ac_cpp conftest.$ac_ext"
24382case "(($ac_try" in
24383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24384 *) ac_try_echo=$ac_try;;
24385esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024387 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024388 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024389 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024390 rm -f conftest.er1
24391 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024393 (exit $ac_status); } >/dev/null && {
24394 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24395 test ! -s conftest.err
24396 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024397 ac_header_preproc=yes
24398else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024400sed 's/^/| /' conftest.$ac_ext >&5
24401
Martin v. Löwis11437992002-04-12 09:54:03 +000024402 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024404
Martin v. Löwis11437992002-04-12 09:54:03 +000024405rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024406{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24407echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024408
24409# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024410case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24411 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024412 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24413echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24414 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24415echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024416 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024417 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024418 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024419 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24420echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24421 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24422echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24423 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24424echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24425 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24426echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24427 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24428echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24429 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24430echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024431 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024432## -------------------------------------- ##
24433## Report this to http://bugs.python.org/ ##
24434## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024435_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024436 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024437 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024439{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24440echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024441if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024442 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024443else
24444 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024445fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024446{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24447echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024448
24449fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024450if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024451
24452
24453cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024454#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024455_ACEOF
24456
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024457 wchar_h="yes"
24458
Guido van Rossumef2255b2000-03-10 22:30:29 +000024459else
Martin v. Löwis11437992002-04-12 09:54:03 +000024460 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024461
24462fi
24463
Michael W. Hudson54241132001-12-07 15:38:26 +000024464
Martin v. Löwis11437992002-04-12 09:54:03 +000024465
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024466# determine wchar_t size
24467if test "$wchar_h" = yes
24468then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024469 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24470echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24471if test "${ac_cv_type_wchar_t+set}" = set; then
24472 echo $ECHO_N "(cached) $ECHO_C" >&6
24473else
24474 cat >conftest.$ac_ext <<_ACEOF
24475/* confdefs.h. */
24476_ACEOF
24477cat confdefs.h >>conftest.$ac_ext
24478cat >>conftest.$ac_ext <<_ACEOF
24479/* end confdefs.h. */
24480#include <wchar.h>
24481
24482typedef wchar_t ac__type_new_;
24483int
24484main ()
24485{
24486if ((ac__type_new_ *) 0)
24487 return 0;
24488if (sizeof (ac__type_new_))
24489 return 0;
24490 ;
24491 return 0;
24492}
24493_ACEOF
24494rm -f conftest.$ac_objext
24495if { (ac_try="$ac_compile"
24496case "(($ac_try" in
24497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24498 *) ac_try_echo=$ac_try;;
24499esac
24500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24501 (eval "$ac_compile") 2>conftest.er1
24502 ac_status=$?
24503 grep -v '^ *+' conftest.er1 >conftest.err
24504 rm -f conftest.er1
24505 cat conftest.err >&5
24506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24507 (exit $ac_status); } && {
24508 test -z "$ac_c_werror_flag" ||
24509 test ! -s conftest.err
24510 } && test -s conftest.$ac_objext; then
24511 ac_cv_type_wchar_t=yes
24512else
24513 echo "$as_me: failed program was:" >&5
24514sed 's/^/| /' conftest.$ac_ext >&5
24515
24516 ac_cv_type_wchar_t=no
24517fi
24518
24519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24520fi
24521{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24522echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24523
24524# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024525# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24526# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24527# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024528{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24529echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024530if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024532else
Martin v. Löwis11437992002-04-12 09:54:03 +000024533 if test "$cross_compiling" = yes; then
24534 # Depending upon the size, compute the lo and hi bounds.
24535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024536/* confdefs.h. */
24537_ACEOF
24538cat confdefs.h >>conftest.$ac_ext
24539cat >>conftest.$ac_ext <<_ACEOF
24540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024541#include <wchar.h>
24542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024543 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024544int
24545main ()
24546{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024547static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024548test_array [0] = 0
24549
24550 ;
24551 return 0;
24552}
24553_ACEOF
24554rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024555if { (ac_try="$ac_compile"
24556case "(($ac_try" in
24557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24558 *) ac_try_echo=$ac_try;;
24559esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024563 grep -v '^ *+' conftest.er1 >conftest.err
24564 rm -f conftest.er1
24565 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024567 (exit $ac_status); } && {
24568 test -z "$ac_c_werror_flag" ||
24569 test ! -s conftest.err
24570 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024571 ac_lo=0 ac_mid=0
24572 while :; do
24573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024574/* confdefs.h. */
24575_ACEOF
24576cat confdefs.h >>conftest.$ac_ext
24577cat >>conftest.$ac_ext <<_ACEOF
24578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024579#include <wchar.h>
24580
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024581 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024582int
24583main ()
24584{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024585static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024586test_array [0] = 0
24587
24588 ;
24589 return 0;
24590}
24591_ACEOF
24592rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024593if { (ac_try="$ac_compile"
24594case "(($ac_try" in
24595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24596 *) ac_try_echo=$ac_try;;
24597esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024601 grep -v '^ *+' conftest.er1 >conftest.err
24602 rm -f conftest.er1
24603 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024605 (exit $ac_status); } && {
24606 test -z "$ac_c_werror_flag" ||
24607 test ! -s conftest.err
24608 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024609 ac_hi=$ac_mid; break
24610else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024612sed 's/^/| /' conftest.$ac_ext >&5
24613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024614 ac_lo=`expr $ac_mid + 1`
24615 if test $ac_lo -le $ac_mid; then
24616 ac_lo= ac_hi=
24617 break
24618 fi
24619 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024621
24622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024623 done
24624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024626sed 's/^/| /' conftest.$ac_ext >&5
24627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024629/* confdefs.h. */
24630_ACEOF
24631cat confdefs.h >>conftest.$ac_ext
24632cat >>conftest.$ac_ext <<_ACEOF
24633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024634#include <wchar.h>
24635
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024636 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024637int
24638main ()
24639{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024640static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024641test_array [0] = 0
24642
24643 ;
24644 return 0;
24645}
24646_ACEOF
24647rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024648if { (ac_try="$ac_compile"
24649case "(($ac_try" in
24650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24651 *) ac_try_echo=$ac_try;;
24652esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024656 grep -v '^ *+' conftest.er1 >conftest.err
24657 rm -f conftest.er1
24658 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024660 (exit $ac_status); } && {
24661 test -z "$ac_c_werror_flag" ||
24662 test ! -s conftest.err
24663 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024664 ac_hi=-1 ac_mid=-1
24665 while :; do
24666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024667/* confdefs.h. */
24668_ACEOF
24669cat confdefs.h >>conftest.$ac_ext
24670cat >>conftest.$ac_ext <<_ACEOF
24671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024672#include <wchar.h>
24673
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024674 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024675int
24676main ()
24677{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024679test_array [0] = 0
24680
24681 ;
24682 return 0;
24683}
24684_ACEOF
24685rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024686if { (ac_try="$ac_compile"
24687case "(($ac_try" in
24688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24689 *) ac_try_echo=$ac_try;;
24690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024694 grep -v '^ *+' conftest.er1 >conftest.err
24695 rm -f conftest.er1
24696 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024698 (exit $ac_status); } && {
24699 test -z "$ac_c_werror_flag" ||
24700 test ! -s conftest.err
24701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024702 ac_lo=$ac_mid; break
24703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024705sed 's/^/| /' conftest.$ac_ext >&5
24706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024707 ac_hi=`expr '(' $ac_mid ')' - 1`
24708 if test $ac_mid -le $ac_hi; then
24709 ac_lo= ac_hi=
24710 break
24711 fi
24712 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024714
24715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024716 done
24717else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024719sed 's/^/| /' conftest.$ac_ext >&5
24720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024721 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024723
24724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024726
24727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024728# Binary search between lo and hi bounds.
24729while test "x$ac_lo" != "x$ac_hi"; do
24730 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024732/* confdefs.h. */
24733_ACEOF
24734cat confdefs.h >>conftest.$ac_ext
24735cat >>conftest.$ac_ext <<_ACEOF
24736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024737#include <wchar.h>
24738
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024739 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024740int
24741main ()
24742{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024743static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024744test_array [0] = 0
24745
24746 ;
24747 return 0;
24748}
24749_ACEOF
24750rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024751if { (ac_try="$ac_compile"
24752case "(($ac_try" in
24753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24754 *) ac_try_echo=$ac_try;;
24755esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024757 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024759 grep -v '^ *+' conftest.er1 >conftest.err
24760 rm -f conftest.er1
24761 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024763 (exit $ac_status); } && {
24764 test -z "$ac_c_werror_flag" ||
24765 test ! -s conftest.err
24766 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024767 ac_hi=$ac_mid
24768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024770sed 's/^/| /' conftest.$ac_ext >&5
24771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024772 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024774
24775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024776done
24777case $ac_lo in
24778?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024779'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024780 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024781See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024782echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024783See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024784 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024785 else
24786 ac_cv_sizeof_wchar_t=0
24787 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024788esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024789else
Martin v. Löwis11437992002-04-12 09:54:03 +000024790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024791/* confdefs.h. */
24792_ACEOF
24793cat confdefs.h >>conftest.$ac_ext
24794cat >>conftest.$ac_ext <<_ACEOF
24795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024796#include <wchar.h>
24797
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024798 typedef wchar_t ac__type_sizeof_;
24799static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24800static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024801#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024802#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024803int
24804main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024805{
Martin v. Löwis11437992002-04-12 09:54:03 +000024806
24807 FILE *f = fopen ("conftest.val", "w");
24808 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024809 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024810 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024811 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024812 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024813 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024814 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024815 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024816 }
24817 else
24818 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024820 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024821 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024822 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024823 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024824 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024825
24826 ;
24827 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024828}
Martin v. Löwis11437992002-04-12 09:54:03 +000024829_ACEOF
24830rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024831if { (ac_try="$ac_link"
24832case "(($ac_try" in
24833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24834 *) ac_try_echo=$ac_try;;
24835esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024838 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024841 { (case "(($ac_try" in
24842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24843 *) ac_try_echo=$ac_try;;
24844esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024847 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024849 (exit $ac_status); }; }; then
24850 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024852 echo "$as_me: program exited with status $ac_status" >&5
24853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024854sed 's/^/| /' conftest.$ac_ext >&5
24855
Martin v. Löwis11437992002-04-12 09:54:03 +000024856( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024857if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024859See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024860echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024861See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024862 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024863 else
24864 ac_cv_sizeof_wchar_t=0
24865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024867rm -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 +000024868fi
24869rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024871{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24872echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024873
24874
24875
Martin v. Löwis11437992002-04-12 09:54:03 +000024876cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024877#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024878_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024879
Michael W. Hudson54241132001-12-07 15:38:26 +000024880
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024881fi
24882
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024883{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24884echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024885have_ucs4_tcl=no
24886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024887/* confdefs.h. */
24888_ACEOF
24889cat confdefs.h >>conftest.$ac_ext
24890cat >>conftest.$ac_ext <<_ACEOF
24891/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024892
24893#include <tcl.h>
24894#if TCL_UTF_MAX != 6
24895# error "NOT UCS4_TCL"
24896#endif
24897int
24898main ()
24899{
24900
24901 ;
24902 return 0;
24903}
24904_ACEOF
24905rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024906if { (ac_try="$ac_compile"
24907case "(($ac_try" in
24908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24909 *) ac_try_echo=$ac_try;;
24910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024914 grep -v '^ *+' conftest.er1 >conftest.err
24915 rm -f conftest.er1
24916 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024918 (exit $ac_status); } && {
24919 test -z "$ac_c_werror_flag" ||
24920 test ! -s conftest.err
24921 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024922
24923
24924cat >>confdefs.h <<\_ACEOF
24925#define HAVE_UCS4_TCL 1
24926_ACEOF
24927
24928 have_ucs4_tcl=yes
24929
24930else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024932sed 's/^/| /' conftest.$ac_ext >&5
24933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024934
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024936
24937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024938{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24939echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024940
Skip Montanaro6dead952003-09-25 14:50:04 +000024941# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024942if test "$wchar_h" = yes
24943then
24944 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024945 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24946echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024947 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024948 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024949else
24950
24951 if test "$cross_compiling" = yes; then
24952 ac_cv_wchar_t_signed=yes
24953else
24954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024955/* confdefs.h. */
24956_ACEOF
24957cat confdefs.h >>conftest.$ac_ext
24958cat >>conftest.$ac_ext <<_ACEOF
24959/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024960
24961 #include <wchar.h>
24962 int main()
24963 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024964 /* Success: exit code 0 */
24965 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024966 }
24967
24968_ACEOF
24969rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024970if { (ac_try="$ac_link"
24971case "(($ac_try" in
24972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24973 *) ac_try_echo=$ac_try;;
24974esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024976 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024977 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024979 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024980 { (case "(($ac_try" in
24981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24982 *) ac_try_echo=$ac_try;;
24983esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024985 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024986 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024988 (exit $ac_status); }; }; then
24989 ac_cv_wchar_t_signed=yes
24990else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024991 echo "$as_me: program exited with status $ac_status" >&5
24992echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024993sed 's/^/| /' conftest.$ac_ext >&5
24994
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024995( exit $ac_status )
24996ac_cv_wchar_t_signed=no
24997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024998rm -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 +000024999fi
25000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025001
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025002fi
25003
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025004 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25005echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025006fi
25007
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025008{ echo "$as_me:$LINENO: checking what type to use for str" >&5
25009echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025010
25011# Check whether --with-wide-unicode was given.
25012if test "${with_wide_unicode+set}" = set; then
25013 withval=$with_wide_unicode;
25014if test "$withval" != no
25015then unicode_size="4"
25016else unicode_size="2"
25017fi
25018
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025019else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025020
Georg Brandl52d168a2008-01-07 18:10:24 +000025021case "$have_ucs4_tcl" in
25022 yes) unicode_size="4" ;;
25023 *) unicode_size="2" ;;
25024esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025025
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025026fi
25027
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025028
25029
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025030
Georg Brandl52d168a2008-01-07 18:10:24 +000025031case "$unicode_size" in
25032 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025033#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025034_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025035 ;;
25036 *) cat >>confdefs.h <<\_ACEOF
25037#define Py_UNICODE_SIZE 2
25038_ACEOF
25039 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025040esac
25041
Michael W. Hudson54241132001-12-07 15:38:26 +000025042
Martin v. Löwis11437992002-04-12 09:54:03 +000025043
25044
Georg Brandl52d168a2008-01-07 18:10:24 +000025045# wchar_t is only usable if it maps to an unsigned type
25046if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025047 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025048then
25049 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025050
Martin v. Löwis11437992002-04-12 09:54:03 +000025051cat >>confdefs.h <<\_ACEOF
25052#define HAVE_USABLE_WCHAR_T 1
25053_ACEOF
25054
Georg Brandl52d168a2008-01-07 18:10:24 +000025055 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025056#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025057_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025058
Georg Brandl52d168a2008-01-07 18:10:24 +000025059elif test "$ac_cv_sizeof_short" = "$unicode_size"
25060then
25061 PY_UNICODE_TYPE="unsigned short"
25062 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025063#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025064_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025065
Georg Brandl52d168a2008-01-07 18:10:24 +000025066elif test "$ac_cv_sizeof_long" = "$unicode_size"
25067then
25068 PY_UNICODE_TYPE="unsigned long"
25069 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025070#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025071_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025072
Georg Brandl52d168a2008-01-07 18:10:24 +000025073else
25074 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025075fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025076{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25077echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025078
25079# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025080{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25081echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025082if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025084else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025085 # See if sys/param.h defines the BYTE_ORDER macro.
25086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025087/* confdefs.h. */
25088_ACEOF
25089cat confdefs.h >>conftest.$ac_ext
25090cat >>conftest.$ac_ext <<_ACEOF
25091/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025092#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025093#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025094
Martin v. Löwis11437992002-04-12 09:54:03 +000025095int
25096main ()
25097{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025098#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25099 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25100 bogus endian macros
25101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025102
25103 ;
25104 return 0;
25105}
25106_ACEOF
25107rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025108if { (ac_try="$ac_compile"
25109case "(($ac_try" in
25110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25111 *) ac_try_echo=$ac_try;;
25112esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025116 grep -v '^ *+' conftest.er1 >conftest.err
25117 rm -f conftest.er1
25118 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025120 (exit $ac_status); } && {
25121 test -z "$ac_c_werror_flag" ||
25122 test ! -s conftest.err
25123 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025124 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025126/* confdefs.h. */
25127_ACEOF
25128cat confdefs.h >>conftest.$ac_ext
25129cat >>conftest.$ac_ext <<_ACEOF
25130/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025131#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025132#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025133
Martin v. Löwis11437992002-04-12 09:54:03 +000025134int
25135main ()
25136{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025137#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025138 not big endian
25139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025140
25141 ;
25142 return 0;
25143}
25144_ACEOF
25145rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025146if { (ac_try="$ac_compile"
25147case "(($ac_try" in
25148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25149 *) ac_try_echo=$ac_try;;
25150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025152 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025154 grep -v '^ *+' conftest.er1 >conftest.err
25155 rm -f conftest.er1
25156 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025158 (exit $ac_status); } && {
25159 test -z "$ac_c_werror_flag" ||
25160 test ! -s conftest.err
25161 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025162 ac_cv_c_bigendian=yes
25163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025165sed 's/^/| /' conftest.$ac_ext >&5
25166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025167 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025169
25170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025173sed 's/^/| /' conftest.$ac_ext >&5
25174
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025175 # It does not; compile a test program.
25176if test "$cross_compiling" = yes; then
25177 # try to guess the endianness by grepping values into an object file
25178 ac_cv_c_bigendian=unknown
25179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025180/* confdefs.h. */
25181_ACEOF
25182cat confdefs.h >>conftest.$ac_ext
25183cat >>conftest.$ac_ext <<_ACEOF
25184/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025185short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25186short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25187void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25188short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25189short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25190void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025191int
25192main ()
25193{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025194 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025195 ;
25196 return 0;
25197}
25198_ACEOF
25199rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025200if { (ac_try="$ac_compile"
25201case "(($ac_try" in
25202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25203 *) ac_try_echo=$ac_try;;
25204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025208 grep -v '^ *+' conftest.er1 >conftest.err
25209 rm -f conftest.er1
25210 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025212 (exit $ac_status); } && {
25213 test -z "$ac_c_werror_flag" ||
25214 test ! -s conftest.err
25215 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025216 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025217 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025218fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025219if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25220 if test "$ac_cv_c_bigendian" = unknown; then
25221 ac_cv_c_bigendian=no
25222 else
25223 # finding both strings is unlikely to happen, but who knows?
25224 ac_cv_c_bigendian=unknown
25225 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025226fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025229sed 's/^/| /' conftest.$ac_ext >&5
25230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025231
Martin v. Löwis11437992002-04-12 09:54:03 +000025232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025233
25234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025235else
25236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025237/* confdefs.h. */
25238_ACEOF
25239cat confdefs.h >>conftest.$ac_ext
25240cat >>conftest.$ac_ext <<_ACEOF
25241/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025242$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025243int
25244main ()
25245{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025247 /* Are we little or big endian? From Harbison&Steele. */
25248 union
25249 {
25250 long int l;
25251 char c[sizeof (long int)];
25252 } u;
25253 u.l = 1;
25254 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025255
25256 ;
25257 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025258}
Martin v. Löwis11437992002-04-12 09:54:03 +000025259_ACEOF
25260rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025261if { (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 Wouters47b49bf2007-08-30 22:15:33 +000025267 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025271 { (case "(($ac_try" in
25272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25273 *) ac_try_echo=$ac_try;;
25274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025276 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025277 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025279 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025280 ac_cv_c_bigendian=no
25281else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025282 echo "$as_me: program exited with status $ac_status" >&5
25283echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025284sed 's/^/| /' conftest.$ac_ext >&5
25285
Martin v. Löwis11437992002-04-12 09:54:03 +000025286( exit $ac_status )
25287ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025289rm -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 +000025290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025291
25292
Martin v. Löwis11437992002-04-12 09:54:03 +000025293fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025294
25295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25296fi
25297{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25298echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25299case $ac_cv_c_bigendian in
25300 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025301
25302cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025303#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025304_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025305 ;;
25306 no)
25307 ;;
25308 *)
25309 { { echo "$as_me:$LINENO: error: unknown endianness
25310presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25311echo "$as_me: error: unknown endianness
25312presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025313 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025314esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025315
Michael W. Hudson54241132001-12-07 15:38:26 +000025316
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025317# Check whether right shifting a negative integer extends the sign bit
25318# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025319{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25320echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025321if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025322 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025323else
Martin v. Löwis11437992002-04-12 09:54:03 +000025324
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025325if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025326 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025327else
Martin v. Löwis11437992002-04-12 09:54:03 +000025328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025329/* confdefs.h. */
25330_ACEOF
25331cat confdefs.h >>conftest.$ac_ext
25332cat >>conftest.$ac_ext <<_ACEOF
25333/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025334
25335int main()
25336{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025337 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025338}
25339
Martin v. Löwis11437992002-04-12 09:54:03 +000025340_ACEOF
25341rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025342if { (ac_try="$ac_link"
25343case "(($ac_try" in
25344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25345 *) ac_try_echo=$ac_try;;
25346esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025348 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025349 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025351 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025352 { (case "(($ac_try" in
25353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25354 *) ac_try_echo=$ac_try;;
25355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025357 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025358 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025360 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025361 ac_cv_rshift_extends_sign=yes
25362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025363 echo "$as_me: program exited with status $ac_status" >&5
25364echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025365sed 's/^/| /' conftest.$ac_ext >&5
25366
Martin v. Löwis11437992002-04-12 09:54:03 +000025367( exit $ac_status )
25368ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025370rm -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 +000025371fi
25372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025373
25374fi
25375
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025376{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25377echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025378if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025379then
Martin v. Löwis11437992002-04-12 09:54:03 +000025380
25381cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025382#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025383_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025384
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025385fi
25386
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025387# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025388{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25389echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025390if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025391 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025392else
Martin v. Löwis11437992002-04-12 09:54:03 +000025393
25394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025395/* confdefs.h. */
25396_ACEOF
25397cat confdefs.h >>conftest.$ac_ext
25398cat >>conftest.$ac_ext <<_ACEOF
25399/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025400#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025401int
25402main ()
25403{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025404
25405 FILE *f = fopen("/dev/null", "r");
25406 flockfile(f);
25407 getc_unlocked(f);
25408 funlockfile(f);
25409
Martin v. Löwis11437992002-04-12 09:54:03 +000025410 ;
25411 return 0;
25412}
25413_ACEOF
25414rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025415if { (ac_try="$ac_link"
25416case "(($ac_try" in
25417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25418 *) ac_try_echo=$ac_try;;
25419esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025421 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025423 grep -v '^ *+' conftest.er1 >conftest.err
25424 rm -f conftest.er1
25425 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025427 (exit $ac_status); } && {
25428 test -z "$ac_c_werror_flag" ||
25429 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025430 } && test -s conftest$ac_exeext &&
25431 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025432 ac_cv_have_getc_unlocked=yes
25433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025435sed 's/^/| /' conftest.$ac_ext >&5
25436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025437 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025439
25440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025441 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025442fi
25443
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025444{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25445echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025446if test "$ac_cv_have_getc_unlocked" = yes
25447then
Martin v. Löwis11437992002-04-12 09:54:03 +000025448
25449cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025450#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025451_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025452
25453fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025454
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025455# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025456# save the value of LIBS so we don't actually link Python with readline
25457LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025458
Gregory P. Smith18820942008-09-07 06:24:49 +000025459# On some systems we need to link readline to a termcap compatible
25460# library. NOTE: Keep the precedence of listed libraries synchronised
25461# with setup.py.
25462py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025463{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25464echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025465for py_libtermcap in "" ncursesw ncurses curses termcap; do
25466 if test -z "$py_libtermcap"; then
25467 READLINE_LIBS="-lreadline"
25468 else
25469 READLINE_LIBS="-lreadline -l$py_libtermcap"
25470 fi
25471 LIBS="$READLINE_LIBS $LIBS_no_readline"
25472 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025473/* confdefs.h. */
25474_ACEOF
25475cat confdefs.h >>conftest.$ac_ext
25476cat >>conftest.$ac_ext <<_ACEOF
25477/* end confdefs.h. */
25478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025479/* Override any GCC internal prototype to avoid an error.
25480 Use char because int might match the return type of a GCC
25481 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025482#ifdef __cplusplus
25483extern "C"
25484#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025485char readline ();
25486int
25487main ()
25488{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025489return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025490 ;
25491 return 0;
25492}
25493_ACEOF
25494rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025495if { (ac_try="$ac_link"
25496case "(($ac_try" in
25497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25498 *) ac_try_echo=$ac_try;;
25499esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025501 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025502 ac_status=$?
25503 grep -v '^ *+' conftest.er1 >conftest.err
25504 rm -f conftest.er1
25505 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025507 (exit $ac_status); } && {
25508 test -z "$ac_c_werror_flag" ||
25509 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025510 } && test -s conftest$ac_exeext &&
25511 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025512 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025513else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025514 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025515sed 's/^/| /' conftest.$ac_ext >&5
25516
Gregory P. Smith18820942008-09-07 06:24:49 +000025517
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025519
25520rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025521 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025522 if test $py_cv_lib_readline = yes; then
25523 break
25524 fi
25525done
25526# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25527#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025528if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025529 { echo "$as_me:$LINENO: result: none" >&5
25530echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025531else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025532 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25533echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025534
25535cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025536#define HAVE_LIBREADLINE 1
25537_ACEOF
25538
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025539fi
25540
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025541# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025542{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25543echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025544if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025545 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025546else
25547 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025548LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025549cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025550/* confdefs.h. */
25551_ACEOF
25552cat confdefs.h >>conftest.$ac_ext
25553cat >>conftest.$ac_ext <<_ACEOF
25554/* end confdefs.h. */
25555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025556/* Override any GCC internal prototype to avoid an error.
25557 Use char because int might match the return type of a GCC
25558 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025559#ifdef __cplusplus
25560extern "C"
25561#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025562char rl_callback_handler_install ();
25563int
25564main ()
25565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025566return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025567 ;
25568 return 0;
25569}
25570_ACEOF
25571rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025572if { (ac_try="$ac_link"
25573case "(($ac_try" in
25574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25575 *) ac_try_echo=$ac_try;;
25576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025578 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025580 grep -v '^ *+' conftest.er1 >conftest.err
25581 rm -f conftest.er1
25582 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025584 (exit $ac_status); } && {
25585 test -z "$ac_c_werror_flag" ||
25586 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025587 } && test -s conftest$ac_exeext &&
25588 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025589 ac_cv_lib_readline_rl_callback_handler_install=yes
25590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025591 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025592sed 's/^/| /' conftest.$ac_ext >&5
25593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025594 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025596
25597rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025598 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025599LIBS=$ac_check_lib_save_LIBS
25600fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025601{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25602echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25603if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025604
25605cat >>confdefs.h <<\_ACEOF
25606#define HAVE_RL_CALLBACK 1
25607_ACEOF
25608
25609fi
25610
25611
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025612# check for readline 2.2
25613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025614/* confdefs.h. */
25615_ACEOF
25616cat confdefs.h >>conftest.$ac_ext
25617cat >>conftest.$ac_ext <<_ACEOF
25618/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025619#include <readline/readline.h>
25620_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025621if { (ac_try="$ac_cpp conftest.$ac_ext"
25622case "(($ac_try" in
25623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25624 *) ac_try_echo=$ac_try;;
25625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025627 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025628 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025629 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025630 rm -f conftest.er1
25631 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025633 (exit $ac_status); } >/dev/null && {
25634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25635 test ! -s conftest.err
25636 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025637 have_readline=yes
25638else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025640sed 's/^/| /' conftest.$ac_ext >&5
25641
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025642 have_readline=no
25643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025644
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025645rm -f conftest.err conftest.$ac_ext
25646if test $have_readline = yes
25647then
25648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025649/* confdefs.h. */
25650_ACEOF
25651cat confdefs.h >>conftest.$ac_ext
25652cat >>conftest.$ac_ext <<_ACEOF
25653/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025654#include <readline/readline.h>
25655
25656_ACEOF
25657if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025658 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025659
25660cat >>confdefs.h <<\_ACEOF
25661#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25662_ACEOF
25663
25664fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000025665rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025666
Antoine Pitroud5131772009-10-26 19:22:14 +000025667 cat >conftest.$ac_ext <<_ACEOF
25668/* confdefs.h. */
25669_ACEOF
25670cat confdefs.h >>conftest.$ac_ext
25671cat >>conftest.$ac_ext <<_ACEOF
25672/* end confdefs.h. */
25673#include <readline/readline.h>
25674
25675_ACEOF
25676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25677 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25678
25679cat >>confdefs.h <<\_ACEOF
25680#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25681_ACEOF
25682
25683fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000025684rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025685
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025686fi
25687
Martin v. Löwis0daad592001-09-30 21:09:59 +000025688# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025689{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25690echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025691if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025692 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025693else
Martin v. Löwis11437992002-04-12 09:54:03 +000025694 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025695LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025696cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025697/* confdefs.h. */
25698_ACEOF
25699cat confdefs.h >>conftest.$ac_ext
25700cat >>conftest.$ac_ext <<_ACEOF
25701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025703/* Override any GCC internal prototype to avoid an error.
25704 Use char because int might match the return type of a GCC
25705 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025706#ifdef __cplusplus
25707extern "C"
25708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025709char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025710int
25711main ()
25712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025713return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025714 ;
25715 return 0;
25716}
25717_ACEOF
25718rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025719if { (ac_try="$ac_link"
25720case "(($ac_try" in
25721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25722 *) ac_try_echo=$ac_try;;
25723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025725 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025727 grep -v '^ *+' conftest.er1 >conftest.err
25728 rm -f conftest.er1
25729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025731 (exit $ac_status); } && {
25732 test -z "$ac_c_werror_flag" ||
25733 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025734 } && test -s conftest$ac_exeext &&
25735 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025736 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025737else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025739sed 's/^/| /' conftest.$ac_ext >&5
25740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025741 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025743
25744rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025745 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025746LIBS=$ac_check_lib_save_LIBS
25747fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025748{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25749echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25750if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025751
Martin v. Löwis11437992002-04-12 09:54:03 +000025752cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025753#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025754_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025755
Martin v. Löwis0daad592001-09-30 21:09:59 +000025756fi
25757
Michael W. Hudson54241132001-12-07 15:38:26 +000025758
Thomas Wouters89d996e2007-09-08 17:39:28 +000025759# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025760{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25761echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025762if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025763 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025764else
25765 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025766LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025767cat >conftest.$ac_ext <<_ACEOF
25768/* confdefs.h. */
25769_ACEOF
25770cat confdefs.h >>conftest.$ac_ext
25771cat >>conftest.$ac_ext <<_ACEOF
25772/* end confdefs.h. */
25773
25774/* Override any GCC internal prototype to avoid an error.
25775 Use char because int might match the return type of a GCC
25776 builtin and then its argument prototype would still apply. */
25777#ifdef __cplusplus
25778extern "C"
25779#endif
25780char rl_completion_display_matches_hook ();
25781int
25782main ()
25783{
25784return rl_completion_display_matches_hook ();
25785 ;
25786 return 0;
25787}
25788_ACEOF
25789rm -f conftest.$ac_objext conftest$ac_exeext
25790if { (ac_try="$ac_link"
25791case "(($ac_try" in
25792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25793 *) ac_try_echo=$ac_try;;
25794esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025796 (eval "$ac_link") 2>conftest.er1
25797 ac_status=$?
25798 grep -v '^ *+' conftest.er1 >conftest.err
25799 rm -f conftest.er1
25800 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025802 (exit $ac_status); } && {
25803 test -z "$ac_c_werror_flag" ||
25804 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025805 } && test -s conftest$ac_exeext &&
25806 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025807 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25808else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025809 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025810sed 's/^/| /' conftest.$ac_ext >&5
25811
25812 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25813fi
25814
25815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25816 conftest$ac_exeext conftest.$ac_ext
25817LIBS=$ac_check_lib_save_LIBS
25818fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025819{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25820echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25821if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025822
25823cat >>confdefs.h <<\_ACEOF
25824#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25825_ACEOF
25826
25827fi
25828
25829
Martin v. Löwis0daad592001-09-30 21:09:59 +000025830# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025831{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25832echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025833if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025834 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025835else
Martin v. Löwis11437992002-04-12 09:54:03 +000025836 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025837LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025838cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025839/* confdefs.h. */
25840_ACEOF
25841cat confdefs.h >>conftest.$ac_ext
25842cat >>conftest.$ac_ext <<_ACEOF
25843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025845/* Override any GCC internal prototype to avoid an error.
25846 Use char because int might match the return type of a GCC
25847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025848#ifdef __cplusplus
25849extern "C"
25850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025851char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025852int
25853main ()
25854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025855return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025856 ;
25857 return 0;
25858}
25859_ACEOF
25860rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025861if { (ac_try="$ac_link"
25862case "(($ac_try" in
25863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25864 *) ac_try_echo=$ac_try;;
25865esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025867 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025869 grep -v '^ *+' conftest.er1 >conftest.err
25870 rm -f conftest.er1
25871 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025873 (exit $ac_status); } && {
25874 test -z "$ac_c_werror_flag" ||
25875 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025876 } && test -s conftest$ac_exeext &&
25877 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025878 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025881sed 's/^/| /' conftest.$ac_ext >&5
25882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025883 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025885
25886rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025888LIBS=$ac_check_lib_save_LIBS
25889fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025890{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25891echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25892if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025893
Martin v. Löwis11437992002-04-12 09:54:03 +000025894cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025895#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025896_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025897
Guido van Rossum353ae582001-07-10 16:45:32 +000025898fi
25899
Jack Jansendd19cf82001-12-06 22:36:17 +000025900
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025901# also in readline 4.2
25902cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025903/* confdefs.h. */
25904_ACEOF
25905cat confdefs.h >>conftest.$ac_ext
25906cat >>conftest.$ac_ext <<_ACEOF
25907/* end confdefs.h. */
25908#include <readline/readline.h>
25909_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025910if { (ac_try="$ac_cpp conftest.$ac_ext"
25911case "(($ac_try" in
25912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25913 *) ac_try_echo=$ac_try;;
25914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025916 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025917 ac_status=$?
25918 grep -v '^ *+' conftest.er1 >conftest.err
25919 rm -f conftest.er1
25920 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025922 (exit $ac_status); } >/dev/null && {
25923 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25924 test ! -s conftest.err
25925 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025926 have_readline=yes
25927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025928 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025929sed 's/^/| /' conftest.$ac_ext >&5
25930
25931 have_readline=no
25932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025933
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025934rm -f conftest.err conftest.$ac_ext
25935if test $have_readline = yes
25936then
25937 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025938/* confdefs.h. */
25939_ACEOF
25940cat confdefs.h >>conftest.$ac_ext
25941cat >>conftest.$ac_ext <<_ACEOF
25942/* end confdefs.h. */
25943#include <readline/readline.h>
25944
25945_ACEOF
25946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25947 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25948
25949cat >>confdefs.h <<\_ACEOF
25950#define HAVE_RL_CATCH_SIGNAL 1
25951_ACEOF
25952
25953fi
Martin v. Löwis7671efc2010-02-15 08:35:16 +000025954rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025955
25956fi
25957
Martin v. Löwis82bca632006-02-10 20:49:30 +000025958# End of readline checks: restore LIBS
25959LIBS=$LIBS_no_readline
25960
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025961{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25962echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025963if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025964 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025965else
Martin v. Löwis11437992002-04-12 09:54:03 +000025966
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025967if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025968 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025969else
Martin v. Löwis11437992002-04-12 09:54:03 +000025970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025971/* confdefs.h. */
25972_ACEOF
25973cat confdefs.h >>conftest.$ac_ext
25974cat >>conftest.$ac_ext <<_ACEOF
25975/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025976
25977int main()
25978{
25979 int val1 = nice(1);
25980 if (val1 != -1 && val1 == nice(2))
25981 exit(0);
25982 exit(1);
25983}
25984
Martin v. Löwis11437992002-04-12 09:54:03 +000025985_ACEOF
25986rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025987if { (ac_try="$ac_link"
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_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025994 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025997 { (case "(($ac_try" in
25998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25999 *) ac_try_echo=$ac_try;;
26000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026002 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026003 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026005 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026006 ac_cv_broken_nice=yes
26007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026008 echo "$as_me: program exited with status $ac_status" >&5
26009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026010sed 's/^/| /' conftest.$ac_ext >&5
26011
Martin v. Löwis11437992002-04-12 09:54:03 +000026012( exit $ac_status )
26013ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026015rm -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 +000026016fi
26017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026018
26019fi
26020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026021{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26022echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026023if test "$ac_cv_broken_nice" = yes
26024then
Martin v. Löwis11437992002-04-12 09:54:03 +000026025
26026cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026027#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026028_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026029
26030fi
26031
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026032{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26033echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026034if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026035 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026036else
26037 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026038 ac_cv_broken_poll=no
26039else
26040 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026041/* confdefs.h. */
26042_ACEOF
26043cat confdefs.h >>conftest.$ac_ext
26044cat >>conftest.$ac_ext <<_ACEOF
26045/* end confdefs.h. */
26046
26047#include <poll.h>
26048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026049int main()
26050{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026051 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026052 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026053
26054 close (42);
26055
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026056 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026057 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026058 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026059 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026060 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026061 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026062 return 1;
26063}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026064
26065_ACEOF
26066rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026067if { (ac_try="$ac_link"
26068case "(($ac_try" in
26069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26070 *) ac_try_echo=$ac_try;;
26071esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026073 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026074 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026076 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026077 { (case "(($ac_try" in
26078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26079 *) ac_try_echo=$ac_try;;
26080esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026082 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026083 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026085 (exit $ac_status); }; }; then
26086 ac_cv_broken_poll=yes
26087else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026088 echo "$as_me: program exited with status $ac_status" >&5
26089echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026090sed 's/^/| /' conftest.$ac_ext >&5
26091
26092( exit $ac_status )
26093ac_cv_broken_poll=no
26094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026095rm -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 +000026096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026097
26098
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026099fi
26100
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026101{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26102echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026103if test "$ac_cv_broken_poll" = yes
26104then
26105
26106cat >>confdefs.h <<\_ACEOF
26107#define HAVE_BROKEN_POLL 1
26108_ACEOF
26109
26110fi
26111
Brett Cannon43802422005-02-10 20:48:03 +000026112# 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 +000026113# (which is not required by ISO C or UNIX spec) and/or if we support
26114# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026115{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26116echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026117if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026118 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026119else
26120 cat >conftest.$ac_ext <<_ACEOF
26121/* confdefs.h. */
26122_ACEOF
26123cat confdefs.h >>conftest.$ac_ext
26124cat >>conftest.$ac_ext <<_ACEOF
26125/* end confdefs.h. */
26126#include <sys/types.h>
26127#include <$ac_cv_struct_tm>
26128
26129
26130int
26131main ()
26132{
26133static struct tm ac_aggr;
26134if (ac_aggr.tm_zone)
26135return 0;
26136 ;
26137 return 0;
26138}
26139_ACEOF
26140rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026141if { (ac_try="$ac_compile"
26142case "(($ac_try" in
26143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26144 *) ac_try_echo=$ac_try;;
26145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026147 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026148 ac_status=$?
26149 grep -v '^ *+' conftest.er1 >conftest.err
26150 rm -f conftest.er1
26151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026153 (exit $ac_status); } && {
26154 test -z "$ac_c_werror_flag" ||
26155 test ! -s conftest.err
26156 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026157 ac_cv_member_struct_tm_tm_zone=yes
26158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026159 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026160sed 's/^/| /' conftest.$ac_ext >&5
26161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026162 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026163/* confdefs.h. */
26164_ACEOF
26165cat confdefs.h >>conftest.$ac_ext
26166cat >>conftest.$ac_ext <<_ACEOF
26167/* end confdefs.h. */
26168#include <sys/types.h>
26169#include <$ac_cv_struct_tm>
26170
26171
26172int
26173main ()
26174{
26175static struct tm ac_aggr;
26176if (sizeof ac_aggr.tm_zone)
26177return 0;
26178 ;
26179 return 0;
26180}
26181_ACEOF
26182rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026183if { (ac_try="$ac_compile"
26184case "(($ac_try" in
26185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26186 *) ac_try_echo=$ac_try;;
26187esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026189 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026190 ac_status=$?
26191 grep -v '^ *+' conftest.er1 >conftest.err
26192 rm -f conftest.er1
26193 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026195 (exit $ac_status); } && {
26196 test -z "$ac_c_werror_flag" ||
26197 test ! -s conftest.err
26198 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026199 ac_cv_member_struct_tm_tm_zone=yes
26200else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026201 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026202sed 's/^/| /' conftest.$ac_ext >&5
26203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026204 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026206
26207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026209
26210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026211fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026212{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26213echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26214if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026215
26216cat >>confdefs.h <<_ACEOF
26217#define HAVE_STRUCT_TM_TM_ZONE 1
26218_ACEOF
26219
26220
26221fi
26222
26223if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26224
26225cat >>confdefs.h <<\_ACEOF
26226#define HAVE_TM_ZONE 1
26227_ACEOF
26228
26229else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026230 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26231echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026232if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026233 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026234else
26235 cat >conftest.$ac_ext <<_ACEOF
26236/* confdefs.h. */
26237_ACEOF
26238cat confdefs.h >>conftest.$ac_ext
26239cat >>conftest.$ac_ext <<_ACEOF
26240/* end confdefs.h. */
26241#include <time.h>
26242
26243int
26244main ()
26245{
26246#ifndef tzname
26247 (void) tzname;
26248#endif
26249
26250 ;
26251 return 0;
26252}
26253_ACEOF
26254rm -f conftest.$ac_objext
26255if { (ac_try="$ac_compile"
26256case "(($ac_try" in
26257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26258 *) ac_try_echo=$ac_try;;
26259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026261 (eval "$ac_compile") 2>conftest.er1
26262 ac_status=$?
26263 grep -v '^ *+' conftest.er1 >conftest.err
26264 rm -f conftest.er1
26265 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026267 (exit $ac_status); } && {
26268 test -z "$ac_c_werror_flag" ||
26269 test ! -s conftest.err
26270 } && test -s conftest.$ac_objext; then
26271 ac_cv_have_decl_tzname=yes
26272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026273 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026274sed 's/^/| /' conftest.$ac_ext >&5
26275
26276 ac_cv_have_decl_tzname=no
26277fi
26278
26279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26280fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026281{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26282echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26283if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026284
26285cat >>confdefs.h <<_ACEOF
26286#define HAVE_DECL_TZNAME 1
26287_ACEOF
26288
26289
26290else
26291 cat >>confdefs.h <<_ACEOF
26292#define HAVE_DECL_TZNAME 0
26293_ACEOF
26294
26295
26296fi
26297
26298
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026299 { echo "$as_me:$LINENO: checking for tzname" >&5
26300echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026301if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026302 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026303else
26304 cat >conftest.$ac_ext <<_ACEOF
26305/* confdefs.h. */
26306_ACEOF
26307cat confdefs.h >>conftest.$ac_ext
26308cat >>conftest.$ac_ext <<_ACEOF
26309/* end confdefs.h. */
26310#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026311#if !HAVE_DECL_TZNAME
26312extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026313#endif
26314
26315int
26316main ()
26317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026318return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026319 ;
26320 return 0;
26321}
26322_ACEOF
26323rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026324if { (ac_try="$ac_link"
26325case "(($ac_try" in
26326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26327 *) ac_try_echo=$ac_try;;
26328esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026330 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026331 ac_status=$?
26332 grep -v '^ *+' conftest.er1 >conftest.err
26333 rm -f conftest.er1
26334 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026336 (exit $ac_status); } && {
26337 test -z "$ac_c_werror_flag" ||
26338 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026339 } && test -s conftest$ac_exeext &&
26340 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026341 ac_cv_var_tzname=yes
26342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026343 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026344sed 's/^/| /' conftest.$ac_ext >&5
26345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026346 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026348
26349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026350 conftest$ac_exeext conftest.$ac_ext
26351fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026352{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26353echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026354 if test $ac_cv_var_tzname = yes; then
26355
26356cat >>confdefs.h <<\_ACEOF
26357#define HAVE_TZNAME 1
26358_ACEOF
26359
26360 fi
26361fi
26362
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026363
Martin v. Löwis1d459062005-03-14 21:23:33 +000026364# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026365{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26366echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026367if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026369else
26370
26371if test "$cross_compiling" = yes; then
26372 ac_cv_working_tzset=no
26373else
26374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026375/* confdefs.h. */
26376_ACEOF
26377cat confdefs.h >>conftest.$ac_ext
26378cat >>conftest.$ac_ext <<_ACEOF
26379/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026380
26381#include <stdlib.h>
26382#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026383#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026384
26385#if HAVE_TZNAME
26386extern char *tzname[];
26387#endif
26388
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026389int main()
26390{
Brett Cannon18367812003-09-19 00:59:16 +000026391 /* Note that we need to ensure that not only does tzset(3)
26392 do 'something' with localtime, but it works as documented
26393 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026394 This includes making sure that tzname is set properly if
26395 tm->tm_zone does not exist since it is the alternative way
26396 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026397
26398 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026399 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026400 */
26401
Martin v. Löwis1d459062005-03-14 21:23:33 +000026402 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026403 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26404
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026405 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026406 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026407 if (localtime(&groundhogday)->tm_hour != 0)
26408 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026409#if HAVE_TZNAME
26410 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26411 if (strcmp(tzname[0], "UTC") ||
26412 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26413 exit(1);
26414#endif
Brett Cannon18367812003-09-19 00:59:16 +000026415
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026416 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026417 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026418 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026419 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026420#if HAVE_TZNAME
26421 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26422 exit(1);
26423#endif
Brett Cannon18367812003-09-19 00:59:16 +000026424
26425 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26426 tzset();
26427 if (localtime(&groundhogday)->tm_hour != 11)
26428 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026429#if HAVE_TZNAME
26430 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26431 exit(1);
26432#endif
26433
26434#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026435 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26436 exit(1);
26437 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26438 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026439#endif
Brett Cannon18367812003-09-19 00:59:16 +000026440
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026441 exit(0);
26442}
26443
26444_ACEOF
26445rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026446if { (ac_try="$ac_link"
26447case "(($ac_try" in
26448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26449 *) ac_try_echo=$ac_try;;
26450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026452 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026453 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026456 { (case "(($ac_try" in
26457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26458 *) ac_try_echo=$ac_try;;
26459esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026461 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026462 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026464 (exit $ac_status); }; }; then
26465 ac_cv_working_tzset=yes
26466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026467 echo "$as_me: program exited with status $ac_status" >&5
26468echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026469sed 's/^/| /' conftest.$ac_ext >&5
26470
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026471( exit $ac_status )
26472ac_cv_working_tzset=no
26473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026474rm -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 +000026475fi
26476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026477
26478fi
26479
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026480{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26481echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026482if test "$ac_cv_working_tzset" = yes
26483then
26484
26485cat >>confdefs.h <<\_ACEOF
26486#define HAVE_WORKING_TZSET 1
26487_ACEOF
26488
26489fi
26490
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026491# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026492{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26493echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026494if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026495 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026496else
26497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026498/* confdefs.h. */
26499_ACEOF
26500cat confdefs.h >>conftest.$ac_ext
26501cat >>conftest.$ac_ext <<_ACEOF
26502/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026503#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026504int
26505main ()
26506{
26507
26508struct stat st;
26509st.st_mtim.tv_nsec = 1;
26510
26511 ;
26512 return 0;
26513}
26514_ACEOF
26515rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026516if { (ac_try="$ac_compile"
26517case "(($ac_try" in
26518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26519 *) ac_try_echo=$ac_try;;
26520esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026522 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026524 grep -v '^ *+' conftest.er1 >conftest.err
26525 rm -f conftest.er1
26526 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026528 (exit $ac_status); } && {
26529 test -z "$ac_c_werror_flag" ||
26530 test ! -s conftest.err
26531 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026532 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026533else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026535sed 's/^/| /' conftest.$ac_ext >&5
26536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026537 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026538fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26541fi
26542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026543{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26544echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026545if test "$ac_cv_stat_tv_nsec" = yes
26546then
26547
26548cat >>confdefs.h <<\_ACEOF
26549#define HAVE_STAT_TV_NSEC 1
26550_ACEOF
26551
26552fi
26553
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026554# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026555{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26556echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026557if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026559else
26560 cat >conftest.$ac_ext <<_ACEOF
26561/* confdefs.h. */
26562_ACEOF
26563cat confdefs.h >>conftest.$ac_ext
26564cat >>conftest.$ac_ext <<_ACEOF
26565/* end confdefs.h. */
26566#include <sys/stat.h>
26567int
26568main ()
26569{
26570
26571struct stat st;
26572st.st_mtimespec.tv_nsec = 1;
26573
26574 ;
26575 return 0;
26576}
26577_ACEOF
26578rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026579if { (ac_try="$ac_compile"
26580case "(($ac_try" in
26581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26582 *) ac_try_echo=$ac_try;;
26583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026586 ac_status=$?
26587 grep -v '^ *+' conftest.er1 >conftest.err
26588 rm -f conftest.er1
26589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026591 (exit $ac_status); } && {
26592 test -z "$ac_c_werror_flag" ||
26593 test ! -s conftest.err
26594 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026595 ac_cv_stat_tv_nsec2=yes
26596else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026597 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026598sed 's/^/| /' conftest.$ac_ext >&5
26599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026600 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026601fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26604fi
26605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026606{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26607echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026608if test "$ac_cv_stat_tv_nsec2" = yes
26609then
26610
26611cat >>confdefs.h <<\_ACEOF
26612#define HAVE_STAT_TV_NSEC2 1
26613_ACEOF
26614
26615fi
26616
Jack Jansen666b1e72001-10-31 12:11:48 +000026617# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026618{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26619echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026620if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026621 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026622else
Martin v. Löwis11437992002-04-12 09:54:03 +000026623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026624/* confdefs.h. */
26625_ACEOF
26626cat confdefs.h >>conftest.$ac_ext
26627cat >>conftest.$ac_ext <<_ACEOF
26628/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026629#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026630int
26631main ()
26632{
Jack Jansen666b1e72001-10-31 12:11:48 +000026633
26634 int rtn;
26635 rtn = mvwdelch(0,0,0);
26636
Martin v. Löwis11437992002-04-12 09:54:03 +000026637 ;
26638 return 0;
26639}
26640_ACEOF
26641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026642if { (ac_try="$ac_compile"
26643case "(($ac_try" in
26644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26645 *) ac_try_echo=$ac_try;;
26646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026650 grep -v '^ *+' conftest.er1 >conftest.err
26651 rm -f conftest.er1
26652 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026654 (exit $ac_status); } && {
26655 test -z "$ac_c_werror_flag" ||
26656 test ! -s conftest.err
26657 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026658 ac_cv_mvwdelch_is_expression=yes
26659else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026661sed 's/^/| /' conftest.$ac_ext >&5
26662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026663 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026664fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26667fi
26668
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026669{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26670echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026671
26672if test "$ac_cv_mvwdelch_is_expression" = yes
26673then
Martin v. Löwis11437992002-04-12 09:54:03 +000026674
26675cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026676#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026677_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026678
26679fi
26680
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026681{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26682echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026683if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026684 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026685else
Martin v. Löwis11437992002-04-12 09:54:03 +000026686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026687/* confdefs.h. */
26688_ACEOF
26689cat confdefs.h >>conftest.$ac_ext
26690cat >>conftest.$ac_ext <<_ACEOF
26691/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026692#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026693int
26694main ()
26695{
Jack Jansen666b1e72001-10-31 12:11:48 +000026696
26697 WINDOW *w;
26698 w->_flags = 0;
26699
Martin v. Löwis11437992002-04-12 09:54:03 +000026700 ;
26701 return 0;
26702}
26703_ACEOF
26704rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026705if { (ac_try="$ac_compile"
26706case "(($ac_try" in
26707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26708 *) ac_try_echo=$ac_try;;
26709esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026713 grep -v '^ *+' conftest.er1 >conftest.err
26714 rm -f conftest.er1
26715 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026717 (exit $ac_status); } && {
26718 test -z "$ac_c_werror_flag" ||
26719 test ! -s conftest.err
26720 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026721 ac_cv_window_has_flags=yes
26722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026724sed 's/^/| /' conftest.$ac_ext >&5
26725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026726 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026727fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26730fi
26731
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026732{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26733echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026734
Jack Jansen666b1e72001-10-31 12:11:48 +000026735
26736if test "$ac_cv_window_has_flags" = yes
26737then
Martin v. Löwis11437992002-04-12 09:54:03 +000026738
26739cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026740#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026741_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026742
26743fi
26744
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026745{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26746echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026747cat >conftest.$ac_ext <<_ACEOF
26748/* confdefs.h. */
26749_ACEOF
26750cat confdefs.h >>conftest.$ac_ext
26751cat >>conftest.$ac_ext <<_ACEOF
26752/* end confdefs.h. */
26753#include <curses.h>
26754int
26755main ()
26756{
26757void *x=is_term_resized
26758 ;
26759 return 0;
26760}
26761_ACEOF
26762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026763if { (ac_try="$ac_compile"
26764case "(($ac_try" in
26765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26766 *) ac_try_echo=$ac_try;;
26767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026769 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026770 ac_status=$?
26771 grep -v '^ *+' conftest.er1 >conftest.err
26772 rm -f conftest.er1
26773 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026775 (exit $ac_status); } && {
26776 test -z "$ac_c_werror_flag" ||
26777 test ! -s conftest.err
26778 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026779
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026780cat >>confdefs.h <<\_ACEOF
26781#define HAVE_CURSES_IS_TERM_RESIZED 1
26782_ACEOF
26783
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026784 { echo "$as_me:$LINENO: result: yes" >&5
26785echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026787 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026788sed 's/^/| /' conftest.$ac_ext >&5
26789
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026790 { echo "$as_me:$LINENO: result: no" >&5
26791echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026792
26793fi
26794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026797{ echo "$as_me:$LINENO: checking for resize_term" >&5
26798echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026799cat >conftest.$ac_ext <<_ACEOF
26800/* confdefs.h. */
26801_ACEOF
26802cat confdefs.h >>conftest.$ac_ext
26803cat >>conftest.$ac_ext <<_ACEOF
26804/* end confdefs.h. */
26805#include <curses.h>
26806int
26807main ()
26808{
26809void *x=resize_term
26810 ;
26811 return 0;
26812}
26813_ACEOF
26814rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026815if { (ac_try="$ac_compile"
26816case "(($ac_try" in
26817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26818 *) ac_try_echo=$ac_try;;
26819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026821 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026822 ac_status=$?
26823 grep -v '^ *+' conftest.er1 >conftest.err
26824 rm -f conftest.er1
26825 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026827 (exit $ac_status); } && {
26828 test -z "$ac_c_werror_flag" ||
26829 test ! -s conftest.err
26830 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026831
26832cat >>confdefs.h <<\_ACEOF
26833#define HAVE_CURSES_RESIZE_TERM 1
26834_ACEOF
26835
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026836 { echo "$as_me:$LINENO: result: yes" >&5
26837echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026839 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026840sed 's/^/| /' conftest.$ac_ext >&5
26841
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026842 { echo "$as_me:$LINENO: result: no" >&5
26843echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026844
26845fi
26846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26848
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026849{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26850echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026851cat >conftest.$ac_ext <<_ACEOF
26852/* confdefs.h. */
26853_ACEOF
26854cat confdefs.h >>conftest.$ac_ext
26855cat >>conftest.$ac_ext <<_ACEOF
26856/* end confdefs.h. */
26857#include <curses.h>
26858int
26859main ()
26860{
26861void *x=resizeterm
26862 ;
26863 return 0;
26864}
26865_ACEOF
26866rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026867if { (ac_try="$ac_compile"
26868case "(($ac_try" in
26869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26870 *) ac_try_echo=$ac_try;;
26871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026873 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026874 ac_status=$?
26875 grep -v '^ *+' conftest.er1 >conftest.err
26876 rm -f conftest.er1
26877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026879 (exit $ac_status); } && {
26880 test -z "$ac_c_werror_flag" ||
26881 test ! -s conftest.err
26882 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026883
26884cat >>confdefs.h <<\_ACEOF
26885#define HAVE_CURSES_RESIZETERM 1
26886_ACEOF
26887
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026888 { echo "$as_me:$LINENO: result: yes" >&5
26889echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026891 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026892sed 's/^/| /' conftest.$ac_ext >&5
26893
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026894 { echo "$as_me:$LINENO: result: no" >&5
26895echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026896
26897fi
26898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26900
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026901{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26902echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026903
26904if test -r /dev/ptmx
26905then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026906 { echo "$as_me:$LINENO: result: yes" >&5
26907echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026908
26909cat >>confdefs.h <<\_ACEOF
26910#define HAVE_DEV_PTMX 1
26911_ACEOF
26912
Thomas Wouters89f507f2006-12-13 04:49:30 +000026913else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026914 { echo "$as_me:$LINENO: result: no" >&5
26915echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026916fi
26917
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026918{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26919echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026920
26921if test -r /dev/ptc
26922then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026923 { echo "$as_me:$LINENO: result: yes" >&5
26924echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026925
26926cat >>confdefs.h <<\_ACEOF
26927#define HAVE_DEV_PTC 1
26928_ACEOF
26929
Thomas Wouters89f507f2006-12-13 04:49:30 +000026930else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026931 { echo "$as_me:$LINENO: result: no" >&5
26932echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026933fi
26934
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026935if test "$have_long_long" = yes
26936then
26937 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26938echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26939 if test "${ac_cv_have_long_long_format+set}" = set; then
26940 echo $ECHO_N "(cached) $ECHO_C" >&6
26941else
26942 if test "$cross_compiling" = yes; then
26943 ac_cv_have_long_long_format=no
26944else
26945 cat >conftest.$ac_ext <<_ACEOF
26946/* confdefs.h. */
26947_ACEOF
26948cat confdefs.h >>conftest.$ac_ext
26949cat >>conftest.$ac_ext <<_ACEOF
26950/* end confdefs.h. */
26951
26952 #include <stdio.h>
26953 #include <stddef.h>
26954 #include <string.h>
26955
26956 #ifdef HAVE_SYS_TYPES_H
26957 #include <sys/types.h>
26958 #endif
26959
26960 int main()
26961 {
26962 char buffer[256];
26963
26964 if (sprintf(buffer, "%lld", (long long)123) < 0)
26965 return 1;
26966 if (strcmp(buffer, "123"))
26967 return 1;
26968
26969 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26970 return 1;
26971 if (strcmp(buffer, "-123"))
26972 return 1;
26973
26974 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26975 return 1;
26976 if (strcmp(buffer, "123"))
26977 return 1;
26978
26979 return 0;
26980 }
26981
26982_ACEOF
26983rm -f conftest$ac_exeext
26984if { (ac_try="$ac_link"
26985case "(($ac_try" in
26986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26987 *) ac_try_echo=$ac_try;;
26988esac
26989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26990 (eval "$ac_link") 2>&5
26991 ac_status=$?
26992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26993 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26994 { (case "(($ac_try" in
26995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26996 *) ac_try_echo=$ac_try;;
26997esac
26998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26999 (eval "$ac_try") 2>&5
27000 ac_status=$?
27001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27002 (exit $ac_status); }; }; then
27003 ac_cv_have_long_long_format=yes
27004else
27005 echo "$as_me: program exited with status $ac_status" >&5
27006echo "$as_me: failed program was:" >&5
27007sed 's/^/| /' conftest.$ac_ext >&5
27008
27009( exit $ac_status )
27010ac_cv_have_long_long_format=no
27011fi
27012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27013fi
27014
27015
27016
27017fi
27018
27019 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27020echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27021fi
27022
Mark Dickinson89d7d412009-12-31 20:50:59 +000027023if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027024then
27025
27026cat >>confdefs.h <<\_ACEOF
27027#define PY_FORMAT_LONG_LONG "ll"
27028_ACEOF
27029
27030fi
27031
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027032if test $ac_sys_system = Darwin
27033then
27034 LIBS="$LIBS -framework CoreFoundation"
27035fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027036
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027037{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27038echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027039if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027040 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027041else
27042 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027043 ac_cv_have_size_t_format="cross -- assuming yes"
27044
Thomas Wouters477c8d52006-05-27 19:21:47 +000027045else
27046 cat >conftest.$ac_ext <<_ACEOF
27047/* confdefs.h. */
27048_ACEOF
27049cat confdefs.h >>conftest.$ac_ext
27050cat >>conftest.$ac_ext <<_ACEOF
27051/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027052
Thomas Wouters477c8d52006-05-27 19:21:47 +000027053#include <stdio.h>
27054#include <stddef.h>
27055#include <string.h>
27056
Christian Heimes2c181612007-12-17 20:04:13 +000027057#ifdef HAVE_SYS_TYPES_H
27058#include <sys/types.h>
27059#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027060
27061#ifdef HAVE_SSIZE_T
27062typedef ssize_t Py_ssize_t;
27063#elif SIZEOF_VOID_P == SIZEOF_LONG
27064typedef long Py_ssize_t;
27065#else
27066typedef int Py_ssize_t;
27067#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027068
Christian Heimes2c181612007-12-17 20:04:13 +000027069int main()
27070{
27071 char buffer[256];
27072
Thomas Wouters477c8d52006-05-27 19:21:47 +000027073 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27074 return 1;
27075
Thomas Wouters89f507f2006-12-13 04:49:30 +000027076 if (strcmp(buffer, "123"))
27077 return 1;
27078
27079 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27080 return 1;
27081
27082 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027083 return 1;
27084
27085 return 0;
27086}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027087
Thomas Wouters477c8d52006-05-27 19:21:47 +000027088_ACEOF
27089rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027090if { (ac_try="$ac_link"
27091case "(($ac_try" in
27092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27093 *) ac_try_echo=$ac_try;;
27094esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027096 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027097 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027100 { (case "(($ac_try" in
27101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27102 *) ac_try_echo=$ac_try;;
27103esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027105 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027106 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027108 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027109 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027110else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027111 echo "$as_me: program exited with status $ac_status" >&5
27112echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027113sed 's/^/| /' conftest.$ac_ext >&5
27114
27115( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027116ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027117fi
27118rm -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 +000027119fi
27120
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027121
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027122fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027123{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27124echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027125if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027126
27127cat >>confdefs.h <<\_ACEOF
27128#define PY_FORMAT_SIZE_T "z"
27129_ACEOF
27130
27131fi
27132
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027133{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27134echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027135if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027136 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027137else
Martin v. Löwis11437992002-04-12 09:54:03 +000027138 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027139/* confdefs.h. */
27140_ACEOF
27141cat confdefs.h >>conftest.$ac_ext
27142cat >>conftest.$ac_ext <<_ACEOF
27143/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027144
27145#ifdef HAVE_SYS_TYPES_H
27146#include <sys/types.h>
27147#endif
27148#ifdef HAVE_SYS_SOCKET_H
27149#include <sys/socket.h>
27150#endif
27151
27152
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027153typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027154int
27155main ()
27156{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027157if ((ac__type_new_ *) 0)
27158 return 0;
27159if (sizeof (ac__type_new_))
27160 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027161 ;
27162 return 0;
27163}
27164_ACEOF
27165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027166if { (ac_try="$ac_compile"
27167case "(($ac_try" in
27168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27169 *) ac_try_echo=$ac_try;;
27170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027174 grep -v '^ *+' conftest.er1 >conftest.err
27175 rm -f conftest.er1
27176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027178 (exit $ac_status); } && {
27179 test -z "$ac_c_werror_flag" ||
27180 test ! -s conftest.err
27181 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027182 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027185sed 's/^/| /' conftest.$ac_ext >&5
27186
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027187 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027189
27190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027191fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027192{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27193echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27194if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027195 :
27196else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027197
Martin v. Löwis01c04012002-11-11 14:58:44 +000027198cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027199#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027200_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027201
27202fi
27203
Michael W. Hudson54241132001-12-07 15:38:26 +000027204
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027205{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27206echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027207if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027208 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027209else
27210 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027211 ac_cv_broken_mbstowcs=no
27212else
27213 cat >conftest.$ac_ext <<_ACEOF
27214/* confdefs.h. */
27215_ACEOF
27216cat confdefs.h >>conftest.$ac_ext
27217cat >>conftest.$ac_ext <<_ACEOF
27218/* end confdefs.h. */
27219
27220#include<stdlib.h>
27221int main() {
27222 size_t len = -1;
27223 const char *str = "text";
27224 len = mbstowcs(NULL, str, 0);
27225 return (len != 4);
27226}
27227
27228_ACEOF
27229rm -f conftest$ac_exeext
27230if { (ac_try="$ac_link"
27231case "(($ac_try" in
27232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27233 *) ac_try_echo=$ac_try;;
27234esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027236 (eval "$ac_link") 2>&5
27237 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27240 { (case "(($ac_try" in
27241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27242 *) ac_try_echo=$ac_try;;
27243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027245 (eval "$ac_try") 2>&5
27246 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027248 (exit $ac_status); }; }; then
27249 ac_cv_broken_mbstowcs=no
27250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027251 echo "$as_me: program exited with status $ac_status" >&5
27252echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027253sed 's/^/| /' conftest.$ac_ext >&5
27254
27255( exit $ac_status )
27256ac_cv_broken_mbstowcs=yes
27257fi
27258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27259fi
27260
27261
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027262fi
27263
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027264{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27265echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027266if test "$ac_cv_broken_mbstowcs" = yes
27267then
27268
27269cat >>confdefs.h <<\_ACEOF
27270#define HAVE_BROKEN_MBSTOWCS 1
27271_ACEOF
27272
27273fi
27274
Antoine Pitroub52ec782009-01-25 16:34:23 +000027275# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027276{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27277echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027278
27279# Check whether --with-computed-gotos was given.
27280if test "${with_computed_gotos+set}" = set; then
27281 withval=$with_computed_gotos;
27282if test "$withval" != no
27283then
27284
27285cat >>confdefs.h <<\_ACEOF
27286#define USE_COMPUTED_GOTOS 1
27287_ACEOF
27288
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027289 { echo "$as_me:$LINENO: result: yes" >&5
27290echo "${ECHO_T}yes" >&6; }
27291else { echo "$as_me:$LINENO: result: no" >&5
27292echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027293fi
27294else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027295 { echo "$as_me:$LINENO: result: no" >&5
27296echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027297fi
27298
27299
27300
Michael W. Hudson54241132001-12-07 15:38:26 +000027301
27302
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027303for h in `(cd $srcdir;echo Python/thread_*.h)`
27304do
27305 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27306done
27307
Michael W. Hudson54241132001-12-07 15:38:26 +000027308
Neal Norwitzd24499d2005-12-18 21:36:39 +000027309SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027310{ echo "$as_me:$LINENO: checking for build directories" >&5
27311echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027312for dir in $SRCDIRS; do
27313 if test ! -d $dir; then
27314 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027315 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027316done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027317{ echo "$as_me:$LINENO: result: done" >&5
27318echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027319
Guido van Rossum627b2d71993-12-24 10:39:16 +000027320# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027321ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027322
Martin v. Löwis11437992002-04-12 09:54:03 +000027323cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027324# This file is a shell script that caches the results of configure
27325# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027326# scripts and configure runs, see configure's option --config-cache.
27327# It is not useful on other systems. If it contains results you don't
27328# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027329#
Martin v. Löwis11437992002-04-12 09:54:03 +000027330# config.status only pays attention to the cache file if you give it
27331# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027332#
Skip Montanaro6dead952003-09-25 14:50:04 +000027333# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027334# loading this file, other *unset* `ac_cv_foo' will be assigned the
27335# following values.
27336
27337_ACEOF
27338
Guido van Rossumf78abae1997-01-21 22:02:36 +000027339# The following way of writing the cache mishandles newlines in values,
27340# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027341# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027342# Ultrix sh set writes to stderr and can't be redirected directly,
27343# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027344(
27345 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27346 eval ac_val=\$$ac_var
27347 case $ac_val in #(
27348 *${as_nl}*)
27349 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027350 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27351echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027352 esac
27353 case $ac_var in #(
27354 _ | IFS | as_nl) ;; #(
27355 *) $as_unset $ac_var ;;
27356 esac ;;
27357 esac
27358 done
27359
Martin v. Löwis11437992002-04-12 09:54:03 +000027360 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027361 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27362 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027363 # `set' does not quote correctly, so add quotes (double-quote
27364 # substitution turns \\\\ into \\, and sed turns \\ into \).
27365 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027366 "s/'/'\\\\''/g;
27367 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027368 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027369 *)
27370 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027371 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027372 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027373 esac |
27374 sort
27375) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027376 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027377 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027378 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027379 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027380 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27381 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027382 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27383 :end' >>confcache
27384if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27385 if test -w "$cache_file"; then
27386 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027387 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27388echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027389 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027390 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027391 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27392echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027393 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027394fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027395rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027397test "x$prefix" = xNONE && prefix=$ac_default_prefix
27398# Let make expand exec_prefix.
27399test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027400
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027401DEFS=-DHAVE_CONFIG_H
27402
Skip Montanaro6dead952003-09-25 14:50:04 +000027403ac_libobjs=
27404ac_ltlibobjs=
27405for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27406 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027407 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027408 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027409 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27410 # will be set to the directory where LIBOBJS objects are built.
27411 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27412 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027413done
27414LIBOBJS=$ac_libobjs
27415
27416LTLIBOBJS=$ac_ltlibobjs
27417
27418
Martin v. Löwis11437992002-04-12 09:54:03 +000027419
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027420: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027421ac_clean_files_save=$ac_clean_files
27422ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027423{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27424echo "$as_me: creating $CONFIG_STATUS" >&6;}
27425cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027426#! $SHELL
27427# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027428# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027429# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027430# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027431
Martin v. Löwis11437992002-04-12 09:54:03 +000027432debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027433ac_cs_recheck=false
27434ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027435SHELL=\${CONFIG_SHELL-$SHELL}
27436_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027437
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027438cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027439## --------------------- ##
27440## M4sh Initialization. ##
27441## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027443# Be more Bourne compatible
27444DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027445if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27446 emulate sh
27447 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027448 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027449 # is contrary to our usage. Disable this feature.
27450 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027451 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027452else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027453 case `(set -o) 2>/dev/null` in
27454 *posix*) set -o posix ;;
27455esac
27456
Michael W. Hudson54241132001-12-07 15:38:26 +000027457fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027458
27459
Michael W. Hudson54241132001-12-07 15:38:26 +000027460
Michael W. Hudson54241132001-12-07 15:38:26 +000027461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027462# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027463# Avoid depending upon Character Ranges.
27464as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27465as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27466as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27467as_cr_digits='0123456789'
27468as_cr_alnum=$as_cr_Letters$as_cr_digits
27469
27470# The user is always right.
27471if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027472 echo "#! /bin/sh" >conf$$.sh
27473 echo "exit 0" >>conf$$.sh
27474 chmod +x conf$$.sh
27475 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27476 PATH_SEPARATOR=';'
27477 else
27478 PATH_SEPARATOR=:
27479 fi
27480 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027481fi
27482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027483# Support unset when possible.
27484if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27485 as_unset=unset
27486else
27487 as_unset=false
27488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027490
27491# IFS
27492# We need space, tab and new line, in precisely that order. Quoting is
27493# there to prevent editors from complaining about space-tab.
27494# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27495# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027496as_nl='
27497'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027498IFS=" "" $as_nl"
27499
27500# Find who we are. Look in the path if we contain no directory separator.
27501case $0 in
27502 *[\\/]* ) as_myself=$0 ;;
27503 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027504for as_dir in $PATH
27505do
27506 IFS=$as_save_IFS
27507 test -z "$as_dir" && as_dir=.
27508 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27509done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027510IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027512 ;;
27513esac
27514# We did not find ourselves, most probably we were run as `sh COMMAND'
27515# in which case we are not to be found in the path.
27516if test "x$as_myself" = x; then
27517 as_myself=$0
27518fi
27519if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027520 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027521 { (exit 1); exit 1; }
27522fi
27523
27524# Work around bugs in pre-3.0 UWIN ksh.
27525for as_var in ENV MAIL MAILPATH
27526do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27527done
27528PS1='$ '
27529PS2='> '
27530PS4='+ '
27531
27532# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027533for as_var in \
27534 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27535 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27536 LC_TELEPHONE LC_TIME
27537do
27538 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27539 eval $as_var=C; export $as_var
27540 else
27541 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27542 fi
27543done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027544
27545# Required to use basename.
27546if expr a : '\(a\)' >/dev/null 2>&1 &&
27547 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27548 as_expr=expr
27549else
27550 as_expr=false
27551fi
27552
27553if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27554 as_basename=basename
27555else
27556 as_basename=false
27557fi
27558
27559
27560# Name of the executable.
27561as_me=`$as_basename -- "$0" ||
27562$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27563 X"$0" : 'X\(//\)$' \| \
27564 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027565echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027566 sed '/^.*\/\([^/][^/]*\)\/*$/{
27567 s//\1/
27568 q
27569 }
27570 /^X\/\(\/\/\)$/{
27571 s//\1/
27572 q
27573 }
27574 /^X\/\(\/\).*/{
27575 s//\1/
27576 q
27577 }
27578 s/.*/./; q'`
27579
27580# CDPATH.
27581$as_unset CDPATH
27582
27583
27584
Martin v. Löwis11437992002-04-12 09:54:03 +000027585 as_lineno_1=$LINENO
27586 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027587 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027588 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027589
Martin v. Löwis11437992002-04-12 09:54:03 +000027590 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27591 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027592 # line-number line after each line using $LINENO; the second 'sed'
27593 # does the real work. The second script uses 'N' to pair each
27594 # line-number line with the line containing $LINENO, and appends
27595 # trailing '-' during substitution so that $LINENO is not a special
27596 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027597 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027598 # scripts with optimization help from Paolo Bonzini. Blame Lee
27599 # E. McMahon (1931-1989) for sed's syntax. :-)
27600 sed -n '
27601 p
27602 /[$]LINENO/=
27603 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027604 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027605 s/[$]LINENO.*/&-/
27606 t lineno
27607 b
27608 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027609 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027610 :loop
27611 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027612 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027613 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027614 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027615 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027616 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027617 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027618
Martin v. Löwis11437992002-04-12 09:54:03 +000027619 # Don't try to exec as it changes $[0], causing all sort of problems
27620 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027621 # original and so on. Autoconf is especially sensitive to this).
27622 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027623 # Exit status is that of the last command.
27624 exit
27625}
27626
27627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027628if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27629 as_dirname=dirname
27630else
27631 as_dirname=false
27632fi
27633
27634ECHO_C= ECHO_N= ECHO_T=
27635case `echo -n x` in
27636-n*)
27637 case `echo 'x\c'` in
27638 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27639 *) ECHO_C='\c';;
27640 esac;;
27641*)
27642 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027645if expr a : '\(a\)' >/dev/null 2>&1 &&
27646 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027647 as_expr=expr
27648else
27649 as_expr=false
27650fi
27651
27652rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027653if test -d conf$$.dir; then
27654 rm -f conf$$.dir/conf$$.file
27655else
27656 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027657 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027658fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027659echo >conf$$.file
27660if ln -s conf$$.file conf$$ 2>/dev/null; then
27661 as_ln_s='ln -s'
27662 # ... but there are two gotchas:
27663 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27664 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27665 # In both cases, we have to default to `cp -p'.
27666 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027667 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027668elif ln conf$$.file conf$$ 2>/dev/null; then
27669 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027670else
27671 as_ln_s='cp -p'
27672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027673rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27674rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027675
Skip Montanaro6dead952003-09-25 14:50:04 +000027676if mkdir -p . 2>/dev/null; then
27677 as_mkdir_p=:
27678else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027679 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027680 as_mkdir_p=false
27681fi
27682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027683if test -x / >/dev/null 2>&1; then
27684 as_test_x='test -x'
27685else
27686 if ls -dL / >/dev/null 2>&1; then
27687 as_ls_L_option=L
27688 else
27689 as_ls_L_option=
27690 fi
27691 as_test_x='
27692 eval sh -c '\''
27693 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027694 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027695 else
27696 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027697 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027698 esac;
27699 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27700 ???[sx]*):;;*)false;;esac;fi
27701 '\'' sh
27702 '
27703fi
27704as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027705
27706# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027707as_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 +000027708
27709# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027710as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027711
27712
Martin v. Löwis11437992002-04-12 09:54:03 +000027713exec 6>&1
27714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027715# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027716# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027717# values after options handling.
27718ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027719This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027720generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027721
27722 CONFIG_FILES = $CONFIG_FILES
27723 CONFIG_HEADERS = $CONFIG_HEADERS
27724 CONFIG_LINKS = $CONFIG_LINKS
27725 CONFIG_COMMANDS = $CONFIG_COMMANDS
27726 $ $0 $@
27727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027728on `(hostname || uname -n) 2>/dev/null | sed 1q`
27729"
27730
Martin v. Löwis11437992002-04-12 09:54:03 +000027731_ACEOF
27732
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027733cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027734# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027735config_files="$ac_config_files"
27736config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027738_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027739
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027740cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027741ac_cs_usage="\
27742\`$as_me' instantiates files from templates according to the
27743current configuration.
27744
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027745Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027746
27747 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027748 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027749 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027750 -d, --debug don't remove temporary files
27751 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027752 --file=FILE[:TEMPLATE]
27753 instantiate the configuration file FILE
27754 --header=FILE[:TEMPLATE]
27755 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027756
27757Configuration files:
27758$config_files
27759
27760Configuration headers:
27761$config_headers
27762
27763Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027765_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027766cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027767ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027768python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027769configured by $0, generated by GNU Autoconf 2.61,
27770 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027771
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027772Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027773This config.status script is free software; the Free Software Foundation
27774gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027775
27776ac_pwd='$ac_pwd'
27777srcdir='$srcdir'
27778INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027779_ACEOF
27780
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027781cat >>$CONFIG_STATUS <<\_ACEOF
27782# If no file are specified by the user, then we need to provide default
27783# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027784ac_need_defaults=:
27785while test $# != 0
27786do
27787 case $1 in
27788 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027789 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27790 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027791 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027792 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027793 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027794 ac_option=$1
27795 ac_optarg=$2
27796 ac_shift=shift
27797 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027798 esac
27799
Skip Montanaro6dead952003-09-25 14:50:04 +000027800 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027801 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027802 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27803 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027804 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027805 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027807 debug=: ;;
27808 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027809 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027810 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027811 ac_need_defaults=false;;
27812 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027813 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027814 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027815 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027816 --he | --h)
27817 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027818 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027819Try \`$0 --help' for more information." >&2
27820 { (exit 1); exit 1; }; };;
27821 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027822 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027823 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27824 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27825 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027826
27827 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027828 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027829Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027830 { (exit 1); exit 1; }; } ;;
27831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027832 *) ac_config_targets="$ac_config_targets $1"
27833 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027834
27835 esac
27836 shift
27837done
27838
Skip Montanaro6dead952003-09-25 14:50:04 +000027839ac_configure_extra_args=
27840
27841if $ac_cs_silent; then
27842 exec 6>/dev/null
27843 ac_configure_extra_args="$ac_configure_extra_args --silent"
27844fi
27845
27846_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027847cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027848if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027849 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27850 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027851 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027852 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027853fi
27854
Martin v. Löwis11437992002-04-12 09:54:03 +000027855_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027856cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027857exec 5>>config.log
27858{
27859 echo
27860 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27861## Running $as_me. ##
27862_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027863 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027864} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027866_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027867cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027868_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027869
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027870cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871
27872# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027873for ac_config_target in $ac_config_targets
27874do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875 case $ac_config_target in
27876 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27877 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27878 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027879 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27880 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027881 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27882 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027883 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027884
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027885 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27886echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027887 { (exit 1); exit 1; }; };;
27888 esac
27889done
27890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027891
Martin v. Löwis11437992002-04-12 09:54:03 +000027892# If the user did not use the arguments to specify the items to instantiate,
27893# then the envvar interface is used. Set only those that are not.
27894# We use the long form for the default assignment because of an extremely
27895# bizarre bug on SunOS 4.1.3.
27896if $ac_need_defaults; then
27897 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27898 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27899fi
27900
Skip Montanaro6dead952003-09-25 14:50:04 +000027901# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027902# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027903# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027904# Hook for its removal unless debugging.
27905# Note that there is a small window in which the directory will not be cleaned:
27906# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027907$debug ||
27908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027909 tmp=
27910 trap 'exit_status=$?
27911 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27912' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027913 trap '{ (exit 1); exit 1; }' 1 2 13 15
27914}
Martin v. Löwis11437992002-04-12 09:54:03 +000027915# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027916
Martin v. Löwis11437992002-04-12 09:54:03 +000027917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027918 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027919 test -n "$tmp" && test -d "$tmp"
27920} ||
27921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027922 tmp=./conf$$-$RANDOM
27923 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027924} ||
27925{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027926 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027927 { (exit 1); exit 1; }
27928}
27929
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027930#
27931# Set up the sed scripts for CONFIG_FILES section.
27932#
27933
27934# No need to generate the scripts if there are no CONFIG_FILES.
27935# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027936if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027937
27938_ACEOF
27939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027940
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027942ac_delim='%!_!# '
27943for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027944 cat >conf$$subs.sed <<_ACEOF
27945SHELL!$SHELL$ac_delim
27946PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27947PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27948PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27949PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27950PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27951PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27952exec_prefix!$exec_prefix$ac_delim
27953prefix!$prefix$ac_delim
27954program_transform_name!$program_transform_name$ac_delim
27955bindir!$bindir$ac_delim
27956sbindir!$sbindir$ac_delim
27957libexecdir!$libexecdir$ac_delim
27958datarootdir!$datarootdir$ac_delim
27959datadir!$datadir$ac_delim
27960sysconfdir!$sysconfdir$ac_delim
27961sharedstatedir!$sharedstatedir$ac_delim
27962localstatedir!$localstatedir$ac_delim
27963includedir!$includedir$ac_delim
27964oldincludedir!$oldincludedir$ac_delim
27965docdir!$docdir$ac_delim
27966infodir!$infodir$ac_delim
27967htmldir!$htmldir$ac_delim
27968dvidir!$dvidir$ac_delim
27969pdfdir!$pdfdir$ac_delim
27970psdir!$psdir$ac_delim
27971libdir!$libdir$ac_delim
27972localedir!$localedir$ac_delim
27973mandir!$mandir$ac_delim
27974DEFS!$DEFS$ac_delim
27975ECHO_C!$ECHO_C$ac_delim
27976ECHO_N!$ECHO_N$ac_delim
27977ECHO_T!$ECHO_T$ac_delim
27978LIBS!$LIBS$ac_delim
27979build_alias!$build_alias$ac_delim
27980host_alias!$host_alias$ac_delim
27981target_alias!$target_alias$ac_delim
27982VERSION!$VERSION$ac_delim
27983SOVERSION!$SOVERSION$ac_delim
27984CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27985UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27986ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027987LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027988PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27989PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27990PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27991PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27992PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27993FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27994FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27995FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27996FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27997FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27998MACHDEP!$MACHDEP$ac_delim
27999SGI_ABI!$SGI_ABI$ac_delim
28000CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28001EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28002CC!$CC$ac_delim
28003CFLAGS!$CFLAGS$ac_delim
28004LDFLAGS!$LDFLAGS$ac_delim
28005CPPFLAGS!$CPPFLAGS$ac_delim
28006ac_ct_CC!$ac_ct_CC$ac_delim
28007EXEEXT!$EXEEXT$ac_delim
28008OBJEXT!$OBJEXT$ac_delim
28009CXX!$CXX$ac_delim
28010MAINCC!$MAINCC$ac_delim
28011CPP!$CPP$ac_delim
28012GREP!$GREP$ac_delim
28013EGREP!$EGREP$ac_delim
28014BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28015LIBRARY!$LIBRARY$ac_delim
28016LDLIBRARY!$LDLIBRARY$ac_delim
28017DLLLIBRARY!$DLLLIBRARY$ac_delim
28018BLDLIBRARY!$BLDLIBRARY$ac_delim
28019LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28020INSTSONAME!$INSTSONAME$ac_delim
28021RUNSHARED!$RUNSHARED$ac_delim
28022LINKCC!$LINKCC$ac_delim
28023GNULD!$GNULD$ac_delim
28024RANLIB!$RANLIB$ac_delim
28025AR!$AR$ac_delim
28026ARFLAGS!$ARFLAGS$ac_delim
28027SVNVERSION!$SVNVERSION$ac_delim
28028INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28029INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28030INSTALL_DATA!$INSTALL_DATA$ac_delim
28031LN!$LN$ac_delim
28032OPT!$OPT$ac_delim
28033BASECFLAGS!$BASECFLAGS$ac_delim
28034UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28035OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28036LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28037SO!$SO$ac_delim
28038LDSHARED!$LDSHARED$ac_delim
28039BLDSHARED!$BLDSHARED$ac_delim
28040CCSHARED!$CCSHARED$ac_delim
28041LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028042_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028043
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028044 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028045 break
28046 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028047 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28048echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028049 { (exit 1); exit 1; }; }
28050 else
28051 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028052 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028053done
28054
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028055ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28056if test -n "$ac_eof"; then
28057 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28058 ac_eof=`expr $ac_eof + 1`
28059fi
28060
28061cat >>$CONFIG_STATUS <<_ACEOF
28062cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28063/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028064_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028065sed '
28066s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28067s/^/s,@/; s/!/@,|#_!!_#|/
28068:n
28069t n
28070s/'"$ac_delim"'$/,g/; t
28071s/$/\\/; p
28072N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28073' >>$CONFIG_STATUS <conf$$subs.sed
28074rm -f conf$$subs.sed
28075cat >>$CONFIG_STATUS <<_ACEOF
28076CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028077_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028078
28079
28080ac_delim='%!_!# '
28081for ac_last_try in false false false false false :; do
28082 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028083CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028084SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028085PKG_CONFIG!$PKG_CONFIG$ac_delim
28086LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028087USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28088SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28089USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28090LDLAST!$LDLAST$ac_delim
28091THREADOBJ!$THREADOBJ$ac_delim
28092DLINCLDIR!$DLINCLDIR$ac_delim
28093DYNLOADFILE!$DYNLOADFILE$ac_delim
28094MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28095TRUE!$TRUE$ac_delim
28096LIBOBJS!$LIBOBJS$ac_delim
28097HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28098HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28099HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28100HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28101HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28102LIBM!$LIBM$ac_delim
28103LIBC!$LIBC$ac_delim
28104THREADHEADERS!$THREADHEADERS$ac_delim
28105SRCDIRS!$SRCDIRS$ac_delim
28106LTLIBOBJS!$LTLIBOBJS$ac_delim
28107_ACEOF
28108
Benjamin Petersond78735d2010-01-01 16:04:23 +000028109 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028110 break
28111 elif $ac_last_try; then
28112 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28113echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028114 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028115 else
28116 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28117 fi
28118done
28119
28120ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28121if test -n "$ac_eof"; then
28122 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28123 ac_eof=`expr $ac_eof + 1`
28124fi
28125
28126cat >>$CONFIG_STATUS <<_ACEOF
28127cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28128/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028129_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028130sed '
28131s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28132s/^/s,@/; s/!/@,|#_!!_#|/
28133:n
28134t n
28135s/'"$ac_delim"'$/,g/; t
28136s/$/\\/; p
28137N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28138' >>$CONFIG_STATUS <conf$$subs.sed
28139rm -f conf$$subs.sed
28140cat >>$CONFIG_STATUS <<_ACEOF
28141:end
28142s/|#_!!_#|//g
28143CEOF$ac_eof
28144_ACEOF
28145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028146
28147# VPATH may cause trouble with some makes, so we remove $(srcdir),
28148# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28149# trailing colons and then remove the whole line if VPATH becomes empty
28150# (actually we leave an empty line to preserve line numbers).
28151if test "x$srcdir" = x.; then
28152 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28153s/:*\$(srcdir):*/:/
28154s/:*\${srcdir}:*/:/
28155s/:*@srcdir@:*/:/
28156s/^\([^=]*=[ ]*\):*/\1/
28157s/:*$//
28158s/^[^=]*=[ ]*$//
28159}'
28160fi
28161
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028162cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028163fi # test -n "$CONFIG_FILES"
28164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028165
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028166for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028167do
28168 case $ac_tag in
28169 :[FHLC]) ac_mode=$ac_tag; continue;;
28170 esac
28171 case $ac_mode$ac_tag in
28172 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028173 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28174echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028175 { (exit 1); exit 1; }; };;
28176 :[FH]-) ac_tag=-:-;;
28177 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28178 esac
28179 ac_save_IFS=$IFS
28180 IFS=:
28181 set x $ac_tag
28182 IFS=$ac_save_IFS
28183 shift
28184 ac_file=$1
28185 shift
28186
28187 case $ac_mode in
28188 :L) ac_source=$1;;
28189 :[FH])
28190 ac_file_inputs=
28191 for ac_f
28192 do
28193 case $ac_f in
28194 -) ac_f="$tmp/stdin";;
28195 *) # Look for the file first in the build tree, then in the source tree
28196 # (if the path is not absolute). The absolute path cannot be DOS-style,
28197 # because $ac_f cannot contain `:'.
28198 test -f "$ac_f" ||
28199 case $ac_f in
28200 [\\/$]*) false;;
28201 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28202 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028203 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28204echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028205 { (exit 1); exit 1; }; };;
28206 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028207 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028208 done
28209
28210 # Let's still pretend it is `configure' which instantiates (i.e., don't
28211 # use $as_me), people would be surprised to read:
28212 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028213 configure_input="Generated from "`IFS=:
28214 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028215 if test x"$ac_file" != x-; then
28216 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028217 { echo "$as_me:$LINENO: creating $ac_file" >&5
28218echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028219 fi
28220
28221 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028222 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028223 esac
28224 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028225 esac
28226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028227 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028228$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028229 X"$ac_file" : 'X\(//\)[^/]' \| \
28230 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028231 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028232echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028233 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28234 s//\1/
28235 q
28236 }
28237 /^X\(\/\/\)[^/].*/{
28238 s//\1/
28239 q
28240 }
28241 /^X\(\/\/\)$/{
28242 s//\1/
28243 q
28244 }
28245 /^X\(\/\).*/{
28246 s//\1/
28247 q
28248 }
28249 s/.*/./; q'`
28250 { as_dir="$ac_dir"
28251 case $as_dir in #(
28252 -*) as_dir=./$as_dir;;
28253 esac
28254 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028255 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028256 while :; do
28257 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028258 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028259 *) as_qdir=$as_dir;;
28260 esac
28261 as_dirs="'$as_qdir' $as_dirs"
28262 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028263$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028264 X"$as_dir" : 'X\(//\)[^/]' \| \
28265 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028266 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028267echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28269 s//\1/
28270 q
28271 }
28272 /^X\(\/\/\)[^/].*/{
28273 s//\1/
28274 q
28275 }
28276 /^X\(\/\/\)$/{
28277 s//\1/
28278 q
28279 }
28280 /^X\(\/\).*/{
28281 s//\1/
28282 q
28283 }
28284 s/.*/./; q'`
28285 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028286 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028287 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028288 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28289echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028290 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028291 ac_builddir=.
28292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028293case "$ac_dir" in
28294.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28295*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028296 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028297 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028298 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028299 case $ac_top_builddir_sub in
28300 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28301 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28302 esac ;;
28303esac
28304ac_abs_top_builddir=$ac_pwd
28305ac_abs_builddir=$ac_pwd$ac_dir_suffix
28306# for backward compatibility:
28307ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028308
28309case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028310 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028311 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028312 ac_top_srcdir=$ac_top_builddir_sub
28313 ac_abs_top_srcdir=$ac_pwd ;;
28314 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028315 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028316 ac_top_srcdir=$srcdir
28317 ac_abs_top_srcdir=$srcdir ;;
28318 *) # Relative name.
28319 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28320 ac_top_srcdir=$ac_top_build_prefix$srcdir
28321 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028322esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028323ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028324
Martin v. Löwis11437992002-04-12 09:54:03 +000028325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028326 case $ac_mode in
28327 :F)
28328 #
28329 # CONFIG_FILE
28330 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028331
28332 case $INSTALL in
28333 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028334 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028335 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028336_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028337
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028338cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028339# If the template does not know about datarootdir, expand it.
28340# FIXME: This hack should be removed a few years after 2.60.
28341ac_datarootdir_hack=; ac_datarootdir_seen=
28342
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028343case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028344 p
28345 q
28346}
28347/@datadir@/p
28348/@docdir@/p
28349/@infodir@/p
28350/@localedir@/p
28351/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028352' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028353*datarootdir*) ac_datarootdir_seen=yes;;
28354*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028355 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28356echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028357_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028358cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028359 ac_datarootdir_hack='
28360 s&@datadir@&$datadir&g
28361 s&@docdir@&$docdir&g
28362 s&@infodir@&$infodir&g
28363 s&@localedir@&$localedir&g
28364 s&@mandir@&$mandir&g
28365 s&\\\${datarootdir}&$datarootdir&g' ;;
28366esac
28367_ACEOF
28368
28369# Neutralize VPATH when `$srcdir' = `.'.
28370# Shell code in configure.ac might set extrasub.
28371# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028372cat >>$CONFIG_STATUS <<_ACEOF
28373 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028374$extrasub
28375_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028376cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028377:t
28378/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028379s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028380s&@top_builddir@&$ac_top_builddir_sub&;t t
28381s&@srcdir@&$ac_srcdir&;t t
28382s&@abs_srcdir@&$ac_abs_srcdir&;t t
28383s&@top_srcdir@&$ac_top_srcdir&;t t
28384s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28385s&@builddir@&$ac_builddir&;t t
28386s&@abs_builddir@&$ac_abs_builddir&;t t
28387s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28388s&@INSTALL@&$ac_INSTALL&;t t
28389$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028390" $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 +000028391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028392test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28393 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28394 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028395 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028396which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028397echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028398which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028400 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028401 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028402 -) cat "$tmp/out"; rm -f "$tmp/out";;
28403 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28404 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028405 ;;
28406 :H)
28407 #
28408 # CONFIG_HEADER
28409 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028410_ACEOF
28411
28412# Transform confdefs.h into a sed script `conftest.defines', that
28413# substitutes the proper values into config.h.in to produce config.h.
28414rm -f conftest.defines conftest.tail
28415# First, append a space to every undef/define line, to ease matching.
28416echo 's/$/ /' >conftest.defines
28417# Then, protect against being on the right side of a sed subst, or in
28418# an unquoted here document, in config.status. If some macros were
28419# called several times there might be several #defines for the same
28420# symbol, which is useless. But do not sort them, since the last
28421# AC_DEFINE must be honored.
28422ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28423# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28424# NAME is the cpp macro being defined, VALUE is the value it is being given.
28425# PARAMS is the parameter list in the macro definition--in most cases, it's
28426# just an empty string.
28427ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28428ac_dB='\\)[ (].*,\\1define\\2'
28429ac_dC=' '
28430ac_dD=' ,'
28431
28432uniq confdefs.h |
28433 sed -n '
28434 t rset
28435 :rset
28436 s/^[ ]*#[ ]*define[ ][ ]*//
28437 t ok
28438 d
28439 :ok
28440 s/[\\&,]/\\&/g
28441 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28442 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28443 ' >>conftest.defines
28444
28445# Remove the space that was appended to ease matching.
28446# Then replace #undef with comments. This is necessary, for
28447# example, in the case of _POSIX_SOURCE, which is predefined and required
28448# on some systems where configure will not decide to define it.
28449# (The regexp can be short, since the line contains either #define or #undef.)
28450echo 's/ $//
28451s,^[ #]*u.*,/* & */,' >>conftest.defines
28452
28453# Break up conftest.defines:
28454ac_max_sed_lines=50
28455
28456# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28457# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28458# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28459# et cetera.
28460ac_in='$ac_file_inputs'
28461ac_out='"$tmp/out1"'
28462ac_nxt='"$tmp/out2"'
28463
28464while :
28465do
28466 # Write a here document:
28467 cat >>$CONFIG_STATUS <<_ACEOF
28468 # First, check the format of the line:
28469 cat >"\$tmp/defines.sed" <<\\CEOF
28470/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28471/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28472b
28473:def
28474_ACEOF
28475 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28476 echo 'CEOF
28477 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28478 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28479 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28480 grep . conftest.tail >/dev/null || break
28481 rm -f conftest.defines
28482 mv conftest.tail conftest.defines
28483done
28484rm -f conftest.defines conftest.tail
28485
28486echo "ac_result=$ac_in" >>$CONFIG_STATUS
28487cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028488 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028489 echo "/* $configure_input */" >"$tmp/config.h"
28490 cat "$ac_result" >>"$tmp/config.h"
28491 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28492 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28493echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028494 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028495 rm -f $ac_file
28496 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028497 fi
28498 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028499 echo "/* $configure_input */"
28500 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028501 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028502 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028503 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028505
28506 esac
28507
28508done # for ac_tag
28509
Guido van Rossum627b2d71993-12-24 10:39:16 +000028510
Martin v. Löwis11437992002-04-12 09:54:03 +000028511{ (exit 0); exit 0; }
28512_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028513chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028514ac_clean_files=$ac_clean_files_save
28515
28516
28517# configure is writing to config.log, and then calls config.status.
28518# config.status does its own redirection, appending to config.log.
28519# Unfortunately, on DOS this fails, as config.log is still kept open
28520# by configure, so config.status won't be able to write to it; its
28521# output is simply discarded. So we exec the FD to /dev/null,
28522# effectively closing config.log, so it can be properly (re)opened and
28523# appended to by config.status. When coming back to configure, we
28524# need to make the FD available again.
28525if test "$no_create" != yes; then
28526 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028527 ac_config_status_args=
28528 test "$silent" = yes &&
28529 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028530 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028531 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028532 exec 5>>config.log
28533 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28534 # would make configure fail if this is the last instruction.
28535 $ac_cs_success || { (exit 1); exit 1; }
28536fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028537
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028538
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028539echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028540if test ! -f Modules/Setup
28541then
28542 cp $srcdir/Modules/Setup.dist Modules/Setup
28543fi
28544
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028545echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028546if test ! -f Modules/Setup.local
28547then
28548 echo "# Edit this file for local setup changes" >Modules/Setup.local
28549fi
28550
28551echo "creating Makefile"
28552$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28553 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028554 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028555mv config.c Modules