blob: cc3147ea134e3f6a45d3cfba052d34f6b776fa53 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitrou6103ab12009-10-24 20:11:21 +00002# From configure.in Revision: 74979 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001249\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001333 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001441python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001455It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001829VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001884# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001885if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887 case $enableval in
1888 yes)
1889 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1890 ;;
1891 esac
1892 case $enableval in
1893 no)
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896 ;;
1897 *)
1898 UNIVERSALSDK=$enableval
1899 ;;
1900 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001901
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902else
1903
1904 UNIVERSALSDK=
1905 enable_universalsdk=
1906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001911
1912
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001913UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001914{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1915echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916
1917# Check whether --with-universal-archs was given.
1918if test "${with_universal_archs+set}" = set; then
1919 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001920 { echo "$as_me:$LINENO: result: $withval" >&5
1921echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922 UNIVERSAL_ARCHS="$withval"
1923
1924else
1925
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001926 { echo "$as_me:$LINENO: result: 32-bit" >&5
1927echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928
1929fi
1930
1931
1932
1933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001934
1935# Check whether --with-framework-name was given.
1936if test "${with_framework_name+set}" = set; then
1937 withval=$with_framework_name;
1938 PYTHONFRAMEWORK=${withval}
1939 PYTHONFRAMEWORKDIR=${withval}.framework
1940 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1941
1942else
1943
1944 PYTHONFRAMEWORK=Python
1945 PYTHONFRAMEWORKDIR=Python.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1947
1948fi
1949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001950# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001951if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001953 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001955 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001956 esac
1957 case $enableval in
1958 no)
1959 PYTHONFRAMEWORK=
1960 PYTHONFRAMEWORKDIR=no-framework
1961 PYTHONFRAMEWORKPREFIX=
1962 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001963 FRAMEWORKINSTALLFIRST=
1964 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001965 FRAMEWORKALTINSTALLFIRST=
1966 FRAMEWORKALTINSTALLLAST=
1967 if test "x${prefix}" = "xNONE"; then
1968 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1969 else
1970 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1971 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001972 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001973 ;;
1974 *)
1975 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001977 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001978 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001979 if test "$UNIVERSAL_ARCHS" = "all"
1980 then
1981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1986 fi
1987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 if test "x${prefix}" = "xNONE" ; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002030fi
2031
Thomas Wouters477c8d52006-05-27 19:21:47 +00002032
2033
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
2035
2036
2037
Jack Jansene578a632001-08-15 01:27:14 +00002038
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002054 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002069 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002070 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002071 esac
2072fi
Guido van Rossum91922671997-10-09 20:24:13 +00002073
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002074# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2075# disable features if it is defined, without any means to access these
2076# features as extensions. For these systems, we skip the definition of
2077# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2078# some feature, make sure there is no alternative way to access this
2079# feature. Also, when using wildcards, make sure you have verified the
2080# need for not defining _XOPEN_SOURCE on all systems matching the
2081# wildcard, and that the wildcard does not include future systems
2082# (which may remove their limitations).
2083case $ac_sys_system/$ac_sys_release in
2084 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2085 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002086 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002087 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002088 define_xopen_source=no
2089 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2090 # also defined. This can be overridden by defining _BSD_SOURCE
2091 # As this has a different meaning on Linux, only define it on OpenBSD
2092
2093cat >>confdefs.h <<\_ACEOF
2094#define _BSD_SOURCE 1
2095_ACEOF
2096
2097 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002098 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2099 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2100 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002101 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 +00002102 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002103 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2104 # of union __?sigval. Reported by Stuart Bishop.
2105 SunOS/5.6)
2106 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002107 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2108 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002109 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002110 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002111 define_xopen_source=no;;
2112 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002113 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002114 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002115 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002116 # On FreeBSD 4, the math functions C89 does not cover are never defined
2117 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2118 FreeBSD/4.*)
2119 define_xopen_source=no;;
2120 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2121 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2122 # identifies itself as Darwin/7.*
2123 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2124 # disables platform specific features beyond repair.
2125 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2126 # has no effect, don't bother defining them
2127 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002128 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002129 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2130 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2131 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002132 AIX/4)
2133 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002134 AIX/5)
2135 if test `uname -r` -eq 1; then
2136 define_xopen_source=no
2137 fi
2138 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002139 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2140 # defining NI_NUMERICHOST.
2141 QNX/6.3.2)
2142 define_xopen_source=no
2143 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002144
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002145esac
2146
2147if test $define_xopen_source = yes
2148then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002149 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2150 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002151 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2152 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002153 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002154 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155
2156cat >>confdefs.h <<\_ACEOF
2157#define _XOPEN_SOURCE 500
2158_ACEOF
2159
2160 ;;
2161 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002162
2163cat >>confdefs.h <<\_ACEOF
2164#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002165_ACEOF
2166
Skip Montanarof0d5f792004-08-15 14:08:23 +00002167 ;;
2168 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002169
2170 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2171 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2172 # several APIs are not declared. Since this is also needed in some
2173 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002174 # except for Solaris 10, where it must not be defined,
2175 # as it implies XPG4.2
2176 case $ac_sys_system/$ac_sys_release in
2177 SunOS/5.10)
2178 ;;
2179 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002180
2181cat >>confdefs.h <<\_ACEOF
2182#define _XOPEN_SOURCE_EXTENDED 1
2183_ACEOF
2184
Martin v. Löwis7dece662005-11-26 11:38:24 +00002185 ;;
2186 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002187
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002188
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002189cat >>confdefs.h <<\_ACEOF
2190#define _POSIX_C_SOURCE 200112L
2191_ACEOF
2192
2193
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002194fi
2195
Guido van Rossum91922671997-10-09 20:24:13 +00002196#
2197# SGI compilers allow the specification of the both the ABI and the
2198# ISA on the command line. Depending on the values of these switches,
2199# different and often incompatable code will be generated.
2200#
2201# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2202# thus supply support for various ABI/ISA combinations. The MACHDEP
2203# variable is also adjusted.
2204#
2205
2206if test ! -z "$SGI_ABI"
2207then
2208 CC="cc $SGI_ABI"
2209 LDFLAGS="$SGI_ABI $LDFLAGS"
2210 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2211fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002212{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2213echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002214
Jack Jansen6b08a402004-06-03 12:41:45 +00002215# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2216# it may influence the way we can build extensions, so distutils
2217# needs to check it
2218
Thomas Wouters477c8d52006-05-27 19:21:47 +00002219
Jack Jansen6b08a402004-06-03 12:41:45 +00002220CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002221EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002222
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002223{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2224echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002225ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002226{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2227echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002228
Guido van Rossum627b2d71993-12-24 10:39:16 +00002229# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002230
2231# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2232# for debug/optimization stuff. BASECFLAGS is for flags that are required
2233# just to get things to compile and link. Users are free to override OPT
2234# when running configure or make. The build should not break if they do.
2235# BASECFLAGS should generally not be messed with, however.
2236
2237# XXX shouldn't some/most/all of this code be merged with the stuff later
2238# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002239{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2240echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002242# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002243if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002244 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002245 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002246 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002247 without_gcc=yes;;
2248 yes) CC=gcc
2249 without_gcc=no;;
2250 *) CC=$withval
2251 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002252 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002253else
Martin v. Löwis11437992002-04-12 09:54:03 +00002254
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002255 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002256 AIX*) CC=cc_r
2257 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002258 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002259 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002260fi
2261
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002262{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2263echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002264
Guido van Rossum8b131c51995-03-09 14:10:13 +00002265# If the user switches compilers, we can't believe the cache
2266if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2267then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002268 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002269(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002270echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002271(it is also a good idea to do 'make clean' before compiling)" >&2;}
2272 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002273fi
2274
Martin v. Löwis11437992002-04-12 09:54:03 +00002275ac_ext=c
2276ac_cpp='$CPP $CPPFLAGS'
2277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2279ac_compiler_gnu=$ac_cv_c_compiler_gnu
2280if test -n "$ac_tool_prefix"; then
2281 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2282set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002283{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2284echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002285if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002287else
2288 if test -n "$CC"; then
2289 ac_cv_prog_CC="$CC" # Let the user override the test.
2290else
Martin v. Löwis11437992002-04-12 09:54:03 +00002291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2292for as_dir in $PATH
2293do
2294 IFS=$as_save_IFS
2295 test -z "$as_dir" && as_dir=.
2296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002297 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 +00002298 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002299 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002300 break 2
2301 fi
2302done
2303done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002304IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002305
Jack Jansendd19cf82001-12-06 22:36:17 +00002306fi
2307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002308CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002309if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002310 { echo "$as_me:$LINENO: result: $CC" >&5
2311echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002313 { echo "$as_me:$LINENO: result: no" >&5
2314echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002315fi
2316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002317
Martin v. Löwis11437992002-04-12 09:54:03 +00002318fi
2319if test -z "$ac_cv_prog_CC"; then
2320 ac_ct_CC=$CC
2321 # Extract the first word of "gcc", so it can be a program name with args.
2322set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002325if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002327else
2328 if test -n "$ac_ct_CC"; then
2329 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2330else
2331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2332for as_dir in $PATH
2333do
2334 IFS=$as_save_IFS
2335 test -z "$as_dir" && as_dir=.
2336 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337 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 +00002338 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002340 break 2
2341 fi
2342done
2343done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346fi
2347fi
2348ac_ct_CC=$ac_cv_prog_ac_ct_CC
2349if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002350 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2351echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002353 { echo "$as_me:$LINENO: result: no" >&5
2354echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002355fi
2356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357 if test "x$ac_ct_CC" = x; then
2358 CC=""
2359 else
2360 case $cross_compiling:$ac_tool_warned in
2361yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002362{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2363whose name does not start with the host triplet. If you think this
2364configuration is useful to you, please write to autoconf@gnu.org." >&5
2365echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2366whose name does not start with the host triplet. If you think this
2367configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368ac_tool_warned=yes ;;
2369esac
2370 CC=$ac_ct_CC
2371 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002372else
2373 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002374fi
2375
Jack Jansendd19cf82001-12-06 22:36:17 +00002376if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377 if test -n "$ac_tool_prefix"; then
2378 # 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 +00002379set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002382if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002383 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002384else
2385 if test -n "$CC"; then
2386 ac_cv_prog_CC="$CC" # Let the user override the test.
2387else
Martin v. Löwis11437992002-04-12 09:54:03 +00002388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391 IFS=$as_save_IFS
2392 test -z "$as_dir" && as_dir=.
2393 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394 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 +00002395 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 break 2
2398 fi
2399done
2400done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
2403fi
2404fi
2405CC=$ac_cv_prog_CC
2406if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002407 { echo "$as_me:$LINENO: result: $CC" >&5
2408echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002409else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002410 { echo "$as_me:$LINENO: result: no" >&5
2411echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412fi
2413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414
Martin v. Löwis11437992002-04-12 09:54:03 +00002415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002416fi
2417if test -z "$CC"; then
2418 # Extract the first word of "cc", so it can be a program name with args.
2419set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002422if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002424else
2425 if test -n "$CC"; then
2426 ac_cv_prog_CC="$CC" # Let the user override the test.
2427else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002428 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
2434 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435 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 +00002436 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2437 ac_prog_rejected=yes
2438 continue
2439 fi
2440 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002442 break 2
2443 fi
2444done
2445done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002447
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002448if test $ac_prog_rejected = yes; then
2449 # We found a bogon in the path, so make sure we never use it.
2450 set dummy $ac_cv_prog_CC
2451 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453 # We chose a different compiler from the bogus one.
2454 # However, it has the same basename, so the bogon will be chosen
2455 # first if we set CC to just the basename; use the full file name.
2456 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002457 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458 fi
2459fi
2460fi
2461fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002462CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002463if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002464 { echo "$as_me:$LINENO: result: $CC" >&5
2465echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002467 { echo "$as_me:$LINENO: result: no" >&5
2468echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469fi
2470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471
Martin v. Löwis11437992002-04-12 09:54:03 +00002472fi
2473if test -z "$CC"; then
2474 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 do
2477 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2478set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002479{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2480echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002481if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002483else
2484 if test -n "$CC"; then
2485 ac_cv_prog_CC="$CC" # Let the user override the test.
2486else
Martin v. Löwis11437992002-04-12 09:54:03 +00002487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2488for as_dir in $PATH
2489do
2490 IFS=$as_save_IFS
2491 test -z "$as_dir" && as_dir=.
2492 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 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 +00002494 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002495 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002498done
2499done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
2502fi
2503fi
2504CC=$ac_cv_prog_CC
2505if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002506 { echo "$as_me:$LINENO: result: $CC" >&5
2507echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002508else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002509 { echo "$as_me:$LINENO: result: no" >&5
2510echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002511fi
2512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 test -n "$CC" && break
2515 done
2516fi
2517if test -z "$CC"; then
2518 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002520do
2521 # Extract the first word of "$ac_prog", so it can be a program name with args.
2522set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002523{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2524echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002525if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002526 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002527else
2528 if test -n "$ac_ct_CC"; then
2529 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2530else
2531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2532for as_dir in $PATH
2533do
2534 IFS=$as_save_IFS
2535 test -z "$as_dir" && as_dir=.
2536 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 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 +00002538 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002539 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 break 2
2541 fi
2542done
2543done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546fi
2547fi
2548ac_ct_CC=$ac_cv_prog_ac_ct_CC
2549if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002550 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2551echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002552else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002553 { echo "$as_me:$LINENO: result: no" >&5
2554echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002555fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 test -n "$ac_ct_CC" && break
2559done
Michael W. Hudson54241132001-12-07 15:38:26 +00002560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 if test "x$ac_ct_CC" = x; then
2562 CC=""
2563 else
2564 case $cross_compiling:$ac_tool_warned in
2565yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002566{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2567whose name does not start with the host triplet. If you think this
2568configuration is useful to you, please write to autoconf@gnu.org." >&5
2569echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2570whose name does not start with the host triplet. If you think this
2571configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572ac_tool_warned=yes ;;
2573esac
2574 CC=$ac_ct_CC
2575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002576fi
2577
2578fi
2579
2580
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002581test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002582See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002583echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002584See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002585 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002586
2587# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002588echo "$as_me:$LINENO: checking for C compiler version" >&5
2589ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590{ (ac_try="$ac_compiler --version >&5"
2591case "(($ac_try" in
2592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2593 *) ac_try_echo=$ac_try;;
2594esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600{ (ac_try="$ac_compiler -v >&5"
2601case "(($ac_try" in
2602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2603 *) ac_try_echo=$ac_try;;
2604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610{ (ac_try="$ac_compiler -V >&5"
2611case "(($ac_try" in
2612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2613 *) ac_try_echo=$ac_try;;
2614esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 (exit $ac_status); }
2620
2621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002622/* confdefs.h. */
2623_ACEOF
2624cat confdefs.h >>conftest.$ac_ext
2625cat >>conftest.$ac_ext <<_ACEOF
2626/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628int
2629main ()
2630{
2631
2632 ;
2633 return 0;
2634}
2635_ACEOF
2636ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002637ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002638# Try to create an executable without -o first, disregard a.out.
2639# It will help us diagnose broken compilers, and finding out an intuition
2640# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002641{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2642echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2643ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2644#
2645# List of possible output files, starting from the most likely.
2646# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2647# only as a last resort. b.out is created by i960 compilers.
2648ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2649#
2650# The IRIX 6 linker writes into existing files which may not be
2651# executable, retaining their permissions. Remove them first so a
2652# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653ac_rmfiles=
2654for ac_file in $ac_files
2655do
2656 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002657 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2659 esac
2660done
2661rm -f $ac_rmfiles
2662
2663if { (ac_try="$ac_link_default"
2664case "(($ac_try" in
2665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2666 *) ac_try_echo=$ac_try;;
2667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002669 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2674# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2675# in a Makefile. We should not override ac_cv_exeext if it was cached,
2676# so that the user can short-circuit this test for compilers unknown to
2677# Autoconf.
2678for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002679do
2680 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002682 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002683 ;;
2684 [ab].out )
2685 # We found the default executable, but exeext='' is most
2686 # certainly right.
2687 break;;
2688 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2690 then :; else
2691 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2692 fi
2693 # We set ac_cv_exeext here because the later test for it is not
2694 # safe: cross compilers may not add the suffix if given an `-o'
2695 # argument, so we may need to know it at that point already.
2696 # Even if this section looks crufty: it has the advantage of
2697 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002698 break;;
2699 * )
2700 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 esac
2702done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703test "$ac_cv_exeext" = no && ac_cv_exeext=
2704
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002705else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706 ac_file=''
2707fi
2708
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002709{ echo "$as_me:$LINENO: result: $ac_file" >&5
2710echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002713sed 's/^/| /' conftest.$ac_ext >&5
2714
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002715{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002716See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002717echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002718See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002719 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002720fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002721
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002722ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002724# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002725# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002726{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2727echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002728# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2729# If not cross compiling, check that we can run a simple program.
2730if test "$cross_compiling" != yes; then
2731 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002732 { (case "(($ac_try" in
2733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2734 *) ac_try_echo=$ac_try;;
2735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 (exit $ac_status); }; }; then
2741 cross_compiling=no
2742 else
2743 if test "$cross_compiling" = maybe; then
2744 cross_compiling=yes
2745 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002746 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002747If you meant to cross compile, use \`--host'.
2748See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002749echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002750If you meant to cross compile, use \`--host'.
2751See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002752 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 fi
2754 fi
2755fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002756{ echo "$as_me:$LINENO: result: yes" >&5
2757echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002759rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002760ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002762# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002763{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2764echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2765{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2766echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002767
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002768{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2769echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002770if { (ac_try="$ac_link"
2771case "(($ac_try" in
2772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2773 *) ac_try_echo=$ac_try;;
2774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002780 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2781# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2782# work properly (i.e., refer to `conftest.exe'), while it won't with
2783# `rm'.
2784for ac_file in conftest.exe conftest conftest.*; do
2785 test -f "$ac_file" || continue
2786 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002787 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002788 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2789 break;;
2790 * ) break;;
2791 esac
2792done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002794 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002795See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002796echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002797See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002798 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002799fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002800
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002801rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002802{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2803echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804
2805rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002806EXEEXT=$ac_cv_exeext
2807ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002808{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2809echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002810if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002811 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002812else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002813 cat >conftest.$ac_ext <<_ACEOF
2814/* confdefs.h. */
2815_ACEOF
2816cat confdefs.h >>conftest.$ac_ext
2817cat >>conftest.$ac_ext <<_ACEOF
2818/* end confdefs.h. */
2819
2820int
2821main ()
2822{
2823
2824 ;
2825 return 0;
2826}
2827_ACEOF
2828rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002829if { (ac_try="$ac_compile"
2830case "(($ac_try" in
2831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2832 *) ac_try_echo=$ac_try;;
2833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002835 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002839 for ac_file in conftest.o conftest.obj conftest.*; do
2840 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002842 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2844 break;;
2845 esac
2846done
2847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002849sed 's/^/| /' conftest.$ac_ext >&5
2850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002851{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002852See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002853echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002854See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002855 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002856fi
2857
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002858rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002859fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002860{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2861echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002862OBJEXT=$ac_cv_objext
2863ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002864{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2865echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002866if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002867 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002868else
2869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002870/* confdefs.h. */
2871_ACEOF
2872cat confdefs.h >>conftest.$ac_ext
2873cat >>conftest.$ac_ext <<_ACEOF
2874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002875
Martin v. Löwis11437992002-04-12 09:54:03 +00002876int
2877main ()
2878{
2879#ifndef __GNUC__
2880 choke me
2881#endif
2882
2883 ;
2884 return 0;
2885}
2886_ACEOF
2887rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002888if { (ac_try="$ac_compile"
2889case "(($ac_try" in
2890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2891 *) ac_try_echo=$ac_try;;
2892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002896 grep -v '^ *+' conftest.er1 >conftest.err
2897 rm -f conftest.er1
2898 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002900 (exit $ac_status); } && {
2901 test -z "$ac_c_werror_flag" ||
2902 test ! -s conftest.err
2903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002904 ac_compiler_gnu=yes
2905else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002907sed 's/^/| /' conftest.$ac_ext >&5
2908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002909 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002911
2912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002913ac_cv_c_compiler_gnu=$ac_compiler_gnu
2914
2915fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002916{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2917echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2918GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002919ac_test_CFLAGS=${CFLAGS+set}
2920ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002921{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2922echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002923if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002924 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002925else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002926 ac_save_c_werror_flag=$ac_c_werror_flag
2927 ac_c_werror_flag=yes
2928 ac_cv_prog_cc_g=no
2929 CFLAGS="-g"
2930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002931/* confdefs.h. */
2932_ACEOF
2933cat confdefs.h >>conftest.$ac_ext
2934cat >>conftest.$ac_ext <<_ACEOF
2935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937int
2938main ()
2939{
2940
2941 ;
2942 return 0;
2943}
2944_ACEOF
2945rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002946if { (ac_try="$ac_compile"
2947case "(($ac_try" in
2948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2949 *) ac_try_echo=$ac_try;;
2950esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002954 grep -v '^ *+' conftest.er1 >conftest.err
2955 rm -f conftest.er1
2956 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958 (exit $ac_status); } && {
2959 test -z "$ac_c_werror_flag" ||
2960 test ! -s conftest.err
2961 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002962 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002963else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002965sed 's/^/| /' conftest.$ac_ext >&5
2966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002967 CFLAGS=""
2968 cat >conftest.$ac_ext <<_ACEOF
2969/* confdefs.h. */
2970_ACEOF
2971cat confdefs.h >>conftest.$ac_ext
2972cat >>conftest.$ac_ext <<_ACEOF
2973/* end confdefs.h. */
2974
2975int
2976main ()
2977{
2978
2979 ;
2980 return 0;
2981}
2982_ACEOF
2983rm -f conftest.$ac_objext
2984if { (ac_try="$ac_compile"
2985case "(($ac_try" in
2986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987 *) ac_try_echo=$ac_try;;
2988esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 (eval "$ac_compile") 2>conftest.er1
2991 ac_status=$?
2992 grep -v '^ *+' conftest.er1 >conftest.err
2993 rm -f conftest.er1
2994 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002996 (exit $ac_status); } && {
2997 test -z "$ac_c_werror_flag" ||
2998 test ! -s conftest.err
2999 } && test -s conftest.$ac_objext; then
3000 :
3001else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003002 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003sed 's/^/| /' conftest.$ac_ext >&5
3004
3005 ac_c_werror_flag=$ac_save_c_werror_flag
3006 CFLAGS="-g"
3007 cat >conftest.$ac_ext <<_ACEOF
3008/* confdefs.h. */
3009_ACEOF
3010cat confdefs.h >>conftest.$ac_ext
3011cat >>conftest.$ac_ext <<_ACEOF
3012/* end confdefs.h. */
3013
3014int
3015main ()
3016{
3017
3018 ;
3019 return 0;
3020}
3021_ACEOF
3022rm -f conftest.$ac_objext
3023if { (ac_try="$ac_compile"
3024case "(($ac_try" in
3025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3026 *) ac_try_echo=$ac_try;;
3027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003029 (eval "$ac_compile") 2>conftest.er1
3030 ac_status=$?
3031 grep -v '^ *+' conftest.er1 >conftest.err
3032 rm -f conftest.er1
3033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003035 (exit $ac_status); } && {
3036 test -z "$ac_c_werror_flag" ||
3037 test ! -s conftest.err
3038 } && test -s conftest.$ac_objext; then
3039 ac_cv_prog_cc_g=yes
3040else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003041 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042sed 's/^/| /' conftest.$ac_ext >&5
3043
3044
Guido van Rossum627b2d71993-12-24 10:39:16 +00003045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046
3047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049
3050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3051fi
3052
3053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3054 ac_c_werror_flag=$ac_save_c_werror_flag
3055fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003056{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3057echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003058if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003059 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003060elif test $ac_cv_prog_cc_g = yes; then
3061 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003062 CFLAGS="-g -O2"
3063 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003064 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003065 fi
3066else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003067 if test "$GCC" = yes; then
3068 CFLAGS="-O2"
3069 else
3070 CFLAGS=
3071 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003072fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003073{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3074echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003075if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003076 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003077else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003079ac_save_CC=$CC
3080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003081/* confdefs.h. */
3082_ACEOF
3083cat confdefs.h >>conftest.$ac_ext
3084cat >>conftest.$ac_ext <<_ACEOF
3085/* end confdefs.h. */
3086#include <stdarg.h>
3087#include <stdio.h>
3088#include <sys/types.h>
3089#include <sys/stat.h>
3090/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3091struct buf { int x; };
3092FILE * (*rcsopen) (struct buf *, struct stat *, int);
3093static char *e (p, i)
3094 char **p;
3095 int i;
3096{
3097 return p[i];
3098}
3099static char *f (char * (*g) (char **, int), char **p, ...)
3100{
3101 char *s;
3102 va_list v;
3103 va_start (v,p);
3104 s = g (p, va_arg (v,int));
3105 va_end (v);
3106 return s;
3107}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003108
3109/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3110 function prototypes and stuff, but not '\xHH' hex character constants.
3111 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003113 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3114 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003115 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003116int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3119 inside strings and character constants. */
3120#define FOO(x) 'x'
3121int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3122
Skip Montanaro6dead952003-09-25 14:50:04 +00003123int test (int i, double x);
3124struct s1 {int (*f) (int a);};
3125struct s2 {int (*f) (double a);};
3126int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3127int argc;
3128char **argv;
3129int
3130main ()
3131{
3132return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3133 ;
3134 return 0;
3135}
3136_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3138 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003139do
3140 CC="$ac_save_CC $ac_arg"
3141 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142if { (ac_try="$ac_compile"
3143case "(($ac_try" in
3144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3145 *) ac_try_echo=$ac_try;;
3146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003150 grep -v '^ *+' conftest.er1 >conftest.err
3151 rm -f conftest.er1
3152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 (exit $ac_status); } && {
3155 test -z "$ac_c_werror_flag" ||
3156 test ! -s conftest.err
3157 } && test -s conftest.$ac_objext; then
3158 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003161sed 's/^/| /' conftest.$ac_ext >&5
3162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163
Skip Montanaro6dead952003-09-25 14:50:04 +00003164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165
3166rm -f core conftest.err conftest.$ac_objext
3167 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003168done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003170CC=$ac_save_CC
3171
3172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173# AC_CACHE_VAL
3174case "x$ac_cv_prog_cc_c89" in
3175 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003176 { echo "$as_me:$LINENO: result: none needed" >&5
3177echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003179 { echo "$as_me:$LINENO: result: unsupported" >&5
3180echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003181 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003183 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3184echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003185esac
3186
Skip Montanaro6dead952003-09-25 14:50:04 +00003187
Martin v. Löwis11437992002-04-12 09:54:03 +00003188ac_ext=c
3189ac_cpp='$CPP $CPPFLAGS'
3190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3192ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003193
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003194
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003195
3196
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003197{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3198echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003201if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003203
3204 case $withval in
3205 no) with_cxx_main=no
3206 MAINCC='$(CC)';;
3207 yes) with_cxx_main=yes
3208 MAINCC='$(CXX)';;
3209 *) with_cxx_main=yes
3210 MAINCC=$withval
3211 if test -z "$CXX"
3212 then
3213 CXX=$withval
3214 fi;;
3215 esac
3216else
3217
3218 with_cxx_main=no
3219 MAINCC='$(CC)'
3220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221fi
3222
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003223{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3224echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003225
3226preset_cxx="$CXX"
3227if test -z "$CXX"
3228then
3229 case "$CC" in
3230 gcc) # Extract the first word of "g++", so it can be a program name with args.
3231set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003232{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003234if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003235 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003236else
3237 case $CXX in
3238 [\\/]* | ?:[\\/]*)
3239 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3240 ;;
3241 *)
3242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3243for as_dir in notfound
3244do
3245 IFS=$as_save_IFS
3246 test -z "$as_dir" && as_dir=.
3247 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248 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 +00003249 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003250 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003251 break 2
3252 fi
3253done
3254done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003256
3257 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3258 ;;
3259esac
3260fi
3261CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003262if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003263 { echo "$as_me:$LINENO: result: $CXX" >&5
3264echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003265else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003266 { echo "$as_me:$LINENO: result: no" >&5
3267echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003269
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270 ;;
3271 cc) # Extract the first word of "c++", so it can be a program name with args.
3272set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003275if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003276 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003277else
3278 case $CXX in
3279 [\\/]* | ?:[\\/]*)
3280 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3281 ;;
3282 *)
3283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in notfound
3285do
3286 IFS=$as_save_IFS
3287 test -z "$as_dir" && as_dir=.
3288 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289 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 +00003290 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003292 break 2
3293 fi
3294done
3295done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003296IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003297
3298 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3299 ;;
3300esac
3301fi
3302CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003303if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003304 { echo "$as_me:$LINENO: result: $CXX" >&5
3305echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003306else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003307 { echo "$as_me:$LINENO: result: no" >&5
3308echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003311 ;;
3312 esac
3313 if test "$CXX" = "notfound"
3314 then
3315 CXX=""
3316 fi
3317fi
3318if test -z "$CXX"
3319then
3320 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3321do
3322 # Extract the first word of "$ac_prog", so it can be a program name with args.
3323set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003326if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003327 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003328else
3329 if test -n "$CXX"; then
3330 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3331else
3332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333for as_dir in $PATH
3334do
3335 IFS=$as_save_IFS
3336 test -z "$as_dir" && as_dir=.
3337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338 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 +00003339 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003341 break 2
3342 fi
3343done
3344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003345IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003346
3347fi
3348fi
3349CXX=$ac_cv_prog_CXX
3350if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003351 { echo "$as_me:$LINENO: result: $CXX" >&5
3352echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003353else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003354 { echo "$as_me:$LINENO: result: no" >&5
3355echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003356fi
3357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003358
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003359 test -n "$CXX" && break
3360done
3361test -n "$CXX" || CXX="notfound"
3362
3363 if test "$CXX" = "notfound"
3364 then
3365 CXX=""
3366 fi
3367fi
3368if test "$preset_cxx" != "$CXX"
3369then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003370 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003371
3372 By default, distutils will build C++ extension modules with \"$CXX\".
3373 If this is not intended, then set CXX on the configure command line.
3374 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003375echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003376
3377 By default, distutils will build C++ extension modules with \"$CXX\".
3378 If this is not intended, then set CXX on the configure command line.
3379 " >&2;}
3380fi
3381
3382
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003383# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003384
3385ac_ext=c
3386ac_cpp='$CPP $CPPFLAGS'
3387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3389ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003390{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3391echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003392# On Suns, sometimes $CPP names a directory.
3393if test -n "$CPP" && test -d "$CPP"; then
3394 CPP=
3395fi
3396if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003399else
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 # Double quotes because CPP needs to be expanded
3401 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3402 do
3403 ac_preproc_ok=false
3404for ac_c_preproc_warn_flag in '' yes
3405do
3406 # Use a header file that comes with gcc, so configuring glibc
3407 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003408 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3409 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003410 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 # not just through cpp. "Syntax error" is here to catch this case.
3412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003413/* confdefs.h. */
3414_ACEOF
3415cat confdefs.h >>conftest.$ac_ext
3416cat >>conftest.$ac_ext <<_ACEOF
3417/* end confdefs.h. */
3418#ifdef __STDC__
3419# include <limits.h>
3420#else
3421# include <assert.h>
3422#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003423 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003424_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003425if { (ac_try="$ac_cpp conftest.$ac_ext"
3426case "(($ac_try" in
3427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3428 *) ac_try_echo=$ac_try;;
3429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003431 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003433 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 rm -f conftest.er1
3435 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437 (exit $ac_status); } >/dev/null && {
3438 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3439 test ! -s conftest.err
3440 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003441 :
3442else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003444sed 's/^/| /' conftest.$ac_ext >&5
3445
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 # Broken: fails on valid input.
3447continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449
Martin v. Löwis11437992002-04-12 09:54:03 +00003450rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 # can be detected and how.
3454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003455/* confdefs.h. */
3456_ACEOF
3457cat confdefs.h >>conftest.$ac_ext
3458cat >>conftest.$ac_ext <<_ACEOF
3459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003460#include <ac_nonexistent.h>
3461_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462if { (ac_try="$ac_cpp conftest.$ac_ext"
3463case "(($ac_try" in
3464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3465 *) ac_try_echo=$ac_try;;
3466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003470 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 rm -f conftest.er1
3472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474 (exit $ac_status); } >/dev/null && {
3475 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3476 test ! -s conftest.err
3477 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 # Broken: success on invalid input.
3479continue
3480else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003482sed 's/^/| /' conftest.$ac_ext >&5
3483
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 # Passes both tests.
3485ac_preproc_ok=:
3486break
3487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488
Martin v. Löwis11437992002-04-12 09:54:03 +00003489rm -f conftest.err conftest.$ac_ext
3490
3491done
3492# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3493rm -f conftest.err conftest.$ac_ext
3494if $ac_preproc_ok; then
3495 break
3496fi
3497
3498 done
3499 ac_cv_prog_CPP=$CPP
3500
3501fi
3502 CPP=$ac_cv_prog_CPP
3503else
3504 ac_cv_prog_CPP=$CPP
3505fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003506{ echo "$as_me:$LINENO: result: $CPP" >&5
3507echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003508ac_preproc_ok=false
3509for ac_c_preproc_warn_flag in '' yes
3510do
3511 # Use a header file that comes with gcc, so configuring glibc
3512 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003513 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3514 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003515 # On the NeXT, cc -E runs the code through the compiler's parser,
3516 # not just through cpp. "Syntax error" is here to catch this case.
3517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003518/* confdefs.h. */
3519_ACEOF
3520cat confdefs.h >>conftest.$ac_ext
3521cat >>conftest.$ac_ext <<_ACEOF
3522/* end confdefs.h. */
3523#ifdef __STDC__
3524# include <limits.h>
3525#else
3526# include <assert.h>
3527#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003528 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003529_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530if { (ac_try="$ac_cpp conftest.$ac_ext"
3531case "(($ac_try" in
3532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3533 *) ac_try_echo=$ac_try;;
3534esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003538 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 rm -f conftest.er1
3540 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003542 (exit $ac_status); } >/dev/null && {
3543 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3544 test ! -s conftest.err
3545 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 :
3547else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003549sed 's/^/| /' conftest.$ac_ext >&5
3550
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # Broken: fails on valid input.
3552continue
3553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555rm -f conftest.err conftest.$ac_ext
3556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 # can be detected and how.
3559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003560/* confdefs.h. */
3561_ACEOF
3562cat confdefs.h >>conftest.$ac_ext
3563cat >>conftest.$ac_ext <<_ACEOF
3564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003565#include <ac_nonexistent.h>
3566_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003567if { (ac_try="$ac_cpp conftest.$ac_ext"
3568case "(($ac_try" in
3569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3570 *) ac_try_echo=$ac_try;;
3571esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003575 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 rm -f conftest.er1
3577 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579 (exit $ac_status); } >/dev/null && {
3580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3581 test ! -s conftest.err
3582 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 # Broken: success on invalid input.
3584continue
3585else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003587sed 's/^/| /' conftest.$ac_ext >&5
3588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 # Passes both tests.
3590ac_preproc_ok=:
3591break
3592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594rm -f conftest.err conftest.$ac_ext
3595
3596done
3597# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3598rm -f conftest.err conftest.$ac_ext
3599if $ac_preproc_ok; then
3600 :
3601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003602 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003603See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003604echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003605See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003606 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003607fi
3608
3609ac_ext=c
3610ac_cpp='$CPP $CPPFLAGS'
3611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3613ac_compiler_gnu=$ac_cv_c_compiler_gnu
3614
3615
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003616{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3617echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003619 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003620else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003621 # Extract the first word of "grep ggrep" to use in msg output
3622if test -z "$GREP"; then
3623set dummy grep ggrep; ac_prog_name=$2
3624if test "${ac_cv_path_GREP+set}" = set; then
3625 echo $ECHO_N "(cached) $ECHO_C" >&6
3626else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003628# Loop through the user's path and test for each of PROGNAME-LIST
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
3634 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003635 for ac_exec_ext in '' $ac_executable_extensions; do
3636 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3637 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3638 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 # Check for GNU $ac_path_GREP
3640case `"$ac_path_GREP" --version 2>&1` in
3641*GNU*)
3642 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3643*)
3644 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003645 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646 while :
3647 do
3648 cat "conftest.in" "conftest.in" >"conftest.tmp"
3649 mv "conftest.tmp" "conftest.in"
3650 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003651 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3653 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3654 ac_count=`expr $ac_count + 1`
3655 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3656 # Best one so far, save it but keep looking for a better one
3657 ac_cv_path_GREP="$ac_path_GREP"
3658 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003659 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 # 10*(2^10) chars as input seems more than enough
3661 test $ac_count -gt 10 && break
3662 done
3663 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3664esac
3665
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003666
3667 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 done
3669done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003670
3671done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003673
3674
3675fi
3676
3677GREP="$ac_cv_path_GREP"
3678if test -z "$GREP"; then
3679 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3680echo "$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 +00003681 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003682fi
3683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684else
3685 ac_cv_path_GREP=$GREP
3686fi
3687
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003690{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3691echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692 GREP="$ac_cv_path_GREP"
3693
3694
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003695{ echo "$as_me:$LINENO: checking for egrep" >&5
3696echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699else
3700 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3701 then ac_cv_path_EGREP="$GREP -E"
3702 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003703 # Extract the first word of "egrep" to use in msg output
3704if test -z "$EGREP"; then
3705set dummy egrep; ac_prog_name=$2
3706if test "${ac_cv_path_EGREP+set}" = set; then
3707 echo $ECHO_N "(cached) $ECHO_C" >&6
3708else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003709 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003710# Loop through the user's path and test for each of PROGNAME-LIST
3711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3713do
3714 IFS=$as_save_IFS
3715 test -z "$as_dir" && as_dir=.
3716 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
3718 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3719 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3720 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721 # Check for GNU $ac_path_EGREP
3722case `"$ac_path_EGREP" --version 2>&1` in
3723*GNU*)
3724 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3725*)
3726 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003727 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728 while :
3729 do
3730 cat "conftest.in" "conftest.in" >"conftest.tmp"
3731 mv "conftest.tmp" "conftest.in"
3732 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003733 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3735 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3736 ac_count=`expr $ac_count + 1`
3737 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3738 # Best one so far, save it but keep looking for a better one
3739 ac_cv_path_EGREP="$ac_path_EGREP"
3740 ac_path_EGREP_max=$ac_count
3741 fi
3742 # 10*(2^10) chars as input seems more than enough
3743 test $ac_count -gt 10 && break
3744 done
3745 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3746esac
3747
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003748
3749 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 done
3751done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003752
3753done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003755
3756
3757fi
3758
3759EGREP="$ac_cv_path_EGREP"
3760if test -z "$EGREP"; then
3761 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3762echo "$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 +00003763 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003764fi
3765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766else
3767 ac_cv_path_EGREP=$EGREP
3768fi
3769
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771 fi
3772fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003773{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3774echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003776
3777
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003778
3779{ echo "$as_me:$LINENO: checking for AIX" >&5
3780echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3781cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003782/* confdefs.h. */
3783_ACEOF
3784cat confdefs.h >>conftest.$ac_ext
3785cat >>conftest.$ac_ext <<_ACEOF
3786/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003787#ifdef _AIX
3788 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003789#endif
3790
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003791_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3793 $EGREP "yes" >/dev/null 2>&1; then
3794 { echo "$as_me:$LINENO: result: yes" >&5
3795echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003796cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003797#define _ALL_SOURCE 1
3798_ACEOF
3799
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003800else
3801 { echo "$as_me:$LINENO: result: no" >&5
3802echo "${ECHO_T}no" >&6; }
3803fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003804rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003805
3806
3807
3808# Check for unsupported systems
3809case $ac_sys_system/$ac_sys_release in
3810atheos*|Linux*/1*)
3811 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3812 echo See README for details.
3813 exit 1;;
3814esac
3815
3816
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003817{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3818echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003819
3820# Check whether --with-suffix was given.
3821if test "${with_suffix+set}" = set; then
3822 withval=$with_suffix;
3823 case $withval in
3824 no) EXEEXT=;;
3825 yes) EXEEXT=.exe;;
3826 *) EXEEXT=$withval;;
3827 esac
3828fi
3829
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003830{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3831echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003832
3833# Test whether we're running on a non-case-sensitive system, in which
3834# case we give a warning if no ext is given
3835
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003836{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3837echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003838if test ! -d CaseSensitiveTestDir; then
3839mkdir CaseSensitiveTestDir
3840fi
3841
3842if test -d casesensitivetestdir
3843then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003844 { echo "$as_me:$LINENO: result: yes" >&5
3845echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003846 BUILDEXEEXT=.exe
3847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003848 { echo "$as_me:$LINENO: result: no" >&5
3849echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003850 BUILDEXEEXT=$EXEEXT
3851fi
3852rmdir CaseSensitiveTestDir
3853
3854case $MACHDEP in
3855bsdos*)
3856 case $CC in
3857 gcc) CC="$CC -D_HAVE_BSDI";;
3858 esac;;
3859esac
3860
3861case $ac_sys_system in
3862hp*|HP*)
3863 case $CC in
3864 cc|*/cc) CC="$CC -Ae";;
3865 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003866SunOS*)
3867 # Some functions have a prototype only with that define, e.g. confstr
3868
3869cat >>confdefs.h <<\_ACEOF
3870#define __EXTENSIONS__ 1
3871_ACEOF
3872
3873 ;;
3874esac
3875
3876
3877
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003878{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3879echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003880if test -z "$LIBRARY"
3881then
3882 LIBRARY='libpython$(VERSION).a'
3883fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003884{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3885echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003886
3887# LDLIBRARY is the name of the library to link against (as opposed to the
3888# name of the library into which to insert object files). BLDLIBRARY is also
3889# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3890# is blank as the main program is not linked directly against LDLIBRARY.
3891# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3892# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3893# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3894# DLLLIBRARY is the shared (i.e., DLL) library.
3895#
3896# RUNSHARED is used to run shared python without installed libraries
3897#
3898# INSTSONAME is the name of the shared library that will be use to install
3899# on the system - some systems like version suffix, others don't
3900
3901
3902
3903
3904
3905
3906LDLIBRARY="$LIBRARY"
3907BLDLIBRARY='$(LDLIBRARY)'
3908INSTSONAME='$(LDLIBRARY)'
3909DLLLIBRARY=''
3910LDLIBRARYDIR=''
3911RUNSHARED=''
3912
3913# LINKCC is the command that links the python executable -- default is $(CC).
3914# If CXX is set, and if it is needed to link a main function that was
3915# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3916# python might then depend on the C++ runtime
3917# This is altered for AIX in order to build the export list before
3918# linking.
3919
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003920{ echo "$as_me:$LINENO: checking LINKCC" >&5
3921echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003922if test -z "$LINKCC"
3923then
3924 LINKCC='$(PURIFY) $(MAINCC)'
3925 case $ac_sys_system in
3926 AIX*)
3927 exp_extra="\"\""
3928 if test $ac_sys_release -ge 5 -o \
3929 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3930 exp_extra="."
3931 fi
3932 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003933 QNX*)
3934 # qcc must be used because the other compilers do not
3935 # support -N.
3936 LINKCC=qcc;;
3937 esac
3938fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003939{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3940echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003941
3942# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3943# make sure we default having it set to "no": this is used by
3944# distutils.unixccompiler to know if it should add --enable-new-dtags
3945# to linker command lines, and failing to detect GNU ld simply results
3946# in the same bahaviour as before.
3947
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003948{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3949echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003950ac_prog=ld
3951if test "$GCC" = yes; then
3952 ac_prog=`$CC -print-prog-name=ld`
3953fi
3954case `"$ac_prog" -V 2>&1 < /dev/null` in
3955 *GNU*)
3956 GNULD=yes;;
3957 *)
3958 GNULD=no;;
3959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003960{ echo "$as_me:$LINENO: result: $GNULD" >&5
3961echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003962
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003963{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3964echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003965# Check whether --enable-shared was given.
3966if test "${enable_shared+set}" = set; then
3967 enableval=$enable_shared;
3968fi
3969
3970
3971if test -z "$enable_shared"
3972then
3973 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003974 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003975 enable_shared="yes";;
3976 *)
3977 enable_shared="no";;
3978 esac
3979fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003980{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3981echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003982
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003983{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3984echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003985# Check whether --enable-profiling was given.
3986if test "${enable_profiling+set}" = set; then
3987 enableval=$enable_profiling; ac_save_cc="$CC"
3988 CC="$CC -pg"
3989 if test "$cross_compiling" = yes; then
3990 ac_enable_profiling="no"
3991else
3992 cat >conftest.$ac_ext <<_ACEOF
3993/* confdefs.h. */
3994_ACEOF
3995cat confdefs.h >>conftest.$ac_ext
3996cat >>conftest.$ac_ext <<_ACEOF
3997/* end confdefs.h. */
3998int main() { return 0; }
3999_ACEOF
4000rm -f conftest$ac_exeext
4001if { (ac_try="$ac_link"
4002case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004007 (eval "$ac_link") 2>&5
4008 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004010 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4011 { (case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004016 (eval "$ac_try") 2>&5
4017 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004019 (exit $ac_status); }; }; then
4020 ac_enable_profiling="yes"
4021else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004022 echo "$as_me: program exited with status $ac_status" >&5
4023echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004024sed 's/^/| /' conftest.$ac_ext >&5
4025
4026( exit $ac_status )
4027ac_enable_profiling="no"
4028fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4030fi
4031
4032
4033 CC="$ac_save_cc"
4034fi
4035
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004036{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4037echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004038
4039case "$ac_enable_profiling" in
4040 "yes")
4041 BASECFLAGS="-pg $BASECFLAGS"
4042 LDFLAGS="-pg $LDFLAGS"
4043 ;;
4044esac
4045
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004046{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4047echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004048
4049# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4050# library that we build, but we do not want to link against it (we
4051# will find it with a -framework option). For this reason there is an
4052# extra variable BLDLIBRARY against which Python and the extension
4053# modules are linked, BLDLIBRARY. This is normally the same as
4054# LDLIBRARY, but empty for MacOSX framework builds.
4055if test "$enable_framework"
4056then
4057 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4058 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4059 BLDLIBRARY=''
4060else
4061 BLDLIBRARY='$(LDLIBRARY)'
4062fi
4063
4064# Other platforms follow
4065if test $enable_shared = "yes"; then
4066
4067cat >>confdefs.h <<\_ACEOF
4068#define Py_ENABLE_SHARED 1
4069_ACEOF
4070
4071 case $ac_sys_system in
4072 CYGWIN*)
4073 LDLIBRARY='libpython$(VERSION).dll.a'
4074 DLLLIBRARY='libpython$(VERSION).dll'
4075 ;;
4076 SunOS*)
4077 LDLIBRARY='libpython$(VERSION).so'
4078 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4079 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4080 INSTSONAME="$LDLIBRARY".$SOVERSION
4081 ;;
4082 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4083 LDLIBRARY='libpython$(VERSION).so'
4084 BLDLIBRARY='-L. -lpython$(VERSION)'
4085 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4086 case $ac_sys_system in
4087 FreeBSD*)
4088 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4089 ;;
4090 esac
4091 INSTSONAME="$LDLIBRARY".$SOVERSION
4092 ;;
4093 hp*|HP*)
4094 case `uname -m` in
4095 ia64)
4096 LDLIBRARY='libpython$(VERSION).so'
4097 ;;
4098 *)
4099 LDLIBRARY='libpython$(VERSION).sl'
4100 ;;
4101 esac
4102 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4103 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4104 ;;
4105 OSF*)
4106 LDLIBRARY='libpython$(VERSION).so'
4107 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4108 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4109 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004110 Darwin*)
4111 LDLIBRARY='libpython$(VERSION).dylib'
4112 BLDLIBRARY='-L. -lpython$(VERSION)'
4113 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4114 ;;
4115
4116 esac
4117else # shared is disabled
4118 case $ac_sys_system in
4119 CYGWIN*)
4120 BLDLIBRARY='$(LIBRARY)'
4121 LDLIBRARY='libpython$(VERSION).dll.a'
4122 ;;
4123 esac
4124fi
4125
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004126{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4127echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004128
4129if test -n "$ac_tool_prefix"; then
4130 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4131set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004132{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4133echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004134if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004135 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004136else
4137 if test -n "$RANLIB"; then
4138 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4139else
4140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4141for as_dir in $PATH
4142do
4143 IFS=$as_save_IFS
4144 test -z "$as_dir" && as_dir=.
4145 for ac_exec_ext in '' $ac_executable_extensions; do
4146 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4147 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004148 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004149 break 2
4150 fi
4151done
4152done
4153IFS=$as_save_IFS
4154
4155fi
4156fi
4157RANLIB=$ac_cv_prog_RANLIB
4158if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004159 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4160echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004161else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004162 { echo "$as_me:$LINENO: result: no" >&5
4163echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004164fi
4165
4166
4167fi
4168if test -z "$ac_cv_prog_RANLIB"; then
4169 ac_ct_RANLIB=$RANLIB
4170 # Extract the first word of "ranlib", so it can be a program name with args.
4171set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004172{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4173echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004174if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004175 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004176else
4177 if test -n "$ac_ct_RANLIB"; then
4178 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4179else
4180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4181for as_dir in $PATH
4182do
4183 IFS=$as_save_IFS
4184 test -z "$as_dir" && as_dir=.
4185 for ac_exec_ext in '' $ac_executable_extensions; do
4186 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4187 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004188 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004189 break 2
4190 fi
4191done
4192done
4193IFS=$as_save_IFS
4194
4195fi
4196fi
4197ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4198if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004199 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4200echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004202 { echo "$as_me:$LINENO: result: no" >&5
4203echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004204fi
4205
4206 if test "x$ac_ct_RANLIB" = x; then
4207 RANLIB=":"
4208 else
4209 case $cross_compiling:$ac_tool_warned in
4210yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004211{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4212whose name does not start with the host triplet. If you think this
4213configuration is useful to you, please write to autoconf@gnu.org." >&5
4214echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4215whose name does not start with the host triplet. If you think this
4216configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004217ac_tool_warned=yes ;;
4218esac
4219 RANLIB=$ac_ct_RANLIB
4220 fi
4221else
4222 RANLIB="$ac_cv_prog_RANLIB"
4223fi
4224
4225
4226for ac_prog in ar aal
4227do
4228 # Extract the first word of "$ac_prog", so it can be a program name with args.
4229set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004230{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4231echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004232if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004233 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004234else
4235 if test -n "$AR"; then
4236 ac_cv_prog_AR="$AR" # Let the user override the test.
4237else
4238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4239for as_dir in $PATH
4240do
4241 IFS=$as_save_IFS
4242 test -z "$as_dir" && as_dir=.
4243 for ac_exec_ext in '' $ac_executable_extensions; do
4244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4245 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004247 break 2
4248 fi
4249done
4250done
4251IFS=$as_save_IFS
4252
4253fi
4254fi
4255AR=$ac_cv_prog_AR
4256if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004257 { echo "$as_me:$LINENO: result: $AR" >&5
4258echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004259else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004260 { echo "$as_me:$LINENO: result: no" >&5
4261echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004262fi
4263
4264
4265 test -n "$AR" && break
4266done
4267test -n "$AR" || AR="ar"
4268
4269
4270# tweak ARFLAGS only if the user didn't set it on the command line
4271
4272if test -z "$ARFLAGS"
4273then
4274 ARFLAGS="rc"
4275fi
4276
4277
4278# Extract the first word of "svnversion", so it can be a program name with args.
4279set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004280{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4281echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004282if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004283 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004284else
4285 if test -n "$SVNVERSION"; then
4286 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4287else
4288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4289for as_dir in $PATH
4290do
4291 IFS=$as_save_IFS
4292 test -z "$as_dir" && as_dir=.
4293 for ac_exec_ext in '' $ac_executable_extensions; do
4294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4295 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004296 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004297 break 2
4298 fi
4299done
4300done
4301IFS=$as_save_IFS
4302
4303 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4304fi
4305fi
4306SVNVERSION=$ac_cv_prog_SVNVERSION
4307if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004308 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4309echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004310else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004311 { echo "$as_me:$LINENO: result: no" >&5
4312echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004313fi
4314
4315
4316if test $SVNVERSION = found
4317then
4318 SVNVERSION="svnversion \$(srcdir)"
4319else
4320 SVNVERSION="echo Unversioned directory"
4321fi
4322
4323case $MACHDEP in
4324bsdos*|hp*|HP*)
4325 # install -d does not work on BSDI or HP-UX
4326 if test -z "$INSTALL"
4327 then
4328 INSTALL="${srcdir}/install-sh -c"
4329 fi
4330esac
4331ac_aux_dir=
4332for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4333 if test -f "$ac_dir/install-sh"; then
4334 ac_aux_dir=$ac_dir
4335 ac_install_sh="$ac_aux_dir/install-sh -c"
4336 break
4337 elif test -f "$ac_dir/install.sh"; then
4338 ac_aux_dir=$ac_dir
4339 ac_install_sh="$ac_aux_dir/install.sh -c"
4340 break
4341 elif test -f "$ac_dir/shtool"; then
4342 ac_aux_dir=$ac_dir
4343 ac_install_sh="$ac_aux_dir/shtool install -c"
4344 break
4345 fi
4346done
4347if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004348 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4349echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004350 { (exit 1); exit 1; }; }
4351fi
4352
4353# These three variables are undocumented and unsupported,
4354# and are intended to be withdrawn in a future Autoconf release.
4355# They can cause serious problems if a builder's source tree is in a directory
4356# whose full name contains unusual characters.
4357ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4358ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4359ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4360
4361
4362# Find a good install program. We prefer a C program (faster),
4363# so one script is as good as another. But avoid the broken or
4364# incompatible versions:
4365# SysV /etc/install, /usr/sbin/install
4366# SunOS /usr/etc/install
4367# IRIX /sbin/install
4368# AIX /bin/install
4369# AmigaOS /C/install, which installs bootblocks on floppy discs
4370# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4371# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4372# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4373# OS/2's system install, which has a completely different semantic
4374# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004375{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4376echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004377if test -z "$INSTALL"; then
4378if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004379 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004380else
4381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4382for as_dir in $PATH
4383do
4384 IFS=$as_save_IFS
4385 test -z "$as_dir" && as_dir=.
4386 # Account for people who put trailing slashes in PATH elements.
4387case $as_dir/ in
4388 ./ | .// | /cC/* | \
4389 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4390 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4391 /usr/ucb/* ) ;;
4392 *)
4393 # OSF1 and SCO ODT 3.0 have their own names for install.
4394 # Don't use installbsd from OSF since it installs stuff as root
4395 # by default.
4396 for ac_prog in ginstall scoinst install; do
4397 for ac_exec_ext in '' $ac_executable_extensions; do
4398 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4399 if test $ac_prog = install &&
4400 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4401 # AIX install. It has an incompatible calling convention.
4402 :
4403 elif test $ac_prog = install &&
4404 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4405 # program-specific install script used by HP pwplus--don't use.
4406 :
4407 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004408 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4409 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004410 fi
4411 fi
4412 done
4413 done
4414 ;;
4415esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004416done
4417IFS=$as_save_IFS
4418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004419
4420fi
4421 if test "${ac_cv_path_install+set}" = set; then
4422 INSTALL=$ac_cv_path_install
4423 else
4424 # As a last resort, use the slow shell script. Don't cache a
4425 # value for INSTALL within a source directory, because that will
4426 # break other packages using the cache if that directory is
4427 # removed, or if the value is a relative name.
4428 INSTALL=$ac_install_sh
4429 fi
4430fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004431{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4432echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004433
4434# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4435# It thinks the first close brace ends the variable substitution.
4436test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4437
4438test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4439
4440test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4441
4442
4443# Not every filesystem supports hard links
4444
4445if test -z "$LN" ; then
4446 case $ac_sys_system in
4447 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004448 *) LN=ln;;
4449 esac
4450fi
4451
4452# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004453{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4454echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004455
4456# Check whether --with-pydebug was given.
4457if test "${with_pydebug+set}" = set; then
4458 withval=$with_pydebug;
4459if test "$withval" != no
4460then
4461
4462cat >>confdefs.h <<\_ACEOF
4463#define Py_DEBUG 1
4464_ACEOF
4465
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004466 { echo "$as_me:$LINENO: result: yes" >&5
4467echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004468 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004469else { echo "$as_me:$LINENO: result: no" >&5
4470echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004471fi
4472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004473 { echo "$as_me:$LINENO: result: no" >&5
4474echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004475fi
4476
4477
4478# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4479# merged with this chunk of code?
4480
4481# Optimizer/debugger flags
4482# ------------------------
4483# (The following bit of code is complicated enough - please keep things
4484# indented properly. Just pretend you're editing Python code. ;-)
4485
4486# There are two parallel sets of case statements below, one that checks to
4487# see if OPT was set and one that does BASECFLAGS setting based upon
4488# compiler and platform. BASECFLAGS tweaks need to be made even if the
4489# user set OPT.
4490
4491# tweak OPT based on compiler and platform, only if the user didn't set
4492# it on the command line
4493
4494if test -z "$OPT"
4495then
4496 case $GCC in
4497 yes)
4498 if test "$CC" != 'g++' ; then
4499 STRICT_PROTO="-Wstrict-prototypes"
4500 fi
4501 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4502 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4503 WRAP="-fwrapv"
4504 fi
4505 case $ac_cv_prog_cc_g in
4506 yes)
4507 if test "$Py_DEBUG" = 'true' ; then
4508 # Optimization messes up debuggers, so turn it off for
4509 # debug builds.
4510 OPT="-g -Wall $STRICT_PROTO"
4511 else
4512 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4513 fi
4514 ;;
4515 *)
4516 OPT="-O3 -Wall $STRICT_PROTO"
4517 ;;
4518 esac
4519 case $ac_sys_system in
4520 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4521 ;;
4522 esac
4523 ;;
4524
4525 *)
4526 OPT="-O"
4527 ;;
4528 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004529fi
4530
4531
4532
4533# The -arch flags for universal builds on OSX
4534UNIVERSAL_ARCH_FLAGS=
4535
4536
4537# tweak BASECFLAGS based on compiler and platform
4538case $GCC in
4539yes)
4540 # Python violates C99 rules, by casting between incompatible
4541 # pointer types. GCC may generate bad code as a result of that,
4542 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004543 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4544echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004545 ac_save_cc="$CC"
4546 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004547 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004548 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004549else
4550 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004551 ac_cv_no_strict_aliasing_ok=no
4552else
4553 cat >conftest.$ac_ext <<_ACEOF
4554/* confdefs.h. */
4555_ACEOF
4556cat confdefs.h >>conftest.$ac_ext
4557cat >>conftest.$ac_ext <<_ACEOF
4558/* end confdefs.h. */
4559int main() { return 0; }
4560_ACEOF
4561rm -f conftest$ac_exeext
4562if { (ac_try="$ac_link"
4563case "(($ac_try" in
4564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4565 *) ac_try_echo=$ac_try;;
4566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004568 (eval "$ac_link") 2>&5
4569 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4572 { (case "(($ac_try" in
4573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4574 *) ac_try_echo=$ac_try;;
4575esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004577 (eval "$ac_try") 2>&5
4578 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004580 (exit $ac_status); }; }; then
4581 ac_cv_no_strict_aliasing_ok=yes
4582else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004583 echo "$as_me: program exited with status $ac_status" >&5
4584echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004585sed 's/^/| /' conftest.$ac_ext >&5
4586
4587( exit $ac_status )
4588ac_cv_no_strict_aliasing_ok=no
4589fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4591fi
4592
4593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004594fi
4595
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004596 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004597 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4598echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004599 if test $ac_cv_no_strict_aliasing_ok = yes
4600 then
4601 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4602 fi
4603
4604 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4605 # support. Without this, treatment of subnormals doesn't follow
4606 # the standard.
4607 case $ac_sys_machine in
4608 alpha*)
4609 BASECFLAGS="$BASECFLAGS -mieee"
4610 ;;
4611 esac
4612
4613 case $ac_sys_system in
4614 SCO_SV*)
4615 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4616 ;;
4617 # is there any other compiler on Darwin besides gcc?
4618 Darwin*)
4619 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4620 # used to be here, but non-Apple gcc doesn't accept them.
4621
4622
4623 if test "${enable_universalsdk}"; then
4624 UNIVERSAL_ARCH_FLAGS=""
4625 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4626 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4627 ARCH_RUN_32BIT=""
4628
4629 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4630 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004631 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004632
4633 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4634 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4635 ARCH_RUN_32BIT="arch -i386 -ppc"
4636
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004637 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4638 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4639 ARCH_RUN_32BIT="arch -i386"
4640
4641 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4642 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4643 ARCH_RUN_32BIT="arch -i386 -ppc"
4644
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004645 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004646 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4647echo "$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 +00004648 { (exit 1); exit 1; }; }
4649
4650 fi
4651
4652
4653 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4654 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4655 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4656 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4657 fi
4658 fi
4659
4660 # Calculate the right deployment target for this build.
4661 #
4662 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4663 if test ${cur_target} '>' 10.2; then
4664 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004665 if test ${enable_universalsdk}; then
4666 if test "${UNIVERSAL_ARCHS}" = "all"; then
4667 # Ensure that the default platform for a
4668 # 4-way universal build is OSX 10.5,
4669 # that's the first OS release where
4670 # 4-way builds make sense.
4671 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004672
4673 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4674 cur_target='10.5'
4675
4676 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4677 cur_target='10.5'
4678
4679 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4680 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004681 fi
4682 else
4683 if test `arch` = "i386"; then
4684 # On Intel macs default to a deployment
4685 # target of 10.4, that's the first OSX
4686 # release with Intel support.
4687 cur_target="10.4"
4688 fi
4689 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690 fi
4691 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4692
4693 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4694 # environment with a value that is the same as what we'll use
4695 # in the Makefile to ensure that we'll get the same compiler
4696 # environment during configure and build time.
4697 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4698 export MACOSX_DEPLOYMENT_TARGET
4699 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4700
4701 ;;
4702 OSF*)
4703 BASECFLAGS="$BASECFLAGS -mieee"
4704 ;;
4705 esac
4706 ;;
4707
4708*)
4709 case $ac_sys_system in
4710 OpenUNIX*|UnixWare*)
4711 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4712 ;;
4713 OSF*)
4714 BASECFLAGS="$BASECFLAGS -ieee -std"
4715 ;;
4716 SCO_SV*)
4717 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4718 ;;
4719 esac
4720 ;;
4721esac
4722
4723if test "$Py_DEBUG" = 'true'; then
4724 :
4725else
4726 OPT="-DNDEBUG $OPT"
4727fi
4728
4729if test "$ac_arch_flags"
4730then
4731 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4732fi
4733
4734# disable check for icc since it seems to pass, but generates a warning
4735if test "$CC" = icc
4736then
4737 ac_cv_opt_olimit_ok=no
4738fi
4739
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004740{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4741echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004742if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004743 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004744else
4745 ac_save_cc="$CC"
4746CC="$CC -OPT:Olimit=0"
4747if test "$cross_compiling" = yes; then
4748 ac_cv_opt_olimit_ok=no
4749else
4750 cat >conftest.$ac_ext <<_ACEOF
4751/* confdefs.h. */
4752_ACEOF
4753cat confdefs.h >>conftest.$ac_ext
4754cat >>conftest.$ac_ext <<_ACEOF
4755/* end confdefs.h. */
4756int main() { return 0; }
4757_ACEOF
4758rm -f conftest$ac_exeext
4759if { (ac_try="$ac_link"
4760case "(($ac_try" in
4761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4762 *) ac_try_echo=$ac_try;;
4763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004765 (eval "$ac_link") 2>&5
4766 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4769 { (case "(($ac_try" in
4770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4771 *) ac_try_echo=$ac_try;;
4772esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004774 (eval "$ac_try") 2>&5
4775 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004777 (exit $ac_status); }; }; then
4778 ac_cv_opt_olimit_ok=yes
4779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004780 echo "$as_me: program exited with status $ac_status" >&5
4781echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782sed 's/^/| /' conftest.$ac_ext >&5
4783
4784( exit $ac_status )
4785ac_cv_opt_olimit_ok=no
4786fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4788fi
4789
4790
4791CC="$ac_save_cc"
4792fi
4793
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004794{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4795echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004796if test $ac_cv_opt_olimit_ok = yes; then
4797 case $ac_sys_system in
4798 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4799 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4800 # environment?
4801 Darwin*)
4802 ;;
4803 *)
4804 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4805 ;;
4806 esac
4807else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004808 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4809echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004811 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812else
4813 ac_save_cc="$CC"
4814 CC="$CC -Olimit 1500"
4815 if test "$cross_compiling" = yes; then
4816 ac_cv_olimit_ok=no
4817else
4818 cat >conftest.$ac_ext <<_ACEOF
4819/* confdefs.h. */
4820_ACEOF
4821cat confdefs.h >>conftest.$ac_ext
4822cat >>conftest.$ac_ext <<_ACEOF
4823/* end confdefs.h. */
4824int main() { return 0; }
4825_ACEOF
4826rm -f conftest$ac_exeext
4827if { (ac_try="$ac_link"
4828case "(($ac_try" in
4829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4830 *) ac_try_echo=$ac_try;;
4831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004833 (eval "$ac_link") 2>&5
4834 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4837 { (case "(($ac_try" in
4838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4839 *) ac_try_echo=$ac_try;;
4840esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 (eval "$ac_try") 2>&5
4843 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 (exit $ac_status); }; }; then
4846 ac_cv_olimit_ok=yes
4847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004848 echo "$as_me: program exited with status $ac_status" >&5
4849echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850sed 's/^/| /' conftest.$ac_ext >&5
4851
4852( exit $ac_status )
4853ac_cv_olimit_ok=no
4854fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4856fi
4857
4858
4859 CC="$ac_save_cc"
4860fi
4861
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004862 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4863echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864 if test $ac_cv_olimit_ok = yes; then
4865 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4866 fi
4867fi
4868
4869# Check whether GCC supports PyArg_ParseTuple format
4870if test "$GCC" = "yes"
4871then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004872 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4873echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874 save_CFLAGS=$CFLAGS
4875 CFLAGS="$CFLAGS -Werror"
4876 cat >conftest.$ac_ext <<_ACEOF
4877/* confdefs.h. */
4878_ACEOF
4879cat confdefs.h >>conftest.$ac_ext
4880cat >>conftest.$ac_ext <<_ACEOF
4881/* end confdefs.h. */
4882
4883 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4884
4885int
4886main ()
4887{
4888
4889 ;
4890 return 0;
4891}
4892_ACEOF
4893rm -f conftest.$ac_objext
4894if { (ac_try="$ac_compile"
4895case "(($ac_try" in
4896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4897 *) ac_try_echo=$ac_try;;
4898esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900 (eval "$ac_compile") 2>conftest.er1
4901 ac_status=$?
4902 grep -v '^ *+' conftest.er1 >conftest.err
4903 rm -f conftest.er1
4904 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906 (exit $ac_status); } && {
4907 test -z "$ac_c_werror_flag" ||
4908 test ! -s conftest.err
4909 } && test -s conftest.$ac_objext; then
4910
4911cat >>confdefs.h <<\_ACEOF
4912#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4913_ACEOF
4914
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004915 { echo "$as_me:$LINENO: result: yes" >&5
4916echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004918 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919sed 's/^/| /' conftest.$ac_ext >&5
4920
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004921 { echo "$as_me:$LINENO: result: no" >&5
4922echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923
4924fi
4925
4926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927 CFLAGS=$save_CFLAGS
4928fi
4929
4930# On some compilers, pthreads are available without further options
4931# (e.g. MacOS X). On some of these systems, the compiler will not
4932# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4933# So we have to see first whether pthreads are available without
4934# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004935{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4936echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004938 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939else
4940 if test "$cross_compiling" = yes; then
4941 ac_cv_pthread_is_default=no
4942else
4943 cat >conftest.$ac_ext <<_ACEOF
4944/* confdefs.h. */
4945_ACEOF
4946cat confdefs.h >>conftest.$ac_ext
4947cat >>conftest.$ac_ext <<_ACEOF
4948/* end confdefs.h. */
4949
4950#include <pthread.h>
4951
4952void* routine(void* p){return NULL;}
4953
4954int main(){
4955 pthread_t p;
4956 if(pthread_create(&p,NULL,routine,NULL)!=0)
4957 return 1;
4958 (void)pthread_detach(p);
4959 return 0;
4960}
4961
4962_ACEOF
4963rm -f conftest$ac_exeext
4964if { (ac_try="$ac_link"
4965case "(($ac_try" in
4966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4967 *) ac_try_echo=$ac_try;;
4968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 (eval "$ac_link") 2>&5
4971 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4974 { (case "(($ac_try" in
4975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4976 *) ac_try_echo=$ac_try;;
4977esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979 (eval "$ac_try") 2>&5
4980 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982 (exit $ac_status); }; }; then
4983
4984 ac_cv_pthread_is_default=yes
4985 ac_cv_kthread=no
4986 ac_cv_pthread=no
4987
4988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004989 echo "$as_me: program exited with status $ac_status" >&5
4990echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991sed 's/^/| /' conftest.$ac_ext >&5
4992
4993( exit $ac_status )
4994ac_cv_pthread_is_default=no
4995fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4997fi
4998
4999
5000
5001fi
5002
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005003{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5004echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005
5006
5007if test $ac_cv_pthread_is_default = yes
5008then
5009 ac_cv_kpthread=no
5010else
5011# -Kpthread, if available, provides the right #defines
5012# and linker options to make pthread_create available
5013# Some compilers won't report that they do not support -Kpthread,
5014# so we need to run a program to see whether it really made the
5015# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005016{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5017echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005019 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020else
5021 ac_save_cc="$CC"
5022CC="$CC -Kpthread"
5023if test "$cross_compiling" = yes; then
5024 ac_cv_kpthread=no
5025else
5026 cat >conftest.$ac_ext <<_ACEOF
5027/* confdefs.h. */
5028_ACEOF
5029cat confdefs.h >>conftest.$ac_ext
5030cat >>conftest.$ac_ext <<_ACEOF
5031/* end confdefs.h. */
5032
5033#include <pthread.h>
5034
5035void* routine(void* p){return NULL;}
5036
5037int main(){
5038 pthread_t p;
5039 if(pthread_create(&p,NULL,routine,NULL)!=0)
5040 return 1;
5041 (void)pthread_detach(p);
5042 return 0;
5043}
5044
5045_ACEOF
5046rm -f conftest$ac_exeext
5047if { (ac_try="$ac_link"
5048case "(($ac_try" in
5049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050 *) ac_try_echo=$ac_try;;
5051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053 (eval "$ac_link") 2>&5
5054 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5057 { (case "(($ac_try" in
5058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5059 *) ac_try_echo=$ac_try;;
5060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 (eval "$ac_try") 2>&5
5063 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065 (exit $ac_status); }; }; then
5066 ac_cv_kpthread=yes
5067else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005068 echo "$as_me: program exited with status $ac_status" >&5
5069echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070sed 's/^/| /' conftest.$ac_ext >&5
5071
5072( exit $ac_status )
5073ac_cv_kpthread=no
5074fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5076fi
5077
5078
5079CC="$ac_save_cc"
5080fi
5081
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005082{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5083echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084fi
5085
5086if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5087then
5088# -Kthread, if available, provides the right #defines
5089# and linker options to make pthread_create available
5090# Some compilers won't report that they do not support -Kthread,
5091# so we need to run a program to see whether it really made the
5092# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005093{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5094echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005096 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097else
5098 ac_save_cc="$CC"
5099CC="$CC -Kthread"
5100if test "$cross_compiling" = yes; then
5101 ac_cv_kthread=no
5102else
5103 cat >conftest.$ac_ext <<_ACEOF
5104/* confdefs.h. */
5105_ACEOF
5106cat confdefs.h >>conftest.$ac_ext
5107cat >>conftest.$ac_ext <<_ACEOF
5108/* end confdefs.h. */
5109
5110#include <pthread.h>
5111
5112void* routine(void* p){return NULL;}
5113
5114int main(){
5115 pthread_t p;
5116 if(pthread_create(&p,NULL,routine,NULL)!=0)
5117 return 1;
5118 (void)pthread_detach(p);
5119 return 0;
5120}
5121
5122_ACEOF
5123rm -f conftest$ac_exeext
5124if { (ac_try="$ac_link"
5125case "(($ac_try" in
5126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5127 *) ac_try_echo=$ac_try;;
5128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130 (eval "$ac_link") 2>&5
5131 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005133 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5134 { (case "(($ac_try" in
5135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5136 *) ac_try_echo=$ac_try;;
5137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139 (eval "$ac_try") 2>&5
5140 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142 (exit $ac_status); }; }; then
5143 ac_cv_kthread=yes
5144else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005145 echo "$as_me: program exited with status $ac_status" >&5
5146echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147sed 's/^/| /' conftest.$ac_ext >&5
5148
5149( exit $ac_status )
5150ac_cv_kthread=no
5151fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5153fi
5154
5155
5156CC="$ac_save_cc"
5157fi
5158
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005159{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5160echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161fi
5162
5163if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5164then
5165# -pthread, if available, provides the right #defines
5166# and linker options to make pthread_create available
5167# Some compilers won't report that they do not support -pthread,
5168# so we need to run a program to see whether it really made the
5169# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005170{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5171echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005173 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005174else
5175 ac_save_cc="$CC"
5176CC="$CC -pthread"
5177if test "$cross_compiling" = yes; then
5178 ac_cv_pthread=no
5179else
5180 cat >conftest.$ac_ext <<_ACEOF
5181/* confdefs.h. */
5182_ACEOF
5183cat confdefs.h >>conftest.$ac_ext
5184cat >>conftest.$ac_ext <<_ACEOF
5185/* end confdefs.h. */
5186
5187#include <pthread.h>
5188
5189void* routine(void* p){return NULL;}
5190
5191int main(){
5192 pthread_t p;
5193 if(pthread_create(&p,NULL,routine,NULL)!=0)
5194 return 1;
5195 (void)pthread_detach(p);
5196 return 0;
5197}
5198
5199_ACEOF
5200rm -f conftest$ac_exeext
5201if { (ac_try="$ac_link"
5202case "(($ac_try" in
5203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5204 *) ac_try_echo=$ac_try;;
5205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207 (eval "$ac_link") 2>&5
5208 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5211 { (case "(($ac_try" in
5212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5213 *) ac_try_echo=$ac_try;;
5214esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216 (eval "$ac_try") 2>&5
5217 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219 (exit $ac_status); }; }; then
5220 ac_cv_pthread=yes
5221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005222 echo "$as_me: program exited with status $ac_status" >&5
5223echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224sed 's/^/| /' conftest.$ac_ext >&5
5225
5226( exit $ac_status )
5227ac_cv_pthread=no
5228fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5230fi
5231
5232
5233CC="$ac_save_cc"
5234fi
5235
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005236{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5237echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238fi
5239
5240# If we have set a CC compiler flag for thread support then
5241# check if it works for CXX, too.
5242ac_cv_cxx_thread=no
5243if test ! -z "$CXX"
5244then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005245{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5246echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247ac_save_cxx="$CXX"
5248
5249if test "$ac_cv_kpthread" = "yes"
5250then
5251 CXX="$CXX -Kpthread"
5252 ac_cv_cxx_thread=yes
5253elif test "$ac_cv_kthread" = "yes"
5254then
5255 CXX="$CXX -Kthread"
5256 ac_cv_cxx_thread=yes
5257elif test "$ac_cv_pthread" = "yes"
5258then
5259 CXX="$CXX -pthread"
5260 ac_cv_cxx_thread=yes
5261fi
5262
5263if test $ac_cv_cxx_thread = yes
5264then
5265 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5266 $CXX -c conftest.$ac_ext 2>&5
5267 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5268 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5269 then
5270 ac_cv_cxx_thread=yes
5271 else
5272 ac_cv_cxx_thread=no
5273 fi
5274 rm -fr conftest*
5275fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005276{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5277echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278fi
5279CXX="$ac_save_cxx"
5280
5281
5282# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005283{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5284echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005285if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005286 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005287else
5288 cat >conftest.$ac_ext <<_ACEOF
5289/* confdefs.h. */
5290_ACEOF
5291cat confdefs.h >>conftest.$ac_ext
5292cat >>conftest.$ac_ext <<_ACEOF
5293/* end confdefs.h. */
5294#include <stdlib.h>
5295#include <stdarg.h>
5296#include <string.h>
5297#include <float.h>
5298
5299int
5300main ()
5301{
5302
5303 ;
5304 return 0;
5305}
5306_ACEOF
5307rm -f conftest.$ac_objext
5308if { (ac_try="$ac_compile"
5309case "(($ac_try" in
5310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5311 *) ac_try_echo=$ac_try;;
5312esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314 (eval "$ac_compile") 2>conftest.er1
5315 ac_status=$?
5316 grep -v '^ *+' conftest.er1 >conftest.err
5317 rm -f conftest.er1
5318 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320 (exit $ac_status); } && {
5321 test -z "$ac_c_werror_flag" ||
5322 test ! -s conftest.err
5323 } && test -s conftest.$ac_objext; then
5324 ac_cv_header_stdc=yes
5325else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005326 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327sed 's/^/| /' conftest.$ac_ext >&5
5328
5329 ac_cv_header_stdc=no
5330fi
5331
5332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5333
5334if test $ac_cv_header_stdc = yes; then
5335 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5336 cat >conftest.$ac_ext <<_ACEOF
5337/* confdefs.h. */
5338_ACEOF
5339cat confdefs.h >>conftest.$ac_ext
5340cat >>conftest.$ac_ext <<_ACEOF
5341/* end confdefs.h. */
5342#include <string.h>
5343
5344_ACEOF
5345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5346 $EGREP "memchr" >/dev/null 2>&1; then
5347 :
5348else
5349 ac_cv_header_stdc=no
5350fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005351rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
5353fi
5354
5355if test $ac_cv_header_stdc = yes; then
5356 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5357 cat >conftest.$ac_ext <<_ACEOF
5358/* confdefs.h. */
5359_ACEOF
5360cat confdefs.h >>conftest.$ac_ext
5361cat >>conftest.$ac_ext <<_ACEOF
5362/* end confdefs.h. */
5363#include <stdlib.h>
5364
5365_ACEOF
5366if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5367 $EGREP "free" >/dev/null 2>&1; then
5368 :
5369else
5370 ac_cv_header_stdc=no
5371fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005372rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373
5374fi
5375
5376if test $ac_cv_header_stdc = yes; then
5377 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5378 if test "$cross_compiling" = yes; then
5379 :
5380else
5381 cat >conftest.$ac_ext <<_ACEOF
5382/* confdefs.h. */
5383_ACEOF
5384cat confdefs.h >>conftest.$ac_ext
5385cat >>conftest.$ac_ext <<_ACEOF
5386/* end confdefs.h. */
5387#include <ctype.h>
5388#include <stdlib.h>
5389#if ((' ' & 0x0FF) == 0x020)
5390# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5391# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5392#else
5393# define ISLOWER(c) \
5394 (('a' <= (c) && (c) <= 'i') \
5395 || ('j' <= (c) && (c) <= 'r') \
5396 || ('s' <= (c) && (c) <= 'z'))
5397# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5398#endif
5399
5400#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5401int
5402main ()
5403{
5404 int i;
5405 for (i = 0; i < 256; i++)
5406 if (XOR (islower (i), ISLOWER (i))
5407 || toupper (i) != TOUPPER (i))
5408 return 2;
5409 return 0;
5410}
5411_ACEOF
5412rm -f conftest$ac_exeext
5413if { (ac_try="$ac_link"
5414case "(($ac_try" in
5415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5416 *) ac_try_echo=$ac_try;;
5417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419 (eval "$ac_link") 2>&5
5420 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5423 { (case "(($ac_try" in
5424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5425 *) ac_try_echo=$ac_try;;
5426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428 (eval "$ac_try") 2>&5
5429 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431 (exit $ac_status); }; }; then
5432 :
5433else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005434 echo "$as_me: program exited with status $ac_status" >&5
5435echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436sed 's/^/| /' conftest.$ac_ext >&5
5437
5438( exit $ac_status )
5439ac_cv_header_stdc=no
5440fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5442fi
5443
5444
5445fi
5446fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005447{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5448echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449if test $ac_cv_header_stdc = yes; then
5450
5451cat >>confdefs.h <<\_ACEOF
5452#define STDC_HEADERS 1
5453_ACEOF
5454
5455fi
5456
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005457# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5468 inttypes.h stdint.h unistd.h
5469do
5470as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5471{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5473if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5474 echo $ECHO_N "(cached) $ECHO_C" >&6
5475else
5476 cat >conftest.$ac_ext <<_ACEOF
5477/* confdefs.h. */
5478_ACEOF
5479cat confdefs.h >>conftest.$ac_ext
5480cat >>conftest.$ac_ext <<_ACEOF
5481/* end confdefs.h. */
5482$ac_includes_default
5483
5484#include <$ac_header>
5485_ACEOF
5486rm -f conftest.$ac_objext
5487if { (ac_try="$ac_compile"
5488case "(($ac_try" in
5489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5490 *) ac_try_echo=$ac_try;;
5491esac
5492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5493 (eval "$ac_compile") 2>conftest.er1
5494 ac_status=$?
5495 grep -v '^ *+' conftest.er1 >conftest.err
5496 rm -f conftest.er1
5497 cat conftest.err >&5
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); } && {
5500 test -z "$ac_c_werror_flag" ||
5501 test ! -s conftest.err
5502 } && test -s conftest.$ac_objext; then
5503 eval "$as_ac_Header=yes"
5504else
5505 echo "$as_me: failed program was:" >&5
5506sed 's/^/| /' conftest.$ac_ext >&5
5507
5508 eval "$as_ac_Header=no"
5509fi
5510
5511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5512fi
5513ac_res=`eval echo '${'$as_ac_Header'}'`
5514 { echo "$as_me:$LINENO: result: $ac_res" >&5
5515echo "${ECHO_T}$ac_res" >&6; }
5516if test `eval echo '${'$as_ac_Header'}'` = yes; then
5517 cat >>confdefs.h <<_ACEOF
5518#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5519_ACEOF
5520
5521fi
5522
5523done
5524
5525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526
Martin v. Löwis11437992002-04-12 09:54:03 +00005527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
Anthony Baxter8a560de2004-10-13 15:30:56 +00005562
Martin v. Löwisc3001752005-01-23 09:27:24 +00005563
Martin v. Löwis11017b12006-01-14 18:12:57 +00005564
Thomas Wouters477c8d52006-05-27 19:21:47 +00005565
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005566
5567
5568
5569
5570
5571
5572
5573
Thomas Wouters89f507f2006-12-13 04:49:30 +00005574
Christian Heimes043d6f62008-01-07 17:19:16 +00005575
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005576
5577
Christian Heimesbbe741d2008-03-28 10:53:29 +00005578
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005579
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005580for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5581fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005582ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005583shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005584unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005585sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5586sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005587sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005588sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005589sys/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 +00005590sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005591bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005592do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005593as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005594if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005595 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5596echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005597if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005598 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005599fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005600ac_res=`eval echo '${'$as_ac_Header'}'`
5601 { echo "$as_me:$LINENO: result: $ac_res" >&5
5602echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005603else
Martin v. Löwis11437992002-04-12 09:54:03 +00005604 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005605{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5606echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005608/* confdefs.h. */
5609_ACEOF
5610cat confdefs.h >>conftest.$ac_ext
5611cat >>conftest.$ac_ext <<_ACEOF
5612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005613$ac_includes_default
5614#include <$ac_header>
5615_ACEOF
5616rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005617if { (ac_try="$ac_compile"
5618case "(($ac_try" in
5619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5620 *) ac_try_echo=$ac_try;;
5621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005625 grep -v '^ *+' conftest.er1 >conftest.err
5626 rm -f conftest.er1
5627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005629 (exit $ac_status); } && {
5630 test -z "$ac_c_werror_flag" ||
5631 test ! -s conftest.err
5632 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005633 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005636sed 's/^/| /' conftest.$ac_ext >&5
5637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005638 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005640
5641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005642{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5643echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005644
5645# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005646{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5647echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005649/* confdefs.h. */
5650_ACEOF
5651cat confdefs.h >>conftest.$ac_ext
5652cat >>conftest.$ac_ext <<_ACEOF
5653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005654#include <$ac_header>
5655_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005656if { (ac_try="$ac_cpp conftest.$ac_ext"
5657case "(($ac_try" in
5658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5659 *) ac_try_echo=$ac_try;;
5660esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005662 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005663 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005664 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005665 rm -f conftest.er1
5666 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005668 (exit $ac_status); } >/dev/null && {
5669 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5670 test ! -s conftest.err
5671 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005672 ac_header_preproc=yes
5673else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005675sed 's/^/| /' conftest.$ac_ext >&5
5676
Martin v. Löwis11437992002-04-12 09:54:03 +00005677 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005679
Martin v. Löwis11437992002-04-12 09:54:03 +00005680rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005681{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5682echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005683
5684# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5686 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005687 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5688echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5689 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5690echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005691 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005692 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005693 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005694 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5695echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5696 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5697echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5698 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5699echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5700 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5701echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5702 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5703echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5704 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5705echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005706 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005707## -------------------------------------- ##
5708## Report this to http://bugs.python.org/ ##
5709## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005710_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005711 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005712 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005713esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005714{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5715echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005716if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005717 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005718else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005719 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005720fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005721ac_res=`eval echo '${'$as_ac_Header'}'`
5722 { echo "$as_me:$LINENO: result: $ac_res" >&5
5723echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005724
5725fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005726if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005727 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005728#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005729_ACEOF
5730
5731fi
5732
Guido van Rossum627b2d71993-12-24 10:39:16 +00005733done
5734
Martin v. Löwis11437992002-04-12 09:54:03 +00005735
5736
5737
5738
5739
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005740ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005741for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005742 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5743{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5744echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005745if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005746 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005747else
Martin v. Löwis11437992002-04-12 09:54:03 +00005748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005749/* confdefs.h. */
5750_ACEOF
5751cat confdefs.h >>conftest.$ac_ext
5752cat >>conftest.$ac_ext <<_ACEOF
5753/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005754#include <sys/types.h>
5755#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005756
Martin v. Löwis11437992002-04-12 09:54:03 +00005757int
5758main ()
5759{
5760if ((DIR *) 0)
5761return 0;
5762 ;
5763 return 0;
5764}
5765_ACEOF
5766rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005767if { (ac_try="$ac_compile"
5768case "(($ac_try" in
5769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5770 *) ac_try_echo=$ac_try;;
5771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005773 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005775 grep -v '^ *+' conftest.er1 >conftest.err
5776 rm -f conftest.er1
5777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005779 (exit $ac_status); } && {
5780 test -z "$ac_c_werror_flag" ||
5781 test ! -s conftest.err
5782 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005783 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005786sed 's/^/| /' conftest.$ac_ext >&5
5787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005788 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005790
5791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005792fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005793ac_res=`eval echo '${'$as_ac_Header'}'`
5794 { echo "$as_me:$LINENO: result: $ac_res" >&5
5795echo "${ECHO_T}$ac_res" >&6; }
5796if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005798#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005799_ACEOF
5800
5801ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005802fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005803
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804done
5805# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5806if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005807 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5808echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005809if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005810 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005811else
Martin v. Löwis11437992002-04-12 09:54:03 +00005812 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005814/* confdefs.h. */
5815_ACEOF
5816cat confdefs.h >>conftest.$ac_ext
5817cat >>conftest.$ac_ext <<_ACEOF
5818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005820/* Override any GCC internal prototype to avoid an error.
5821 Use char because int might match the return type of a GCC
5822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005823#ifdef __cplusplus
5824extern "C"
5825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005826char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005827int
5828main ()
5829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005830return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005831 ;
5832 return 0;
5833}
5834_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005835for ac_lib in '' dir; do
5836 if test -z "$ac_lib"; then
5837 ac_res="none required"
5838 else
5839 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005840 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005841 fi
5842 rm -f conftest.$ac_objext conftest$ac_exeext
5843if { (ac_try="$ac_link"
5844case "(($ac_try" in
5845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5846 *) ac_try_echo=$ac_try;;
5847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005849 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005850 ac_status=$?
5851 grep -v '^ *+' conftest.er1 >conftest.err
5852 rm -f conftest.er1
5853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005855 (exit $ac_status); } && {
5856 test -z "$ac_c_werror_flag" ||
5857 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005858 } && test -s conftest$ac_exeext &&
5859 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005860 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005861else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005862 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005863sed 's/^/| /' conftest.$ac_ext >&5
5864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005865
Thomas Wouters477c8d52006-05-27 19:21:47 +00005866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005867
5868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5869 conftest$ac_exeext
5870 if test "${ac_cv_search_opendir+set}" = set; then
5871 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005873done
5874if test "${ac_cv_search_opendir+set}" = set; then
5875 :
5876else
5877 ac_cv_search_opendir=no
5878fi
5879rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005880LIBS=$ac_func_search_save_LIBS
5881fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005882{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5883echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005884ac_res=$ac_cv_search_opendir
5885if test "$ac_res" != no; then
5886 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005887
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005889
Michael W. Hudson54241132001-12-07 15:38:26 +00005890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005891 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5892echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005893if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005894 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005895else
5896 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005898/* confdefs.h. */
5899_ACEOF
5900cat confdefs.h >>conftest.$ac_ext
5901cat >>conftest.$ac_ext <<_ACEOF
5902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005904/* Override any GCC internal prototype to avoid an error.
5905 Use char because int might match the return type of a GCC
5906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005907#ifdef __cplusplus
5908extern "C"
5909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005910char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005911int
5912main ()
5913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005914return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005915 ;
5916 return 0;
5917}
5918_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005919for ac_lib in '' x; do
5920 if test -z "$ac_lib"; then
5921 ac_res="none required"
5922 else
5923 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005924 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005925 fi
5926 rm -f conftest.$ac_objext conftest$ac_exeext
5927if { (ac_try="$ac_link"
5928case "(($ac_try" in
5929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5930 *) ac_try_echo=$ac_try;;
5931esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005933 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005934 ac_status=$?
5935 grep -v '^ *+' conftest.er1 >conftest.err
5936 rm -f conftest.er1
5937 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005939 (exit $ac_status); } && {
5940 test -z "$ac_c_werror_flag" ||
5941 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005942 } && test -s conftest$ac_exeext &&
5943 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005944 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005945else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005946 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005947sed 's/^/| /' conftest.$ac_ext >&5
5948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005949
Thomas Wouters477c8d52006-05-27 19:21:47 +00005950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005951
5952rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5953 conftest$ac_exeext
5954 if test "${ac_cv_search_opendir+set}" = set; then
5955 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005957done
5958if test "${ac_cv_search_opendir+set}" = set; then
5959 :
5960else
5961 ac_cv_search_opendir=no
5962fi
5963rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005964LIBS=$ac_func_search_save_LIBS
5965fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005966{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5967echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005968ac_res=$ac_cv_search_opendir
5969if test "$ac_res" != no; then
5970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005971
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005972fi
5973
5974fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005975
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005976{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5977echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005979 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005980else
5981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005982/* confdefs.h. */
5983_ACEOF
5984cat confdefs.h >>conftest.$ac_ext
5985cat >>conftest.$ac_ext <<_ACEOF
5986/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005987#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005988int
5989main ()
5990{
5991return makedev(0, 0);
5992 ;
5993 return 0;
5994}
5995_ACEOF
5996rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005997if { (ac_try="$ac_link"
5998case "(($ac_try" in
5999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6000 *) ac_try_echo=$ac_try;;
6001esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006003 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006005 grep -v '^ *+' conftest.er1 >conftest.err
6006 rm -f conftest.er1
6007 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006009 (exit $ac_status); } && {
6010 test -z "$ac_c_werror_flag" ||
6011 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006012 } && test -s conftest$ac_exeext &&
6013 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006014 ac_cv_header_sys_types_h_makedev=yes
6015else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006017sed 's/^/| /' conftest.$ac_ext >&5
6018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006019 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006021
6022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024
6025fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006026{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6027echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006028
6029if test $ac_cv_header_sys_types_h_makedev = no; then
6030if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006031 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6032echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006034 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006036{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6037echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038else
6039 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006040{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6041echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006043/* confdefs.h. */
6044_ACEOF
6045cat confdefs.h >>conftest.$ac_ext
6046cat >>conftest.$ac_ext <<_ACEOF
6047/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048$ac_includes_default
6049#include <sys/mkdev.h>
6050_ACEOF
6051rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006052if { (ac_try="$ac_compile"
6053case "(($ac_try" in
6054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6055 *) ac_try_echo=$ac_try;;
6056esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006060 grep -v '^ *+' conftest.er1 >conftest.err
6061 rm -f conftest.er1
6062 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064 (exit $ac_status); } && {
6065 test -z "$ac_c_werror_flag" ||
6066 test ! -s conftest.err
6067 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068 ac_header_compiler=yes
6069else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006071sed 's/^/| /' conftest.$ac_ext >&5
6072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006073 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075
6076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006077{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6078echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079
6080# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006081{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6082echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006084/* confdefs.h. */
6085_ACEOF
6086cat confdefs.h >>conftest.$ac_ext
6087cat >>conftest.$ac_ext <<_ACEOF
6088/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089#include <sys/mkdev.h>
6090_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006091if { (ac_try="$ac_cpp conftest.$ac_ext"
6092case "(($ac_try" in
6093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6094 *) ac_try_echo=$ac_try;;
6095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006097 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006099 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100 rm -f conftest.er1
6101 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103 (exit $ac_status); } >/dev/null && {
6104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6105 test ! -s conftest.err
6106 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107 ac_header_preproc=yes
6108else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006110sed 's/^/| /' conftest.$ac_ext >&5
6111
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112 ac_header_preproc=no
6113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006116{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6117echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006118
6119# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006120case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6121 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006126 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006127 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006128 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6131 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6132echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6133 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6134echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6135 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6136echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6137 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6138echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6139 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6140echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006141 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006142## -------------------------------------- ##
6143## Report this to http://bugs.python.org/ ##
6144## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006145_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006146 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006147 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006149{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6150echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006152 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153else
6154 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6155fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006156{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6157echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158
6159fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006160if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161
6162cat >>confdefs.h <<\_ACEOF
6163#define MAJOR_IN_MKDEV 1
6164_ACEOF
6165
6166fi
6167
6168
6169
6170 if test $ac_cv_header_sys_mkdev_h = no; then
6171 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006172 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6173echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006175 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006177{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6178echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179else
6180 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006181{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6182echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006184/* confdefs.h. */
6185_ACEOF
6186cat confdefs.h >>conftest.$ac_ext
6187cat >>conftest.$ac_ext <<_ACEOF
6188/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189$ac_includes_default
6190#include <sys/sysmacros.h>
6191_ACEOF
6192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006193if { (ac_try="$ac_compile"
6194case "(($ac_try" in
6195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6196 *) ac_try_echo=$ac_try;;
6197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006201 grep -v '^ *+' conftest.er1 >conftest.err
6202 rm -f conftest.er1
6203 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205 (exit $ac_status); } && {
6206 test -z "$ac_c_werror_flag" ||
6207 test ! -s conftest.err
6208 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209 ac_header_compiler=yes
6210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006212sed 's/^/| /' conftest.$ac_ext >&5
6213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006214 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216
6217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006218{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6219echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220
6221# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006222{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6223echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006225/* confdefs.h. */
6226_ACEOF
6227cat confdefs.h >>conftest.$ac_ext
6228cat >>conftest.$ac_ext <<_ACEOF
6229/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230#include <sys/sysmacros.h>
6231_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232if { (ac_try="$ac_cpp conftest.$ac_ext"
6233case "(($ac_try" in
6234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6235 *) ac_try_echo=$ac_try;;
6236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006240 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241 rm -f conftest.er1
6242 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006244 (exit $ac_status); } >/dev/null && {
6245 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6246 test ! -s conftest.err
6247 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248 ac_header_preproc=yes
6249else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006251sed 's/^/| /' conftest.$ac_ext >&5
6252
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253 ac_header_preproc=no
6254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006257{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6258echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006259
6260# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006261case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6262 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006267 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006268 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6272 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6273echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6274 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6275echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6276 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6277echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6278 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6279echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6280 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6281echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006282 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006283## -------------------------------------- ##
6284## Report this to http://bugs.python.org/ ##
6285## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006286_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006287 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006288 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006290{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6291echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006293 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294else
6295 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6296fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006297{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6298echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299
6300fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006301if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302
6303cat >>confdefs.h <<\_ACEOF
6304#define MAJOR_IN_SYSMACROS 1
6305_ACEOF
6306
6307fi
6308
6309
6310 fi
6311fi
6312
Michael W. Hudson54241132001-12-07 15:38:26 +00006313
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006314# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006315
6316for ac_header in term.h
6317do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006318as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6319{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6320echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006321if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006322 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006323else
6324 cat >conftest.$ac_ext <<_ACEOF
6325/* confdefs.h. */
6326_ACEOF
6327cat confdefs.h >>conftest.$ac_ext
6328cat >>conftest.$ac_ext <<_ACEOF
6329/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006330
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006331#ifdef HAVE_CURSES_H
6332#include <curses.h>
6333#endif
6334
6335
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006336#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006337_ACEOF
6338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006339if { (ac_try="$ac_compile"
6340case "(($ac_try" in
6341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6342 *) ac_try_echo=$ac_try;;
6343esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346 ac_status=$?
6347 grep -v '^ *+' conftest.er1 >conftest.err
6348 rm -f conftest.er1
6349 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351 (exit $ac_status); } && {
6352 test -z "$ac_c_werror_flag" ||
6353 test ! -s conftest.err
6354 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006355 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006356else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006357 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358sed 's/^/| /' conftest.$ac_ext >&5
6359
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006360 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362
6363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006364fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006365ac_res=`eval echo '${'$as_ac_Header'}'`
6366 { echo "$as_me:$LINENO: result: $ac_res" >&5
6367echo "${ECHO_T}$ac_res" >&6; }
6368if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006369 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006370#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006371_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006372
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006373fi
6374
6375done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006376
6377
Martin v. Löwis11017b12006-01-14 18:12:57 +00006378# On Linux, netlink.h requires asm/types.h
6379
6380for ac_header in linux/netlink.h
6381do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006382as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6383{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006385if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006386 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006387else
6388 cat >conftest.$ac_ext <<_ACEOF
6389/* confdefs.h. */
6390_ACEOF
6391cat confdefs.h >>conftest.$ac_ext
6392cat >>conftest.$ac_ext <<_ACEOF
6393/* end confdefs.h. */
6394
6395#ifdef HAVE_ASM_TYPES_H
6396#include <asm/types.h>
6397#endif
6398#ifdef HAVE_SYS_SOCKET_H
6399#include <sys/socket.h>
6400#endif
6401
6402
6403#include <$ac_header>
6404_ACEOF
6405rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006406if { (ac_try="$ac_compile"
6407case "(($ac_try" in
6408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6409 *) ac_try_echo=$ac_try;;
6410esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006413 ac_status=$?
6414 grep -v '^ *+' conftest.er1 >conftest.err
6415 rm -f conftest.er1
6416 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418 (exit $ac_status); } && {
6419 test -z "$ac_c_werror_flag" ||
6420 test ! -s conftest.err
6421 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422 eval "$as_ac_Header=yes"
6423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006424 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425sed 's/^/| /' conftest.$ac_ext >&5
6426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006427 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006429
6430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006431fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006432ac_res=`eval echo '${'$as_ac_Header'}'`
6433 { echo "$as_me:$LINENO: result: $ac_res" >&5
6434echo "${ECHO_T}$ac_res" >&6; }
6435if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006437#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438_ACEOF
6439
6440fi
6441
6442done
6443
6444
Guido van Rossum627b2d71993-12-24 10:39:16 +00006445# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006446was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006447{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6448echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006450/* confdefs.h. */
6451_ACEOF
6452cat confdefs.h >>conftest.$ac_ext
6453cat >>conftest.$ac_ext <<_ACEOF
6454/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006455#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006456
6457_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006459 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006460 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461else
Martin v. Löwis11437992002-04-12 09:54:03 +00006462
6463
6464cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006466_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006467
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006468
Guido van Rossum627b2d71993-12-24 10:39:16 +00006469fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00006470rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006471
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006472{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6473echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006474
Neal Norwitz11690112002-07-30 01:08:28 +00006475# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006476{ echo "$as_me:$LINENO: checking for makedev" >&5
6477echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006478cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006479/* confdefs.h. */
6480_ACEOF
6481cat confdefs.h >>conftest.$ac_ext
6482cat >>conftest.$ac_ext <<_ACEOF
6483/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006484#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006485int
6486main ()
6487{
6488 makedev(0, 0)
6489 ;
6490 return 0;
6491}
6492_ACEOF
6493rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006494if { (ac_try="$ac_link"
6495case "(($ac_try" in
6496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6497 *) ac_try_echo=$ac_try;;
6498esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006500 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006502 grep -v '^ *+' conftest.er1 >conftest.err
6503 rm -f conftest.er1
6504 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006506 (exit $ac_status); } && {
6507 test -z "$ac_c_werror_flag" ||
6508 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006509 } && test -s conftest$ac_exeext &&
6510 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006511 ac_cv_has_makedev=yes
6512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006514sed 's/^/| /' conftest.$ac_ext >&5
6515
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006516 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006518
6519rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006520 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006521if test "$ac_cv_has_makedev" = "no"; then
6522 # we didn't link, try if _OSF_SOURCE will allow us to link
6523 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006524/* confdefs.h. */
6525_ACEOF
6526cat confdefs.h >>conftest.$ac_ext
6527cat >>conftest.$ac_ext <<_ACEOF
6528/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006529
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006530#define _OSF_SOURCE 1
6531#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006532
Neal Norwitz11690112002-07-30 01:08:28 +00006533int
6534main ()
6535{
6536 makedev(0, 0)
6537 ;
6538 return 0;
6539}
6540_ACEOF
6541rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006542if { (ac_try="$ac_link"
6543case "(($ac_try" in
6544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6545 *) ac_try_echo=$ac_try;;
6546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006548 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006550 grep -v '^ *+' conftest.er1 >conftest.err
6551 rm -f conftest.er1
6552 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554 (exit $ac_status); } && {
6555 test -z "$ac_c_werror_flag" ||
6556 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006557 } && test -s conftest$ac_exeext &&
6558 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006559 ac_cv_has_makedev=yes
6560else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006562sed 's/^/| /' conftest.$ac_ext >&5
6563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006566
6567rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006568 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006569 if test "$ac_cv_has_makedev" = "yes"; then
6570
6571cat >>confdefs.h <<\_ACEOF
6572#define _OSF_SOURCE 1
6573_ACEOF
6574
6575 fi
6576fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006577{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6578echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006579if test "$ac_cv_has_makedev" = "yes"; then
6580
6581cat >>confdefs.h <<\_ACEOF
6582#define HAVE_MAKEDEV 1
6583_ACEOF
6584
6585fi
6586
Martin v. Löwis399a6892002-10-04 10:22:02 +00006587# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6588# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6589# defined, but the compiler does not support pragma redefine_extname,
6590# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6591# structures (such as rlimit64) without declaring them. As a
6592# work-around, disable LFS on such configurations
6593
6594use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006595{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6596echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006598/* confdefs.h. */
6599_ACEOF
6600cat confdefs.h >>conftest.$ac_ext
6601cat >>conftest.$ac_ext <<_ACEOF
6602/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006603
6604#define _LARGEFILE_SOURCE 1
6605#define _FILE_OFFSET_BITS 64
6606#include <sys/resource.h>
6607
Martin v. Löwis399a6892002-10-04 10:22:02 +00006608int
6609main ()
6610{
6611struct rlimit foo;
6612 ;
6613 return 0;
6614}
6615_ACEOF
6616rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006617if { (ac_try="$ac_compile"
6618case "(($ac_try" in
6619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6620 *) ac_try_echo=$ac_try;;
6621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006625 grep -v '^ *+' conftest.er1 >conftest.err
6626 rm -f conftest.er1
6627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629 (exit $ac_status); } && {
6630 test -z "$ac_c_werror_flag" ||
6631 test ! -s conftest.err
6632 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633 sol_lfs_bug=no
6634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006636sed 's/^/| /' conftest.$ac_ext >&5
6637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006638 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006640
6641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006642{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6643echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006644if test "$sol_lfs_bug" = "yes"; then
6645 use_lfs=no
6646fi
6647
6648if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006649# Two defines needed to enable largefile support on various platforms
6650# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006651
Martin v. Löwis11437992002-04-12 09:54:03 +00006652cat >>confdefs.h <<\_ACEOF
6653#define _LARGEFILE_SOURCE 1
6654_ACEOF
6655
6656
6657cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006658#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006659_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006660
Martin v. Löwis399a6892002-10-04 10:22:02 +00006661fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006662
Guido van Rossum84e7b241996-08-19 21:59:00 +00006663# Add some code to confdefs.h so that the test for off_t works on SCO
6664cat >> confdefs.h <<\EOF
6665#if defined(SCO_DS)
6666#undef _OFF_T
6667#endif
6668EOF
6669
Guido van Rossumef2255b2000-03-10 22:30:29 +00006670# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006671{ echo "$as_me:$LINENO: checking for mode_t" >&5
6672echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006673if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006675else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006676 cat >conftest.$ac_ext <<_ACEOF
6677/* confdefs.h. */
6678_ACEOF
6679cat confdefs.h >>conftest.$ac_ext
6680cat >>conftest.$ac_ext <<_ACEOF
6681/* end confdefs.h. */
6682$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006683typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006684int
6685main ()
6686{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006687if ((ac__type_new_ *) 0)
6688 return 0;
6689if (sizeof (ac__type_new_))
6690 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006691 ;
6692 return 0;
6693}
6694_ACEOF
6695rm -f conftest.$ac_objext
6696if { (ac_try="$ac_compile"
6697case "(($ac_try" in
6698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6699 *) ac_try_echo=$ac_try;;
6700esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006702 (eval "$ac_compile") 2>conftest.er1
6703 ac_status=$?
6704 grep -v '^ *+' conftest.er1 >conftest.err
6705 rm -f conftest.er1
6706 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006708 (exit $ac_status); } && {
6709 test -z "$ac_c_werror_flag" ||
6710 test ! -s conftest.err
6711 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006712 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006713else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006715sed 's/^/| /' conftest.$ac_ext >&5
6716
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006717 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006719
6720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006721fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006722{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6723echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6724if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006725 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006726else
Martin v. Löwis11437992002-04-12 09:54:03 +00006727
6728cat >>confdefs.h <<_ACEOF
6729#define mode_t int
6730_ACEOF
6731
6732fi
6733
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006734{ echo "$as_me:$LINENO: checking for off_t" >&5
6735echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006736if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006737 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006738else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006739 cat >conftest.$ac_ext <<_ACEOF
6740/* confdefs.h. */
6741_ACEOF
6742cat confdefs.h >>conftest.$ac_ext
6743cat >>conftest.$ac_ext <<_ACEOF
6744/* end confdefs.h. */
6745$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006746typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006747int
6748main ()
6749{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006750if ((ac__type_new_ *) 0)
6751 return 0;
6752if (sizeof (ac__type_new_))
6753 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006754 ;
6755 return 0;
6756}
6757_ACEOF
6758rm -f conftest.$ac_objext
6759if { (ac_try="$ac_compile"
6760case "(($ac_try" in
6761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6762 *) ac_try_echo=$ac_try;;
6763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006765 (eval "$ac_compile") 2>conftest.er1
6766 ac_status=$?
6767 grep -v '^ *+' conftest.er1 >conftest.err
6768 rm -f conftest.er1
6769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006771 (exit $ac_status); } && {
6772 test -z "$ac_c_werror_flag" ||
6773 test ! -s conftest.err
6774 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006775 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006776else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006778sed 's/^/| /' conftest.$ac_ext >&5
6779
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006780 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006782
6783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006784fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006785{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6786echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6787if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006788 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006789else
Martin v. Löwis11437992002-04-12 09:54:03 +00006790
6791cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006792#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006793_ACEOF
6794
6795fi
6796
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006797{ echo "$as_me:$LINENO: checking for pid_t" >&5
6798echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006799if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006800 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006801else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006802 cat >conftest.$ac_ext <<_ACEOF
6803/* confdefs.h. */
6804_ACEOF
6805cat confdefs.h >>conftest.$ac_ext
6806cat >>conftest.$ac_ext <<_ACEOF
6807/* end confdefs.h. */
6808$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006809typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006810int
6811main ()
6812{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006813if ((ac__type_new_ *) 0)
6814 return 0;
6815if (sizeof (ac__type_new_))
6816 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006817 ;
6818 return 0;
6819}
6820_ACEOF
6821rm -f conftest.$ac_objext
6822if { (ac_try="$ac_compile"
6823case "(($ac_try" in
6824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6825 *) ac_try_echo=$ac_try;;
6826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006828 (eval "$ac_compile") 2>conftest.er1
6829 ac_status=$?
6830 grep -v '^ *+' conftest.er1 >conftest.err
6831 rm -f conftest.er1
6832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006834 (exit $ac_status); } && {
6835 test -z "$ac_c_werror_flag" ||
6836 test ! -s conftest.err
6837 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006838 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006841sed 's/^/| /' conftest.$ac_ext >&5
6842
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006843 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006845
6846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006847fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006848{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6849echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6850if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006851 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006852else
Martin v. Löwis11437992002-04-12 09:54:03 +00006853
6854cat >>confdefs.h <<_ACEOF
6855#define pid_t int
6856_ACEOF
6857
6858fi
6859
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006860{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6861echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006862if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006863 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006864else
6865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006866/* confdefs.h. */
6867_ACEOF
6868cat confdefs.h >>conftest.$ac_ext
6869cat >>conftest.$ac_ext <<_ACEOF
6870/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006871#include <sys/types.h>
6872#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874int
6875main ()
6876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006877return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006878 ;
6879 return 0;
6880}
6881_ACEOF
6882rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883if { (ac_try="$ac_compile"
6884case "(($ac_try" in
6885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6886 *) ac_try_echo=$ac_try;;
6887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006891 grep -v '^ *+' conftest.er1 >conftest.err
6892 rm -f conftest.er1
6893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895 (exit $ac_status); } && {
6896 test -z "$ac_c_werror_flag" ||
6897 test ! -s conftest.err
6898 } && test -s conftest.$ac_objext; then
6899 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006902sed 's/^/| /' conftest.$ac_ext >&5
6903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006904 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906
6907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006908fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006909{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6910echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006911
Martin v. Löwis11437992002-04-12 09:54:03 +00006912cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006913#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006914_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006915
Michael W. Hudson54241132001-12-07 15:38:26 +00006916
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006917{ echo "$as_me:$LINENO: checking for size_t" >&5
6918echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006919if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006921else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006922 cat >conftest.$ac_ext <<_ACEOF
6923/* confdefs.h. */
6924_ACEOF
6925cat confdefs.h >>conftest.$ac_ext
6926cat >>conftest.$ac_ext <<_ACEOF
6927/* end confdefs.h. */
6928$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006929typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006930int
6931main ()
6932{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006933if ((ac__type_new_ *) 0)
6934 return 0;
6935if (sizeof (ac__type_new_))
6936 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006937 ;
6938 return 0;
6939}
6940_ACEOF
6941rm -f conftest.$ac_objext
6942if { (ac_try="$ac_compile"
6943case "(($ac_try" in
6944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6945 *) ac_try_echo=$ac_try;;
6946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006948 (eval "$ac_compile") 2>conftest.er1
6949 ac_status=$?
6950 grep -v '^ *+' conftest.er1 >conftest.err
6951 rm -f conftest.er1
6952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006954 (exit $ac_status); } && {
6955 test -z "$ac_c_werror_flag" ||
6956 test ! -s conftest.err
6957 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006958 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006959else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006961sed 's/^/| /' conftest.$ac_ext >&5
6962
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006963 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006965
6966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006967fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006968{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6969echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6970if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006971 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972else
Martin v. Löwis11437992002-04-12 09:54:03 +00006973
6974cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006976_ACEOF
6977
6978fi
6979
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006980{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6981echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006982if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006983 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006984else
6985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006986/* confdefs.h. */
6987_ACEOF
6988cat confdefs.h >>conftest.$ac_ext
6989cat >>conftest.$ac_ext <<_ACEOF
6990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006991#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006992
6993_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006995 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996 ac_cv_type_uid_t=yes
6997else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006998 ac_cv_type_uid_t=no
6999fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +00007000rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007001
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007002fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007003{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7004echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007005if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006
Martin v. Löwis11437992002-04-12 09:54:03 +00007007cat >>confdefs.h <<\_ACEOF
7008#define uid_t int
7009_ACEOF
7010
7011
7012cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007013#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007014_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007015
7016fi
7017
Mark Dickinsonbd792642009-03-18 20:06:12 +00007018
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007019 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7020echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007021if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007022 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007023else
7024 ac_cv_c_uint32_t=no
7025 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7026 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7027 cat >conftest.$ac_ext <<_ACEOF
7028/* confdefs.h. */
7029_ACEOF
7030cat confdefs.h >>conftest.$ac_ext
7031cat >>conftest.$ac_ext <<_ACEOF
7032/* end confdefs.h. */
7033$ac_includes_default
7034int
7035main ()
7036{
7037static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7038test_array [0] = 0
7039
7040 ;
7041 return 0;
7042}
7043_ACEOF
7044rm -f conftest.$ac_objext
7045if { (ac_try="$ac_compile"
7046case "(($ac_try" in
7047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7048 *) ac_try_echo=$ac_try;;
7049esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007051 (eval "$ac_compile") 2>conftest.er1
7052 ac_status=$?
7053 grep -v '^ *+' conftest.er1 >conftest.err
7054 rm -f conftest.er1
7055 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007057 (exit $ac_status); } && {
7058 test -z "$ac_c_werror_flag" ||
7059 test ! -s conftest.err
7060 } && test -s conftest.$ac_objext; then
7061 case $ac_type in
7062 uint32_t) ac_cv_c_uint32_t=yes ;;
7063 *) ac_cv_c_uint32_t=$ac_type ;;
7064esac
7065
7066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007067 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007068sed 's/^/| /' conftest.$ac_ext >&5
7069
7070
7071fi
7072
7073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7074 test "$ac_cv_c_uint32_t" != no && break
7075 done
7076fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007077{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7078echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007079 case $ac_cv_c_uint32_t in #(
7080 no|yes) ;; #(
7081 *)
7082
7083cat >>confdefs.h <<\_ACEOF
7084#define _UINT32_T 1
7085_ACEOF
7086
7087
7088cat >>confdefs.h <<_ACEOF
7089#define uint32_t $ac_cv_c_uint32_t
7090_ACEOF
7091;;
7092 esac
7093
7094
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007095 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7096echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007097if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007098 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007099else
7100 ac_cv_c_uint64_t=no
7101 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7102 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7103 cat >conftest.$ac_ext <<_ACEOF
7104/* confdefs.h. */
7105_ACEOF
7106cat confdefs.h >>conftest.$ac_ext
7107cat >>conftest.$ac_ext <<_ACEOF
7108/* end confdefs.h. */
7109$ac_includes_default
7110int
7111main ()
7112{
7113static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7114test_array [0] = 0
7115
7116 ;
7117 return 0;
7118}
7119_ACEOF
7120rm -f conftest.$ac_objext
7121if { (ac_try="$ac_compile"
7122case "(($ac_try" in
7123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7124 *) ac_try_echo=$ac_try;;
7125esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007127 (eval "$ac_compile") 2>conftest.er1
7128 ac_status=$?
7129 grep -v '^ *+' conftest.er1 >conftest.err
7130 rm -f conftest.er1
7131 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007133 (exit $ac_status); } && {
7134 test -z "$ac_c_werror_flag" ||
7135 test ! -s conftest.err
7136 } && test -s conftest.$ac_objext; then
7137 case $ac_type in
7138 uint64_t) ac_cv_c_uint64_t=yes ;;
7139 *) ac_cv_c_uint64_t=$ac_type ;;
7140esac
7141
7142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007143 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007144sed 's/^/| /' conftest.$ac_ext >&5
7145
7146
7147fi
7148
7149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7150 test "$ac_cv_c_uint64_t" != no && break
7151 done
7152fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007153{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7154echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007155 case $ac_cv_c_uint64_t in #(
7156 no|yes) ;; #(
7157 *)
7158
7159cat >>confdefs.h <<\_ACEOF
7160#define _UINT64_T 1
7161_ACEOF
7162
7163
7164cat >>confdefs.h <<_ACEOF
7165#define uint64_t $ac_cv_c_uint64_t
7166_ACEOF
7167;;
7168 esac
7169
7170
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007171 { echo "$as_me:$LINENO: checking for int32_t" >&5
7172echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007173if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007174 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007175else
7176 ac_cv_c_int32_t=no
7177 for ac_type in 'int32_t' 'int' 'long int' \
7178 'long long int' 'short int' 'signed char'; do
7179 cat >conftest.$ac_ext <<_ACEOF
7180/* confdefs.h. */
7181_ACEOF
7182cat confdefs.h >>conftest.$ac_ext
7183cat >>conftest.$ac_ext <<_ACEOF
7184/* end confdefs.h. */
7185$ac_includes_default
7186int
7187main ()
7188{
7189static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7190test_array [0] = 0
7191
7192 ;
7193 return 0;
7194}
7195_ACEOF
7196rm -f conftest.$ac_objext
7197if { (ac_try="$ac_compile"
7198case "(($ac_try" in
7199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7200 *) ac_try_echo=$ac_try;;
7201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007203 (eval "$ac_compile") 2>conftest.er1
7204 ac_status=$?
7205 grep -v '^ *+' conftest.er1 >conftest.err
7206 rm -f conftest.er1
7207 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007209 (exit $ac_status); } && {
7210 test -z "$ac_c_werror_flag" ||
7211 test ! -s conftest.err
7212 } && test -s conftest.$ac_objext; then
7213 cat >conftest.$ac_ext <<_ACEOF
7214/* confdefs.h. */
7215_ACEOF
7216cat confdefs.h >>conftest.$ac_ext
7217cat >>conftest.$ac_ext <<_ACEOF
7218/* end confdefs.h. */
7219$ac_includes_default
7220int
7221main ()
7222{
7223static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007224 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007225test_array [0] = 0
7226
7227 ;
7228 return 0;
7229}
7230_ACEOF
7231rm -f conftest.$ac_objext
7232if { (ac_try="$ac_compile"
7233case "(($ac_try" in
7234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7235 *) ac_try_echo=$ac_try;;
7236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007238 (eval "$ac_compile") 2>conftest.er1
7239 ac_status=$?
7240 grep -v '^ *+' conftest.er1 >conftest.err
7241 rm -f conftest.er1
7242 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007244 (exit $ac_status); } && {
7245 test -z "$ac_c_werror_flag" ||
7246 test ! -s conftest.err
7247 } && test -s conftest.$ac_objext; then
7248 :
7249else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007250 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007251sed 's/^/| /' conftest.$ac_ext >&5
7252
7253 case $ac_type in
7254 int32_t) ac_cv_c_int32_t=yes ;;
7255 *) ac_cv_c_int32_t=$ac_type ;;
7256esac
7257
7258fi
7259
7260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007262 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007263sed 's/^/| /' conftest.$ac_ext >&5
7264
7265
7266fi
7267
7268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7269 test "$ac_cv_c_int32_t" != no && break
7270 done
7271fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007272{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7273echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007274 case $ac_cv_c_int32_t in #(
7275 no|yes) ;; #(
7276 *)
7277
7278cat >>confdefs.h <<_ACEOF
7279#define int32_t $ac_cv_c_int32_t
7280_ACEOF
7281;;
7282 esac
7283
7284
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007285 { echo "$as_me:$LINENO: checking for int64_t" >&5
7286echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007287if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007288 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007289else
7290 ac_cv_c_int64_t=no
7291 for ac_type in 'int64_t' 'int' 'long int' \
7292 'long long int' 'short int' 'signed char'; do
7293 cat >conftest.$ac_ext <<_ACEOF
7294/* confdefs.h. */
7295_ACEOF
7296cat confdefs.h >>conftest.$ac_ext
7297cat >>conftest.$ac_ext <<_ACEOF
7298/* end confdefs.h. */
7299$ac_includes_default
7300int
7301main ()
7302{
7303static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7304test_array [0] = 0
7305
7306 ;
7307 return 0;
7308}
7309_ACEOF
7310rm -f conftest.$ac_objext
7311if { (ac_try="$ac_compile"
7312case "(($ac_try" in
7313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7314 *) ac_try_echo=$ac_try;;
7315esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007317 (eval "$ac_compile") 2>conftest.er1
7318 ac_status=$?
7319 grep -v '^ *+' conftest.er1 >conftest.err
7320 rm -f conftest.er1
7321 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007323 (exit $ac_status); } && {
7324 test -z "$ac_c_werror_flag" ||
7325 test ! -s conftest.err
7326 } && test -s conftest.$ac_objext; then
7327 cat >conftest.$ac_ext <<_ACEOF
7328/* confdefs.h. */
7329_ACEOF
7330cat confdefs.h >>conftest.$ac_ext
7331cat >>conftest.$ac_ext <<_ACEOF
7332/* end confdefs.h. */
7333$ac_includes_default
7334int
7335main ()
7336{
7337static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007338 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007339test_array [0] = 0
7340
7341 ;
7342 return 0;
7343}
7344_ACEOF
7345rm -f conftest.$ac_objext
7346if { (ac_try="$ac_compile"
7347case "(($ac_try" in
7348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7349 *) ac_try_echo=$ac_try;;
7350esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007352 (eval "$ac_compile") 2>conftest.er1
7353 ac_status=$?
7354 grep -v '^ *+' conftest.er1 >conftest.err
7355 rm -f conftest.er1
7356 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007358 (exit $ac_status); } && {
7359 test -z "$ac_c_werror_flag" ||
7360 test ! -s conftest.err
7361 } && test -s conftest.$ac_objext; then
7362 :
7363else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007364 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007365sed 's/^/| /' conftest.$ac_ext >&5
7366
7367 case $ac_type in
7368 int64_t) ac_cv_c_int64_t=yes ;;
7369 *) ac_cv_c_int64_t=$ac_type ;;
7370esac
7371
7372fi
7373
7374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7375else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007376 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007377sed 's/^/| /' conftest.$ac_ext >&5
7378
7379
7380fi
7381
7382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7383 test "$ac_cv_c_int64_t" != no && break
7384 done
7385fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007386{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7387echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007388 case $ac_cv_c_int64_t in #(
7389 no|yes) ;; #(
7390 *)
7391
7392cat >>confdefs.h <<_ACEOF
7393#define int64_t $ac_cv_c_int64_t
7394_ACEOF
7395;;
7396 esac
7397
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007398{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7399echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007400if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007401 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007402else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007403 cat >conftest.$ac_ext <<_ACEOF
7404/* confdefs.h. */
7405_ACEOF
7406cat confdefs.h >>conftest.$ac_ext
7407cat >>conftest.$ac_ext <<_ACEOF
7408/* end confdefs.h. */
7409$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007410typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007411int
7412main ()
7413{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007414if ((ac__type_new_ *) 0)
7415 return 0;
7416if (sizeof (ac__type_new_))
7417 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007418 ;
7419 return 0;
7420}
7421_ACEOF
7422rm -f conftest.$ac_objext
7423if { (ac_try="$ac_compile"
7424case "(($ac_try" in
7425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7426 *) ac_try_echo=$ac_try;;
7427esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007429 (eval "$ac_compile") 2>conftest.er1
7430 ac_status=$?
7431 grep -v '^ *+' conftest.er1 >conftest.err
7432 rm -f conftest.er1
7433 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007435 (exit $ac_status); } && {
7436 test -z "$ac_c_werror_flag" ||
7437 test ! -s conftest.err
7438 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007439 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007441 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007442sed 's/^/| /' conftest.$ac_ext >&5
7443
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007444 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007446
7447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007448fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007449{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7450echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7451if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007452
7453cat >>confdefs.h <<\_ACEOF
7454#define HAVE_SSIZE_T 1
7455_ACEOF
7456
7457fi
7458
Jack Jansendd19cf82001-12-06 22:36:17 +00007459
Michael W. Hudson54241132001-12-07 15:38:26 +00007460# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007461# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007462{ echo "$as_me:$LINENO: checking for int" >&5
7463echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7464if test "${ac_cv_type_int+set}" = set; then
7465 echo $ECHO_N "(cached) $ECHO_C" >&6
7466else
7467 cat >conftest.$ac_ext <<_ACEOF
7468/* confdefs.h. */
7469_ACEOF
7470cat confdefs.h >>conftest.$ac_ext
7471cat >>conftest.$ac_ext <<_ACEOF
7472/* end confdefs.h. */
7473$ac_includes_default
7474typedef int ac__type_new_;
7475int
7476main ()
7477{
7478if ((ac__type_new_ *) 0)
7479 return 0;
7480if (sizeof (ac__type_new_))
7481 return 0;
7482 ;
7483 return 0;
7484}
7485_ACEOF
7486rm -f conftest.$ac_objext
7487if { (ac_try="$ac_compile"
7488case "(($ac_try" in
7489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7490 *) ac_try_echo=$ac_try;;
7491esac
7492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7493 (eval "$ac_compile") 2>conftest.er1
7494 ac_status=$?
7495 grep -v '^ *+' conftest.er1 >conftest.err
7496 rm -f conftest.er1
7497 cat conftest.err >&5
7498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7499 (exit $ac_status); } && {
7500 test -z "$ac_c_werror_flag" ||
7501 test ! -s conftest.err
7502 } && test -s conftest.$ac_objext; then
7503 ac_cv_type_int=yes
7504else
7505 echo "$as_me: failed program was:" >&5
7506sed 's/^/| /' conftest.$ac_ext >&5
7507
7508 ac_cv_type_int=no
7509fi
7510
7511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7512fi
7513{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7514echo "${ECHO_T}$ac_cv_type_int" >&6; }
7515
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007516# The cast to long int works around a bug in the HP C Compiler
7517# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7518# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7519# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007520{ echo "$as_me:$LINENO: checking size of int" >&5
7521echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007522if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007523 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007524else
Martin v. Löwis11437992002-04-12 09:54:03 +00007525 if test "$cross_compiling" = yes; then
7526 # Depending upon the size, compute the lo and hi bounds.
7527cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007528/* confdefs.h. */
7529_ACEOF
7530cat confdefs.h >>conftest.$ac_ext
7531cat >>conftest.$ac_ext <<_ACEOF
7532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007533$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007534 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007535int
7536main ()
7537{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007539test_array [0] = 0
7540
7541 ;
7542 return 0;
7543}
7544_ACEOF
7545rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007546if { (ac_try="$ac_compile"
7547case "(($ac_try" in
7548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7549 *) ac_try_echo=$ac_try;;
7550esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007554 grep -v '^ *+' conftest.er1 >conftest.err
7555 rm -f conftest.er1
7556 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007558 (exit $ac_status); } && {
7559 test -z "$ac_c_werror_flag" ||
7560 test ! -s conftest.err
7561 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007562 ac_lo=0 ac_mid=0
7563 while :; do
7564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007565/* confdefs.h. */
7566_ACEOF
7567cat confdefs.h >>conftest.$ac_ext
7568cat >>conftest.$ac_ext <<_ACEOF
7569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007570$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007571 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007572int
7573main ()
7574{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007576test_array [0] = 0
7577
7578 ;
7579 return 0;
7580}
7581_ACEOF
7582rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007583if { (ac_try="$ac_compile"
7584case "(($ac_try" in
7585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7586 *) ac_try_echo=$ac_try;;
7587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007591 grep -v '^ *+' conftest.er1 >conftest.err
7592 rm -f conftest.er1
7593 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595 (exit $ac_status); } && {
7596 test -z "$ac_c_werror_flag" ||
7597 test ! -s conftest.err
7598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 ac_hi=$ac_mid; break
7600else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007602sed 's/^/| /' conftest.$ac_ext >&5
7603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604 ac_lo=`expr $ac_mid + 1`
7605 if test $ac_lo -le $ac_mid; then
7606 ac_lo= ac_hi=
7607 break
7608 fi
7609 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611
7612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 done
7614else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007616sed 's/^/| /' conftest.$ac_ext >&5
7617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007619/* confdefs.h. */
7620_ACEOF
7621cat confdefs.h >>conftest.$ac_ext
7622cat >>conftest.$ac_ext <<_ACEOF
7623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007624$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007625 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007626int
7627main ()
7628{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007630test_array [0] = 0
7631
7632 ;
7633 return 0;
7634}
7635_ACEOF
7636rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637if { (ac_try="$ac_compile"
7638case "(($ac_try" in
7639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7640 *) ac_try_echo=$ac_try;;
7641esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007645 grep -v '^ *+' conftest.er1 >conftest.err
7646 rm -f conftest.er1
7647 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649 (exit $ac_status); } && {
7650 test -z "$ac_c_werror_flag" ||
7651 test ! -s conftest.err
7652 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007653 ac_hi=-1 ac_mid=-1
7654 while :; do
7655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007656/* confdefs.h. */
7657_ACEOF
7658cat confdefs.h >>conftest.$ac_ext
7659cat >>conftest.$ac_ext <<_ACEOF
7660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007661$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007662 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007663int
7664main ()
7665{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007667test_array [0] = 0
7668
7669 ;
7670 return 0;
7671}
7672_ACEOF
7673rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674if { (ac_try="$ac_compile"
7675case "(($ac_try" in
7676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7677 *) ac_try_echo=$ac_try;;
7678esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007682 grep -v '^ *+' conftest.er1 >conftest.err
7683 rm -f conftest.er1
7684 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686 (exit $ac_status); } && {
7687 test -z "$ac_c_werror_flag" ||
7688 test ! -s conftest.err
7689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 ac_lo=$ac_mid; break
7691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007693sed 's/^/| /' conftest.$ac_ext >&5
7694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695 ac_hi=`expr '(' $ac_mid ')' - 1`
7696 if test $ac_mid -le $ac_hi; then
7697 ac_lo= ac_hi=
7698 break
7699 fi
7700 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702
7703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 done
7705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007707sed 's/^/| /' conftest.$ac_ext >&5
7708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711
7712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714
7715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007716# Binary search between lo and hi bounds.
7717while test "x$ac_lo" != "x$ac_hi"; do
7718 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007720/* confdefs.h. */
7721_ACEOF
7722cat confdefs.h >>conftest.$ac_ext
7723cat >>conftest.$ac_ext <<_ACEOF
7724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007725$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007726 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007727int
7728main ()
7729{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007731test_array [0] = 0
7732
7733 ;
7734 return 0;
7735}
7736_ACEOF
7737rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738if { (ac_try="$ac_compile"
7739case "(($ac_try" in
7740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7741 *) ac_try_echo=$ac_try;;
7742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007746 grep -v '^ *+' conftest.er1 >conftest.err
7747 rm -f conftest.er1
7748 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750 (exit $ac_status); } && {
7751 test -z "$ac_c_werror_flag" ||
7752 test ! -s conftest.err
7753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ac_hi=$ac_mid
7755else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007757sed 's/^/| /' conftest.$ac_ext >&5
7758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761
7762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007763done
7764case $ac_lo in
7765?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007766'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007767 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007768See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007769echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007770See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007771 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772 else
7773 ac_cv_sizeof_int=0
7774 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007775esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007776else
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007778/* confdefs.h. */
7779_ACEOF
7780cat confdefs.h >>conftest.$ac_ext
7781cat >>conftest.$ac_ext <<_ACEOF
7782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007783$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007784 typedef int ac__type_sizeof_;
7785static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7786static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007787#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007788#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007789int
7790main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007791{
Martin v. Löwis11437992002-04-12 09:54:03 +00007792
7793 FILE *f = fopen ("conftest.val", "w");
7794 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007796 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007799 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007801 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 }
7803 else
7804 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007806 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007808 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007811
7812 ;
7813 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007814}
Martin v. Löwis11437992002-04-12 09:54:03 +00007815_ACEOF
7816rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817if { (ac_try="$ac_link"
7818case "(($ac_try" in
7819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7820 *) ac_try_echo=$ac_try;;
7821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827 { (case "(($ac_try" in
7828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7829 *) ac_try_echo=$ac_try;;
7830esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 (exit $ac_status); }; }; then
7836 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007837else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007838 echo "$as_me: program exited with status $ac_status" >&5
7839echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007840sed 's/^/| /' conftest.$ac_ext >&5
7841
Martin v. Löwis11437992002-04-12 09:54:03 +00007842( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007844 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007845See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007846echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007847See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007848 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849 else
7850 ac_cv_sizeof_int=0
7851 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853rm -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 +00007854fi
7855rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007857{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7858echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859
7860
7861
Martin v. Löwis11437992002-04-12 09:54:03 +00007862cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007863#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007864_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007865
7866
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007867{ echo "$as_me:$LINENO: checking for long" >&5
7868echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7869if test "${ac_cv_type_long+set}" = set; then
7870 echo $ECHO_N "(cached) $ECHO_C" >&6
7871else
7872 cat >conftest.$ac_ext <<_ACEOF
7873/* confdefs.h. */
7874_ACEOF
7875cat confdefs.h >>conftest.$ac_ext
7876cat >>conftest.$ac_ext <<_ACEOF
7877/* end confdefs.h. */
7878$ac_includes_default
7879typedef long ac__type_new_;
7880int
7881main ()
7882{
7883if ((ac__type_new_ *) 0)
7884 return 0;
7885if (sizeof (ac__type_new_))
7886 return 0;
7887 ;
7888 return 0;
7889}
7890_ACEOF
7891rm -f conftest.$ac_objext
7892if { (ac_try="$ac_compile"
7893case "(($ac_try" in
7894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7895 *) ac_try_echo=$ac_try;;
7896esac
7897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7898 (eval "$ac_compile") 2>conftest.er1
7899 ac_status=$?
7900 grep -v '^ *+' conftest.er1 >conftest.err
7901 rm -f conftest.er1
7902 cat conftest.err >&5
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); } && {
7905 test -z "$ac_c_werror_flag" ||
7906 test ! -s conftest.err
7907 } && test -s conftest.$ac_objext; then
7908 ac_cv_type_long=yes
7909else
7910 echo "$as_me: failed program was:" >&5
7911sed 's/^/| /' conftest.$ac_ext >&5
7912
7913 ac_cv_type_long=no
7914fi
7915
7916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7917fi
7918{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7919echo "${ECHO_T}$ac_cv_type_long" >&6; }
7920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921# The cast to long int works around a bug in the HP C Compiler
7922# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7923# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7924# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007925{ echo "$as_me:$LINENO: checking size of long" >&5
7926echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007927if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007928 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007929else
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 if test "$cross_compiling" = yes; then
7931 # Depending upon the size, compute the lo and hi bounds.
7932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007933/* confdefs.h. */
7934_ACEOF
7935cat confdefs.h >>conftest.$ac_ext
7936cat >>conftest.$ac_ext <<_ACEOF
7937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007938$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007939 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007940int
7941main ()
7942{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007944test_array [0] = 0
7945
7946 ;
7947 return 0;
7948}
7949_ACEOF
7950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951if { (ac_try="$ac_compile"
7952case "(($ac_try" in
7953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7954 *) ac_try_echo=$ac_try;;
7955esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007959 grep -v '^ *+' conftest.er1 >conftest.err
7960 rm -f conftest.er1
7961 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963 (exit $ac_status); } && {
7964 test -z "$ac_c_werror_flag" ||
7965 test ! -s conftest.err
7966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ac_lo=0 ac_mid=0
7968 while :; do
7969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007970/* confdefs.h. */
7971_ACEOF
7972cat confdefs.h >>conftest.$ac_ext
7973cat >>conftest.$ac_ext <<_ACEOF
7974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007975$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007976 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007977int
7978main ()
7979{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007981test_array [0] = 0
7982
7983 ;
7984 return 0;
7985}
7986_ACEOF
7987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988if { (ac_try="$ac_compile"
7989case "(($ac_try" in
7990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7991 *) ac_try_echo=$ac_try;;
7992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007996 grep -v '^ *+' conftest.er1 >conftest.err
7997 rm -f conftest.er1
7998 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 (exit $ac_status); } && {
8001 test -z "$ac_c_werror_flag" ||
8002 test ! -s conftest.err
8003 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 ac_hi=$ac_mid; break
8005else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008007sed 's/^/| /' conftest.$ac_ext >&5
8008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 ac_lo=`expr $ac_mid + 1`
8010 if test $ac_lo -le $ac_mid; then
8011 ac_lo= ac_hi=
8012 break
8013 fi
8014 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016
8017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 done
8019else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008021sed 's/^/| /' conftest.$ac_ext >&5
8022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008024/* confdefs.h. */
8025_ACEOF
8026cat confdefs.h >>conftest.$ac_ext
8027cat >>conftest.$ac_ext <<_ACEOF
8028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008029$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008030 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008031int
8032main ()
8033{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008034static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008035test_array [0] = 0
8036
8037 ;
8038 return 0;
8039}
8040_ACEOF
8041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042if { (ac_try="$ac_compile"
8043case "(($ac_try" in
8044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8045 *) ac_try_echo=$ac_try;;
8046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008050 grep -v '^ *+' conftest.er1 >conftest.err
8051 rm -f conftest.er1
8052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 (exit $ac_status); } && {
8055 test -z "$ac_c_werror_flag" ||
8056 test ! -s conftest.err
8057 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008058 ac_hi=-1 ac_mid=-1
8059 while :; do
8060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008061/* confdefs.h. */
8062_ACEOF
8063cat confdefs.h >>conftest.$ac_ext
8064cat >>conftest.$ac_ext <<_ACEOF
8065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008066$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008067 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008068int
8069main ()
8070{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008071static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008072test_array [0] = 0
8073
8074 ;
8075 return 0;
8076}
8077_ACEOF
8078rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079if { (ac_try="$ac_compile"
8080case "(($ac_try" in
8081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8082 *) ac_try_echo=$ac_try;;
8083esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008087 grep -v '^ *+' conftest.er1 >conftest.err
8088 rm -f conftest.er1
8089 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091 (exit $ac_status); } && {
8092 test -z "$ac_c_werror_flag" ||
8093 test ! -s conftest.err
8094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ac_lo=$ac_mid; break
8096else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008098sed 's/^/| /' conftest.$ac_ext >&5
8099
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100 ac_hi=`expr '(' $ac_mid ')' - 1`
8101 if test $ac_mid -le $ac_hi; then
8102 ac_lo= ac_hi=
8103 break
8104 fi
8105 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107
8108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 done
8110else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008112sed 's/^/| /' conftest.$ac_ext >&5
8113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116
8117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008119
8120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008121# Binary search between lo and hi bounds.
8122while test "x$ac_lo" != "x$ac_hi"; do
8123 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008125/* confdefs.h. */
8126_ACEOF
8127cat confdefs.h >>conftest.$ac_ext
8128cat >>conftest.$ac_ext <<_ACEOF
8129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008130$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008131 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008132int
8133main ()
8134{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008135static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008136test_array [0] = 0
8137
8138 ;
8139 return 0;
8140}
8141_ACEOF
8142rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008143if { (ac_try="$ac_compile"
8144case "(($ac_try" in
8145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8146 *) ac_try_echo=$ac_try;;
8147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008151 grep -v '^ *+' conftest.er1 >conftest.err
8152 rm -f conftest.er1
8153 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155 (exit $ac_status); } && {
8156 test -z "$ac_c_werror_flag" ||
8157 test ! -s conftest.err
8158 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 ac_hi=$ac_mid
8160else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008162sed 's/^/| /' conftest.$ac_ext >&5
8163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166
8167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008168done
8169case $ac_lo in
8170?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008172 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008173See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008174echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008175See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008176 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177 else
8178 ac_cv_sizeof_long=0
8179 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008180esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008181else
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008183/* confdefs.h. */
8184_ACEOF
8185cat confdefs.h >>conftest.$ac_ext
8186cat >>conftest.$ac_ext <<_ACEOF
8187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008188$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008189 typedef long ac__type_sizeof_;
8190static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8191static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008192#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008193#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008194int
8195main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008196{
Martin v. Löwis11437992002-04-12 09:54:03 +00008197
8198 FILE *f = fopen ("conftest.val", "w");
8199 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008201 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008204 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008206 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 }
8208 else
8209 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008211 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008213 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008216
8217 ;
8218 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008219}
Martin v. Löwis11437992002-04-12 09:54:03 +00008220_ACEOF
8221rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008222if { (ac_try="$ac_link"
8223case "(($ac_try" in
8224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8225 *) ac_try_echo=$ac_try;;
8226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232 { (case "(($ac_try" in
8233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8234 *) ac_try_echo=$ac_try;;
8235esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 (exit $ac_status); }; }; then
8241 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008243 echo "$as_me: program exited with status $ac_status" >&5
8244echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008245sed 's/^/| /' conftest.$ac_ext >&5
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008249 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008250See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008251echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008252See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008253 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 else
8255 ac_cv_sizeof_long=0
8256 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258rm -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 +00008259fi
8260rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008262{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8263echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264
8265
8266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008269_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270
8271
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008272{ echo "$as_me:$LINENO: checking for void *" >&5
8273echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8274if test "${ac_cv_type_void_p+set}" = set; then
8275 echo $ECHO_N "(cached) $ECHO_C" >&6
8276else
8277 cat >conftest.$ac_ext <<_ACEOF
8278/* confdefs.h. */
8279_ACEOF
8280cat confdefs.h >>conftest.$ac_ext
8281cat >>conftest.$ac_ext <<_ACEOF
8282/* end confdefs.h. */
8283$ac_includes_default
8284typedef void * ac__type_new_;
8285int
8286main ()
8287{
8288if ((ac__type_new_ *) 0)
8289 return 0;
8290if (sizeof (ac__type_new_))
8291 return 0;
8292 ;
8293 return 0;
8294}
8295_ACEOF
8296rm -f conftest.$ac_objext
8297if { (ac_try="$ac_compile"
8298case "(($ac_try" in
8299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8300 *) ac_try_echo=$ac_try;;
8301esac
8302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8303 (eval "$ac_compile") 2>conftest.er1
8304 ac_status=$?
8305 grep -v '^ *+' conftest.er1 >conftest.err
8306 rm -f conftest.er1
8307 cat conftest.err >&5
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); } && {
8310 test -z "$ac_c_werror_flag" ||
8311 test ! -s conftest.err
8312 } && test -s conftest.$ac_objext; then
8313 ac_cv_type_void_p=yes
8314else
8315 echo "$as_me: failed program was:" >&5
8316sed 's/^/| /' conftest.$ac_ext >&5
8317
8318 ac_cv_type_void_p=no
8319fi
8320
8321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8322fi
8323{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8324echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008326# The cast to long int works around a bug in the HP C Compiler
8327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8329# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008330{ echo "$as_me:$LINENO: checking size of void *" >&5
8331echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008332if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008333 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008334else
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 if test "$cross_compiling" = yes; then
8336 # Depending upon the size, compute the lo and hi bounds.
8337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008338/* confdefs.h. */
8339_ACEOF
8340cat confdefs.h >>conftest.$ac_ext
8341cat >>conftest.$ac_ext <<_ACEOF
8342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008343$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008344 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008345int
8346main ()
8347{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008348static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008349test_array [0] = 0
8350
8351 ;
8352 return 0;
8353}
8354_ACEOF
8355rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356if { (ac_try="$ac_compile"
8357case "(($ac_try" in
8358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8359 *) ac_try_echo=$ac_try;;
8360esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008364 grep -v '^ *+' conftest.er1 >conftest.err
8365 rm -f conftest.er1
8366 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368 (exit $ac_status); } && {
8369 test -z "$ac_c_werror_flag" ||
8370 test ! -s conftest.err
8371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 ac_lo=0 ac_mid=0
8373 while :; do
8374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008375/* confdefs.h. */
8376_ACEOF
8377cat confdefs.h >>conftest.$ac_ext
8378cat >>conftest.$ac_ext <<_ACEOF
8379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008380$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008381 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008382int
8383main ()
8384{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008386test_array [0] = 0
8387
8388 ;
8389 return 0;
8390}
8391_ACEOF
8392rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393if { (ac_try="$ac_compile"
8394case "(($ac_try" in
8395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8396 *) ac_try_echo=$ac_try;;
8397esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008401 grep -v '^ *+' conftest.er1 >conftest.err
8402 rm -f conftest.er1
8403 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405 (exit $ac_status); } && {
8406 test -z "$ac_c_werror_flag" ||
8407 test ! -s conftest.err
8408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 ac_hi=$ac_mid; break
8410else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008412sed 's/^/| /' conftest.$ac_ext >&5
8413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414 ac_lo=`expr $ac_mid + 1`
8415 if test $ac_lo -le $ac_mid; then
8416 ac_lo= ac_hi=
8417 break
8418 fi
8419 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421
8422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 done
8424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008426sed 's/^/| /' conftest.$ac_ext >&5
8427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008429/* confdefs.h. */
8430_ACEOF
8431cat confdefs.h >>conftest.$ac_ext
8432cat >>conftest.$ac_ext <<_ACEOF
8433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008434$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008435 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008436int
8437main ()
8438{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008439static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008440test_array [0] = 0
8441
8442 ;
8443 return 0;
8444}
8445_ACEOF
8446rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447if { (ac_try="$ac_compile"
8448case "(($ac_try" in
8449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8450 *) ac_try_echo=$ac_try;;
8451esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008455 grep -v '^ *+' conftest.er1 >conftest.err
8456 rm -f conftest.er1
8457 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459 (exit $ac_status); } && {
8460 test -z "$ac_c_werror_flag" ||
8461 test ! -s conftest.err
8462 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 ac_hi=-1 ac_mid=-1
8464 while :; do
8465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008466/* confdefs.h. */
8467_ACEOF
8468cat confdefs.h >>conftest.$ac_ext
8469cat >>conftest.$ac_ext <<_ACEOF
8470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008471$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008472 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008476static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008477test_array [0] = 0
8478
8479 ;
8480 return 0;
8481}
8482_ACEOF
8483rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484if { (ac_try="$ac_compile"
8485case "(($ac_try" in
8486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8487 *) ac_try_echo=$ac_try;;
8488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008492 grep -v '^ *+' conftest.er1 >conftest.err
8493 rm -f conftest.er1
8494 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496 (exit $ac_status); } && {
8497 test -z "$ac_c_werror_flag" ||
8498 test ! -s conftest.err
8499 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 ac_lo=$ac_mid; break
8501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008503sed 's/^/| /' conftest.$ac_ext >&5
8504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505 ac_hi=`expr '(' $ac_mid ')' - 1`
8506 if test $ac_mid -le $ac_hi; then
8507 ac_lo= ac_hi=
8508 break
8509 fi
8510 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512
8513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 done
8515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008517sed 's/^/| /' conftest.$ac_ext >&5
8518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521
8522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524
8525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008526# Binary search between lo and hi bounds.
8527while test "x$ac_lo" != "x$ac_hi"; do
8528 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008530/* confdefs.h. */
8531_ACEOF
8532cat confdefs.h >>conftest.$ac_ext
8533cat >>conftest.$ac_ext <<_ACEOF
8534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008535$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008536 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008537int
8538main ()
8539{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008540static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008541test_array [0] = 0
8542
8543 ;
8544 return 0;
8545}
8546_ACEOF
8547rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548if { (ac_try="$ac_compile"
8549case "(($ac_try" in
8550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8551 *) ac_try_echo=$ac_try;;
8552esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008556 grep -v '^ *+' conftest.er1 >conftest.err
8557 rm -f conftest.er1
8558 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 (exit $ac_status); } && {
8561 test -z "$ac_c_werror_flag" ||
8562 test ! -s conftest.err
8563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 ac_hi=$ac_mid
8565else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008567sed 's/^/| /' conftest.$ac_ext >&5
8568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571
8572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008573done
8574case $ac_lo in
8575?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008577 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008578See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008579echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008580See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008581 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582 else
8583 ac_cv_sizeof_void_p=0
8584 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008585esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008586else
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008588/* confdefs.h. */
8589_ACEOF
8590cat confdefs.h >>conftest.$ac_ext
8591cat >>conftest.$ac_ext <<_ACEOF
8592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008593$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008594 typedef void * ac__type_sizeof_;
8595static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8596static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008597#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008598#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008601{
Martin v. Löwis11437992002-04-12 09:54:03 +00008602
8603 FILE *f = fopen ("conftest.val", "w");
8604 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008606 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008609 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008611 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 }
8613 else
8614 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008616 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008618 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008621
8622 ;
8623 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008624}
Martin v. Löwis11437992002-04-12 09:54:03 +00008625_ACEOF
8626rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627if { (ac_try="$ac_link"
8628case "(($ac_try" in
8629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8630 *) ac_try_echo=$ac_try;;
8631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637 { (case "(($ac_try" in
8638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8639 *) ac_try_echo=$ac_try;;
8640esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 (exit $ac_status); }; }; then
8646 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008647else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008648 echo "$as_me: program exited with status $ac_status" >&5
8649echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008650sed 's/^/| /' conftest.$ac_ext >&5
8651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008654 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008655See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008656echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008657See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008658 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659 else
8660 ac_cv_sizeof_void_p=0
8661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663rm -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 +00008664fi
8665rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008666fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008667{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8668echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669
8670
8671
Martin v. Löwis11437992002-04-12 09:54:03 +00008672cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008673#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008674_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008675
8676
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008677{ echo "$as_me:$LINENO: checking for short" >&5
8678echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8679if test "${ac_cv_type_short+set}" = set; then
8680 echo $ECHO_N "(cached) $ECHO_C" >&6
8681else
8682 cat >conftest.$ac_ext <<_ACEOF
8683/* confdefs.h. */
8684_ACEOF
8685cat confdefs.h >>conftest.$ac_ext
8686cat >>conftest.$ac_ext <<_ACEOF
8687/* end confdefs.h. */
8688$ac_includes_default
8689typedef short ac__type_new_;
8690int
8691main ()
8692{
8693if ((ac__type_new_ *) 0)
8694 return 0;
8695if (sizeof (ac__type_new_))
8696 return 0;
8697 ;
8698 return 0;
8699}
8700_ACEOF
8701rm -f conftest.$ac_objext
8702if { (ac_try="$ac_compile"
8703case "(($ac_try" in
8704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8705 *) ac_try_echo=$ac_try;;
8706esac
8707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8708 (eval "$ac_compile") 2>conftest.er1
8709 ac_status=$?
8710 grep -v '^ *+' conftest.er1 >conftest.err
8711 rm -f conftest.er1
8712 cat conftest.err >&5
8713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8714 (exit $ac_status); } && {
8715 test -z "$ac_c_werror_flag" ||
8716 test ! -s conftest.err
8717 } && test -s conftest.$ac_objext; then
8718 ac_cv_type_short=yes
8719else
8720 echo "$as_me: failed program was:" >&5
8721sed 's/^/| /' conftest.$ac_ext >&5
8722
8723 ac_cv_type_short=no
8724fi
8725
8726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8727fi
8728{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8729echo "${ECHO_T}$ac_cv_type_short" >&6; }
8730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731# The cast to long int works around a bug in the HP C Compiler
8732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8734# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008735{ echo "$as_me:$LINENO: checking size of short" >&5
8736echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008737if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008739else
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 if test "$cross_compiling" = yes; then
8741 # Depending upon the size, compute the lo and hi bounds.
8742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008748$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008749 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008750int
8751main ()
8752{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008754test_array [0] = 0
8755
8756 ;
8757 return 0;
8758}
8759_ACEOF
8760rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761if { (ac_try="$ac_compile"
8762case "(($ac_try" in
8763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8764 *) ac_try_echo=$ac_try;;
8765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008769 grep -v '^ *+' conftest.er1 >conftest.err
8770 rm -f conftest.er1
8771 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773 (exit $ac_status); } && {
8774 test -z "$ac_c_werror_flag" ||
8775 test ! -s conftest.err
8776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ac_lo=0 ac_mid=0
8778 while :; do
8779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* confdefs.h. */
8781_ACEOF
8782cat confdefs.h >>conftest.$ac_ext
8783cat >>conftest.$ac_ext <<_ACEOF
8784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008786 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008787int
8788main ()
8789{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008791test_array [0] = 0
8792
8793 ;
8794 return 0;
8795}
8796_ACEOF
8797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798if { (ac_try="$ac_compile"
8799case "(($ac_try" in
8800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8801 *) ac_try_echo=$ac_try;;
8802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008806 grep -v '^ *+' conftest.er1 >conftest.err
8807 rm -f conftest.er1
8808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810 (exit $ac_status); } && {
8811 test -z "$ac_c_werror_flag" ||
8812 test ! -s conftest.err
8813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_hi=$ac_mid; break
8815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008817sed 's/^/| /' conftest.$ac_ext >&5
8818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819 ac_lo=`expr $ac_mid + 1`
8820 if test $ac_lo -le $ac_mid; then
8821 ac_lo= ac_hi=
8822 break
8823 fi
8824 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826
8827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 done
8829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008831sed 's/^/| /' conftest.$ac_ext >&5
8832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008834/* confdefs.h. */
8835_ACEOF
8836cat confdefs.h >>conftest.$ac_ext
8837cat >>conftest.$ac_ext <<_ACEOF
8838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008839$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008840 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008841int
8842main ()
8843{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008844static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008845test_array [0] = 0
8846
8847 ;
8848 return 0;
8849}
8850_ACEOF
8851rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852if { (ac_try="$ac_compile"
8853case "(($ac_try" in
8854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8855 *) ac_try_echo=$ac_try;;
8856esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008860 grep -v '^ *+' conftest.er1 >conftest.err
8861 rm -f conftest.er1
8862 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864 (exit $ac_status); } && {
8865 test -z "$ac_c_werror_flag" ||
8866 test ! -s conftest.err
8867 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ac_hi=-1 ac_mid=-1
8869 while :; do
8870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008871/* confdefs.h. */
8872_ACEOF
8873cat confdefs.h >>conftest.$ac_ext
8874cat >>conftest.$ac_ext <<_ACEOF
8875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008876$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008877 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008882test_array [0] = 0
8883
8884 ;
8885 return 0;
8886}
8887_ACEOF
8888rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889if { (ac_try="$ac_compile"
8890case "(($ac_try" in
8891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8892 *) ac_try_echo=$ac_try;;
8893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008897 grep -v '^ *+' conftest.er1 >conftest.err
8898 rm -f conftest.er1
8899 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901 (exit $ac_status); } && {
8902 test -z "$ac_c_werror_flag" ||
8903 test ! -s conftest.err
8904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_lo=$ac_mid; break
8906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008908sed 's/^/| /' conftest.$ac_ext >&5
8909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910 ac_hi=`expr '(' $ac_mid ')' - 1`
8911 if test $ac_mid -le $ac_hi; then
8912 ac_lo= ac_hi=
8913 break
8914 fi
8915 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917
8918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 done
8920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008922sed 's/^/| /' conftest.$ac_ext >&5
8923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926
8927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929
8930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008931# Binary search between lo and hi bounds.
8932while test "x$ac_lo" != "x$ac_hi"; do
8933 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008935/* confdefs.h. */
8936_ACEOF
8937cat confdefs.h >>conftest.$ac_ext
8938cat >>conftest.$ac_ext <<_ACEOF
8939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008940$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008941 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008942int
8943main ()
8944{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008946test_array [0] = 0
8947
8948 ;
8949 return 0;
8950}
8951_ACEOF
8952rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953if { (ac_try="$ac_compile"
8954case "(($ac_try" in
8955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8956 *) ac_try_echo=$ac_try;;
8957esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008961 grep -v '^ *+' conftest.er1 >conftest.err
8962 rm -f conftest.er1
8963 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965 (exit $ac_status); } && {
8966 test -z "$ac_c_werror_flag" ||
8967 test ! -s conftest.err
8968 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_hi=$ac_mid
8970else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008972sed 's/^/| /' conftest.$ac_ext >&5
8973
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976
8977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008978done
8979case $ac_lo in
8980?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008981'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008982 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008983See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008984echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008985See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008986 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008987 else
8988 ac_cv_sizeof_short=0
8989 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008990esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008991else
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008993/* confdefs.h. */
8994_ACEOF
8995cat confdefs.h >>conftest.$ac_ext
8996cat >>conftest.$ac_ext <<_ACEOF
8997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008998$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008999 typedef short ac__type_sizeof_;
9000static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9001static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009002#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009003#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009004int
9005main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009006{
Martin v. Löwis11437992002-04-12 09:54:03 +00009007
9008 FILE *f = fopen ("conftest.val", "w");
9009 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009011 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009014 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009016 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 }
9018 else
9019 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009020 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009021 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009023 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009026
9027 ;
9028 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009029}
Martin v. Löwis11437992002-04-12 09:54:03 +00009030_ACEOF
9031rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032if { (ac_try="$ac_link"
9033case "(($ac_try" in
9034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9035 *) ac_try_echo=$ac_try;;
9036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009042 { (case "(($ac_try" in
9043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9044 *) ac_try_echo=$ac_try;;
9045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 (exit $ac_status); }; }; then
9051 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009052else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009053 echo "$as_me: program exited with status $ac_status" >&5
9054echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009055sed 's/^/| /' conftest.$ac_ext >&5
9056
Martin v. Löwis11437992002-04-12 09:54:03 +00009057( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009058if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009059 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009060See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009061echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009062See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009063 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009064 else
9065 ac_cv_sizeof_short=0
9066 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009068rm -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 +00009069fi
9070rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009071fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009072{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9073echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009074
9075
9076
Martin v. Löwis11437992002-04-12 09:54:03 +00009077cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009078#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009079_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009080
9081
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009082{ echo "$as_me:$LINENO: checking for float" >&5
9083echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9084if test "${ac_cv_type_float+set}" = set; then
9085 echo $ECHO_N "(cached) $ECHO_C" >&6
9086else
9087 cat >conftest.$ac_ext <<_ACEOF
9088/* confdefs.h. */
9089_ACEOF
9090cat confdefs.h >>conftest.$ac_ext
9091cat >>conftest.$ac_ext <<_ACEOF
9092/* end confdefs.h. */
9093$ac_includes_default
9094typedef float ac__type_new_;
9095int
9096main ()
9097{
9098if ((ac__type_new_ *) 0)
9099 return 0;
9100if (sizeof (ac__type_new_))
9101 return 0;
9102 ;
9103 return 0;
9104}
9105_ACEOF
9106rm -f conftest.$ac_objext
9107if { (ac_try="$ac_compile"
9108case "(($ac_try" in
9109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9110 *) ac_try_echo=$ac_try;;
9111esac
9112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9113 (eval "$ac_compile") 2>conftest.er1
9114 ac_status=$?
9115 grep -v '^ *+' conftest.er1 >conftest.err
9116 rm -f conftest.er1
9117 cat conftest.err >&5
9118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9119 (exit $ac_status); } && {
9120 test -z "$ac_c_werror_flag" ||
9121 test ! -s conftest.err
9122 } && test -s conftest.$ac_objext; then
9123 ac_cv_type_float=yes
9124else
9125 echo "$as_me: failed program was:" >&5
9126sed 's/^/| /' conftest.$ac_ext >&5
9127
9128 ac_cv_type_float=no
9129fi
9130
9131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9132fi
9133{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9134echo "${ECHO_T}$ac_cv_type_float" >&6; }
9135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136# The cast to long int works around a bug in the HP C Compiler
9137# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9138# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9139# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009140{ echo "$as_me:$LINENO: checking size of float" >&5
9141echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009142if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009144else
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 if test "$cross_compiling" = yes; then
9146 # Depending upon the size, compute the lo and hi bounds.
9147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009148/* confdefs.h. */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009153$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009154 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009155int
9156main ()
9157{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009159test_array [0] = 0
9160
9161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009166if { (ac_try="$ac_compile"
9167case "(($ac_try" in
9168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9169 *) ac_try_echo=$ac_try;;
9170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009174 grep -v '^ *+' conftest.er1 >conftest.err
9175 rm -f conftest.er1
9176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178 (exit $ac_status); } && {
9179 test -z "$ac_c_werror_flag" ||
9180 test ! -s conftest.err
9181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 ac_lo=0 ac_mid=0
9183 while :; do
9184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009185/* confdefs.h. */
9186_ACEOF
9187cat confdefs.h >>conftest.$ac_ext
9188cat >>conftest.$ac_ext <<_ACEOF
9189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009190$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009191 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009192int
9193main ()
9194{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009196test_array [0] = 0
9197
9198 ;
9199 return 0;
9200}
9201_ACEOF
9202rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203if { (ac_try="$ac_compile"
9204case "(($ac_try" in
9205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9206 *) ac_try_echo=$ac_try;;
9207esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009211 grep -v '^ *+' conftest.er1 >conftest.err
9212 rm -f conftest.er1
9213 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215 (exit $ac_status); } && {
9216 test -z "$ac_c_werror_flag" ||
9217 test ! -s conftest.err
9218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 ac_hi=$ac_mid; break
9220else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009222sed 's/^/| /' conftest.$ac_ext >&5
9223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009224 ac_lo=`expr $ac_mid + 1`
9225 if test $ac_lo -le $ac_mid; then
9226 ac_lo= ac_hi=
9227 break
9228 fi
9229 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231
9232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 done
9234else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009236sed 's/^/| /' conftest.$ac_ext >&5
9237
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009239/* confdefs.h. */
9240_ACEOF
9241cat confdefs.h >>conftest.$ac_ext
9242cat >>conftest.$ac_ext <<_ACEOF
9243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009244$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009245 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009246int
9247main ()
9248{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009249static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009250test_array [0] = 0
9251
9252 ;
9253 return 0;
9254}
9255_ACEOF
9256rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009257if { (ac_try="$ac_compile"
9258case "(($ac_try" in
9259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9260 *) ac_try_echo=$ac_try;;
9261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009265 grep -v '^ *+' conftest.er1 >conftest.err
9266 rm -f conftest.er1
9267 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269 (exit $ac_status); } && {
9270 test -z "$ac_c_werror_flag" ||
9271 test ! -s conftest.err
9272 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 ac_hi=-1 ac_mid=-1
9274 while :; do
9275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009276/* confdefs.h. */
9277_ACEOF
9278cat confdefs.h >>conftest.$ac_ext
9279cat >>conftest.$ac_ext <<_ACEOF
9280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009281$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009282 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009283int
9284main ()
9285{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009286static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009287test_array [0] = 0
9288
9289 ;
9290 return 0;
9291}
9292_ACEOF
9293rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009294if { (ac_try="$ac_compile"
9295case "(($ac_try" in
9296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9297 *) ac_try_echo=$ac_try;;
9298esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009300 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009302 grep -v '^ *+' conftest.er1 >conftest.err
9303 rm -f conftest.er1
9304 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306 (exit $ac_status); } && {
9307 test -z "$ac_c_werror_flag" ||
9308 test ! -s conftest.err
9309 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_lo=$ac_mid; break
9311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009313sed 's/^/| /' conftest.$ac_ext >&5
9314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315 ac_hi=`expr '(' $ac_mid ')' - 1`
9316 if test $ac_mid -le $ac_hi; then
9317 ac_lo= ac_hi=
9318 break
9319 fi
9320 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322
9323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 done
9325else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009327sed 's/^/| /' conftest.$ac_ext >&5
9328
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331
9332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009334
9335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009336# Binary search between lo and hi bounds.
9337while test "x$ac_lo" != "x$ac_hi"; do
9338 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009340/* confdefs.h. */
9341_ACEOF
9342cat confdefs.h >>conftest.$ac_ext
9343cat >>conftest.$ac_ext <<_ACEOF
9344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009345$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009346 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009347int
9348main ()
9349{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009351test_array [0] = 0
9352
9353 ;
9354 return 0;
9355}
9356_ACEOF
9357rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358if { (ac_try="$ac_compile"
9359case "(($ac_try" in
9360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9361 *) ac_try_echo=$ac_try;;
9362esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009366 grep -v '^ *+' conftest.er1 >conftest.err
9367 rm -f conftest.er1
9368 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370 (exit $ac_status); } && {
9371 test -z "$ac_c_werror_flag" ||
9372 test ! -s conftest.err
9373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 ac_hi=$ac_mid
9375else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009377sed 's/^/| /' conftest.$ac_ext >&5
9378
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009379 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381
9382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009383done
9384case $ac_lo in
9385?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009386'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009387 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009388See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009389echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009390See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009391 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009392 else
9393 ac_cv_sizeof_float=0
9394 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009395esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009396else
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009398/* confdefs.h. */
9399_ACEOF
9400cat confdefs.h >>conftest.$ac_ext
9401cat >>conftest.$ac_ext <<_ACEOF
9402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009403$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009404 typedef float ac__type_sizeof_;
9405static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9406static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009407#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009408#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009409int
9410main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009411{
Martin v. Löwis11437992002-04-12 09:54:03 +00009412
9413 FILE *f = fopen ("conftest.val", "w");
9414 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009416 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009419 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009421 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 }
9423 else
9424 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009426 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009428 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009431
9432 ;
9433 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009434}
Martin v. Löwis11437992002-04-12 09:54:03 +00009435_ACEOF
9436rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437if { (ac_try="$ac_link"
9438case "(($ac_try" in
9439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9440 *) ac_try_echo=$ac_try;;
9441esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009447 { (case "(($ac_try" in
9448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9449 *) ac_try_echo=$ac_try;;
9450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 (exit $ac_status); }; }; then
9456 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009457else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009458 echo "$as_me: program exited with status $ac_status" >&5
9459echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009460sed 's/^/| /' conftest.$ac_ext >&5
9461
Martin v. Löwis11437992002-04-12 09:54:03 +00009462( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009464 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009465See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009466echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009467See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009468 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469 else
9470 ac_cv_sizeof_float=0
9471 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473rm -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 +00009474fi
9475rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009476fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009477{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9478echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479
9480
9481
Martin v. Löwis11437992002-04-12 09:54:03 +00009482cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009483#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009484_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009485
9486
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009487{ echo "$as_me:$LINENO: checking for double" >&5
9488echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9489if test "${ac_cv_type_double+set}" = set; then
9490 echo $ECHO_N "(cached) $ECHO_C" >&6
9491else
9492 cat >conftest.$ac_ext <<_ACEOF
9493/* confdefs.h. */
9494_ACEOF
9495cat confdefs.h >>conftest.$ac_ext
9496cat >>conftest.$ac_ext <<_ACEOF
9497/* end confdefs.h. */
9498$ac_includes_default
9499typedef double ac__type_new_;
9500int
9501main ()
9502{
9503if ((ac__type_new_ *) 0)
9504 return 0;
9505if (sizeof (ac__type_new_))
9506 return 0;
9507 ;
9508 return 0;
9509}
9510_ACEOF
9511rm -f conftest.$ac_objext
9512if { (ac_try="$ac_compile"
9513case "(($ac_try" in
9514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9515 *) ac_try_echo=$ac_try;;
9516esac
9517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9518 (eval "$ac_compile") 2>conftest.er1
9519 ac_status=$?
9520 grep -v '^ *+' conftest.er1 >conftest.err
9521 rm -f conftest.er1
9522 cat conftest.err >&5
9523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9524 (exit $ac_status); } && {
9525 test -z "$ac_c_werror_flag" ||
9526 test ! -s conftest.err
9527 } && test -s conftest.$ac_objext; then
9528 ac_cv_type_double=yes
9529else
9530 echo "$as_me: failed program was:" >&5
9531sed 's/^/| /' conftest.$ac_ext >&5
9532
9533 ac_cv_type_double=no
9534fi
9535
9536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9537fi
9538{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9539echo "${ECHO_T}$ac_cv_type_double" >&6; }
9540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541# The cast to long int works around a bug in the HP C Compiler
9542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9544# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009545{ echo "$as_me:$LINENO: checking size of double" >&5
9546echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009547if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009549else
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 if test "$cross_compiling" = yes; then
9551 # Depending upon the size, compute the lo and hi bounds.
9552cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009553/* confdefs.h. */
9554_ACEOF
9555cat confdefs.h >>conftest.$ac_ext
9556cat >>conftest.$ac_ext <<_ACEOF
9557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009558$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009559 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009560int
9561main ()
9562{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009564test_array [0] = 0
9565
9566 ;
9567 return 0;
9568}
9569_ACEOF
9570rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571if { (ac_try="$ac_compile"
9572case "(($ac_try" in
9573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9574 *) ac_try_echo=$ac_try;;
9575esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009579 grep -v '^ *+' conftest.er1 >conftest.err
9580 rm -f conftest.er1
9581 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009583 (exit $ac_status); } && {
9584 test -z "$ac_c_werror_flag" ||
9585 test ! -s conftest.err
9586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ac_lo=0 ac_mid=0
9588 while :; do
9589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009590/* confdefs.h. */
9591_ACEOF
9592cat confdefs.h >>conftest.$ac_ext
9593cat >>conftest.$ac_ext <<_ACEOF
9594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009595$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009596 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009597int
9598main ()
9599{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009601test_array [0] = 0
9602
9603 ;
9604 return 0;
9605}
9606_ACEOF
9607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608if { (ac_try="$ac_compile"
9609case "(($ac_try" in
9610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9611 *) ac_try_echo=$ac_try;;
9612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009616 grep -v '^ *+' conftest.er1 >conftest.err
9617 rm -f conftest.er1
9618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 (exit $ac_status); } && {
9621 test -z "$ac_c_werror_flag" ||
9622 test ! -s conftest.err
9623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ac_hi=$ac_mid; break
9625else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009627sed 's/^/| /' conftest.$ac_ext >&5
9628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629 ac_lo=`expr $ac_mid + 1`
9630 if test $ac_lo -le $ac_mid; then
9631 ac_lo= ac_hi=
9632 break
9633 fi
9634 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636
9637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 done
9639else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009641sed 's/^/| /' conftest.$ac_ext >&5
9642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009644/* confdefs.h. */
9645_ACEOF
9646cat confdefs.h >>conftest.$ac_ext
9647cat >>conftest.$ac_ext <<_ACEOF
9648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009649$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009650 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009651int
9652main ()
9653{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009654static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009655test_array [0] = 0
9656
9657 ;
9658 return 0;
9659}
9660_ACEOF
9661rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662if { (ac_try="$ac_compile"
9663case "(($ac_try" in
9664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9665 *) ac_try_echo=$ac_try;;
9666esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009670 grep -v '^ *+' conftest.er1 >conftest.err
9671 rm -f conftest.er1
9672 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674 (exit $ac_status); } && {
9675 test -z "$ac_c_werror_flag" ||
9676 test ! -s conftest.err
9677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 ac_hi=-1 ac_mid=-1
9679 while :; do
9680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* confdefs.h. */
9682_ACEOF
9683cat confdefs.h >>conftest.$ac_ext
9684cat >>conftest.$ac_ext <<_ACEOF
9685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009686$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009687 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009688int
9689main ()
9690{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009691static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009692test_array [0] = 0
9693
9694 ;
9695 return 0;
9696}
9697_ACEOF
9698rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699if { (ac_try="$ac_compile"
9700case "(($ac_try" in
9701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9702 *) ac_try_echo=$ac_try;;
9703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009707 grep -v '^ *+' conftest.er1 >conftest.err
9708 rm -f conftest.er1
9709 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711 (exit $ac_status); } && {
9712 test -z "$ac_c_werror_flag" ||
9713 test ! -s conftest.err
9714 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ac_lo=$ac_mid; break
9716else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009718sed 's/^/| /' conftest.$ac_ext >&5
9719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720 ac_hi=`expr '(' $ac_mid ')' - 1`
9721 if test $ac_mid -le $ac_hi; then
9722 ac_lo= ac_hi=
9723 break
9724 fi
9725 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727
9728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 done
9730else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009732sed 's/^/| /' conftest.$ac_ext >&5
9733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736
9737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739
9740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009741# Binary search between lo and hi bounds.
9742while test "x$ac_lo" != "x$ac_hi"; do
9743 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* confdefs.h. */
9746_ACEOF
9747cat confdefs.h >>conftest.$ac_ext
9748cat >>conftest.$ac_ext <<_ACEOF
9749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009750$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009751 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009752int
9753main ()
9754{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009756test_array [0] = 0
9757
9758 ;
9759 return 0;
9760}
9761_ACEOF
9762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763if { (ac_try="$ac_compile"
9764case "(($ac_try" in
9765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9766 *) ac_try_echo=$ac_try;;
9767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009771 grep -v '^ *+' conftest.er1 >conftest.err
9772 rm -f conftest.er1
9773 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775 (exit $ac_status); } && {
9776 test -z "$ac_c_werror_flag" ||
9777 test ! -s conftest.err
9778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_hi=$ac_mid
9780else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009782sed 's/^/| /' conftest.$ac_ext >&5
9783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786
9787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009788done
9789case $ac_lo in
9790?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009792 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009793See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009794echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009795See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009796 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009797 else
9798 ac_cv_sizeof_double=0
9799 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009800esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009801else
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* confdefs.h. */
9804_ACEOF
9805cat confdefs.h >>conftest.$ac_ext
9806cat >>conftest.$ac_ext <<_ACEOF
9807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009809 typedef double ac__type_sizeof_;
9810static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9811static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009812#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009813#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009814int
9815main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009816{
Martin v. Löwis11437992002-04-12 09:54:03 +00009817
9818 FILE *f = fopen ("conftest.val", "w");
9819 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009821 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009824 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009826 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 }
9828 else
9829 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009831 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009833 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009836
9837 ;
9838 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009839}
Martin v. Löwis11437992002-04-12 09:54:03 +00009840_ACEOF
9841rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842if { (ac_try="$ac_link"
9843case "(($ac_try" in
9844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9845 *) ac_try_echo=$ac_try;;
9846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852 { (case "(($ac_try" in
9853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9854 *) ac_try_echo=$ac_try;;
9855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 (exit $ac_status); }; }; then
9861 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009862else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009863 echo "$as_me: program exited with status $ac_status" >&5
9864echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009865sed 's/^/| /' conftest.$ac_ext >&5
9866
Martin v. Löwis11437992002-04-12 09:54:03 +00009867( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009869 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009870See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009871echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009872See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009873 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874 else
9875 ac_cv_sizeof_double=0
9876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878rm -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 +00009879fi
9880rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009882{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9883echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884
9885
9886
Martin v. Löwis11437992002-04-12 09:54:03 +00009887cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009888#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009889_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009890
9891
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009892{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9893echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9894if test "${ac_cv_type_fpos_t+set}" = set; then
9895 echo $ECHO_N "(cached) $ECHO_C" >&6
9896else
9897 cat >conftest.$ac_ext <<_ACEOF
9898/* confdefs.h. */
9899_ACEOF
9900cat confdefs.h >>conftest.$ac_ext
9901cat >>conftest.$ac_ext <<_ACEOF
9902/* end confdefs.h. */
9903$ac_includes_default
9904typedef fpos_t ac__type_new_;
9905int
9906main ()
9907{
9908if ((ac__type_new_ *) 0)
9909 return 0;
9910if (sizeof (ac__type_new_))
9911 return 0;
9912 ;
9913 return 0;
9914}
9915_ACEOF
9916rm -f conftest.$ac_objext
9917if { (ac_try="$ac_compile"
9918case "(($ac_try" in
9919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9920 *) ac_try_echo=$ac_try;;
9921esac
9922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9923 (eval "$ac_compile") 2>conftest.er1
9924 ac_status=$?
9925 grep -v '^ *+' conftest.er1 >conftest.err
9926 rm -f conftest.er1
9927 cat conftest.err >&5
9928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9929 (exit $ac_status); } && {
9930 test -z "$ac_c_werror_flag" ||
9931 test ! -s conftest.err
9932 } && test -s conftest.$ac_objext; then
9933 ac_cv_type_fpos_t=yes
9934else
9935 echo "$as_me: failed program was:" >&5
9936sed 's/^/| /' conftest.$ac_ext >&5
9937
9938 ac_cv_type_fpos_t=no
9939fi
9940
9941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9942fi
9943{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9944echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009946# The cast to long int works around a bug in the HP C Compiler
9947# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9948# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9949# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009950{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9951echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009952if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009953 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009954else
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 if test "$cross_compiling" = yes; then
9956 # Depending upon the size, compute the lo and hi bounds.
9957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* confdefs.h. */
9959_ACEOF
9960cat confdefs.h >>conftest.$ac_ext
9961cat >>conftest.$ac_ext <<_ACEOF
9962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009963$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009964 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009965int
9966main ()
9967{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009969test_array [0] = 0
9970
9971 ;
9972 return 0;
9973}
9974_ACEOF
9975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009976if { (ac_try="$ac_compile"
9977case "(($ac_try" in
9978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9979 *) ac_try_echo=$ac_try;;
9980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009984 grep -v '^ *+' conftest.er1 >conftest.err
9985 rm -f conftest.er1
9986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009988 (exit $ac_status); } && {
9989 test -z "$ac_c_werror_flag" ||
9990 test ! -s conftest.err
9991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 ac_lo=0 ac_mid=0
9993 while :; do
9994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009995/* confdefs.h. */
9996_ACEOF
9997cat confdefs.h >>conftest.$ac_ext
9998cat >>conftest.$ac_ext <<_ACEOF
9999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010000$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010001 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010002int
10003main ()
10004{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010006test_array [0] = 0
10007
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013if { (ac_try="$ac_compile"
10014case "(($ac_try" in
10015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10016 *) ac_try_echo=$ac_try;;
10017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010021 grep -v '^ *+' conftest.er1 >conftest.err
10022 rm -f conftest.er1
10023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025 (exit $ac_status); } && {
10026 test -z "$ac_c_werror_flag" ||
10027 test ! -s conftest.err
10028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 ac_hi=$ac_mid; break
10030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010032sed 's/^/| /' conftest.$ac_ext >&5
10033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010034 ac_lo=`expr $ac_mid + 1`
10035 if test $ac_lo -le $ac_mid; then
10036 ac_lo= ac_hi=
10037 break
10038 fi
10039 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041
10042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 done
10044else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010046sed 's/^/| /' conftest.$ac_ext >&5
10047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010049/* confdefs.h. */
10050_ACEOF
10051cat confdefs.h >>conftest.$ac_ext
10052cat >>conftest.$ac_ext <<_ACEOF
10053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010054$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010055 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010056int
10057main ()
10058{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010059static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010060test_array [0] = 0
10061
10062 ;
10063 return 0;
10064}
10065_ACEOF
10066rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067if { (ac_try="$ac_compile"
10068case "(($ac_try" in
10069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10070 *) ac_try_echo=$ac_try;;
10071esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010075 grep -v '^ *+' conftest.er1 >conftest.err
10076 rm -f conftest.er1
10077 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079 (exit $ac_status); } && {
10080 test -z "$ac_c_werror_flag" ||
10081 test ! -s conftest.err
10082 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010083 ac_hi=-1 ac_mid=-1
10084 while :; do
10085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010086/* confdefs.h. */
10087_ACEOF
10088cat confdefs.h >>conftest.$ac_ext
10089cat >>conftest.$ac_ext <<_ACEOF
10090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010091$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010092 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010093int
10094main ()
10095{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010096static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010097test_array [0] = 0
10098
10099 ;
10100 return 0;
10101}
10102_ACEOF
10103rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010104if { (ac_try="$ac_compile"
10105case "(($ac_try" in
10106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10107 *) ac_try_echo=$ac_try;;
10108esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010112 grep -v '^ *+' conftest.er1 >conftest.err
10113 rm -f conftest.er1
10114 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116 (exit $ac_status); } && {
10117 test -z "$ac_c_werror_flag" ||
10118 test ! -s conftest.err
10119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_lo=$ac_mid; break
10121else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010123sed 's/^/| /' conftest.$ac_ext >&5
10124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125 ac_hi=`expr '(' $ac_mid ')' - 1`
10126 if test $ac_mid -le $ac_hi; then
10127 ac_lo= ac_hi=
10128 break
10129 fi
10130 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132
10133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 done
10135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010137sed 's/^/| /' conftest.$ac_ext >&5
10138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141
10142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144
10145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010146# Binary search between lo and hi bounds.
10147while test "x$ac_lo" != "x$ac_hi"; do
10148 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010150/* confdefs.h. */
10151_ACEOF
10152cat confdefs.h >>conftest.$ac_ext
10153cat >>conftest.$ac_ext <<_ACEOF
10154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010155$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010156 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010157int
10158main ()
10159{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010161test_array [0] = 0
10162
10163 ;
10164 return 0;
10165}
10166_ACEOF
10167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010168if { (ac_try="$ac_compile"
10169case "(($ac_try" in
10170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10171 *) ac_try_echo=$ac_try;;
10172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010176 grep -v '^ *+' conftest.er1 >conftest.err
10177 rm -f conftest.er1
10178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180 (exit $ac_status); } && {
10181 test -z "$ac_c_werror_flag" ||
10182 test ! -s conftest.err
10183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 ac_hi=$ac_mid
10185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010187sed 's/^/| /' conftest.$ac_ext >&5
10188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010189 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191
10192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010193done
10194case $ac_lo in
10195?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010197 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010198See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010199echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010200See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010201 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202 else
10203 ac_cv_sizeof_fpos_t=0
10204 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010205esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010206else
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010208/* confdefs.h. */
10209_ACEOF
10210cat confdefs.h >>conftest.$ac_ext
10211cat >>conftest.$ac_ext <<_ACEOF
10212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010213$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010214 typedef fpos_t ac__type_sizeof_;
10215static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10216static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010217#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010218#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010219int
10220main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010221{
Martin v. Löwis11437992002-04-12 09:54:03 +000010222
10223 FILE *f = fopen ("conftest.val", "w");
10224 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010225 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010226 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010229 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010231 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 }
10233 else
10234 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010236 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010238 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010241
10242 ;
10243 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010244}
Martin v. Löwis11437992002-04-12 09:54:03 +000010245_ACEOF
10246rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247if { (ac_try="$ac_link"
10248case "(($ac_try" in
10249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10250 *) ac_try_echo=$ac_try;;
10251esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257 { (case "(($ac_try" in
10258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10259 *) ac_try_echo=$ac_try;;
10260esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 (exit $ac_status); }; }; then
10266 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010267else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010268 echo "$as_me: program exited with status $ac_status" >&5
10269echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010270sed 's/^/| /' conftest.$ac_ext >&5
10271
Martin v. Löwis11437992002-04-12 09:54:03 +000010272( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010274 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010275See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010276echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010277See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010278 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279 else
10280 ac_cv_sizeof_fpos_t=0
10281 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010283rm -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 +000010284fi
10285rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010286fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010287{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10288echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289
10290
10291
Martin v. Löwis11437992002-04-12 09:54:03 +000010292cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010293#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010294_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010295
Michael W. Hudson54241132001-12-07 15:38:26 +000010296
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010297{ echo "$as_me:$LINENO: checking for size_t" >&5
10298echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10299if test "${ac_cv_type_size_t+set}" = set; then
10300 echo $ECHO_N "(cached) $ECHO_C" >&6
10301else
10302 cat >conftest.$ac_ext <<_ACEOF
10303/* confdefs.h. */
10304_ACEOF
10305cat confdefs.h >>conftest.$ac_ext
10306cat >>conftest.$ac_ext <<_ACEOF
10307/* end confdefs.h. */
10308$ac_includes_default
10309typedef size_t ac__type_new_;
10310int
10311main ()
10312{
10313if ((ac__type_new_ *) 0)
10314 return 0;
10315if (sizeof (ac__type_new_))
10316 return 0;
10317 ;
10318 return 0;
10319}
10320_ACEOF
10321rm -f conftest.$ac_objext
10322if { (ac_try="$ac_compile"
10323case "(($ac_try" in
10324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10325 *) ac_try_echo=$ac_try;;
10326esac
10327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10328 (eval "$ac_compile") 2>conftest.er1
10329 ac_status=$?
10330 grep -v '^ *+' conftest.er1 >conftest.err
10331 rm -f conftest.er1
10332 cat conftest.err >&5
10333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10334 (exit $ac_status); } && {
10335 test -z "$ac_c_werror_flag" ||
10336 test ! -s conftest.err
10337 } && test -s conftest.$ac_objext; then
10338 ac_cv_type_size_t=yes
10339else
10340 echo "$as_me: failed program was:" >&5
10341sed 's/^/| /' conftest.$ac_ext >&5
10342
10343 ac_cv_type_size_t=no
10344fi
10345
10346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10347fi
10348{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10349echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351# The cast to long int works around a bug in the HP C Compiler
10352# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10353# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10354# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010355{ echo "$as_me:$LINENO: checking size of size_t" >&5
10356echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010357if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010359else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010360 if test "$cross_compiling" = yes; then
10361 # Depending upon the size, compute the lo and hi bounds.
10362cat >conftest.$ac_ext <<_ACEOF
10363/* confdefs.h. */
10364_ACEOF
10365cat confdefs.h >>conftest.$ac_ext
10366cat >>conftest.$ac_ext <<_ACEOF
10367/* end confdefs.h. */
10368$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010369 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010370int
10371main ()
10372{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010374test_array [0] = 0
10375
10376 ;
10377 return 0;
10378}
10379_ACEOF
10380rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010381if { (ac_try="$ac_compile"
10382case "(($ac_try" in
10383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10384 *) ac_try_echo=$ac_try;;
10385esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010388 ac_status=$?
10389 grep -v '^ *+' conftest.er1 >conftest.err
10390 rm -f conftest.er1
10391 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010393 (exit $ac_status); } && {
10394 test -z "$ac_c_werror_flag" ||
10395 test ! -s conftest.err
10396 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010397 ac_lo=0 ac_mid=0
10398 while :; do
10399 cat >conftest.$ac_ext <<_ACEOF
10400/* confdefs.h. */
10401_ACEOF
10402cat confdefs.h >>conftest.$ac_ext
10403cat >>conftest.$ac_ext <<_ACEOF
10404/* end confdefs.h. */
10405$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010406 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010407int
10408main ()
10409{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010411test_array [0] = 0
10412
10413 ;
10414 return 0;
10415}
10416_ACEOF
10417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418if { (ac_try="$ac_compile"
10419case "(($ac_try" in
10420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10421 *) ac_try_echo=$ac_try;;
10422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425 ac_status=$?
10426 grep -v '^ *+' conftest.er1 >conftest.err
10427 rm -f conftest.er1
10428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430 (exit $ac_status); } && {
10431 test -z "$ac_c_werror_flag" ||
10432 test ! -s conftest.err
10433 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434 ac_hi=$ac_mid; break
10435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010436 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010437sed 's/^/| /' conftest.$ac_ext >&5
10438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439 ac_lo=`expr $ac_mid + 1`
10440 if test $ac_lo -le $ac_mid; then
10441 ac_lo= ac_hi=
10442 break
10443 fi
10444 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446
10447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448 done
10449else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010450 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010451sed 's/^/| /' conftest.$ac_ext >&5
10452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010454/* confdefs.h. */
10455_ACEOF
10456cat confdefs.h >>conftest.$ac_ext
10457cat >>conftest.$ac_ext <<_ACEOF
10458/* end confdefs.h. */
10459$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010460 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010461int
10462main ()
10463{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010464static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010465test_array [0] = 0
10466
10467 ;
10468 return 0;
10469}
10470_ACEOF
10471rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010472if { (ac_try="$ac_compile"
10473case "(($ac_try" in
10474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10475 *) ac_try_echo=$ac_try;;
10476esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010479 ac_status=$?
10480 grep -v '^ *+' conftest.er1 >conftest.err
10481 rm -f conftest.er1
10482 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484 (exit $ac_status); } && {
10485 test -z "$ac_c_werror_flag" ||
10486 test ! -s conftest.err
10487 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010488 ac_hi=-1 ac_mid=-1
10489 while :; do
10490 cat >conftest.$ac_ext <<_ACEOF
10491/* confdefs.h. */
10492_ACEOF
10493cat confdefs.h >>conftest.$ac_ext
10494cat >>conftest.$ac_ext <<_ACEOF
10495/* end confdefs.h. */
10496$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010497 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010498int
10499main ()
10500{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010501static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502test_array [0] = 0
10503
10504 ;
10505 return 0;
10506}
10507_ACEOF
10508rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010509if { (ac_try="$ac_compile"
10510case "(($ac_try" in
10511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10512 *) ac_try_echo=$ac_try;;
10513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516 ac_status=$?
10517 grep -v '^ *+' conftest.er1 >conftest.err
10518 rm -f conftest.er1
10519 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521 (exit $ac_status); } && {
10522 test -z "$ac_c_werror_flag" ||
10523 test ! -s conftest.err
10524 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525 ac_lo=$ac_mid; break
10526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010527 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528sed 's/^/| /' conftest.$ac_ext >&5
10529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530 ac_hi=`expr '(' $ac_mid ')' - 1`
10531 if test $ac_mid -le $ac_hi; then
10532 ac_lo= ac_hi=
10533 break
10534 fi
10535 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537
10538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539 done
10540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010541 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010542sed 's/^/| /' conftest.$ac_ext >&5
10543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546
10547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010549
10550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551# Binary search between lo and hi bounds.
10552while test "x$ac_lo" != "x$ac_hi"; do
10553 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10554 cat >conftest.$ac_ext <<_ACEOF
10555/* confdefs.h. */
10556_ACEOF
10557cat confdefs.h >>conftest.$ac_ext
10558cat >>conftest.$ac_ext <<_ACEOF
10559/* end confdefs.h. */
10560$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010561 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562int
10563main ()
10564{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010566test_array [0] = 0
10567
10568 ;
10569 return 0;
10570}
10571_ACEOF
10572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010573if { (ac_try="$ac_compile"
10574case "(($ac_try" in
10575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10576 *) ac_try_echo=$ac_try;;
10577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010580 ac_status=$?
10581 grep -v '^ *+' conftest.er1 >conftest.err
10582 rm -f conftest.er1
10583 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585 (exit $ac_status); } && {
10586 test -z "$ac_c_werror_flag" ||
10587 test ! -s conftest.err
10588 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010589 ac_hi=$ac_mid
10590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010591 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592sed 's/^/| /' conftest.$ac_ext >&5
10593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596
10597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010598done
10599case $ac_lo in
10600?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010601'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010602 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010604echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010606 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010607 else
10608 ac_cv_sizeof_size_t=0
10609 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610esac
10611else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612 cat >conftest.$ac_ext <<_ACEOF
10613/* confdefs.h. */
10614_ACEOF
10615cat confdefs.h >>conftest.$ac_ext
10616cat >>conftest.$ac_ext <<_ACEOF
10617/* end confdefs.h. */
10618$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010619 typedef size_t ac__type_sizeof_;
10620static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10621static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622#include <stdio.h>
10623#include <stdlib.h>
10624int
10625main ()
10626{
10627
10628 FILE *f = fopen ("conftest.val", "w");
10629 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010631 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010632 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010634 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010636 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637 }
10638 else
10639 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010641 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010643 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646
10647 ;
10648 return 0;
10649}
10650_ACEOF
10651rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652if { (ac_try="$ac_link"
10653case "(($ac_try" in
10654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10655 *) ac_try_echo=$ac_try;;
10656esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662 { (case "(($ac_try" in
10663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10664 *) ac_try_echo=$ac_try;;
10665esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670 (exit $ac_status); }; }; then
10671 ac_cv_sizeof_size_t=`cat conftest.val`
10672else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010673 echo "$as_me: program exited with status $ac_status" >&5
10674echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675sed 's/^/| /' conftest.$ac_ext >&5
10676
10677( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010679 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010681echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010683 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684 else
10685 ac_cv_sizeof_size_t=0
10686 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688rm -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 +000010689fi
10690rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010691fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010692{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10693echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010694
10695
10696
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697cat >>confdefs.h <<_ACEOF
10698#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10699_ACEOF
10700
10701
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010702{ echo "$as_me:$LINENO: checking for pid_t" >&5
10703echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10704if test "${ac_cv_type_pid_t+set}" = set; then
10705 echo $ECHO_N "(cached) $ECHO_C" >&6
10706else
10707 cat >conftest.$ac_ext <<_ACEOF
10708/* confdefs.h. */
10709_ACEOF
10710cat confdefs.h >>conftest.$ac_ext
10711cat >>conftest.$ac_ext <<_ACEOF
10712/* end confdefs.h. */
10713$ac_includes_default
10714typedef pid_t ac__type_new_;
10715int
10716main ()
10717{
10718if ((ac__type_new_ *) 0)
10719 return 0;
10720if (sizeof (ac__type_new_))
10721 return 0;
10722 ;
10723 return 0;
10724}
10725_ACEOF
10726rm -f conftest.$ac_objext
10727if { (ac_try="$ac_compile"
10728case "(($ac_try" in
10729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10730 *) ac_try_echo=$ac_try;;
10731esac
10732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10733 (eval "$ac_compile") 2>conftest.er1
10734 ac_status=$?
10735 grep -v '^ *+' conftest.er1 >conftest.err
10736 rm -f conftest.er1
10737 cat conftest.err >&5
10738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10739 (exit $ac_status); } && {
10740 test -z "$ac_c_werror_flag" ||
10741 test ! -s conftest.err
10742 } && test -s conftest.$ac_objext; then
10743 ac_cv_type_pid_t=yes
10744else
10745 echo "$as_me: failed program was:" >&5
10746sed 's/^/| /' conftest.$ac_ext >&5
10747
10748 ac_cv_type_pid_t=no
10749fi
10750
10751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10752fi
10753{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10754echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10755
Christian Heimes400adb02008-02-01 08:12:03 +000010756# The cast to long int works around a bug in the HP C Compiler
10757# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10758# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10759# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010760{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10761echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010762if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010763 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010764else
10765 if test "$cross_compiling" = yes; then
10766 # Depending upon the size, compute the lo and hi bounds.
10767cat >conftest.$ac_ext <<_ACEOF
10768/* confdefs.h. */
10769_ACEOF
10770cat confdefs.h >>conftest.$ac_ext
10771cat >>conftest.$ac_ext <<_ACEOF
10772/* end confdefs.h. */
10773$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010774 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010775int
10776main ()
10777{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010778static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010779test_array [0] = 0
10780
10781 ;
10782 return 0;
10783}
10784_ACEOF
10785rm -f conftest.$ac_objext
10786if { (ac_try="$ac_compile"
10787case "(($ac_try" in
10788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10789 *) ac_try_echo=$ac_try;;
10790esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010792 (eval "$ac_compile") 2>conftest.er1
10793 ac_status=$?
10794 grep -v '^ *+' conftest.er1 >conftest.err
10795 rm -f conftest.er1
10796 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010798 (exit $ac_status); } && {
10799 test -z "$ac_c_werror_flag" ||
10800 test ! -s conftest.err
10801 } && test -s conftest.$ac_objext; then
10802 ac_lo=0 ac_mid=0
10803 while :; do
10804 cat >conftest.$ac_ext <<_ACEOF
10805/* confdefs.h. */
10806_ACEOF
10807cat confdefs.h >>conftest.$ac_ext
10808cat >>conftest.$ac_ext <<_ACEOF
10809/* end confdefs.h. */
10810$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010811 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010812int
10813main ()
10814{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010816test_array [0] = 0
10817
10818 ;
10819 return 0;
10820}
10821_ACEOF
10822rm -f conftest.$ac_objext
10823if { (ac_try="$ac_compile"
10824case "(($ac_try" in
10825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10826 *) ac_try_echo=$ac_try;;
10827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010829 (eval "$ac_compile") 2>conftest.er1
10830 ac_status=$?
10831 grep -v '^ *+' conftest.er1 >conftest.err
10832 rm -f conftest.er1
10833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010835 (exit $ac_status); } && {
10836 test -z "$ac_c_werror_flag" ||
10837 test ! -s conftest.err
10838 } && test -s conftest.$ac_objext; then
10839 ac_hi=$ac_mid; break
10840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010841 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010842sed 's/^/| /' conftest.$ac_ext >&5
10843
10844 ac_lo=`expr $ac_mid + 1`
10845 if test $ac_lo -le $ac_mid; then
10846 ac_lo= ac_hi=
10847 break
10848 fi
10849 ac_mid=`expr 2 '*' $ac_mid + 1`
10850fi
10851
10852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10853 done
10854else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010855 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010856sed 's/^/| /' conftest.$ac_ext >&5
10857
10858 cat >conftest.$ac_ext <<_ACEOF
10859/* confdefs.h. */
10860_ACEOF
10861cat confdefs.h >>conftest.$ac_ext
10862cat >>conftest.$ac_ext <<_ACEOF
10863/* end confdefs.h. */
10864$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010865 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010866int
10867main ()
10868{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010870test_array [0] = 0
10871
10872 ;
10873 return 0;
10874}
10875_ACEOF
10876rm -f conftest.$ac_objext
10877if { (ac_try="$ac_compile"
10878case "(($ac_try" in
10879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10880 *) ac_try_echo=$ac_try;;
10881esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010883 (eval "$ac_compile") 2>conftest.er1
10884 ac_status=$?
10885 grep -v '^ *+' conftest.er1 >conftest.err
10886 rm -f conftest.er1
10887 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010889 (exit $ac_status); } && {
10890 test -z "$ac_c_werror_flag" ||
10891 test ! -s conftest.err
10892 } && test -s conftest.$ac_objext; then
10893 ac_hi=-1 ac_mid=-1
10894 while :; do
10895 cat >conftest.$ac_ext <<_ACEOF
10896/* confdefs.h. */
10897_ACEOF
10898cat confdefs.h >>conftest.$ac_ext
10899cat >>conftest.$ac_ext <<_ACEOF
10900/* end confdefs.h. */
10901$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010902 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010903int
10904main ()
10905{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010906static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010907test_array [0] = 0
10908
10909 ;
10910 return 0;
10911}
10912_ACEOF
10913rm -f conftest.$ac_objext
10914if { (ac_try="$ac_compile"
10915case "(($ac_try" in
10916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10917 *) ac_try_echo=$ac_try;;
10918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010920 (eval "$ac_compile") 2>conftest.er1
10921 ac_status=$?
10922 grep -v '^ *+' conftest.er1 >conftest.err
10923 rm -f conftest.er1
10924 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010926 (exit $ac_status); } && {
10927 test -z "$ac_c_werror_flag" ||
10928 test ! -s conftest.err
10929 } && test -s conftest.$ac_objext; then
10930 ac_lo=$ac_mid; break
10931else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010932 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010933sed 's/^/| /' conftest.$ac_ext >&5
10934
10935 ac_hi=`expr '(' $ac_mid ')' - 1`
10936 if test $ac_mid -le $ac_hi; then
10937 ac_lo= ac_hi=
10938 break
10939 fi
10940 ac_mid=`expr 2 '*' $ac_mid`
10941fi
10942
10943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10944 done
10945else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010946 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010947sed 's/^/| /' conftest.$ac_ext >&5
10948
10949 ac_lo= ac_hi=
10950fi
10951
10952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10953fi
10954
10955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10956# Binary search between lo and hi bounds.
10957while test "x$ac_lo" != "x$ac_hi"; do
10958 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10959 cat >conftest.$ac_ext <<_ACEOF
10960/* confdefs.h. */
10961_ACEOF
10962cat confdefs.h >>conftest.$ac_ext
10963cat >>conftest.$ac_ext <<_ACEOF
10964/* end confdefs.h. */
10965$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010966 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010967int
10968main ()
10969{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010970static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010971test_array [0] = 0
10972
10973 ;
10974 return 0;
10975}
10976_ACEOF
10977rm -f conftest.$ac_objext
10978if { (ac_try="$ac_compile"
10979case "(($ac_try" in
10980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10981 *) ac_try_echo=$ac_try;;
10982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010984 (eval "$ac_compile") 2>conftest.er1
10985 ac_status=$?
10986 grep -v '^ *+' conftest.er1 >conftest.err
10987 rm -f conftest.er1
10988 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010990 (exit $ac_status); } && {
10991 test -z "$ac_c_werror_flag" ||
10992 test ! -s conftest.err
10993 } && test -s conftest.$ac_objext; then
10994 ac_hi=$ac_mid
10995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010996 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010997sed 's/^/| /' conftest.$ac_ext >&5
10998
10999 ac_lo=`expr '(' $ac_mid ')' + 1`
11000fi
11001
11002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11003done
11004case $ac_lo in
11005?*) ac_cv_sizeof_pid_t=$ac_lo;;
11006'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011007 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011008See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011009echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011010See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011011 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011012 else
11013 ac_cv_sizeof_pid_t=0
11014 fi ;;
11015esac
11016else
11017 cat >conftest.$ac_ext <<_ACEOF
11018/* confdefs.h. */
11019_ACEOF
11020cat confdefs.h >>conftest.$ac_ext
11021cat >>conftest.$ac_ext <<_ACEOF
11022/* end confdefs.h. */
11023$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011024 typedef pid_t ac__type_sizeof_;
11025static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11026static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011027#include <stdio.h>
11028#include <stdlib.h>
11029int
11030main ()
11031{
11032
11033 FILE *f = fopen ("conftest.val", "w");
11034 if (! f)
11035 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011036 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011037 {
11038 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011039 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011040 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011041 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011042 }
11043 else
11044 {
11045 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011046 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011047 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011048 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011049 }
11050 return ferror (f) || fclose (f) != 0;
11051
11052 ;
11053 return 0;
11054}
11055_ACEOF
11056rm -f conftest$ac_exeext
11057if { (ac_try="$ac_link"
11058case "(($ac_try" in
11059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11060 *) ac_try_echo=$ac_try;;
11061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011063 (eval "$ac_link") 2>&5
11064 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11067 { (case "(($ac_try" in
11068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11069 *) ac_try_echo=$ac_try;;
11070esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011072 (eval "$ac_try") 2>&5
11073 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011075 (exit $ac_status); }; }; then
11076 ac_cv_sizeof_pid_t=`cat conftest.val`
11077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011078 echo "$as_me: program exited with status $ac_status" >&5
11079echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011080sed 's/^/| /' conftest.$ac_ext >&5
11081
11082( exit $ac_status )
11083if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011084 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011085See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011086echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011087See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011088 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011089 else
11090 ac_cv_sizeof_pid_t=0
11091 fi
11092fi
11093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11094fi
11095rm -f conftest.val
11096fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011097{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11098echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011099
11100
11101
11102cat >>confdefs.h <<_ACEOF
11103#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11104_ACEOF
11105
11106
Michael W. Hudson54241132001-12-07 15:38:26 +000011107
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011108{ echo "$as_me:$LINENO: checking for long long support" >&5
11109echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011110have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011112/* confdefs.h. */
11113_ACEOF
11114cat confdefs.h >>conftest.$ac_ext
11115cat >>conftest.$ac_ext <<_ACEOF
11116/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011117
Martin v. Löwis11437992002-04-12 09:54:03 +000011118int
11119main ()
11120{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011121long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 ;
11123 return 0;
11124}
11125_ACEOF
11126rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127if { (ac_try="$ac_compile"
11128case "(($ac_try" in
11129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11130 *) ac_try_echo=$ac_try;;
11131esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011135 grep -v '^ *+' conftest.er1 >conftest.err
11136 rm -f conftest.er1
11137 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139 (exit $ac_status); } && {
11140 test -z "$ac_c_werror_flag" ||
11141 test ! -s conftest.err
11142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
11144
11145cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011146#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011147_ACEOF
11148
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011149 have_long_long=yes
11150
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011151else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011153sed 's/^/| /' conftest.$ac_ext >&5
11154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011157
11158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011159{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11160echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011161if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011162{ echo "$as_me:$LINENO: checking for long long" >&5
11163echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11164if test "${ac_cv_type_long_long+set}" = set; then
11165 echo $ECHO_N "(cached) $ECHO_C" >&6
11166else
11167 cat >conftest.$ac_ext <<_ACEOF
11168/* confdefs.h. */
11169_ACEOF
11170cat confdefs.h >>conftest.$ac_ext
11171cat >>conftest.$ac_ext <<_ACEOF
11172/* end confdefs.h. */
11173$ac_includes_default
11174typedef long long ac__type_new_;
11175int
11176main ()
11177{
11178if ((ac__type_new_ *) 0)
11179 return 0;
11180if (sizeof (ac__type_new_))
11181 return 0;
11182 ;
11183 return 0;
11184}
11185_ACEOF
11186rm -f conftest.$ac_objext
11187if { (ac_try="$ac_compile"
11188case "(($ac_try" in
11189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11190 *) ac_try_echo=$ac_try;;
11191esac
11192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11193 (eval "$ac_compile") 2>conftest.er1
11194 ac_status=$?
11195 grep -v '^ *+' conftest.er1 >conftest.err
11196 rm -f conftest.er1
11197 cat conftest.err >&5
11198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11199 (exit $ac_status); } && {
11200 test -z "$ac_c_werror_flag" ||
11201 test ! -s conftest.err
11202 } && test -s conftest.$ac_objext; then
11203 ac_cv_type_long_long=yes
11204else
11205 echo "$as_me: failed program was:" >&5
11206sed 's/^/| /' conftest.$ac_ext >&5
11207
11208 ac_cv_type_long_long=no
11209fi
11210
11211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11212fi
11213{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11214echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216# The cast to long int works around a bug in the HP C Compiler
11217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11219# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011220{ echo "$as_me:$LINENO: checking size of long long" >&5
11221echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011222if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011223 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011224else
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 if test "$cross_compiling" = yes; then
11226 # Depending upon the size, compute the lo and hi bounds.
11227cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011228/* confdefs.h. */
11229_ACEOF
11230cat confdefs.h >>conftest.$ac_ext
11231cat >>conftest.$ac_ext <<_ACEOF
11232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011233$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011234 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011235int
11236main ()
11237{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011238static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011239test_array [0] = 0
11240
11241 ;
11242 return 0;
11243}
11244_ACEOF
11245rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011246if { (ac_try="$ac_compile"
11247case "(($ac_try" in
11248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11249 *) ac_try_echo=$ac_try;;
11250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011254 grep -v '^ *+' conftest.er1 >conftest.err
11255 rm -f conftest.er1
11256 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258 (exit $ac_status); } && {
11259 test -z "$ac_c_werror_flag" ||
11260 test ! -s conftest.err
11261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 ac_lo=0 ac_mid=0
11263 while :; do
11264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011265/* confdefs.h. */
11266_ACEOF
11267cat confdefs.h >>conftest.$ac_ext
11268cat >>conftest.$ac_ext <<_ACEOF
11269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011270$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011271 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011272int
11273main ()
11274{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011276test_array [0] = 0
11277
11278 ;
11279 return 0;
11280}
11281_ACEOF
11282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011283if { (ac_try="$ac_compile"
11284case "(($ac_try" in
11285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11286 *) ac_try_echo=$ac_try;;
11287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011291 grep -v '^ *+' conftest.er1 >conftest.err
11292 rm -f conftest.er1
11293 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295 (exit $ac_status); } && {
11296 test -z "$ac_c_werror_flag" ||
11297 test ! -s conftest.err
11298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 ac_hi=$ac_mid; break
11300else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011302sed 's/^/| /' conftest.$ac_ext >&5
11303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304 ac_lo=`expr $ac_mid + 1`
11305 if test $ac_lo -le $ac_mid; then
11306 ac_lo= ac_hi=
11307 break
11308 fi
11309 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311
11312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 done
11314else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011316sed 's/^/| /' conftest.$ac_ext >&5
11317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011319/* confdefs.h. */
11320_ACEOF
11321cat confdefs.h >>conftest.$ac_ext
11322cat >>conftest.$ac_ext <<_ACEOF
11323/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011324$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011325 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011326int
11327main ()
11328{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011329static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011330test_array [0] = 0
11331
11332 ;
11333 return 0;
11334}
11335_ACEOF
11336rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011337if { (ac_try="$ac_compile"
11338case "(($ac_try" in
11339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11340 *) ac_try_echo=$ac_try;;
11341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011345 grep -v '^ *+' conftest.er1 >conftest.err
11346 rm -f conftest.er1
11347 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011349 (exit $ac_status); } && {
11350 test -z "$ac_c_werror_flag" ||
11351 test ! -s conftest.err
11352 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 ac_hi=-1 ac_mid=-1
11354 while :; do
11355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011356/* confdefs.h. */
11357_ACEOF
11358cat confdefs.h >>conftest.$ac_ext
11359cat >>conftest.$ac_ext <<_ACEOF
11360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011361$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011362 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011363int
11364main ()
11365{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011366static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011367test_array [0] = 0
11368
11369 ;
11370 return 0;
11371}
11372_ACEOF
11373rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011374if { (ac_try="$ac_compile"
11375case "(($ac_try" in
11376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11377 *) ac_try_echo=$ac_try;;
11378esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011382 grep -v '^ *+' conftest.er1 >conftest.err
11383 rm -f conftest.er1
11384 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386 (exit $ac_status); } && {
11387 test -z "$ac_c_werror_flag" ||
11388 test ! -s conftest.err
11389 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 ac_lo=$ac_mid; break
11391else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011393sed 's/^/| /' conftest.$ac_ext >&5
11394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395 ac_hi=`expr '(' $ac_mid ')' - 1`
11396 if test $ac_mid -le $ac_hi; then
11397 ac_lo= ac_hi=
11398 break
11399 fi
11400 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402
11403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 done
11405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011407sed 's/^/| /' conftest.$ac_ext >&5
11408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411
11412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414
11415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011416# Binary search between lo and hi bounds.
11417while test "x$ac_lo" != "x$ac_hi"; do
11418 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* confdefs.h. */
11421_ACEOF
11422cat confdefs.h >>conftest.$ac_ext
11423cat >>conftest.$ac_ext <<_ACEOF
11424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011425$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011426 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011427int
11428main ()
11429{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011431test_array [0] = 0
11432
11433 ;
11434 return 0;
11435}
11436_ACEOF
11437rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438if { (ac_try="$ac_compile"
11439case "(($ac_try" in
11440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11441 *) ac_try_echo=$ac_try;;
11442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011446 grep -v '^ *+' conftest.er1 >conftest.err
11447 rm -f conftest.er1
11448 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450 (exit $ac_status); } && {
11451 test -z "$ac_c_werror_flag" ||
11452 test ! -s conftest.err
11453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ac_hi=$ac_mid
11455else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011457sed 's/^/| /' conftest.$ac_ext >&5
11458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461
11462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011463done
11464case $ac_lo in
11465?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011467 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011468See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011469echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011470See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011471 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011472 else
11473 ac_cv_sizeof_long_long=0
11474 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011475esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011476else
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011478/* confdefs.h. */
11479_ACEOF
11480cat confdefs.h >>conftest.$ac_ext
11481cat >>conftest.$ac_ext <<_ACEOF
11482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011483$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011484 typedef long long ac__type_sizeof_;
11485static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11486static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011487#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011488#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011489int
11490main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011491{
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
11493 FILE *f = fopen ("conftest.val", "w");
11494 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011496 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011499 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011501 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 }
11503 else
11504 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011506 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011508 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011511
11512 ;
11513 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011514}
Martin v. Löwis11437992002-04-12 09:54:03 +000011515_ACEOF
11516rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011517if { (ac_try="$ac_link"
11518case "(($ac_try" in
11519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11520 *) ac_try_echo=$ac_try;;
11521esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527 { (case "(($ac_try" in
11528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11529 *) ac_try_echo=$ac_try;;
11530esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 (exit $ac_status); }; }; then
11536 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011538 echo "$as_me: program exited with status $ac_status" >&5
11539echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011540sed 's/^/| /' conftest.$ac_ext >&5
11541
Martin v. Löwis11437992002-04-12 09:54:03 +000011542( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011544 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011545See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011546echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011547See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011548 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011549 else
11550 ac_cv_sizeof_long_long=0
11551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553rm -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 +000011554fi
11555rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011557{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11558echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011559
11560
11561
Martin v. Löwis11437992002-04-12 09:54:03 +000011562cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011563#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011564_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565
Michael W. Hudson54241132001-12-07 15:38:26 +000011566
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011567fi
11568
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011569{ echo "$as_me:$LINENO: checking for long double support" >&5
11570echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011571have_long_double=no
11572cat >conftest.$ac_ext <<_ACEOF
11573/* confdefs.h. */
11574_ACEOF
11575cat confdefs.h >>conftest.$ac_ext
11576cat >>conftest.$ac_ext <<_ACEOF
11577/* end confdefs.h. */
11578
11579int
11580main ()
11581{
11582long double x; x = (long double)0;
11583 ;
11584 return 0;
11585}
11586_ACEOF
11587rm -f conftest.$ac_objext
11588if { (ac_try="$ac_compile"
11589case "(($ac_try" in
11590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11591 *) ac_try_echo=$ac_try;;
11592esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011594 (eval "$ac_compile") 2>conftest.er1
11595 ac_status=$?
11596 grep -v '^ *+' conftest.er1 >conftest.err
11597 rm -f conftest.er1
11598 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011600 (exit $ac_status); } && {
11601 test -z "$ac_c_werror_flag" ||
11602 test ! -s conftest.err
11603 } && test -s conftest.$ac_objext; then
11604
11605
11606cat >>confdefs.h <<\_ACEOF
11607#define HAVE_LONG_DOUBLE 1
11608_ACEOF
11609
11610 have_long_double=yes
11611
11612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011613 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011614sed 's/^/| /' conftest.$ac_ext >&5
11615
11616
11617fi
11618
11619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011620{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11621echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011622if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011623{ echo "$as_me:$LINENO: checking for long double" >&5
11624echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11625if test "${ac_cv_type_long_double+set}" = set; then
11626 echo $ECHO_N "(cached) $ECHO_C" >&6
11627else
11628 cat >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$ac_includes_default
11635typedef long double ac__type_new_;
11636int
11637main ()
11638{
11639if ((ac__type_new_ *) 0)
11640 return 0;
11641if (sizeof (ac__type_new_))
11642 return 0;
11643 ;
11644 return 0;
11645}
11646_ACEOF
11647rm -f conftest.$ac_objext
11648if { (ac_try="$ac_compile"
11649case "(($ac_try" in
11650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11651 *) ac_try_echo=$ac_try;;
11652esac
11653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11654 (eval "$ac_compile") 2>conftest.er1
11655 ac_status=$?
11656 grep -v '^ *+' conftest.er1 >conftest.err
11657 rm -f conftest.er1
11658 cat conftest.err >&5
11659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11660 (exit $ac_status); } && {
11661 test -z "$ac_c_werror_flag" ||
11662 test ! -s conftest.err
11663 } && test -s conftest.$ac_objext; then
11664 ac_cv_type_long_double=yes
11665else
11666 echo "$as_me: failed program was:" >&5
11667sed 's/^/| /' conftest.$ac_ext >&5
11668
11669 ac_cv_type_long_double=no
11670fi
11671
11672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11673fi
11674{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11675echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11676
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011677# The cast to long int works around a bug in the HP C Compiler
11678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11680# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011681{ echo "$as_me:$LINENO: checking size of long double" >&5
11682echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011683if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011684 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011685else
11686 if test "$cross_compiling" = yes; then
11687 # Depending upon the size, compute the lo and hi bounds.
11688cat >conftest.$ac_ext <<_ACEOF
11689/* confdefs.h. */
11690_ACEOF
11691cat confdefs.h >>conftest.$ac_ext
11692cat >>conftest.$ac_ext <<_ACEOF
11693/* end confdefs.h. */
11694$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011695 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011696int
11697main ()
11698{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011700test_array [0] = 0
11701
11702 ;
11703 return 0;
11704}
11705_ACEOF
11706rm -f conftest.$ac_objext
11707if { (ac_try="$ac_compile"
11708case "(($ac_try" in
11709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11710 *) ac_try_echo=$ac_try;;
11711esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011713 (eval "$ac_compile") 2>conftest.er1
11714 ac_status=$?
11715 grep -v '^ *+' conftest.er1 >conftest.err
11716 rm -f conftest.er1
11717 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011719 (exit $ac_status); } && {
11720 test -z "$ac_c_werror_flag" ||
11721 test ! -s conftest.err
11722 } && test -s conftest.$ac_objext; then
11723 ac_lo=0 ac_mid=0
11724 while :; do
11725 cat >conftest.$ac_ext <<_ACEOF
11726/* confdefs.h. */
11727_ACEOF
11728cat confdefs.h >>conftest.$ac_ext
11729cat >>conftest.$ac_ext <<_ACEOF
11730/* end confdefs.h. */
11731$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011732 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011733int
11734main ()
11735{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011736static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011737test_array [0] = 0
11738
11739 ;
11740 return 0;
11741}
11742_ACEOF
11743rm -f conftest.$ac_objext
11744if { (ac_try="$ac_compile"
11745case "(($ac_try" in
11746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11747 *) ac_try_echo=$ac_try;;
11748esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011750 (eval "$ac_compile") 2>conftest.er1
11751 ac_status=$?
11752 grep -v '^ *+' conftest.er1 >conftest.err
11753 rm -f conftest.er1
11754 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011756 (exit $ac_status); } && {
11757 test -z "$ac_c_werror_flag" ||
11758 test ! -s conftest.err
11759 } && test -s conftest.$ac_objext; then
11760 ac_hi=$ac_mid; break
11761else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011762 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011763sed 's/^/| /' conftest.$ac_ext >&5
11764
11765 ac_lo=`expr $ac_mid + 1`
11766 if test $ac_lo -le $ac_mid; then
11767 ac_lo= ac_hi=
11768 break
11769 fi
11770 ac_mid=`expr 2 '*' $ac_mid + 1`
11771fi
11772
11773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11774 done
11775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011776 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011777sed 's/^/| /' conftest.$ac_ext >&5
11778
11779 cat >conftest.$ac_ext <<_ACEOF
11780/* confdefs.h. */
11781_ACEOF
11782cat confdefs.h >>conftest.$ac_ext
11783cat >>conftest.$ac_ext <<_ACEOF
11784/* end confdefs.h. */
11785$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011786 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011787int
11788main ()
11789{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011791test_array [0] = 0
11792
11793 ;
11794 return 0;
11795}
11796_ACEOF
11797rm -f conftest.$ac_objext
11798if { (ac_try="$ac_compile"
11799case "(($ac_try" in
11800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11801 *) ac_try_echo=$ac_try;;
11802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011804 (eval "$ac_compile") 2>conftest.er1
11805 ac_status=$?
11806 grep -v '^ *+' conftest.er1 >conftest.err
11807 rm -f conftest.er1
11808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011810 (exit $ac_status); } && {
11811 test -z "$ac_c_werror_flag" ||
11812 test ! -s conftest.err
11813 } && test -s conftest.$ac_objext; then
11814 ac_hi=-1 ac_mid=-1
11815 while :; do
11816 cat >conftest.$ac_ext <<_ACEOF
11817/* confdefs.h. */
11818_ACEOF
11819cat confdefs.h >>conftest.$ac_ext
11820cat >>conftest.$ac_ext <<_ACEOF
11821/* end confdefs.h. */
11822$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011823 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011824int
11825main ()
11826{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011828test_array [0] = 0
11829
11830 ;
11831 return 0;
11832}
11833_ACEOF
11834rm -f conftest.$ac_objext
11835if { (ac_try="$ac_compile"
11836case "(($ac_try" in
11837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11838 *) ac_try_echo=$ac_try;;
11839esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011841 (eval "$ac_compile") 2>conftest.er1
11842 ac_status=$?
11843 grep -v '^ *+' conftest.er1 >conftest.err
11844 rm -f conftest.er1
11845 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011847 (exit $ac_status); } && {
11848 test -z "$ac_c_werror_flag" ||
11849 test ! -s conftest.err
11850 } && test -s conftest.$ac_objext; then
11851 ac_lo=$ac_mid; break
11852else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011853 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011854sed 's/^/| /' conftest.$ac_ext >&5
11855
11856 ac_hi=`expr '(' $ac_mid ')' - 1`
11857 if test $ac_mid -le $ac_hi; then
11858 ac_lo= ac_hi=
11859 break
11860 fi
11861 ac_mid=`expr 2 '*' $ac_mid`
11862fi
11863
11864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11865 done
11866else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011867 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011868sed 's/^/| /' conftest.$ac_ext >&5
11869
11870 ac_lo= ac_hi=
11871fi
11872
11873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11874fi
11875
11876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877# Binary search between lo and hi bounds.
11878while test "x$ac_lo" != "x$ac_hi"; do
11879 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11880 cat >conftest.$ac_ext <<_ACEOF
11881/* confdefs.h. */
11882_ACEOF
11883cat confdefs.h >>conftest.$ac_ext
11884cat >>conftest.$ac_ext <<_ACEOF
11885/* end confdefs.h. */
11886$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011887 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011888int
11889main ()
11890{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011891static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011892test_array [0] = 0
11893
11894 ;
11895 return 0;
11896}
11897_ACEOF
11898rm -f conftest.$ac_objext
11899if { (ac_try="$ac_compile"
11900case "(($ac_try" in
11901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11902 *) ac_try_echo=$ac_try;;
11903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011905 (eval "$ac_compile") 2>conftest.er1
11906 ac_status=$?
11907 grep -v '^ *+' conftest.er1 >conftest.err
11908 rm -f conftest.er1
11909 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011911 (exit $ac_status); } && {
11912 test -z "$ac_c_werror_flag" ||
11913 test ! -s conftest.err
11914 } && test -s conftest.$ac_objext; then
11915 ac_hi=$ac_mid
11916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011917 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011918sed 's/^/| /' conftest.$ac_ext >&5
11919
11920 ac_lo=`expr '(' $ac_mid ')' + 1`
11921fi
11922
11923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11924done
11925case $ac_lo in
11926?*) ac_cv_sizeof_long_double=$ac_lo;;
11927'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011928 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011929See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011930echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011931See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011932 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011933 else
11934 ac_cv_sizeof_long_double=0
11935 fi ;;
11936esac
11937else
11938 cat >conftest.$ac_ext <<_ACEOF
11939/* confdefs.h. */
11940_ACEOF
11941cat confdefs.h >>conftest.$ac_ext
11942cat >>conftest.$ac_ext <<_ACEOF
11943/* end confdefs.h. */
11944$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011945 typedef long double ac__type_sizeof_;
11946static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11947static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948#include <stdio.h>
11949#include <stdlib.h>
11950int
11951main ()
11952{
11953
11954 FILE *f = fopen ("conftest.val", "w");
11955 if (! f)
11956 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011957 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011958 {
11959 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011960 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011962 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011963 }
11964 else
11965 {
11966 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011967 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011968 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011969 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011970 }
11971 return ferror (f) || fclose (f) != 0;
11972
11973 ;
11974 return 0;
11975}
11976_ACEOF
11977rm -f conftest$ac_exeext
11978if { (ac_try="$ac_link"
11979case "(($ac_try" in
11980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11981 *) ac_try_echo=$ac_try;;
11982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011984 (eval "$ac_link") 2>&5
11985 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11988 { (case "(($ac_try" in
11989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11990 *) ac_try_echo=$ac_try;;
11991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993 (eval "$ac_try") 2>&5
11994 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011996 (exit $ac_status); }; }; then
11997 ac_cv_sizeof_long_double=`cat conftest.val`
11998else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011999 echo "$as_me: program exited with status $ac_status" >&5
12000echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012001sed 's/^/| /' conftest.$ac_ext >&5
12002
12003( exit $ac_status )
12004if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012005 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012006See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012007echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012009 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010 else
12011 ac_cv_sizeof_long_double=0
12012 fi
12013fi
12014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12015fi
12016rm -f conftest.val
12017fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012018{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12019echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012020
12021
12022
12023cat >>confdefs.h <<_ACEOF
12024#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12025_ACEOF
12026
12027
12028fi
12029
12030
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012031{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12032echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012033have_c99_bool=no
12034cat >conftest.$ac_ext <<_ACEOF
12035/* confdefs.h. */
12036_ACEOF
12037cat confdefs.h >>conftest.$ac_ext
12038cat >>conftest.$ac_ext <<_ACEOF
12039/* end confdefs.h. */
12040
12041int
12042main ()
12043{
12044_Bool x; x = (_Bool)0;
12045 ;
12046 return 0;
12047}
12048_ACEOF
12049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012050if { (ac_try="$ac_compile"
12051case "(($ac_try" in
12052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12053 *) ac_try_echo=$ac_try;;
12054esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012056 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012057 ac_status=$?
12058 grep -v '^ *+' conftest.er1 >conftest.err
12059 rm -f conftest.er1
12060 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062 (exit $ac_status); } && {
12063 test -z "$ac_c_werror_flag" ||
12064 test ! -s conftest.err
12065 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012066
12067
12068cat >>confdefs.h <<\_ACEOF
12069#define HAVE_C99_BOOL 1
12070_ACEOF
12071
12072 have_c99_bool=yes
12073
12074else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012075 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012076sed 's/^/| /' conftest.$ac_ext >&5
12077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078
Thomas Woutersb2137042007-02-01 18:02:27 +000012079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080
12081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012082{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12083echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012084if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012085{ echo "$as_me:$LINENO: checking for _Bool" >&5
12086echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12087if test "${ac_cv_type__Bool+set}" = set; then
12088 echo $ECHO_N "(cached) $ECHO_C" >&6
12089else
12090 cat >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$ac_includes_default
12097typedef _Bool ac__type_new_;
12098int
12099main ()
12100{
12101if ((ac__type_new_ *) 0)
12102 return 0;
12103if (sizeof (ac__type_new_))
12104 return 0;
12105 ;
12106 return 0;
12107}
12108_ACEOF
12109rm -f conftest.$ac_objext
12110if { (ac_try="$ac_compile"
12111case "(($ac_try" in
12112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12113 *) ac_try_echo=$ac_try;;
12114esac
12115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12116 (eval "$ac_compile") 2>conftest.er1
12117 ac_status=$?
12118 grep -v '^ *+' conftest.er1 >conftest.err
12119 rm -f conftest.er1
12120 cat conftest.err >&5
12121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122 (exit $ac_status); } && {
12123 test -z "$ac_c_werror_flag" ||
12124 test ! -s conftest.err
12125 } && test -s conftest.$ac_objext; then
12126 ac_cv_type__Bool=yes
12127else
12128 echo "$as_me: failed program was:" >&5
12129sed 's/^/| /' conftest.$ac_ext >&5
12130
12131 ac_cv_type__Bool=no
12132fi
12133
12134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12135fi
12136{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12137echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012139# The cast to long int works around a bug in the HP C Compiler
12140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12142# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012143{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12144echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012145if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012146 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012147else
12148 if test "$cross_compiling" = yes; then
12149 # Depending upon the size, compute the lo and hi bounds.
12150cat >conftest.$ac_ext <<_ACEOF
12151/* confdefs.h. */
12152_ACEOF
12153cat confdefs.h >>conftest.$ac_ext
12154cat >>conftest.$ac_ext <<_ACEOF
12155/* end confdefs.h. */
12156$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012157 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012158int
12159main ()
12160{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012162test_array [0] = 0
12163
12164 ;
12165 return 0;
12166}
12167_ACEOF
12168rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012169if { (ac_try="$ac_compile"
12170case "(($ac_try" in
12171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12172 *) ac_try_echo=$ac_try;;
12173esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012176 ac_status=$?
12177 grep -v '^ *+' conftest.er1 >conftest.err
12178 rm -f conftest.er1
12179 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012181 (exit $ac_status); } && {
12182 test -z "$ac_c_werror_flag" ||
12183 test ! -s conftest.err
12184 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012185 ac_lo=0 ac_mid=0
12186 while :; do
12187 cat >conftest.$ac_ext <<_ACEOF
12188/* confdefs.h. */
12189_ACEOF
12190cat confdefs.h >>conftest.$ac_ext
12191cat >>conftest.$ac_ext <<_ACEOF
12192/* end confdefs.h. */
12193$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012194 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012195int
12196main ()
12197{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012198static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012199test_array [0] = 0
12200
12201 ;
12202 return 0;
12203}
12204_ACEOF
12205rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206if { (ac_try="$ac_compile"
12207case "(($ac_try" in
12208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12209 *) ac_try_echo=$ac_try;;
12210esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012213 ac_status=$?
12214 grep -v '^ *+' conftest.er1 >conftest.err
12215 rm -f conftest.er1
12216 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218 (exit $ac_status); } && {
12219 test -z "$ac_c_werror_flag" ||
12220 test ! -s conftest.err
12221 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012222 ac_hi=$ac_mid; break
12223else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012224 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012225sed 's/^/| /' conftest.$ac_ext >&5
12226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227 ac_lo=`expr $ac_mid + 1`
12228 if test $ac_lo -le $ac_mid; then
12229 ac_lo= ac_hi=
12230 break
12231 fi
12232 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234
12235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012236 done
12237else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012238 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012239sed 's/^/| /' conftest.$ac_ext >&5
12240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012242/* confdefs.h. */
12243_ACEOF
12244cat confdefs.h >>conftest.$ac_ext
12245cat >>conftest.$ac_ext <<_ACEOF
12246/* end confdefs.h. */
12247$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012248 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012249int
12250main ()
12251{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012252static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012253test_array [0] = 0
12254
12255 ;
12256 return 0;
12257}
12258_ACEOF
12259rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012260if { (ac_try="$ac_compile"
12261case "(($ac_try" in
12262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12263 *) ac_try_echo=$ac_try;;
12264esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012267 ac_status=$?
12268 grep -v '^ *+' conftest.er1 >conftest.err
12269 rm -f conftest.er1
12270 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272 (exit $ac_status); } && {
12273 test -z "$ac_c_werror_flag" ||
12274 test ! -s conftest.err
12275 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012276 ac_hi=-1 ac_mid=-1
12277 while :; do
12278 cat >conftest.$ac_ext <<_ACEOF
12279/* confdefs.h. */
12280_ACEOF
12281cat confdefs.h >>conftest.$ac_ext
12282cat >>conftest.$ac_ext <<_ACEOF
12283/* end confdefs.h. */
12284$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012285 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012286int
12287main ()
12288{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012289static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012290test_array [0] = 0
12291
12292 ;
12293 return 0;
12294}
12295_ACEOF
12296rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012297if { (ac_try="$ac_compile"
12298case "(($ac_try" in
12299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12300 *) ac_try_echo=$ac_try;;
12301esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012304 ac_status=$?
12305 grep -v '^ *+' conftest.er1 >conftest.err
12306 rm -f conftest.er1
12307 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309 (exit $ac_status); } && {
12310 test -z "$ac_c_werror_flag" ||
12311 test ! -s conftest.err
12312 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012313 ac_lo=$ac_mid; break
12314else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012315 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012316sed 's/^/| /' conftest.$ac_ext >&5
12317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318 ac_hi=`expr '(' $ac_mid ')' - 1`
12319 if test $ac_mid -le $ac_hi; then
12320 ac_lo= ac_hi=
12321 break
12322 fi
12323 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325
12326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012327 done
12328else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012329 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012330sed 's/^/| /' conftest.$ac_ext >&5
12331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012332 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334
12335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012337
12338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012339# Binary search between lo and hi bounds.
12340while test "x$ac_lo" != "x$ac_hi"; do
12341 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12342 cat >conftest.$ac_ext <<_ACEOF
12343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
12348$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012349 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012350int
12351main ()
12352{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012354test_array [0] = 0
12355
12356 ;
12357 return 0;
12358}
12359_ACEOF
12360rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361if { (ac_try="$ac_compile"
12362case "(($ac_try" in
12363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12364 *) ac_try_echo=$ac_try;;
12365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012368 ac_status=$?
12369 grep -v '^ *+' conftest.er1 >conftest.err
12370 rm -f conftest.er1
12371 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373 (exit $ac_status); } && {
12374 test -z "$ac_c_werror_flag" ||
12375 test ! -s conftest.err
12376 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012377 ac_hi=$ac_mid
12378else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012379 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012380sed 's/^/| /' conftest.$ac_ext >&5
12381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384
12385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012386done
12387case $ac_lo in
12388?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012390 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012391See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012392echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012393See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012394 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395 else
12396 ac_cv_sizeof__Bool=0
12397 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012398esac
12399else
12400 cat >conftest.$ac_ext <<_ACEOF
12401/* confdefs.h. */
12402_ACEOF
12403cat confdefs.h >>conftest.$ac_ext
12404cat >>conftest.$ac_ext <<_ACEOF
12405/* end confdefs.h. */
12406$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012407 typedef _Bool ac__type_sizeof_;
12408static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12409static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012410#include <stdio.h>
12411#include <stdlib.h>
12412int
12413main ()
12414{
12415
12416 FILE *f = fopen ("conftest.val", "w");
12417 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012419 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012420 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012422 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012424 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012425 }
12426 else
12427 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012429 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012431 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012432 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012434
12435 ;
12436 return 0;
12437}
12438_ACEOF
12439rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440if { (ac_try="$ac_link"
12441case "(($ac_try" in
12442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12443 *) ac_try_echo=$ac_try;;
12444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012447 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450 { (case "(($ac_try" in
12451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12452 *) ac_try_echo=$ac_try;;
12453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012456 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012458 (exit $ac_status); }; }; then
12459 ac_cv_sizeof__Bool=`cat conftest.val`
12460else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012461 echo "$as_me: program exited with status $ac_status" >&5
12462echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012463sed 's/^/| /' conftest.$ac_ext >&5
12464
12465( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012467 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012468See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012469echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012470See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012471 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472 else
12473 ac_cv_sizeof__Bool=0
12474 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476rm -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 +000012477fi
12478rm -f conftest.val
12479fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012480{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12481echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482
12483
12484
Thomas Woutersb2137042007-02-01 18:02:27 +000012485cat >>confdefs.h <<_ACEOF
12486#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12487_ACEOF
12488
12489
12490fi
12491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012492{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12493echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012494if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012495 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012496else
12497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012498/* confdefs.h. */
12499_ACEOF
12500cat confdefs.h >>conftest.$ac_ext
12501cat >>conftest.$ac_ext <<_ACEOF
12502/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012503#ifdef HAVE_STDINT_H
12504 #include <stdint.h>
12505 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012506
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012507typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012508int
12509main ()
12510{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012511if ((ac__type_new_ *) 0)
12512 return 0;
12513if (sizeof (ac__type_new_))
12514 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012515 ;
12516 return 0;
12517}
12518_ACEOF
12519rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520if { (ac_try="$ac_compile"
12521case "(($ac_try" in
12522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12523 *) ac_try_echo=$ac_try;;
12524esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012528 grep -v '^ *+' conftest.er1 >conftest.err
12529 rm -f conftest.er1
12530 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532 (exit $ac_status); } && {
12533 test -z "$ac_c_werror_flag" ||
12534 test ! -s conftest.err
12535 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012536 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012537else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012539sed 's/^/| /' conftest.$ac_ext >&5
12540
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012541 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543
12544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012545fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012546{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12547echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12548if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012549
12550cat >>confdefs.h <<_ACEOF
12551#define HAVE_UINTPTR_T 1
12552_ACEOF
12553
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012554{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12555echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12556if test "${ac_cv_type_uintptr_t+set}" = set; then
12557 echo $ECHO_N "(cached) $ECHO_C" >&6
12558else
12559 cat >conftest.$ac_ext <<_ACEOF
12560/* confdefs.h. */
12561_ACEOF
12562cat confdefs.h >>conftest.$ac_ext
12563cat >>conftest.$ac_ext <<_ACEOF
12564/* end confdefs.h. */
12565$ac_includes_default
12566typedef uintptr_t ac__type_new_;
12567int
12568main ()
12569{
12570if ((ac__type_new_ *) 0)
12571 return 0;
12572if (sizeof (ac__type_new_))
12573 return 0;
12574 ;
12575 return 0;
12576}
12577_ACEOF
12578rm -f conftest.$ac_objext
12579if { (ac_try="$ac_compile"
12580case "(($ac_try" in
12581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12582 *) ac_try_echo=$ac_try;;
12583esac
12584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12585 (eval "$ac_compile") 2>conftest.er1
12586 ac_status=$?
12587 grep -v '^ *+' conftest.er1 >conftest.err
12588 rm -f conftest.er1
12589 cat conftest.err >&5
12590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12591 (exit $ac_status); } && {
12592 test -z "$ac_c_werror_flag" ||
12593 test ! -s conftest.err
12594 } && test -s conftest.$ac_objext; then
12595 ac_cv_type_uintptr_t=yes
12596else
12597 echo "$as_me: failed program was:" >&5
12598sed 's/^/| /' conftest.$ac_ext >&5
12599
12600 ac_cv_type_uintptr_t=no
12601fi
12602
12603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12604fi
12605{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12606echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608# The cast to long int works around a bug in the HP C Compiler
12609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12611# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012612{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12613echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012614if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012615 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012616else
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 if test "$cross_compiling" = yes; then
12618 # Depending upon the size, compute the lo and hi bounds.
12619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012620/* confdefs.h. */
12621_ACEOF
12622cat confdefs.h >>conftest.$ac_ext
12623cat >>conftest.$ac_ext <<_ACEOF
12624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012625$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012626 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012627int
12628main ()
12629{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012631test_array [0] = 0
12632
12633 ;
12634 return 0;
12635}
12636_ACEOF
12637rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638if { (ac_try="$ac_compile"
12639case "(($ac_try" in
12640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12641 *) ac_try_echo=$ac_try;;
12642esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012646 grep -v '^ *+' conftest.er1 >conftest.err
12647 rm -f conftest.er1
12648 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650 (exit $ac_status); } && {
12651 test -z "$ac_c_werror_flag" ||
12652 test ! -s conftest.err
12653 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 ac_lo=0 ac_mid=0
12655 while :; do
12656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* confdefs.h. */
12658_ACEOF
12659cat confdefs.h >>conftest.$ac_ext
12660cat >>conftest.$ac_ext <<_ACEOF
12661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012662$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012663 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012664int
12665main ()
12666{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012667static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012668test_array [0] = 0
12669
12670 ;
12671 return 0;
12672}
12673_ACEOF
12674rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675if { (ac_try="$ac_compile"
12676case "(($ac_try" in
12677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12678 *) ac_try_echo=$ac_try;;
12679esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012683 grep -v '^ *+' conftest.er1 >conftest.err
12684 rm -f conftest.er1
12685 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687 (exit $ac_status); } && {
12688 test -z "$ac_c_werror_flag" ||
12689 test ! -s conftest.err
12690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 ac_hi=$ac_mid; break
12692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012694sed 's/^/| /' conftest.$ac_ext >&5
12695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696 ac_lo=`expr $ac_mid + 1`
12697 if test $ac_lo -le $ac_mid; then
12698 ac_lo= ac_hi=
12699 break
12700 fi
12701 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703
12704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 done
12706else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012708sed 's/^/| /' conftest.$ac_ext >&5
12709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012711/* confdefs.h. */
12712_ACEOF
12713cat confdefs.h >>conftest.$ac_ext
12714cat >>conftest.$ac_ext <<_ACEOF
12715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012716$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012717 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012718int
12719main ()
12720{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012722test_array [0] = 0
12723
12724 ;
12725 return 0;
12726}
12727_ACEOF
12728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729if { (ac_try="$ac_compile"
12730case "(($ac_try" in
12731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12732 *) ac_try_echo=$ac_try;;
12733esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012737 grep -v '^ *+' conftest.er1 >conftest.err
12738 rm -f conftest.er1
12739 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741 (exit $ac_status); } && {
12742 test -z "$ac_c_werror_flag" ||
12743 test ! -s conftest.err
12744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012745 ac_hi=-1 ac_mid=-1
12746 while :; do
12747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012748/* confdefs.h. */
12749_ACEOF
12750cat confdefs.h >>conftest.$ac_ext
12751cat >>conftest.$ac_ext <<_ACEOF
12752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012753$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012754 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012755int
12756main ()
12757{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012758static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012759test_array [0] = 0
12760
12761 ;
12762 return 0;
12763}
12764_ACEOF
12765rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766if { (ac_try="$ac_compile"
12767case "(($ac_try" in
12768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12769 *) ac_try_echo=$ac_try;;
12770esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012774 grep -v '^ *+' conftest.er1 >conftest.err
12775 rm -f conftest.er1
12776 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778 (exit $ac_status); } && {
12779 test -z "$ac_c_werror_flag" ||
12780 test ! -s conftest.err
12781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012782 ac_lo=$ac_mid; break
12783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012785sed 's/^/| /' conftest.$ac_ext >&5
12786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787 ac_hi=`expr '(' $ac_mid ')' - 1`
12788 if test $ac_mid -le $ac_hi; then
12789 ac_lo= ac_hi=
12790 break
12791 fi
12792 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794
12795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 done
12797else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012799sed 's/^/| /' conftest.$ac_ext >&5
12800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803
12804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806
12807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012808# Binary search between lo and hi bounds.
12809while test "x$ac_lo" != "x$ac_hi"; do
12810 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012812/* confdefs.h. */
12813_ACEOF
12814cat confdefs.h >>conftest.$ac_ext
12815cat >>conftest.$ac_ext <<_ACEOF
12816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012817$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012818 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012819int
12820main ()
12821{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012823test_array [0] = 0
12824
12825 ;
12826 return 0;
12827}
12828_ACEOF
12829rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830if { (ac_try="$ac_compile"
12831case "(($ac_try" in
12832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12833 *) ac_try_echo=$ac_try;;
12834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012838 grep -v '^ *+' conftest.er1 >conftest.err
12839 rm -f conftest.er1
12840 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842 (exit $ac_status); } && {
12843 test -z "$ac_c_werror_flag" ||
12844 test ! -s conftest.err
12845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ac_hi=$ac_mid
12847else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012849sed 's/^/| /' conftest.$ac_ext >&5
12850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853
12854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012855done
12856case $ac_lo in
12857?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012859 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012860See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012861echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012862See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012863 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012864 else
12865 ac_cv_sizeof_uintptr_t=0
12866 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012867esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012868else
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012870/* confdefs.h. */
12871_ACEOF
12872cat confdefs.h >>conftest.$ac_ext
12873cat >>conftest.$ac_ext <<_ACEOF
12874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012875$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012876 typedef uintptr_t ac__type_sizeof_;
12877static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12878static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012879#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012880#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012881int
12882main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012883{
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
12885 FILE *f = fopen ("conftest.val", "w");
12886 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012888 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012893 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 }
12895 else
12896 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012898 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012900 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012903
12904 ;
12905 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012906}
Martin v. Löwis11437992002-04-12 09:54:03 +000012907_ACEOF
12908rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909if { (ac_try="$ac_link"
12910case "(($ac_try" in
12911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12912 *) ac_try_echo=$ac_try;;
12913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919 { (case "(($ac_try" in
12920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12921 *) ac_try_echo=$ac_try;;
12922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 (exit $ac_status); }; }; then
12928 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012929else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012930 echo "$as_me: program exited with status $ac_status" >&5
12931echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012932sed 's/^/| /' conftest.$ac_ext >&5
12933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012936 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012937See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012938echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012939See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012940 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012941 else
12942 ac_cv_sizeof_uintptr_t=0
12943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945rm -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 +000012946fi
12947rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012949{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12950echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012951
12952
12953
Martin v. Löwis11437992002-04-12 09:54:03 +000012954cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012955#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012956_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012957
Michael W. Hudson54241132001-12-07 15:38:26 +000012958
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012959fi
12960
Thomas Wouters89f507f2006-12-13 04:49:30 +000012961
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012962{ echo "$as_me:$LINENO: checking for off_t" >&5
12963echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12964if test "${ac_cv_type_off_t+set}" = set; then
12965 echo $ECHO_N "(cached) $ECHO_C" >&6
12966else
12967 cat >conftest.$ac_ext <<_ACEOF
12968/* confdefs.h. */
12969_ACEOF
12970cat confdefs.h >>conftest.$ac_ext
12971cat >>conftest.$ac_ext <<_ACEOF
12972/* end confdefs.h. */
12973
12974#ifdef HAVE_SYS_TYPES_H
12975#include <sys/types.h>
12976#endif
12977
12978
12979typedef off_t ac__type_new_;
12980int
12981main ()
12982{
12983if ((ac__type_new_ *) 0)
12984 return 0;
12985if (sizeof (ac__type_new_))
12986 return 0;
12987 ;
12988 return 0;
12989}
12990_ACEOF
12991rm -f conftest.$ac_objext
12992if { (ac_try="$ac_compile"
12993case "(($ac_try" in
12994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12995 *) ac_try_echo=$ac_try;;
12996esac
12997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12998 (eval "$ac_compile") 2>conftest.er1
12999 ac_status=$?
13000 grep -v '^ *+' conftest.er1 >conftest.err
13001 rm -f conftest.er1
13002 cat conftest.err >&5
13003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13004 (exit $ac_status); } && {
13005 test -z "$ac_c_werror_flag" ||
13006 test ! -s conftest.err
13007 } && test -s conftest.$ac_objext; then
13008 ac_cv_type_off_t=yes
13009else
13010 echo "$as_me: failed program was:" >&5
13011sed 's/^/| /' conftest.$ac_ext >&5
13012
13013 ac_cv_type_off_t=no
13014fi
13015
13016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13017fi
13018{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13019echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013021# The cast to long int works around a bug in the HP C Compiler
13022# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13023# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13024# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013025{ echo "$as_me:$LINENO: checking size of off_t" >&5
13026echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013027if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013028 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013029else
13030 if test "$cross_compiling" = yes; then
13031 # Depending upon the size, compute the lo and hi bounds.
13032cat >conftest.$ac_ext <<_ACEOF
13033/* confdefs.h. */
13034_ACEOF
13035cat confdefs.h >>conftest.$ac_ext
13036cat >>conftest.$ac_ext <<_ACEOF
13037/* end confdefs.h. */
13038
13039#ifdef HAVE_SYS_TYPES_H
13040#include <sys/types.h>
13041#endif
13042
13043
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013044 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013045int
13046main ()
13047{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013049test_array [0] = 0
13050
13051 ;
13052 return 0;
13053}
13054_ACEOF
13055rm -f conftest.$ac_objext
13056if { (ac_try="$ac_compile"
13057case "(($ac_try" in
13058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13059 *) ac_try_echo=$ac_try;;
13060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013062 (eval "$ac_compile") 2>conftest.er1
13063 ac_status=$?
13064 grep -v '^ *+' conftest.er1 >conftest.err
13065 rm -f conftest.er1
13066 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013068 (exit $ac_status); } && {
13069 test -z "$ac_c_werror_flag" ||
13070 test ! -s conftest.err
13071 } && test -s conftest.$ac_objext; then
13072 ac_lo=0 ac_mid=0
13073 while :; do
13074 cat >conftest.$ac_ext <<_ACEOF
13075/* confdefs.h. */
13076_ACEOF
13077cat confdefs.h >>conftest.$ac_ext
13078cat >>conftest.$ac_ext <<_ACEOF
13079/* end confdefs.h. */
13080
13081#ifdef HAVE_SYS_TYPES_H
13082#include <sys/types.h>
13083#endif
13084
13085
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013086 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013087int
13088main ()
13089{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013091test_array [0] = 0
13092
13093 ;
13094 return 0;
13095}
13096_ACEOF
13097rm -f conftest.$ac_objext
13098if { (ac_try="$ac_compile"
13099case "(($ac_try" in
13100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13101 *) ac_try_echo=$ac_try;;
13102esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013104 (eval "$ac_compile") 2>conftest.er1
13105 ac_status=$?
13106 grep -v '^ *+' conftest.er1 >conftest.err
13107 rm -f conftest.er1
13108 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013110 (exit $ac_status); } && {
13111 test -z "$ac_c_werror_flag" ||
13112 test ! -s conftest.err
13113 } && test -s conftest.$ac_objext; then
13114 ac_hi=$ac_mid; break
13115else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013116 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013117sed 's/^/| /' conftest.$ac_ext >&5
13118
13119 ac_lo=`expr $ac_mid + 1`
13120 if test $ac_lo -le $ac_mid; then
13121 ac_lo= ac_hi=
13122 break
13123 fi
13124 ac_mid=`expr 2 '*' $ac_mid + 1`
13125fi
13126
13127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13128 done
13129else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013130 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013131sed 's/^/| /' conftest.$ac_ext >&5
13132
13133 cat >conftest.$ac_ext <<_ACEOF
13134/* confdefs.h. */
13135_ACEOF
13136cat confdefs.h >>conftest.$ac_ext
13137cat >>conftest.$ac_ext <<_ACEOF
13138/* end confdefs.h. */
13139
13140#ifdef HAVE_SYS_TYPES_H
13141#include <sys/types.h>
13142#endif
13143
13144
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013145 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013146int
13147main ()
13148{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150test_array [0] = 0
13151
13152 ;
13153 return 0;
13154}
13155_ACEOF
13156rm -f conftest.$ac_objext
13157if { (ac_try="$ac_compile"
13158case "(($ac_try" in
13159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13160 *) ac_try_echo=$ac_try;;
13161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013163 (eval "$ac_compile") 2>conftest.er1
13164 ac_status=$?
13165 grep -v '^ *+' conftest.er1 >conftest.err
13166 rm -f conftest.er1
13167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013169 (exit $ac_status); } && {
13170 test -z "$ac_c_werror_flag" ||
13171 test ! -s conftest.err
13172 } && test -s conftest.$ac_objext; then
13173 ac_hi=-1 ac_mid=-1
13174 while :; do
13175 cat >conftest.$ac_ext <<_ACEOF
13176/* confdefs.h. */
13177_ACEOF
13178cat confdefs.h >>conftest.$ac_ext
13179cat >>conftest.$ac_ext <<_ACEOF
13180/* end confdefs.h. */
13181
13182#ifdef HAVE_SYS_TYPES_H
13183#include <sys/types.h>
13184#endif
13185
13186
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013187 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013188int
13189main ()
13190{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013192test_array [0] = 0
13193
13194 ;
13195 return 0;
13196}
13197_ACEOF
13198rm -f conftest.$ac_objext
13199if { (ac_try="$ac_compile"
13200case "(($ac_try" in
13201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13202 *) ac_try_echo=$ac_try;;
13203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013205 (eval "$ac_compile") 2>conftest.er1
13206 ac_status=$?
13207 grep -v '^ *+' conftest.er1 >conftest.err
13208 rm -f conftest.er1
13209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013211 (exit $ac_status); } && {
13212 test -z "$ac_c_werror_flag" ||
13213 test ! -s conftest.err
13214 } && test -s conftest.$ac_objext; then
13215 ac_lo=$ac_mid; break
13216else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013217 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013218sed 's/^/| /' conftest.$ac_ext >&5
13219
13220 ac_hi=`expr '(' $ac_mid ')' - 1`
13221 if test $ac_mid -le $ac_hi; then
13222 ac_lo= ac_hi=
13223 break
13224 fi
13225 ac_mid=`expr 2 '*' $ac_mid`
13226fi
13227
13228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13229 done
13230else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013231 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013232sed 's/^/| /' conftest.$ac_ext >&5
13233
13234 ac_lo= ac_hi=
13235fi
13236
13237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13238fi
13239
13240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13241# Binary search between lo and hi bounds.
13242while test "x$ac_lo" != "x$ac_hi"; do
13243 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13244 cat >conftest.$ac_ext <<_ACEOF
13245/* confdefs.h. */
13246_ACEOF
13247cat confdefs.h >>conftest.$ac_ext
13248cat >>conftest.$ac_ext <<_ACEOF
13249/* end confdefs.h. */
13250
13251#ifdef HAVE_SYS_TYPES_H
13252#include <sys/types.h>
13253#endif
13254
13255
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013256 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013257int
13258main ()
13259{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013261test_array [0] = 0
13262
13263 ;
13264 return 0;
13265}
13266_ACEOF
13267rm -f conftest.$ac_objext
13268if { (ac_try="$ac_compile"
13269case "(($ac_try" in
13270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13271 *) ac_try_echo=$ac_try;;
13272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013274 (eval "$ac_compile") 2>conftest.er1
13275 ac_status=$?
13276 grep -v '^ *+' conftest.er1 >conftest.err
13277 rm -f conftest.er1
13278 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013280 (exit $ac_status); } && {
13281 test -z "$ac_c_werror_flag" ||
13282 test ! -s conftest.err
13283 } && test -s conftest.$ac_objext; then
13284 ac_hi=$ac_mid
13285else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013286 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013287sed 's/^/| /' conftest.$ac_ext >&5
13288
13289 ac_lo=`expr '(' $ac_mid ')' + 1`
13290fi
13291
13292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13293done
13294case $ac_lo in
13295?*) ac_cv_sizeof_off_t=$ac_lo;;
13296'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013297 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013298See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013299echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013300See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013301 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013302 else
13303 ac_cv_sizeof_off_t=0
13304 fi ;;
13305esac
13306else
13307 cat >conftest.$ac_ext <<_ACEOF
13308/* confdefs.h. */
13309_ACEOF
13310cat confdefs.h >>conftest.$ac_ext
13311cat >>conftest.$ac_ext <<_ACEOF
13312/* end confdefs.h. */
13313
13314#ifdef HAVE_SYS_TYPES_H
13315#include <sys/types.h>
13316#endif
13317
13318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013319 typedef off_t ac__type_sizeof_;
13320static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13321static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013322#include <stdio.h>
13323#include <stdlib.h>
13324int
13325main ()
13326{
13327
13328 FILE *f = fopen ("conftest.val", "w");
13329 if (! f)
13330 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013331 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013332 {
13333 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013334 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013335 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013336 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013337 }
13338 else
13339 {
13340 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013341 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013342 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013343 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013344 }
13345 return ferror (f) || fclose (f) != 0;
13346
13347 ;
13348 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013349}
Martin v. Löwis11437992002-04-12 09:54:03 +000013350_ACEOF
13351rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352if { (ac_try="$ac_link"
13353case "(($ac_try" in
13354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13355 *) ac_try_echo=$ac_try;;
13356esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362 { (case "(($ac_try" in
13363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13364 *) ac_try_echo=$ac_try;;
13365esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013370 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013371 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013373 echo "$as_me: program exited with status $ac_status" >&5
13374echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013375sed 's/^/| /' conftest.$ac_ext >&5
13376
Martin v. Löwis11437992002-04-12 09:54:03 +000013377( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013378if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013379 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013380See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013381echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013382See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013383 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013384 else
13385 ac_cv_sizeof_off_t=0
13386 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388rm -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 +000013389fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013390rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013391fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013392{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13393echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013394
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013395
13396
Martin v. Löwis11437992002-04-12 09:54:03 +000013397cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013398#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013399_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013400
Michael W. Hudson54241132001-12-07 15:38:26 +000013401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13404echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013405if test "$have_long_long" = yes -a \
13406 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13407 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409cat >>confdefs.h <<\_ACEOF
13410#define HAVE_LARGEFILE_SUPPORT 1
13411_ACEOF
13412
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013413 { echo "$as_me:$LINENO: result: yes" >&5
13414echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013416 { echo "$as_me:$LINENO: result: no" >&5
13417echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013418fi
13419
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013420{ echo "$as_me:$LINENO: checking for time_t" >&5
13421echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13422if test "${ac_cv_type_time_t+set}" = set; then
13423 echo $ECHO_N "(cached) $ECHO_C" >&6
13424else
13425 cat >conftest.$ac_ext <<_ACEOF
13426/* confdefs.h. */
13427_ACEOF
13428cat confdefs.h >>conftest.$ac_ext
13429cat >>conftest.$ac_ext <<_ACEOF
13430/* end confdefs.h. */
13431
13432#ifdef HAVE_SYS_TYPES_H
13433#include <sys/types.h>
13434#endif
13435#ifdef HAVE_TIME_H
13436#include <time.h>
13437#endif
13438
13439
13440typedef time_t ac__type_new_;
13441int
13442main ()
13443{
13444if ((ac__type_new_ *) 0)
13445 return 0;
13446if (sizeof (ac__type_new_))
13447 return 0;
13448 ;
13449 return 0;
13450}
13451_ACEOF
13452rm -f conftest.$ac_objext
13453if { (ac_try="$ac_compile"
13454case "(($ac_try" in
13455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13456 *) ac_try_echo=$ac_try;;
13457esac
13458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13459 (eval "$ac_compile") 2>conftest.er1
13460 ac_status=$?
13461 grep -v '^ *+' conftest.er1 >conftest.err
13462 rm -f conftest.er1
13463 cat conftest.err >&5
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13465 (exit $ac_status); } && {
13466 test -z "$ac_c_werror_flag" ||
13467 test ! -s conftest.err
13468 } && test -s conftest.$ac_objext; then
13469 ac_cv_type_time_t=yes
13470else
13471 echo "$as_me: failed program was:" >&5
13472sed 's/^/| /' conftest.$ac_ext >&5
13473
13474 ac_cv_type_time_t=no
13475fi
13476
13477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13478fi
13479{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13480echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13481
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013482# The cast to long int works around a bug in the HP C Compiler
13483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13485# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013486{ echo "$as_me:$LINENO: checking size of time_t" >&5
13487echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013488if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013489 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013490else
13491 if test "$cross_compiling" = yes; then
13492 # Depending upon the size, compute the lo and hi bounds.
13493cat >conftest.$ac_ext <<_ACEOF
13494/* confdefs.h. */
13495_ACEOF
13496cat confdefs.h >>conftest.$ac_ext
13497cat >>conftest.$ac_ext <<_ACEOF
13498/* end confdefs.h. */
13499
13500#ifdef HAVE_SYS_TYPES_H
13501#include <sys/types.h>
13502#endif
13503#ifdef HAVE_TIME_H
13504#include <time.h>
13505#endif
13506
13507
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013508 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013509int
13510main ()
13511{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013512static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013513test_array [0] = 0
13514
13515 ;
13516 return 0;
13517}
13518_ACEOF
13519rm -f conftest.$ac_objext
13520if { (ac_try="$ac_compile"
13521case "(($ac_try" in
13522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13523 *) ac_try_echo=$ac_try;;
13524esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013526 (eval "$ac_compile") 2>conftest.er1
13527 ac_status=$?
13528 grep -v '^ *+' conftest.er1 >conftest.err
13529 rm -f conftest.er1
13530 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013532 (exit $ac_status); } && {
13533 test -z "$ac_c_werror_flag" ||
13534 test ! -s conftest.err
13535 } && test -s conftest.$ac_objext; then
13536 ac_lo=0 ac_mid=0
13537 while :; do
13538 cat >conftest.$ac_ext <<_ACEOF
13539/* confdefs.h. */
13540_ACEOF
13541cat confdefs.h >>conftest.$ac_ext
13542cat >>conftest.$ac_ext <<_ACEOF
13543/* end confdefs.h. */
13544
13545#ifdef HAVE_SYS_TYPES_H
13546#include <sys/types.h>
13547#endif
13548#ifdef HAVE_TIME_H
13549#include <time.h>
13550#endif
13551
13552
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013553 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013554int
13555main ()
13556{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013557static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013558test_array [0] = 0
13559
13560 ;
13561 return 0;
13562}
13563_ACEOF
13564rm -f conftest.$ac_objext
13565if { (ac_try="$ac_compile"
13566case "(($ac_try" in
13567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13568 *) ac_try_echo=$ac_try;;
13569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013571 (eval "$ac_compile") 2>conftest.er1
13572 ac_status=$?
13573 grep -v '^ *+' conftest.er1 >conftest.err
13574 rm -f conftest.er1
13575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013577 (exit $ac_status); } && {
13578 test -z "$ac_c_werror_flag" ||
13579 test ! -s conftest.err
13580 } && test -s conftest.$ac_objext; then
13581 ac_hi=$ac_mid; break
13582else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013583 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013584sed 's/^/| /' conftest.$ac_ext >&5
13585
13586 ac_lo=`expr $ac_mid + 1`
13587 if test $ac_lo -le $ac_mid; then
13588 ac_lo= ac_hi=
13589 break
13590 fi
13591 ac_mid=`expr 2 '*' $ac_mid + 1`
13592fi
13593
13594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13595 done
13596else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013597 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013598sed 's/^/| /' conftest.$ac_ext >&5
13599
13600 cat >conftest.$ac_ext <<_ACEOF
13601/* confdefs.h. */
13602_ACEOF
13603cat confdefs.h >>conftest.$ac_ext
13604cat >>conftest.$ac_ext <<_ACEOF
13605/* end confdefs.h. */
13606
13607#ifdef HAVE_SYS_TYPES_H
13608#include <sys/types.h>
13609#endif
13610#ifdef HAVE_TIME_H
13611#include <time.h>
13612#endif
13613
13614
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013615 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013616int
13617main ()
13618{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013620test_array [0] = 0
13621
13622 ;
13623 return 0;
13624}
13625_ACEOF
13626rm -f conftest.$ac_objext
13627if { (ac_try="$ac_compile"
13628case "(($ac_try" in
13629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13630 *) ac_try_echo=$ac_try;;
13631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013633 (eval "$ac_compile") 2>conftest.er1
13634 ac_status=$?
13635 grep -v '^ *+' conftest.er1 >conftest.err
13636 rm -f conftest.er1
13637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013639 (exit $ac_status); } && {
13640 test -z "$ac_c_werror_flag" ||
13641 test ! -s conftest.err
13642 } && test -s conftest.$ac_objext; then
13643 ac_hi=-1 ac_mid=-1
13644 while :; do
13645 cat >conftest.$ac_ext <<_ACEOF
13646/* confdefs.h. */
13647_ACEOF
13648cat confdefs.h >>conftest.$ac_ext
13649cat >>conftest.$ac_ext <<_ACEOF
13650/* end confdefs.h. */
13651
13652#ifdef HAVE_SYS_TYPES_H
13653#include <sys/types.h>
13654#endif
13655#ifdef HAVE_TIME_H
13656#include <time.h>
13657#endif
13658
13659
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013660 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013661int
13662main ()
13663{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013664static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013665test_array [0] = 0
13666
13667 ;
13668 return 0;
13669}
13670_ACEOF
13671rm -f conftest.$ac_objext
13672if { (ac_try="$ac_compile"
13673case "(($ac_try" in
13674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13675 *) ac_try_echo=$ac_try;;
13676esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013678 (eval "$ac_compile") 2>conftest.er1
13679 ac_status=$?
13680 grep -v '^ *+' conftest.er1 >conftest.err
13681 rm -f conftest.er1
13682 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013684 (exit $ac_status); } && {
13685 test -z "$ac_c_werror_flag" ||
13686 test ! -s conftest.err
13687 } && test -s conftest.$ac_objext; then
13688 ac_lo=$ac_mid; break
13689else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013690 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013691sed 's/^/| /' conftest.$ac_ext >&5
13692
13693 ac_hi=`expr '(' $ac_mid ')' - 1`
13694 if test $ac_mid -le $ac_hi; then
13695 ac_lo= ac_hi=
13696 break
13697 fi
13698 ac_mid=`expr 2 '*' $ac_mid`
13699fi
13700
13701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13702 done
13703else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013704 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013705sed 's/^/| /' conftest.$ac_ext >&5
13706
13707 ac_lo= ac_hi=
13708fi
13709
13710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13711fi
13712
13713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13714# Binary search between lo and hi bounds.
13715while test "x$ac_lo" != "x$ac_hi"; do
13716 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13717 cat >conftest.$ac_ext <<_ACEOF
13718/* confdefs.h. */
13719_ACEOF
13720cat confdefs.h >>conftest.$ac_ext
13721cat >>conftest.$ac_ext <<_ACEOF
13722/* end confdefs.h. */
13723
13724#ifdef HAVE_SYS_TYPES_H
13725#include <sys/types.h>
13726#endif
13727#ifdef HAVE_TIME_H
13728#include <time.h>
13729#endif
13730
13731
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013732 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013733int
13734main ()
13735{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013736static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013737test_array [0] = 0
13738
13739 ;
13740 return 0;
13741}
13742_ACEOF
13743rm -f conftest.$ac_objext
13744if { (ac_try="$ac_compile"
13745case "(($ac_try" in
13746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13747 *) ac_try_echo=$ac_try;;
13748esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013750 (eval "$ac_compile") 2>conftest.er1
13751 ac_status=$?
13752 grep -v '^ *+' conftest.er1 >conftest.err
13753 rm -f conftest.er1
13754 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013756 (exit $ac_status); } && {
13757 test -z "$ac_c_werror_flag" ||
13758 test ! -s conftest.err
13759 } && test -s conftest.$ac_objext; then
13760 ac_hi=$ac_mid
13761else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013762 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013763sed 's/^/| /' conftest.$ac_ext >&5
13764
13765 ac_lo=`expr '(' $ac_mid ')' + 1`
13766fi
13767
13768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13769done
13770case $ac_lo in
13771?*) ac_cv_sizeof_time_t=$ac_lo;;
13772'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013773 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013774See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013775echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013776See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013777 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013778 else
13779 ac_cv_sizeof_time_t=0
13780 fi ;;
13781esac
13782else
13783 cat >conftest.$ac_ext <<_ACEOF
13784/* confdefs.h. */
13785_ACEOF
13786cat confdefs.h >>conftest.$ac_ext
13787cat >>conftest.$ac_ext <<_ACEOF
13788/* end confdefs.h. */
13789
13790#ifdef HAVE_SYS_TYPES_H
13791#include <sys/types.h>
13792#endif
13793#ifdef HAVE_TIME_H
13794#include <time.h>
13795#endif
13796
13797
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013798 typedef time_t ac__type_sizeof_;
13799static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13800static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013801#include <stdio.h>
13802#include <stdlib.h>
13803int
13804main ()
13805{
13806
13807 FILE *f = fopen ("conftest.val", "w");
13808 if (! f)
13809 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013810 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013811 {
13812 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013813 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013814 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013815 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013816 }
13817 else
13818 {
13819 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013820 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013821 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013822 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013823 }
13824 return ferror (f) || fclose (f) != 0;
13825
13826 ;
13827 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013828}
Martin v. Löwis11437992002-04-12 09:54:03 +000013829_ACEOF
13830rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831if { (ac_try="$ac_link"
13832case "(($ac_try" in
13833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13834 *) ac_try_echo=$ac_try;;
13835esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841 { (case "(($ac_try" in
13842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13843 *) ac_try_echo=$ac_try;;
13844esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013850 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013852 echo "$as_me: program exited with status $ac_status" >&5
13853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013854sed 's/^/| /' conftest.$ac_ext >&5
13855
Martin v. Löwis11437992002-04-12 09:54:03 +000013856( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013857if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013859See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013860echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013861See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013862 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013863 else
13864 ac_cv_sizeof_time_t=0
13865 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867rm -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 +000013868fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013869rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013871{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13872echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013874
13875
Martin v. Löwis11437992002-04-12 09:54:03 +000013876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013877#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013879
Michael W. Hudson54241132001-12-07 15:38:26 +000013880
13881
Trent Mick635f6fb2000-08-23 21:33:05 +000013882# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013883ac_save_cc="$CC"
13884if test "$ac_cv_kpthread" = "yes"
13885then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013886elif test "$ac_cv_kthread" = "yes"
13887then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013888elif test "$ac_cv_pthread" = "yes"
13889then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013890fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013892{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13893echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013894have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013895cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013896/* confdefs.h. */
13897_ACEOF
13898cat confdefs.h >>conftest.$ac_ext
13899cat >>conftest.$ac_ext <<_ACEOF
13900/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013901#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013902int
13903main ()
13904{
Guido van Rossum12580492000-09-24 16:47:19 +000013905pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 ;
13907 return 0;
13908}
13909_ACEOF
13910rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911if { (ac_try="$ac_compile"
13912case "(($ac_try" in
13913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13914 *) ac_try_echo=$ac_try;;
13915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013919 grep -v '^ *+' conftest.er1 >conftest.err
13920 rm -f conftest.er1
13921 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923 (exit $ac_status); } && {
13924 test -z "$ac_c_werror_flag" ||
13925 test ! -s conftest.err
13926 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013927 have_pthread_t=yes
13928else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013930sed 's/^/| /' conftest.$ac_ext >&5
13931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932
Trent Mick635f6fb2000-08-23 21:33:05 +000013933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934
13935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013936{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13937echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013938if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013939 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13940echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13941if test "${ac_cv_type_pthread_t+set}" = set; then
13942 echo $ECHO_N "(cached) $ECHO_C" >&6
13943else
13944 cat >conftest.$ac_ext <<_ACEOF
13945/* confdefs.h. */
13946_ACEOF
13947cat confdefs.h >>conftest.$ac_ext
13948cat >>conftest.$ac_ext <<_ACEOF
13949/* end confdefs.h. */
13950
13951#ifdef HAVE_PTHREAD_H
13952#include <pthread.h>
13953#endif
13954
13955
13956typedef pthread_t ac__type_new_;
13957int
13958main ()
13959{
13960if ((ac__type_new_ *) 0)
13961 return 0;
13962if (sizeof (ac__type_new_))
13963 return 0;
13964 ;
13965 return 0;
13966}
13967_ACEOF
13968rm -f conftest.$ac_objext
13969if { (ac_try="$ac_compile"
13970case "(($ac_try" in
13971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13972 *) ac_try_echo=$ac_try;;
13973esac
13974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13975 (eval "$ac_compile") 2>conftest.er1
13976 ac_status=$?
13977 grep -v '^ *+' conftest.er1 >conftest.err
13978 rm -f conftest.er1
13979 cat conftest.err >&5
13980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981 (exit $ac_status); } && {
13982 test -z "$ac_c_werror_flag" ||
13983 test ! -s conftest.err
13984 } && test -s conftest.$ac_objext; then
13985 ac_cv_type_pthread_t=yes
13986else
13987 echo "$as_me: failed program was:" >&5
13988sed 's/^/| /' conftest.$ac_ext >&5
13989
13990 ac_cv_type_pthread_t=no
13991fi
13992
13993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13994fi
13995{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13996echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13997
13998# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013999# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14000# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14001# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014002{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14003echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014004if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014005 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014006else
14007 if test "$cross_compiling" = yes; then
14008 # Depending upon the size, compute the lo and hi bounds.
14009cat >conftest.$ac_ext <<_ACEOF
14010/* confdefs.h. */
14011_ACEOF
14012cat confdefs.h >>conftest.$ac_ext
14013cat >>conftest.$ac_ext <<_ACEOF
14014/* end confdefs.h. */
14015
14016#ifdef HAVE_PTHREAD_H
14017#include <pthread.h>
14018#endif
14019
14020
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014021 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014022int
14023main ()
14024{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014025static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014026test_array [0] = 0
14027
14028 ;
14029 return 0;
14030}
14031_ACEOF
14032rm -f conftest.$ac_objext
14033if { (ac_try="$ac_compile"
14034case "(($ac_try" in
14035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14036 *) ac_try_echo=$ac_try;;
14037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014039 (eval "$ac_compile") 2>conftest.er1
14040 ac_status=$?
14041 grep -v '^ *+' conftest.er1 >conftest.err
14042 rm -f conftest.er1
14043 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014045 (exit $ac_status); } && {
14046 test -z "$ac_c_werror_flag" ||
14047 test ! -s conftest.err
14048 } && test -s conftest.$ac_objext; then
14049 ac_lo=0 ac_mid=0
14050 while :; do
14051 cat >conftest.$ac_ext <<_ACEOF
14052/* confdefs.h. */
14053_ACEOF
14054cat confdefs.h >>conftest.$ac_ext
14055cat >>conftest.$ac_ext <<_ACEOF
14056/* end confdefs.h. */
14057
14058#ifdef HAVE_PTHREAD_H
14059#include <pthread.h>
14060#endif
14061
14062
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014063 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014064int
14065main ()
14066{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014068test_array [0] = 0
14069
14070 ;
14071 return 0;
14072}
14073_ACEOF
14074rm -f conftest.$ac_objext
14075if { (ac_try="$ac_compile"
14076case "(($ac_try" in
14077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14078 *) ac_try_echo=$ac_try;;
14079esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014081 (eval "$ac_compile") 2>conftest.er1
14082 ac_status=$?
14083 grep -v '^ *+' conftest.er1 >conftest.err
14084 rm -f conftest.er1
14085 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014087 (exit $ac_status); } && {
14088 test -z "$ac_c_werror_flag" ||
14089 test ! -s conftest.err
14090 } && test -s conftest.$ac_objext; then
14091 ac_hi=$ac_mid; break
14092else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014093 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014094sed 's/^/| /' conftest.$ac_ext >&5
14095
14096 ac_lo=`expr $ac_mid + 1`
14097 if test $ac_lo -le $ac_mid; then
14098 ac_lo= ac_hi=
14099 break
14100 fi
14101 ac_mid=`expr 2 '*' $ac_mid + 1`
14102fi
14103
14104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14105 done
14106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014107 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014108sed 's/^/| /' conftest.$ac_ext >&5
14109
14110 cat >conftest.$ac_ext <<_ACEOF
14111/* confdefs.h. */
14112_ACEOF
14113cat confdefs.h >>conftest.$ac_ext
14114cat >>conftest.$ac_ext <<_ACEOF
14115/* end confdefs.h. */
14116
14117#ifdef HAVE_PTHREAD_H
14118#include <pthread.h>
14119#endif
14120
14121
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014122 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014123int
14124main ()
14125{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014127test_array [0] = 0
14128
14129 ;
14130 return 0;
14131}
14132_ACEOF
14133rm -f conftest.$ac_objext
14134if { (ac_try="$ac_compile"
14135case "(($ac_try" in
14136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14137 *) ac_try_echo=$ac_try;;
14138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014140 (eval "$ac_compile") 2>conftest.er1
14141 ac_status=$?
14142 grep -v '^ *+' conftest.er1 >conftest.err
14143 rm -f conftest.er1
14144 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014146 (exit $ac_status); } && {
14147 test -z "$ac_c_werror_flag" ||
14148 test ! -s conftest.err
14149 } && test -s conftest.$ac_objext; then
14150 ac_hi=-1 ac_mid=-1
14151 while :; do
14152 cat >conftest.$ac_ext <<_ACEOF
14153/* confdefs.h. */
14154_ACEOF
14155cat confdefs.h >>conftest.$ac_ext
14156cat >>conftest.$ac_ext <<_ACEOF
14157/* end confdefs.h. */
14158
14159#ifdef HAVE_PTHREAD_H
14160#include <pthread.h>
14161#endif
14162
14163
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014164 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014165int
14166main ()
14167{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014168static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014169test_array [0] = 0
14170
14171 ;
14172 return 0;
14173}
14174_ACEOF
14175rm -f conftest.$ac_objext
14176if { (ac_try="$ac_compile"
14177case "(($ac_try" in
14178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14179 *) ac_try_echo=$ac_try;;
14180esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 (eval "$ac_compile") 2>conftest.er1
14183 ac_status=$?
14184 grep -v '^ *+' conftest.er1 >conftest.err
14185 rm -f conftest.er1
14186 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188 (exit $ac_status); } && {
14189 test -z "$ac_c_werror_flag" ||
14190 test ! -s conftest.err
14191 } && test -s conftest.$ac_objext; then
14192 ac_lo=$ac_mid; break
14193else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014194 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014195sed 's/^/| /' conftest.$ac_ext >&5
14196
14197 ac_hi=`expr '(' $ac_mid ')' - 1`
14198 if test $ac_mid -le $ac_hi; then
14199 ac_lo= ac_hi=
14200 break
14201 fi
14202 ac_mid=`expr 2 '*' $ac_mid`
14203fi
14204
14205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14206 done
14207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014208 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014209sed 's/^/| /' conftest.$ac_ext >&5
14210
14211 ac_lo= ac_hi=
14212fi
14213
14214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14215fi
14216
14217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14218# Binary search between lo and hi bounds.
14219while test "x$ac_lo" != "x$ac_hi"; do
14220 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14221 cat >conftest.$ac_ext <<_ACEOF
14222/* confdefs.h. */
14223_ACEOF
14224cat confdefs.h >>conftest.$ac_ext
14225cat >>conftest.$ac_ext <<_ACEOF
14226/* end confdefs.h. */
14227
14228#ifdef HAVE_PTHREAD_H
14229#include <pthread.h>
14230#endif
14231
14232
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014233 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234int
14235main ()
14236{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014237static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014238test_array [0] = 0
14239
14240 ;
14241 return 0;
14242}
14243_ACEOF
14244rm -f conftest.$ac_objext
14245if { (ac_try="$ac_compile"
14246case "(($ac_try" in
14247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14248 *) ac_try_echo=$ac_try;;
14249esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014251 (eval "$ac_compile") 2>conftest.er1
14252 ac_status=$?
14253 grep -v '^ *+' conftest.er1 >conftest.err
14254 rm -f conftest.er1
14255 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014257 (exit $ac_status); } && {
14258 test -z "$ac_c_werror_flag" ||
14259 test ! -s conftest.err
14260 } && test -s conftest.$ac_objext; then
14261 ac_hi=$ac_mid
14262else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014263 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014264sed 's/^/| /' conftest.$ac_ext >&5
14265
14266 ac_lo=`expr '(' $ac_mid ')' + 1`
14267fi
14268
14269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14270done
14271case $ac_lo in
14272?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14273'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014274 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014275See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014276echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014277See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014278 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014279 else
14280 ac_cv_sizeof_pthread_t=0
14281 fi ;;
14282esac
14283else
14284 cat >conftest.$ac_ext <<_ACEOF
14285/* confdefs.h. */
14286_ACEOF
14287cat confdefs.h >>conftest.$ac_ext
14288cat >>conftest.$ac_ext <<_ACEOF
14289/* end confdefs.h. */
14290
14291#ifdef HAVE_PTHREAD_H
14292#include <pthread.h>
14293#endif
14294
14295
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014296 typedef pthread_t ac__type_sizeof_;
14297static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14298static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014299#include <stdio.h>
14300#include <stdlib.h>
14301int
14302main ()
14303{
14304
14305 FILE *f = fopen ("conftest.val", "w");
14306 if (! f)
14307 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014308 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014309 {
14310 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014311 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014312 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014313 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014314 }
14315 else
14316 {
14317 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014318 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014319 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014320 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014321 }
14322 return ferror (f) || fclose (f) != 0;
14323
14324 ;
14325 return 0;
14326}
Martin v. Löwis11437992002-04-12 09:54:03 +000014327_ACEOF
14328rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329if { (ac_try="$ac_link"
14330case "(($ac_try" in
14331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14332 *) ac_try_echo=$ac_try;;
14333esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339 { (case "(($ac_try" in
14340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14341 *) ac_try_echo=$ac_try;;
14342esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014348 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014350 echo "$as_me: program exited with status $ac_status" >&5
14351echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014352sed 's/^/| /' conftest.$ac_ext >&5
14353
Martin v. Löwis11437992002-04-12 09:54:03 +000014354( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014355if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014356 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014358echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014359See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014360 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014361 else
14362 ac_cv_sizeof_pthread_t=0
14363 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365rm -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 +000014366fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014367rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014368fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014369{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14370echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014371
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014372
14373
Martin v. Löwis11437992002-04-12 09:54:03 +000014374cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014375#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014376_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014377
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014378
Trent Mick635f6fb2000-08-23 21:33:05 +000014379fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014380CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014381
Michael W. Hudson54241132001-12-07 15:38:26 +000014382
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014383case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014384 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014385 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14386 ;;
14387 Darwin/*)
14388 OTHER_LIBTOOL_OPT=""
14389 ;;
14390esac
14391
14392
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014393ARCH_RUN_32BIT=""
14394
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014395case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014396 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014397 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14398 if test "${enable_universalsdk}"; then
14399 :
14400 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014401 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014402 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014403 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014404 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014405 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014406 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14407 if test ${gcc_version} '<' 4.0
14408 then
14409 LIBTOOL_CRUFT="-lcc_dynamic"
14410 else
14411 LIBTOOL_CRUFT=""
14412 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014413 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014414 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014415else
14416 cat >conftest.$ac_ext <<_ACEOF
14417/* confdefs.h. */
14418_ACEOF
14419cat confdefs.h >>conftest.$ac_ext
14420cat >>conftest.$ac_ext <<_ACEOF
14421/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014423 #include <unistd.h>
14424 int main(int argc, char*argv[])
14425 {
14426 if (sizeof(long) == 4) {
14427 return 0;
14428 } else {
14429 return 1;
14430 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014431 }
14432
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014433_ACEOF
14434rm -f conftest$ac_exeext
14435if { (ac_try="$ac_link"
14436case "(($ac_try" in
14437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14438 *) ac_try_echo=$ac_try;;
14439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014441 (eval "$ac_link") 2>&5
14442 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014444 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14445 { (case "(($ac_try" in
14446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14447 *) ac_try_echo=$ac_try;;
14448esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014450 (eval "$ac_try") 2>&5
14451 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014453 (exit $ac_status); }; }; then
14454 ac_osx_32bit=yes
14455else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014456 echo "$as_me: program exited with status $ac_status" >&5
14457echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014458sed 's/^/| /' conftest.$ac_ext >&5
14459
14460( exit $ac_status )
14461ac_osx_32bit=no
14462fi
14463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14464fi
14465
14466
14467
14468 if test "${ac_osx_32bit}" = "yes"; then
14469 case `arch` in
14470 i386)
14471 MACOSX_DEFAULT_ARCH="i386"
14472 ;;
14473 ppc)
14474 MACOSX_DEFAULT_ARCH="ppc"
14475 ;;
14476 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014477 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14478echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014479 { (exit 1); exit 1; }; }
14480 ;;
14481 esac
14482 else
14483 case `arch` in
14484 i386)
14485 MACOSX_DEFAULT_ARCH="x86_64"
14486 ;;
14487 ppc)
14488 MACOSX_DEFAULT_ARCH="ppc64"
14489 ;;
14490 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014491 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14492echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014493 { (exit 1); exit 1; }; }
14494 ;;
14495 esac
14496
14497 #ARCH_RUN_32BIT="true"
14498 fi
14499
14500 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014501 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014503esac
14504
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014505{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14506echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014507if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014508then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014509 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014511 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014512
Martin v. Löwis11437992002-04-12 09:54:03 +000014513cat >>confdefs.h <<\_ACEOF
14514#define WITH_NEXT_FRAMEWORK 1
14515_ACEOF
14516
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014517 { echo "$as_me:$LINENO: result: yes" >&5
14518echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014519 if test $enable_shared = "yes"
14520 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014521 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14522echo "$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 +000014523 { (exit 1); exit 1; }; }
14524 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014525else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014526 { echo "$as_me:$LINENO: result: no" >&5
14527echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014528fi
14529
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014530{ echo "$as_me:$LINENO: checking for dyld" >&5
14531echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014532case $ac_sys_system/$ac_sys_release in
14533 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014534
Martin v. Löwis11437992002-04-12 09:54:03 +000014535cat >>confdefs.h <<\_ACEOF
14536#define WITH_DYLD 1
14537_ACEOF
14538
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014539 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14540echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014541 ;;
14542 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014543 { echo "$as_me:$LINENO: result: no" >&5
14544echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014545 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014546esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014547
Guido van Rossum0a516c91994-09-12 10:58:40 +000014548# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014549
Michael W. Hudson54241132001-12-07 15:38:26 +000014550
14551
14552
14553
Guido van Rossum0a516c91994-09-12 10:58:40 +000014554# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014555# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014556{ echo "$as_me:$LINENO: checking SO" >&5
14557echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014558if test -z "$SO"
14559then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014560 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014561 hp*|HP*)
14562 case `uname -m` in
14563 ia64) SO=.so;;
14564 *) SO=.sl;;
14565 esac
14566 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014567 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014568 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014569 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014570else
14571 # this might also be a termcap variable, see #610332
14572 echo
14573 echo '====================================================================='
14574 echo '+ +'
14575 echo '+ WARNING: You have set SO in your environment. +'
14576 echo '+ Do you really mean to change the extension for shared libraries? +'
14577 echo '+ Continuing in 10 seconds to let you to ponder. +'
14578 echo '+ +'
14579 echo '====================================================================='
14580 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014581fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014582{ echo "$as_me:$LINENO: result: $SO" >&5
14583echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014584
Georg Brandlb1441c72009-01-03 22:33:39 +000014585
Thomas Wouters477c8d52006-05-27 19:21:47 +000014586cat >>confdefs.h <<_ACEOF
14587#define SHLIB_EXT "$SO"
14588_ACEOF
14589
Guido van Rossum0a516c91994-09-12 10:58:40 +000014590# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014591# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014592# (Shared libraries in this instance are shared modules to be loaded into
14593# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014594{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14595echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014596if test -z "$LDSHARED"
14597then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014598 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014599 AIX*)
14600 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014601 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014602 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014603 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014604 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014606 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014607 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014608 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014609 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014610 hp*|HP*)
14611 if test "$GCC" = "yes"
14612 then LDSHARED='$(CC) -shared'
14613 else LDSHARED='ld -b';
14614 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014615 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014616 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014617 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14618 if test "$enable_framework" ; then
14619 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014620 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14621 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014622 else
14623 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014624 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014625 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014626 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014627 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14628 if test "$enable_framework" ; then
14629 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014630 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14631 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014632 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014633 # No framework, use the Python app as bundle-loader
14634 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014635 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014636 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014637 Darwin/*)
14638 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14639 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014640
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014641 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014642 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014643 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014644 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014645 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014646 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14647 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014648 else
14649 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14650 if test "$enable_framework" ; then
14651 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014652 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14653 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014654 else
14655 # No framework, use the Python app as bundle-loader
14656 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14657 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14658 fi
14659 fi
14660 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014661 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014662 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014663 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014664 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014665 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014666 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014667 else
14668 LDSHARED="ld -Bshareable ${LDFLAGS}"
14669 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014670 OpenBSD*)
14671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14672 then
14673 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14674 else
14675 case `uname -r` in
14676 [01].* | 2.[0-7] | 2.[0-7].*)
14677 LDSHARED="ld -Bshareable ${LDFLAGS}"
14678 ;;
14679 *)
14680 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14681 ;;
14682 esac
14683 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014684 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014685 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014686 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014687 then LDSHARED='$(CC) -shared'
14688 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014689 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014690 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014691 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014692 *) LDSHARED="ld";;
14693 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014694fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014695{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14696echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014697BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014698# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014699# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014700{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14701echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014702if test -z "$CCSHARED"
14703then
Guido van Rossum07397971997-04-29 21:49:50 +000014704 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014705 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014706 then CCSHARED="-fPIC";
14707 elif test `uname -p` = sparc;
14708 then CCSHARED="-xcode=pic32";
14709 else CCSHARED="-Kpic";
14710 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014711 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014712 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014713 else CCSHARED="+z";
14714 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014715 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014716 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014717 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014718 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014719 if test "$GCC" = "yes"
14720 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014721 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014722 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014723 SCO_SV*)
14724 if test "$GCC" = "yes"
14725 then CCSHARED="-fPIC"
14726 else CCSHARED="-Kpic -belf"
14727 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014728 IRIX*/6*) case $CC in
14729 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014730 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014731 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014732 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014733fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014734{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14735echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014736# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014737# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014738{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14739echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014740if test -z "$LINKFORSHARED"
14741then
Guido van Rossum07397971997-04-29 21:49:50 +000014742 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014743 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014744 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014745 LINKFORSHARED="-Wl,-E -Wl,+s";;
14746# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014747 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014748 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014749 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014751 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014752 if test "$enable_framework"
14753 then
Jack Jansenda49e192005-01-07 13:08:22 +000014754 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014755 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014756 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014757 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014758 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014759 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014760 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014761 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14762 then
14763 LINKFORSHARED="-Wl,--export-dynamic"
14764 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014765 SunOS/5*) case $CC in
14766 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014767 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014768 then
14769 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014770 fi;;
14771 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014772 CYGWIN*)
14773 if test $enable_shared = "no"
14774 then
14775 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14776 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014777 QNX*)
14778 # -Wl,-E causes the symbols to be added to the dynamic
14779 # symbol table so that they can be found when a module
14780 # is loaded. -N 2048K causes the stack size to be set
14781 # to 2048 kilobytes so that the stack doesn't overflow
14782 # when running test_compile.py.
14783 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014784 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014785fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014786{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14787echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014788
Michael W. Hudson54241132001-12-07 15:38:26 +000014789
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014790
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014791{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14792echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014793if test ! "$LIBRARY" = "$LDLIBRARY"
14794then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014795 case $ac_sys_system in
14796 CYGWIN*)
14797 # Cygwin needs CCSHARED when building extension DLLs
14798 # but not when building the interpreter DLL.
14799 CFLAGSFORSHARED='';;
14800 *)
14801 CFLAGSFORSHARED='$(CCSHARED)'
14802 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014803fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014804{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14805echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014806
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014807# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14808# library (with --enable-shared).
14809# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014810# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14811# if it is not required, since it creates a dependency of the shared library
14812# to LIBS. This, in turn, means that applications linking the shared libpython
14813# don't need to link LIBS explicitly. The default should be only changed
14814# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014815
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014816{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14817echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014818case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014819 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014820 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014821esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014822{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14823echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014824
14825
Guido van Rossum627b2d71993-12-24 10:39:16 +000014826# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014827
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014828{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14829echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014830if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014831 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014832else
Martin v. Löwis11437992002-04-12 09:54:03 +000014833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014834LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014836/* confdefs.h. */
14837_ACEOF
14838cat confdefs.h >>conftest.$ac_ext
14839cat >>conftest.$ac_ext <<_ACEOF
14840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842/* Override any GCC internal prototype to avoid an error.
14843 Use char because int might match the return type of a GCC
14844 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014845#ifdef __cplusplus
14846extern "C"
14847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014848char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014849int
14850main ()
14851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 ;
14854 return 0;
14855}
14856_ACEOF
14857rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858if { (ac_try="$ac_link"
14859case "(($ac_try" in
14860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14861 *) ac_try_echo=$ac_try;;
14862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014866 grep -v '^ *+' conftest.er1 >conftest.err
14867 rm -f conftest.er1
14868 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014870 (exit $ac_status); } && {
14871 test -z "$ac_c_werror_flag" ||
14872 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014873 } && test -s conftest$ac_exeext &&
14874 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014875 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014876else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014878sed 's/^/| /' conftest.$ac_ext >&5
14879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882
14883rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014885LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014886fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014887{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14888echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14889if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 cat >>confdefs.h <<_ACEOF
14891#define HAVE_LIBDL 1
14892_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014893
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014894 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014895
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014896fi
14897 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014898
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014899{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14900echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014901if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014902 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014903else
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014905LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014907/* confdefs.h. */
14908_ACEOF
14909cat confdefs.h >>conftest.$ac_ext
14910cat >>conftest.$ac_ext <<_ACEOF
14911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913/* Override any GCC internal prototype to avoid an error.
14914 Use char because int might match the return type of a GCC
14915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014916#ifdef __cplusplus
14917extern "C"
14918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014919char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014920int
14921main ()
14922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014924 ;
14925 return 0;
14926}
14927_ACEOF
14928rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929if { (ac_try="$ac_link"
14930case "(($ac_try" in
14931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14932 *) ac_try_echo=$ac_try;;
14933esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014937 grep -v '^ *+' conftest.er1 >conftest.err
14938 rm -f conftest.er1
14939 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 (exit $ac_status); } && {
14942 test -z "$ac_c_werror_flag" ||
14943 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014944 } && test -s conftest$ac_exeext &&
14945 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014947else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014949sed 's/^/| /' conftest.$ac_ext >&5
14950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014951 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953
14954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014956LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014957fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014958{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14959echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14960if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 cat >>confdefs.h <<_ACEOF
14962#define HAVE_LIBDLD 1
14963_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014964
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014965 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014967fi
14968 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014969
Georg Brandlb1441c72009-01-03 22:33:39 +000014970# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014971if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014972 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14973echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014974if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014975 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014976else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014977 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014978cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014979/* confdefs.h. */
14980_ACEOF
14981cat confdefs.h >>conftest.$ac_ext
14982cat >>conftest.$ac_ext <<_ACEOF
14983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985/* Override any GCC internal prototype to avoid an error.
14986 Use char because int might match the return type of a GCC
14987 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014988#ifdef __cplusplus
14989extern "C"
14990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014991char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014992int
14993main ()
14994{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 ;
14997 return 0;
14998}
14999_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000for ac_lib in '' pthread rt posix4; do
15001 if test -z "$ac_lib"; then
15002 ac_res="none required"
15003 else
15004 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 fi
15007 rm -f conftest.$ac_objext conftest$ac_exeext
15008if { (ac_try="$ac_link"
15009case "(($ac_try" in
15010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15011 *) ac_try_echo=$ac_try;;
15012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015015 ac_status=$?
15016 grep -v '^ *+' conftest.er1 >conftest.err
15017 rm -f conftest.er1
15018 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020 (exit $ac_status); } && {
15021 test -z "$ac_c_werror_flag" ||
15022 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015023 } && test -s conftest$ac_exeext &&
15024 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015026else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015027 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015028sed 's/^/| /' conftest.$ac_ext >&5
15029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030
Thomas Wouters477c8d52006-05-27 19:21:47 +000015031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032
15033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15034 conftest$ac_exeext
15035 if test "${ac_cv_search_sem_init+set}" = set; then
15036 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038done
15039if test "${ac_cv_search_sem_init+set}" = set; then
15040 :
15041else
15042 ac_cv_search_sem_init=no
15043fi
15044rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015045LIBS=$ac_func_search_save_LIBS
15046fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015047{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15048echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049ac_res=$ac_cv_search_sem_init
15050if test "$ac_res" != no; then
15051 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015052
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015053fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015054 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015055 # posix4 on Solaris 2.6
15056 # pthread (first!) on Linux
15057fi
15058
Martin v. Löwis19d17342003-06-14 21:03:05 +000015059# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015060{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15061echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015062if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015063 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015064else
15065 ac_check_lib_save_LIBS=$LIBS
15066LIBS="-lintl $LIBS"
15067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015068/* confdefs.h. */
15069_ACEOF
15070cat confdefs.h >>conftest.$ac_ext
15071cat >>conftest.$ac_ext <<_ACEOF
15072/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074/* Override any GCC internal prototype to avoid an error.
15075 Use char because int might match the return type of a GCC
15076 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015077#ifdef __cplusplus
15078extern "C"
15079#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015080char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015081int
15082main ()
15083{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015085 ;
15086 return 0;
15087}
15088_ACEOF
15089rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090if { (ac_try="$ac_link"
15091case "(($ac_try" in
15092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15093 *) ac_try_echo=$ac_try;;
15094esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015098 grep -v '^ *+' conftest.er1 >conftest.err
15099 rm -f conftest.er1
15100 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102 (exit $ac_status); } && {
15103 test -z "$ac_c_werror_flag" ||
15104 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015105 } && test -s conftest$ac_exeext &&
15106 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015107 ac_cv_lib_intl_textdomain=yes
15108else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015110sed 's/^/| /' conftest.$ac_ext >&5
15111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114
15115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015117LIBS=$ac_check_lib_save_LIBS
15118fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015119{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15120echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15121if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015122
15123cat >>confdefs.h <<\_ACEOF
15124#define WITH_LIBINTL 1
15125_ACEOF
15126
Brett Cannonc6d936e2009-06-07 20:09:53 +000015127 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015128fi
15129
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015130
15131# checks for system dependent C++ extensions support
15132case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015133 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15134echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015136/* confdefs.h. */
15137_ACEOF
15138cat confdefs.h >>conftest.$ac_ext
15139cat >>conftest.$ac_ext <<_ACEOF
15140/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015141#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015142int
15143main ()
15144{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015145loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +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
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015168
Martin v. Löwis11437992002-04-12 09:54:03 +000015169cat >>confdefs.h <<\_ACEOF
15170#define AIX_GENUINE_CPLUSPLUS 1
15171_ACEOF
15172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015173 { echo "$as_me:$LINENO: result: yes" >&5
15174echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015177sed 's/^/| /' conftest.$ac_ext >&5
15178
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015179 { echo "$as_me:$LINENO: result: no" >&5
15180echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182
15183rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015184 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015185 *) ;;
15186esac
15187
Guido van Rossum70c7f481998-03-26 18:44:10 +000015188# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015189{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15190echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015191if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015192 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015193else
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015195LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015196cat >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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203/* Override any GCC internal prototype to avoid an error.
15204 Use char because int might match the return type of a GCC
15205 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015206#ifdef __cplusplus
15207extern "C"
15208#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015209char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015210int
15211main ()
15212{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 ;
15215 return 0;
15216}
15217_ACEOF
15218rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219if { (ac_try="$ac_link"
15220case "(($ac_try" in
15221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15222 *) ac_try_echo=$ac_try;;
15223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015227 grep -v '^ *+' conftest.er1 >conftest.err
15228 rm -f conftest.er1
15229 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 (exit $ac_status); } && {
15232 test -z "$ac_c_werror_flag" ||
15233 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015234 } && test -s conftest$ac_exeext &&
15235 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015237else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015239sed 's/^/| /' conftest.$ac_ext >&5
15240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000015246LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015247fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015248{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15249echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15250if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015251 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015252fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015253 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015254{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15255echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015256if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015258else
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015260LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015262/* confdefs.h. */
15263_ACEOF
15264cat confdefs.h >>conftest.$ac_ext
15265cat >>conftest.$ac_ext <<_ACEOF
15266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268/* Override any GCC internal prototype to avoid an error.
15269 Use char because int might match the return type of a GCC
15270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015271#ifdef __cplusplus
15272extern "C"
15273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015274char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015275int
15276main ()
15277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 ;
15280 return 0;
15281}
15282_ACEOF
15283rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284if { (ac_try="$ac_link"
15285case "(($ac_try" in
15286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15287 *) ac_try_echo=$ac_try;;
15288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015292 grep -v '^ *+' conftest.er1 >conftest.err
15293 rm -f conftest.er1
15294 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 (exit $ac_status); } && {
15297 test -z "$ac_c_werror_flag" ||
15298 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015299 } && test -s conftest$ac_exeext &&
15300 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015302else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015304sed 's/^/| /' conftest.$ac_ext >&5
15305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308
15309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015311LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015312fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015313{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15314echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15315if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015316 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015317fi
15318 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015319
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015320{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15321echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015324if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015326{ echo "$as_me:$LINENO: result: $withval" >&5
15327echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015328LIBS="$withval $LIBS"
15329
15330else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015331 { echo "$as_me:$LINENO: result: no" >&5
15332echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333fi
15334
Guido van Rossum7f43da71994-08-01 12:15:30 +000015335
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015336# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015337{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15338echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015341if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342 withval=$with_system_ffi;
15343fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015344
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015345
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015346{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15347echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015348
Matthias Klose55708cc2009-04-30 08:06:49 +000015349# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015350{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15351echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015352
15353# Check whether --with-dbmliborder was given.
15354if test "${with_dbmliborder+set}" = set; then
15355 withval=$with_dbmliborder;
15356if test x$with_dbmliborder = xyes
15357then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015358{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15359echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015360 { (exit 1); exit 1; }; }
15361else
15362 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15363 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15364 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015365 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15366echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015367 { (exit 1); exit 1; }; }
15368 fi
15369 done
15370fi
15371fi
15372
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015373{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15374echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015375
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015376# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015377
15378
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015379{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15380echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015383if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384 withval=$with_signal_module;
15385fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015386
15387
15388if test -z "$with_signal_module"
15389then with_signal_module="yes"
15390fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015391{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15392echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015393
15394if test "${with_signal_module}" = "yes"; then
15395 USE_SIGNAL_MODULE=""
15396 SIGNAL_OBJS=""
15397else
15398 USE_SIGNAL_MODULE="#"
15399 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15400fi
15401
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015402# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015403
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015404USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015405
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015406{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15407echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015408
Guido van Rossumec2f0731997-01-22 20:54:01 +000015409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015410# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015411if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015412 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015413{ echo "$as_me:$LINENO: result: $withval" >&5
15414echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015415LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015416if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015417 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015418fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015419else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015420 { echo "$as_me:$LINENO: result: no" >&5
15421echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015422fi
15423
Martin v. Löwis11437992002-04-12 09:54:03 +000015424
15425# Templates for things AC_DEFINEd more than once.
15426# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015427
15428
Martin v. Löwis11437992002-04-12 09:54:03 +000015429
15430
15431
15432
15433
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015434{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15435echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015438if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439 withval=$with_threads;
15440fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015441
15442
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015443# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015446if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447 withval=$with_thread; with_threads=$with_thread
15448fi
15449
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015450
15451if test -z "$with_threads"
15452then with_threads="yes"
15453fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015454{ echo "$as_me:$LINENO: result: $with_threads" >&5
15455echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015456
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015457
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015458if test "$with_threads" = "no"
15459then
15460 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015461elif test "$ac_cv_pthread_is_default" = yes
15462then
Martin v. Löwis11437992002-04-12 09:54:03 +000015463 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015464#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015465_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015466
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015467 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015469#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015470_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015471
15472 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015474elif test "$ac_cv_kpthread" = "yes"
15475then
15476 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015477 if test "$ac_cv_cxx_thread" = "yes"; then
15478 CXX="$CXX -Kpthread"
15479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015481#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015482_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015483
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015484 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015485 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015486elif test "$ac_cv_kthread" = "yes"
15487then
15488 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015489 if test "$ac_cv_cxx_thread" = "yes"; then
15490 CXX="$CXX -Kthread"
15491 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015492 cat >>confdefs.h <<\_ACEOF
15493#define WITH_THREAD 1
15494_ACEOF
15495
15496 posix_threads=yes
15497 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015498elif test "$ac_cv_pthread" = "yes"
15499then
15500 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015501 if test "$ac_cv_cxx_thread" = "yes"; then
15502 CXX="$CXX -pthread"
15503 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015504 cat >>confdefs.h <<\_ACEOF
15505#define WITH_THREAD 1
15506_ACEOF
15507
15508 posix_threads=yes
15509 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015510else
15511 if test ! -z "$with_threads" -a -d "$with_threads"
15512 then LDFLAGS="$LDFLAGS -L$with_threads"
15513 fi
15514 if test ! -z "$withval" -a -d "$withval"
15515 then LDFLAGS="$LDFLAGS -L$withval"
15516 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015517
15518 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015519 # define _POSIX_THREADS in unistd.h. Some apparently don't
15520 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015521 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15522echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015523 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015524/* confdefs.h. */
15525_ACEOF
15526cat confdefs.h >>conftest.$ac_ext
15527cat >>conftest.$ac_ext <<_ACEOF
15528/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015529
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015530#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015531#ifdef _POSIX_THREADS
15532yes
15533#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015534
15535_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015537 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015538 unistd_defines_pthreads=yes
15539else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015540 unistd_defines_pthreads=no
15541fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000015542rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015543
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015544 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15545echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015546
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015548#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015549_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015550
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015552 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15553echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015554if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015555 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015556fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015557{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15558echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015559else
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015561{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15562echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015564/* confdefs.h. */
15565_ACEOF
15566cat confdefs.h >>conftest.$ac_ext
15567cat >>conftest.$ac_ext <<_ACEOF
15568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015569$ac_includes_default
15570#include <cthreads.h>
15571_ACEOF
15572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573if { (ac_try="$ac_compile"
15574case "(($ac_try" in
15575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15576 *) ac_try_echo=$ac_try;;
15577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015581 grep -v '^ *+' conftest.er1 >conftest.err
15582 rm -f conftest.er1
15583 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585 (exit $ac_status); } && {
15586 test -z "$ac_c_werror_flag" ||
15587 test ! -s conftest.err
15588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 ac_header_compiler=yes
15590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015592sed 's/^/| /' conftest.$ac_ext >&5
15593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596
15597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015598{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15599echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
15601# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015602{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15603echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015604cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015605/* confdefs.h. */
15606_ACEOF
15607cat confdefs.h >>conftest.$ac_ext
15608cat >>conftest.$ac_ext <<_ACEOF
15609/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015610#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015611_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612if { (ac_try="$ac_cpp conftest.$ac_ext"
15613case "(($ac_try" in
15614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15615 *) ac_try_echo=$ac_try;;
15616esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015620 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 rm -f conftest.er1
15622 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624 (exit $ac_status); } >/dev/null && {
15625 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15626 test ! -s conftest.err
15627 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 ac_header_preproc=yes
15629else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015631sed 's/^/| /' conftest.$ac_ext >&5
15632
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635
Martin v. Löwis11437992002-04-12 09:54:03 +000015636rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015637{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15638echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015639
15640# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015641case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15642 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015643 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15644echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15645 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15646echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015647 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015648 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015649 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015650 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15651echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15652 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15653echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15654 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15655echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15656 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15657echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15658 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15659echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15660 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15661echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015663## -------------------------------------- ##
15664## Report this to http://bugs.python.org/ ##
15665## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015666_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015667 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015668 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015669esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015670{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15671echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015672if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015674else
15675 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015676fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015677{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15678echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
15680fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015681if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015683#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015684_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015685
Martin v. Löwis11437992002-04-12 09:54:03 +000015686 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015687#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015688_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690
15691cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015692#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015693_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015694
15695 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015696 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015697else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015698
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015700 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15701echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015702if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015703 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015705{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15706echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015707else
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015709{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15710echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015711cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015712/* confdefs.h. */
15713_ACEOF
15714cat confdefs.h >>conftest.$ac_ext
15715cat >>conftest.$ac_ext <<_ACEOF
15716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015717$ac_includes_default
15718#include <mach/cthreads.h>
15719_ACEOF
15720rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721if { (ac_try="$ac_compile"
15722case "(($ac_try" in
15723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15724 *) ac_try_echo=$ac_try;;
15725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015729 grep -v '^ *+' conftest.er1 >conftest.err
15730 rm -f conftest.er1
15731 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733 (exit $ac_status); } && {
15734 test -z "$ac_c_werror_flag" ||
15735 test ! -s conftest.err
15736 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ac_header_compiler=yes
15738else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015740sed 's/^/| /' conftest.$ac_ext >&5
15741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744
15745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015746{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15747echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015748
15749# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015750{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15751echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015752cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015753/* confdefs.h. */
15754_ACEOF
15755cat confdefs.h >>conftest.$ac_ext
15756cat >>conftest.$ac_ext <<_ACEOF
15757/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015758#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015759_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760if { (ac_try="$ac_cpp conftest.$ac_ext"
15761case "(($ac_try" in
15762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15763 *) ac_try_echo=$ac_try;;
15764esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015766 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015768 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 rm -f conftest.er1
15770 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015772 (exit $ac_status); } >/dev/null && {
15773 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15774 test ! -s conftest.err
15775 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 ac_header_preproc=yes
15777else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015779sed 's/^/| /' conftest.$ac_ext >&5
15780
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783
Martin v. Löwis11437992002-04-12 09:54:03 +000015784rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015785{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15786echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015787
15788# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015789case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15790 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015791 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15792echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15793 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15794echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015795 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015796 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015797 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015798 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15799echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15800 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15801echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15802 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15803echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15804 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15805echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15806 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15807echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15808 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15809echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015810 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015811## -------------------------------------- ##
15812## Report this to http://bugs.python.org/ ##
15813## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015814_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015815 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015816 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015818{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15819echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015820if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015821 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015822else
15823 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015824fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015825{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15826echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015827
15828fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015829if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015831#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015832_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015833
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015835#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015836_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015837
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
15839cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015840#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015841_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015842
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015843 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015844else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015845
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015846 { echo "$as_me:$LINENO: checking for --with-pth" >&5
15847echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015850if test "${with_pth+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015851 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
15852echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015853 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015854#define WITH_THREAD 1
15855_ACEOF
15856
15857
15858cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015859#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015860_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015861
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015862 LIBS="-lpth $LIBS"
15863 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015864else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015865 { echo "$as_me:$LINENO: result: no" >&5
15866echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015867
15868 # Just looking for pthread_create in libpthread is not enough:
15869 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15870 # So we really have to include pthread.h, and then link.
15871 _libs=$LIBS
15872 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015873 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15874echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015876/* confdefs.h. */
15877_ACEOF
15878cat confdefs.h >>conftest.$ac_ext
15879cat >>conftest.$ac_ext <<_ACEOF
15880/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015881#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015882
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015883void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015884int
15885main ()
15886{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015887
15888pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 ;
15890 return 0;
15891}
15892_ACEOF
15893rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894if { (ac_try="$ac_link"
15895case "(($ac_try" in
15896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15897 *) ac_try_echo=$ac_try;;
15898esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015900 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015902 grep -v '^ *+' conftest.er1 >conftest.err
15903 rm -f conftest.er1
15904 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906 (exit $ac_status); } && {
15907 test -z "$ac_c_werror_flag" ||
15908 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015909 } && test -s conftest$ac_exeext &&
15910 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015911
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015912 { echo "$as_me:$LINENO: result: yes" >&5
15913echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015914 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015915#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015916_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015917
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015918 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015919 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015922sed 's/^/| /' conftest.$ac_ext >&5
15923
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015925 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015926 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15927echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015928if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015930else
Martin v. Löwis11437992002-04-12 09:54:03 +000015931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015932/* confdefs.h. */
15933_ACEOF
15934cat confdefs.h >>conftest.$ac_ext
15935cat >>conftest.$ac_ext <<_ACEOF
15936/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015937/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15938 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15939#define pthread_detach innocuous_pthread_detach
15940
Guido van Rossumad678af1998-10-02 14:42:15 +000015941/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015942 which can conflict with char pthread_detach (); below.
15943 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015944 <limits.h> exists even on freestanding compilers. */
15945
15946#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015947# include <limits.h>
15948#else
15949# include <assert.h>
15950#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015951
15952#undef pthread_detach
15953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015954/* Override any GCC internal prototype to avoid an error.
15955 Use char because int might match the return type of a GCC
15956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015957#ifdef __cplusplus
15958extern "C"
15959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015960char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015961/* The GNU C library defines this for functions which it implements
15962 to always fail with ENOSYS. Some functions are actually named
15963 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015964#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015965choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015966#endif
15967
Skip Montanaro6dead952003-09-25 14:50:04 +000015968int
15969main ()
15970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015972 ;
15973 return 0;
15974}
15975_ACEOF
15976rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015977if { (ac_try="$ac_link"
15978case "(($ac_try" in
15979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15980 *) ac_try_echo=$ac_try;;
15981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015985 grep -v '^ *+' conftest.er1 >conftest.err
15986 rm -f conftest.er1
15987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015989 (exit $ac_status); } && {
15990 test -z "$ac_c_werror_flag" ||
15991 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015992 } && test -s conftest$ac_exeext &&
15993 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015997sed 's/^/| /' conftest.$ac_ext >&5
15998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016001
16002rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016003 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016004fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016005{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16006echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16007if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016009#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016010_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016011
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016012 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016013 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016014else
Guido van Rossumad678af1998-10-02 14:42:15 +000016015
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016016 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16017echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016018if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016020else
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016022LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016024/* confdefs.h. */
16025_ACEOF
16026cat confdefs.h >>conftest.$ac_ext
16027cat >>conftest.$ac_ext <<_ACEOF
16028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016030/* Override any GCC internal prototype to avoid an error.
16031 Use char because int might match the return type of a GCC
16032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016033#ifdef __cplusplus
16034extern "C"
16035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016036char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016037int
16038main ()
16039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016040return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 ;
16042 return 0;
16043}
16044_ACEOF
16045rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046if { (ac_try="$ac_link"
16047case "(($ac_try" in
16048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16049 *) ac_try_echo=$ac_try;;
16050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016054 grep -v '^ *+' conftest.er1 >conftest.err
16055 rm -f conftest.er1
16056 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058 (exit $ac_status); } && {
16059 test -z "$ac_c_werror_flag" ||
16060 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016061 } && test -s conftest$ac_exeext &&
16062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016064else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016066sed 's/^/| /' conftest.$ac_ext >&5
16067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070
16071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016073LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016074fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016075{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16076echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16077if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016078 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016079#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016080_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016081
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016082 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016083 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016084 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016085else
Greg Steinadf63d62000-07-05 10:38:09 +000016086
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016087 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16088echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016089if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016090 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016091else
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016093LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016095/* confdefs.h. */
16096_ACEOF
16097cat confdefs.h >>conftest.$ac_ext
16098cat >>conftest.$ac_ext <<_ACEOF
16099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016101/* Override any GCC internal prototype to avoid an error.
16102 Use char because int might match the return type of a GCC
16103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016104#ifdef __cplusplus
16105extern "C"
16106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016107char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016108int
16109main ()
16110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016111return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016112 ;
16113 return 0;
16114}
16115_ACEOF
16116rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016117if { (ac_try="$ac_link"
16118case "(($ac_try" in
16119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16120 *) ac_try_echo=$ac_try;;
16121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016125 grep -v '^ *+' conftest.er1 >conftest.err
16126 rm -f conftest.er1
16127 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129 (exit $ac_status); } && {
16130 test -z "$ac_c_werror_flag" ||
16131 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016132 } && test -s conftest$ac_exeext &&
16133 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016137sed 's/^/| /' conftest.$ac_ext >&5
16138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141
16142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016144LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016145fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016146{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16147echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16148if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016150#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016151_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016152
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016153 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016154 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016155 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016156else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016157
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016158 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16159echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016160if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016161 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016162else
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016164LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016166/* confdefs.h. */
16167_ACEOF
16168cat confdefs.h >>conftest.$ac_ext
16169cat >>conftest.$ac_ext <<_ACEOF
16170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016172/* Override any GCC internal prototype to avoid an error.
16173 Use char because int might match the return type of a GCC
16174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016175#ifdef __cplusplus
16176extern "C"
16177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016178char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016179int
16180main ()
16181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 ;
16184 return 0;
16185}
16186_ACEOF
16187rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188if { (ac_try="$ac_link"
16189case "(($ac_try" in
16190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16191 *) ac_try_echo=$ac_try;;
16192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016196 grep -v '^ *+' conftest.er1 >conftest.err
16197 rm -f conftest.er1
16198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200 (exit $ac_status); } && {
16201 test -z "$ac_c_werror_flag" ||
16202 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016203 } && test -s conftest$ac_exeext &&
16204 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016208sed 's/^/| /' conftest.$ac_ext >&5
16209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212
16213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016215LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016216fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016217{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16218echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16219if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016221#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016222_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016223
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016224 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016225 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016226 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016227else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016228
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016229 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16230echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016231if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016233else
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016235LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016237/* confdefs.h. */
16238_ACEOF
16239cat confdefs.h >>conftest.$ac_ext
16240cat >>conftest.$ac_ext <<_ACEOF
16241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243/* Override any GCC internal prototype to avoid an error.
16244 Use char because int might match the return type of a GCC
16245 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016246#ifdef __cplusplus
16247extern "C"
16248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016249char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016250int
16251main ()
16252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016254 ;
16255 return 0;
16256}
16257_ACEOF
16258rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259if { (ac_try="$ac_link"
16260case "(($ac_try" in
16261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16262 *) ac_try_echo=$ac_try;;
16263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016267 grep -v '^ *+' conftest.er1 >conftest.err
16268 rm -f conftest.er1
16269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 (exit $ac_status); } && {
16272 test -z "$ac_c_werror_flag" ||
16273 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016274 } && test -s conftest$ac_exeext &&
16275 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016276 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016277else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016279sed 's/^/| /' conftest.$ac_ext >&5
16280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283
16284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016285 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016286LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016288{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16289echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16290if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016292#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016293_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016294
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016295 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016296 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016297 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016298else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016299
Martin v. Löwis130fb172001-07-19 11:00:41 +000016300 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016301fi
16302
Guido van Rossum627b2d71993-12-24 10:39:16 +000016303
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016304fi
16305
Guido van Rossum0be3e491997-05-22 20:33:33 +000016306fi
16307
Guido van Rossum49545951997-12-02 19:28:29 +000016308fi
16309
Guido van Rossumb93a8621998-05-07 13:27:32 +000016310fi
16311
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313
16314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016315 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316fi
16317
Martin v. Löwis11437992002-04-12 09:54:03 +000016318fi
16319
16320
16321fi
16322
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016323
Michael W. Hudson54241132001-12-07 15:38:26 +000016324
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016325 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16326echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016327if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016329else
Martin v. Löwis11437992002-04-12 09:54:03 +000016330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016331LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016333/* confdefs.h. */
16334_ACEOF
16335cat confdefs.h >>conftest.$ac_ext
16336cat >>conftest.$ac_ext <<_ACEOF
16337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339/* Override any GCC internal prototype to avoid an error.
16340 Use char because int might match the return type of a GCC
16341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016342#ifdef __cplusplus
16343extern "C"
16344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016345char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016346int
16347main ()
16348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 ;
16351 return 0;
16352}
16353_ACEOF
16354rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355if { (ac_try="$ac_link"
16356case "(($ac_try" in
16357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16358 *) ac_try_echo=$ac_try;;
16359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016363 grep -v '^ *+' conftest.er1 >conftest.err
16364 rm -f conftest.er1
16365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367 (exit $ac_status); } && {
16368 test -z "$ac_c_werror_flag" ||
16369 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016370 } && test -s conftest$ac_exeext &&
16371 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016373else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016375sed 's/^/| /' conftest.$ac_ext >&5
16376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016379
16380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016381 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016382LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016383fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016384{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16385echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16386if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016388#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016389_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016390
Martin v. Löwis130fb172001-07-19 11:00:41 +000016391 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016392 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016393 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016394fi
16395
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016396
Neal Norwitza978ab02002-11-02 16:58:05 +000016397 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016398 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16399echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016400if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016401 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016402else
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016404LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016405cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016406/* confdefs.h. */
16407_ACEOF
16408cat confdefs.h >>conftest.$ac_ext
16409cat >>conftest.$ac_ext <<_ACEOF
16410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412/* Override any GCC internal prototype to avoid an error.
16413 Use char because int might match the return type of a GCC
16414 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016415#ifdef __cplusplus
16416extern "C"
16417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016418char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016419int
16420main ()
16421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 ;
16424 return 0;
16425}
16426_ACEOF
16427rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428if { (ac_try="$ac_link"
16429case "(($ac_try" in
16430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16431 *) ac_try_echo=$ac_try;;
16432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016436 grep -v '^ *+' conftest.er1 >conftest.err
16437 rm -f conftest.er1
16438 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016440 (exit $ac_status); } && {
16441 test -z "$ac_c_werror_flag" ||
16442 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016443 } && test -s conftest$ac_exeext &&
16444 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016445 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016448sed 's/^/| /' conftest.$ac_ext >&5
16449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452
16453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016455LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016456fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016457{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16458echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16459if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016461#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016462_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016463
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016464 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016465 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016466 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016467fi
16468
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016469 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016470
Martin v. Löwis130fb172001-07-19 11:00:41 +000016471 if test "$USE_THREAD_MODULE" != "#"
16472 then
16473 # If the above checks didn't disable threads, (at least) OSF1
16474 # needs this '-threads' argument during linking.
16475 case $ac_sys_system in
16476 OSF1) LDLAST=-threads;;
16477 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016478 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016479fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016480
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016481if test "$posix_threads" = "yes"; then
16482 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016483
16484cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016485#define _POSIX_THREADS 1
16486_ACEOF
16487
16488 fi
16489
16490 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16491 case $ac_sys_system/$ac_sys_release in
16492 SunOS/5.6)
16493cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016494#define HAVE_PTHREAD_DESTRUCTOR 1
16495_ACEOF
16496
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016497 ;;
16498 SunOS/5.8)
16499cat >>confdefs.h <<\_ACEOF
16500#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16501_ACEOF
16502
16503 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016504 AIX/5)
16505cat >>confdefs.h <<\_ACEOF
16506#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16507_ACEOF
16508
16509 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016510 esac
16511
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016512 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16513echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016514 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016515 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016516else
16517 if test "$cross_compiling" = yes; then
16518 ac_cv_pthread_system_supported=no
16519else
16520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016521/* confdefs.h. */
16522_ACEOF
16523cat confdefs.h >>conftest.$ac_ext
16524cat >>conftest.$ac_ext <<_ACEOF
16525/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016526#include <pthread.h>
16527 void *foo(void *parm) {
16528 return NULL;
16529 }
16530 main() {
16531 pthread_attr_t attr;
16532 pthread_t id;
16533 if (pthread_attr_init(&attr)) exit(-1);
16534 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16535 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16536 exit(0);
16537 }
16538_ACEOF
16539rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016540if { (ac_try="$ac_link"
16541case "(($ac_try" in
16542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16543 *) ac_try_echo=$ac_try;;
16544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016547 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550 { (case "(($ac_try" in
16551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16552 *) ac_try_echo=$ac_try;;
16553esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016556 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016558 (exit $ac_status); }; }; then
16559 ac_cv_pthread_system_supported=yes
16560else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016561 echo "$as_me: program exited with status $ac_status" >&5
16562echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016563sed 's/^/| /' conftest.$ac_ext >&5
16564
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016565( exit $ac_status )
16566ac_cv_pthread_system_supported=no
16567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568rm -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 +000016569fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016571
16572
Guido van Rossum627b2d71993-12-24 10:39:16 +000016573fi
16574
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016575 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16576echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016577 if test "$ac_cv_pthread_system_supported" = "yes"; then
16578
16579cat >>confdefs.h <<\_ACEOF
16580#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16581_ACEOF
16582
16583 fi
16584
16585for ac_func in pthread_sigmask
16586do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016587as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16588{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16589echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016591 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016592else
16593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016594/* confdefs.h. */
16595_ACEOF
16596cat confdefs.h >>conftest.$ac_ext
16597cat >>conftest.$ac_ext <<_ACEOF
16598/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016599/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16600 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16601#define $ac_func innocuous_$ac_func
16602
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016603/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016604 which can conflict with char $ac_func (); below.
16605 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016606 <limits.h> exists even on freestanding compilers. */
16607
16608#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016609# include <limits.h>
16610#else
16611# include <assert.h>
16612#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016613
16614#undef $ac_func
16615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616/* Override any GCC internal prototype to avoid an error.
16617 Use char because int might match the return type of a GCC
16618 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016619#ifdef __cplusplus
16620extern "C"
16621#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016622char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016623/* The GNU C library defines this for functions which it implements
16624 to always fail with ENOSYS. Some functions are actually named
16625 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016627choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016628#endif
16629
Skip Montanaro6dead952003-09-25 14:50:04 +000016630int
16631main ()
16632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016634 ;
16635 return 0;
16636}
16637_ACEOF
16638rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639if { (ac_try="$ac_link"
16640case "(($ac_try" in
16641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16642 *) ac_try_echo=$ac_try;;
16643esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016647 grep -v '^ *+' conftest.er1 >conftest.err
16648 rm -f conftest.er1
16649 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651 (exit $ac_status); } && {
16652 test -z "$ac_c_werror_flag" ||
16653 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016654 } && test -s conftest$ac_exeext &&
16655 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016656 eval "$as_ac_var=yes"
16657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016659sed 's/^/| /' conftest.$ac_ext >&5
16660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663
16664rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016666fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016667ac_res=`eval echo '${'$as_ac_var'}'`
16668 { echo "$as_me:$LINENO: result: $ac_res" >&5
16669echo "${ECHO_T}$ac_res" >&6; }
16670if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016671 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016672#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016673_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016674 case $ac_sys_system in
16675 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016676
Jason Tishlerfac083d2003-07-22 15:20:49 +000016677cat >>confdefs.h <<\_ACEOF
16678#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16679_ACEOF
16680
16681 ;;
16682 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016683fi
16684done
16685
16686fi
16687
16688
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016689# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016690
16691
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016692{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16693echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016695if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016697 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016698 { echo "$as_me:$LINENO: result: no" >&5
16699echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016700 ipv6=no
16701 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016702 *) { echo "$as_me:$LINENO: result: yes" >&5
16703echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016705#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016706_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016707
16708 ipv6=yes
16709 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016711else
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016713 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016714 { echo "$as_me:$LINENO: result: no" >&5
16715echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016716 ipv6=no
16717
16718else
Martin v. Löwis11437992002-04-12 09:54:03 +000016719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016720/* confdefs.h. */
16721_ACEOF
16722cat confdefs.h >>conftest.$ac_ext
16723cat >>conftest.$ac_ext <<_ACEOF
16724/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016725 /* AF_INET6 available check */
16726#include <sys/types.h>
16727#include <sys/socket.h>
16728main()
16729{
16730 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16731 exit(1);
16732 else
16733 exit(0);
16734}
16735
Martin v. Löwis11437992002-04-12 09:54:03 +000016736_ACEOF
16737rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738if { (ac_try="$ac_link"
16739case "(($ac_try" in
16740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16741 *) ac_try_echo=$ac_try;;
16742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016744 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748 { (case "(($ac_try" in
16749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16750 *) ac_try_echo=$ac_try;;
16751esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016756 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016757 { echo "$as_me:$LINENO: result: yes" >&5
16758echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016759 ipv6=yes
16760else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016761 echo "$as_me: program exited with status $ac_status" >&5
16762echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016763sed 's/^/| /' conftest.$ac_ext >&5
16764
Martin v. Löwis11437992002-04-12 09:54:03 +000016765( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016766{ echo "$as_me:$LINENO: result: no" >&5
16767echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016768 ipv6=no
16769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770rm -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 +000016771fi
16772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773
16774
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016775if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016776 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16777echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016779/* confdefs.h. */
16780_ACEOF
16781cat confdefs.h >>conftest.$ac_ext
16782cat >>conftest.$ac_ext <<_ACEOF
16783/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016784#include <sys/types.h>
16785#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016786int
16787main ()
16788{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016789struct sockaddr_in6 x;
16790x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 ;
16792 return 0;
16793}
16794_ACEOF
16795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796if { (ac_try="$ac_compile"
16797case "(($ac_try" in
16798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16799 *) ac_try_echo=$ac_try;;
16800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016804 grep -v '^ *+' conftest.er1 >conftest.err
16805 rm -f conftest.er1
16806 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808 (exit $ac_status); } && {
16809 test -z "$ac_c_werror_flag" ||
16810 test ! -s conftest.err
16811 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016812 { echo "$as_me:$LINENO: result: yes" >&5
16813echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016814 ipv6=yes
16815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016817sed 's/^/| /' conftest.$ac_ext >&5
16818
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016819 { echo "$as_me:$LINENO: result: no" >&5
16820echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016821 ipv6=no
16822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016823
16824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016825fi
16826
16827if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016828 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016829#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016830_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016831
16832fi
16833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834fi
16835
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016836
16837ipv6type=unknown
16838ipv6lib=none
16839ipv6trylibc=no
16840
16841if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016842 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16843echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016844 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16845 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016846 case $i in
16847 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016849/* confdefs.h. */
16850_ACEOF
16851cat confdefs.h >>conftest.$ac_ext
16852cat >>conftest.$ac_ext <<_ACEOF
16853/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016854
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016855#include <netinet/in.h>
16856#ifdef IPV6_INRIA_VERSION
16857yes
16858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016859_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016861 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016862 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016863fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016864rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016865
16866 ;;
16867 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016869/* confdefs.h. */
16870_ACEOF
16871cat confdefs.h >>conftest.$ac_ext
16872cat >>conftest.$ac_ext <<_ACEOF
16873/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016874
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016875#include <netinet/in.h>
16876#ifdef __KAME__
16877yes
16878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016879_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016881 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016882 ipv6type=$i;
16883 ipv6lib=inet6
16884 ipv6libdir=/usr/local/v6/lib
16885 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016886fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016887rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016888
16889 ;;
16890 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016892/* confdefs.h. */
16893_ACEOF
16894cat confdefs.h >>conftest.$ac_ext
16895cat >>conftest.$ac_ext <<_ACEOF
16896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016898#include <features.h>
16899#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16900yes
16901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016904 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016905 ipv6type=$i;
16906 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016907fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016908rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016909
16910 ;;
16911 linux-inet6)
16912 if test -d /usr/inet6; then
16913 ipv6type=$i
16914 ipv6lib=inet6
16915 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016916 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016917 fi
16918 ;;
16919 solaris)
16920 if test -f /etc/netconfig; then
16921 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16922 ipv6type=$i
16923 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016924 fi
16925 fi
16926 ;;
16927 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016929/* confdefs.h. */
16930_ACEOF
16931cat confdefs.h >>conftest.$ac_ext
16932cat >>conftest.$ac_ext <<_ACEOF
16933/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016934
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016935#include <sys/param.h>
16936#ifdef _TOSHIBA_INET6
16937yes
16938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016939_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016941 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016942 ipv6type=$i;
16943 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016944 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016945fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016946rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016947
16948 ;;
16949 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016951/* confdefs.h. */
16952_ACEOF
16953cat confdefs.h >>conftest.$ac_ext
16954cat >>conftest.$ac_ext <<_ACEOF
16955/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016956
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016957#include </usr/local/v6/include/sys/v6config.h>
16958#ifdef __V6D__
16959yes
16960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016961_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016963 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016964 ipv6type=$i;
16965 ipv6lib=v6;
16966 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016967 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016968fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016969rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016970
16971 ;;
16972 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016974/* confdefs.h. */
16975_ACEOF
16976cat confdefs.h >>conftest.$ac_ext
16977cat >>conftest.$ac_ext <<_ACEOF
16978/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016979
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016980#include <sys/param.h>
16981#ifdef _ZETA_MINAMI_INET6
16982yes
16983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016984_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016986 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016987 ipv6type=$i;
16988 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016989 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016990fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000016991rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016992
16993 ;;
16994 esac
16995 if test "$ipv6type" != "unknown"; then
16996 break
16997 fi
16998 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016999 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17000echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017001fi
17002
17003if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17004 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17005 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17006 echo "using lib$ipv6lib"
17007 else
17008 if test $ipv6trylibc = "yes"; then
17009 echo "using libc"
17010 else
17011 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17012 echo "You need to fetch lib$ipv6lib.a from appropriate"
17013 echo 'ipv6 kit and compile beforehand.'
17014 exit 1
17015 fi
17016 fi
17017fi
17018
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017019{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17020echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017021cat >conftest.$ac_ext <<_ACEOF
17022/* confdefs.h. */
17023_ACEOF
17024cat confdefs.h >>conftest.$ac_ext
17025cat >>conftest.$ac_ext <<_ACEOF
17026/* end confdefs.h. */
17027#include <Carbon/Carbon.h>
17028int
17029main ()
17030{
17031FSIORefNum fRef = 0
17032 ;
17033 return 0;
17034}
17035_ACEOF
17036rm -f conftest.$ac_objext
17037if { (ac_try="$ac_compile"
17038case "(($ac_try" in
17039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17040 *) ac_try_echo=$ac_try;;
17041esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017043 (eval "$ac_compile") 2>conftest.er1
17044 ac_status=$?
17045 grep -v '^ *+' conftest.er1 >conftest.err
17046 rm -f conftest.er1
17047 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017049 (exit $ac_status); } && {
17050 test -z "$ac_c_werror_flag" ||
17051 test ! -s conftest.err
17052 } && test -s conftest.$ac_objext; then
17053
17054cat >>confdefs.h <<\_ACEOF
17055#define HAVE_OSX105_SDK 1
17056_ACEOF
17057
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017058 { echo "$as_me:$LINENO: result: yes" >&5
17059echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017061 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017062sed 's/^/| /' conftest.$ac_ext >&5
17063
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017064 { echo "$as_me:$LINENO: result: no" >&5
17065echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017066
17067fi
17068
17069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17070
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017071# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017072{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17073echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017076if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077 withval=$with_doc_strings;
17078fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017079
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017080
17081if test -z "$with_doc_strings"
17082then with_doc_strings="yes"
17083fi
17084if test "$with_doc_strings" != "no"
17085then
17086
17087cat >>confdefs.h <<\_ACEOF
17088#define WITH_DOC_STRINGS 1
17089_ACEOF
17090
17091fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017092{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17093echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017094
Neil Schemenauera35c6882001-02-27 04:45:05 +000017095# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017096{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17097echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017100if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017102if test "$withval" != no
17103then
17104
17105cat >>confdefs.h <<\_ACEOF
17106#define WITH_TSC 1
17107_ACEOF
17108
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017109 { echo "$as_me:$LINENO: result: yes" >&5
17110echo "${ECHO_T}yes" >&6; }
17111else { echo "$as_me:$LINENO: result: no" >&5
17112echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017113fi
17114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017115 { echo "$as_me:$LINENO: result: no" >&5
17116echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017117fi
17118
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017119
17120# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017121{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17122echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017125if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126 withval=$with_pymalloc;
17127fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017128
Neil Schemenauera35c6882001-02-27 04:45:05 +000017129
Neil Schemenauer16c22972002-03-22 15:34:49 +000017130if test -z "$with_pymalloc"
17131then with_pymalloc="yes"
17132fi
17133if test "$with_pymalloc" != "no"
17134then
Martin v. Löwis11437992002-04-12 09:54:03 +000017135
17136cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017137#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017138_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017139
17140fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017141{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17142echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017143
Barry Warsawef82cd72000-06-30 16:21:01 +000017144# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017145{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17146echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017148# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017149if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017151if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017152then
17153
17154cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017155#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017156_ACEOF
17157
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017158 { echo "$as_me:$LINENO: result: yes" >&5
17159echo "${ECHO_T}yes" >&6; }
17160else { echo "$as_me:$LINENO: result: no" >&5
17161echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017162fi
17163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017164 { echo "$as_me:$LINENO: result: no" >&5
17165echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166fi
17167
Barry Warsawef82cd72000-06-30 16:21:01 +000017168
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017169# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017170
Guido van Rossum98935bf2001-09-05 19:13:16 +000017171DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017172
Guido van Rossume97ee181999-12-20 21:27:22 +000017173# the dlopen() function means we might want to use dynload_shlib.o. some
17174# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017175
Thomas Wouters3a584202000-08-05 23:28:51 +000017176for ac_func in dlopen
17177do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017178as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17179{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17180echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017181if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017183else
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017185/* confdefs.h. */
17186_ACEOF
17187cat confdefs.h >>conftest.$ac_ext
17188cat >>conftest.$ac_ext <<_ACEOF
17189/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017190/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17192#define $ac_func innocuous_$ac_func
17193
Guido van Rossume97ee181999-12-20 21:27:22 +000017194/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017195 which can conflict with char $ac_func (); below.
17196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017197 <limits.h> exists even on freestanding compilers. */
17198
17199#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017200# include <limits.h>
17201#else
17202# include <assert.h>
17203#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017204
17205#undef $ac_func
17206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207/* Override any GCC internal prototype to avoid an error.
17208 Use char because int might match the return type of a GCC
17209 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017210#ifdef __cplusplus
17211extern "C"
17212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017213char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017214/* The GNU C library defines this for functions which it implements
17215 to always fail with ENOSYS. Some functions are actually named
17216 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017218choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017219#endif
17220
Skip Montanaro6dead952003-09-25 14:50:04 +000017221int
17222main ()
17223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017225 ;
17226 return 0;
17227}
17228_ACEOF
17229rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230if { (ac_try="$ac_link"
17231case "(($ac_try" in
17232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17233 *) ac_try_echo=$ac_try;;
17234esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017238 grep -v '^ *+' conftest.er1 >conftest.err
17239 rm -f conftest.er1
17240 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242 (exit $ac_status); } && {
17243 test -z "$ac_c_werror_flag" ||
17244 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017245 } && test -s conftest$ac_exeext &&
17246 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017248else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017250sed 's/^/| /' conftest.$ac_ext >&5
17251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017254
17255rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017256 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017257fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017258ac_res=`eval echo '${'$as_ac_var'}'`
17259 { echo "$as_me:$LINENO: result: $ac_res" >&5
17260echo "${ECHO_T}$ac_res" >&6; }
17261if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017263#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017264_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017265
Guido van Rossume97ee181999-12-20 21:27:22 +000017266fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017267done
Guido van Rossume97ee181999-12-20 21:27:22 +000017268
Michael W. Hudson54241132001-12-07 15:38:26 +000017269
Guido van Rossume97ee181999-12-20 21:27:22 +000017270# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17271# loading of modules.
17272
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017273{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17274echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017275if test -z "$DYNLOADFILE"
17276then
17277 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017278 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17279 if test "$ac_cv_func_dlopen" = yes
17280 then DYNLOADFILE="dynload_shlib.o"
17281 else DYNLOADFILE="dynload_aix.o"
17282 fi
17283 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017284 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017285 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17286 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017287 *)
17288 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17289 # out any dynamic loading
17290 if test "$ac_cv_func_dlopen" = yes
17291 then DYNLOADFILE="dynload_shlib.o"
17292 else DYNLOADFILE="dynload_stub.o"
17293 fi
17294 ;;
17295 esac
17296fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017297{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17298echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017299if test "$DYNLOADFILE" != "dynload_stub.o"
17300then
Martin v. Löwis11437992002-04-12 09:54:03 +000017301
17302cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017303#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017304_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017305
17306fi
17307
Neil Schemenauer4e425612001-06-19 15:44:15 +000017308# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17309
Michael W. Hudson54241132001-12-07 15:38:26 +000017310
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017311{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17312echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017313if test -z "$MACHDEP_OBJS"
17314then
Jack Jansene578a632001-08-15 01:27:14 +000017315 MACHDEP_OBJS=$extra_machdep_objs
17316else
17317 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017318fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017319{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17320echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017321
Guido van Rossum627b2d71993-12-24 10:39:16 +000017322# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
Martin v. Löwisd6320502004-08-12 13:45:08 +000017394
Martin v. Löwisc3001752005-01-23 09:27:24 +000017395
17396
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017397
17398
Thomas Wouterscf297e42007-02-23 15:07:44 +000017399
17400
Gregory P. Smith25523d22007-09-03 16:44:55 +000017401
Christian Heimes4e30a842007-11-30 22:12:06 +000017402
Martin v. Löwis92fab752008-03-08 10:40:41 +000017403
Martin v. Löwis823725e2008-03-24 13:39:54 +000017404
17405
Benjamin Peterson965ce872009-04-05 21:24:58 +000017406
17407
17408
17409
Martin v. Löwis011e8422009-05-05 04:43:17 +000017410
Martin v. Löwis113a0852009-05-29 17:25:39 +000017411
Martin v. Löwis823725e2008-03-24 13:39:54 +000017412for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17413 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017414 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017415 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017416 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017417 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017418 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017419 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17420 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017421 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017422 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017423 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017424 truncate uname unsetenv utimes waitpid wait3 wait4 \
17425 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017426do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017427as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17428{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17429echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017432else
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017434/* confdefs.h. */
17435_ACEOF
17436cat confdefs.h >>conftest.$ac_ext
17437cat >>conftest.$ac_ext <<_ACEOF
17438/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017439/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17440 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17441#define $ac_func innocuous_$ac_func
17442
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017443/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017444 which can conflict with char $ac_func (); below.
17445 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017446 <limits.h> exists even on freestanding compilers. */
17447
17448#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017449# include <limits.h>
17450#else
17451# include <assert.h>
17452#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017453
17454#undef $ac_func
17455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017456/* Override any GCC internal prototype to avoid an error.
17457 Use char because int might match the return type of a GCC
17458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017459#ifdef __cplusplus
17460extern "C"
17461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017462char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017463/* The GNU C library defines this for functions which it implements
17464 to always fail with ENOSYS. Some functions are actually named
17465 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017467choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017468#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017469
Skip Montanaro6dead952003-09-25 14:50:04 +000017470int
17471main ()
17472{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017473return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017474 ;
17475 return 0;
17476}
17477_ACEOF
17478rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479if { (ac_try="$ac_link"
17480case "(($ac_try" in
17481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17482 *) ac_try_echo=$ac_try;;
17483esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017487 grep -v '^ *+' conftest.er1 >conftest.err
17488 rm -f conftest.er1
17489 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017491 (exit $ac_status); } && {
17492 test -z "$ac_c_werror_flag" ||
17493 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017494 } && test -s conftest$ac_exeext &&
17495 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017496 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017497else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017499sed 's/^/| /' conftest.$ac_ext >&5
17500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503
17504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017505 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017506fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017507ac_res=`eval echo '${'$as_ac_var'}'`
17508 { echo "$as_me:$LINENO: result: $ac_res" >&5
17509echo "${ECHO_T}$ac_res" >&6; }
17510if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017511 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017512#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017513_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017514
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017515fi
17516done
17517
Michael W. Hudson54241132001-12-07 15:38:26 +000017518
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017519# For some functions, having a definition is not sufficient, since
17520# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017521{ echo "$as_me:$LINENO: checking for chroot" >&5
17522echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017523cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017524/* confdefs.h. */
17525_ACEOF
17526cat confdefs.h >>conftest.$ac_ext
17527cat >>conftest.$ac_ext <<_ACEOF
17528/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017529#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017530int
17531main ()
17532{
17533void *x=chroot
17534 ;
17535 return 0;
17536}
17537_ACEOF
17538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539if { (ac_try="$ac_compile"
17540case "(($ac_try" in
17541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17542 *) ac_try_echo=$ac_try;;
17543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017547 grep -v '^ *+' conftest.er1 >conftest.err
17548 rm -f conftest.er1
17549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551 (exit $ac_status); } && {
17552 test -z "$ac_c_werror_flag" ||
17553 test ! -s conftest.err
17554 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017555
17556cat >>confdefs.h <<\_ACEOF
17557#define HAVE_CHROOT 1
17558_ACEOF
17559
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017560 { echo "$as_me:$LINENO: result: yes" >&5
17561echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017562else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017564sed 's/^/| /' conftest.$ac_ext >&5
17565
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017566 { echo "$as_me:$LINENO: result: no" >&5
17567echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017568
17569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570
17571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017572{ echo "$as_me:$LINENO: checking for link" >&5
17573echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017574cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017575/* confdefs.h. */
17576_ACEOF
17577cat confdefs.h >>conftest.$ac_ext
17578cat >>conftest.$ac_ext <<_ACEOF
17579/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017580#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017581int
17582main ()
17583{
17584void *x=link
17585 ;
17586 return 0;
17587}
17588_ACEOF
17589rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590if { (ac_try="$ac_compile"
17591case "(($ac_try" in
17592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17593 *) ac_try_echo=$ac_try;;
17594esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017598 grep -v '^ *+' conftest.er1 >conftest.err
17599 rm -f conftest.er1
17600 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602 (exit $ac_status); } && {
17603 test -z "$ac_c_werror_flag" ||
17604 test ! -s conftest.err
17605 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017606
17607cat >>confdefs.h <<\_ACEOF
17608#define HAVE_LINK 1
17609_ACEOF
17610
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017611 { echo "$as_me:$LINENO: result: yes" >&5
17612echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017613else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017615sed 's/^/| /' conftest.$ac_ext >&5
17616
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017617 { echo "$as_me:$LINENO: result: no" >&5
17618echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017619
17620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017621
17622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017623{ echo "$as_me:$LINENO: checking for symlink" >&5
17624echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017626/* confdefs.h. */
17627_ACEOF
17628cat confdefs.h >>conftest.$ac_ext
17629cat >>conftest.$ac_ext <<_ACEOF
17630/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017631#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017632int
17633main ()
17634{
17635void *x=symlink
17636 ;
17637 return 0;
17638}
17639_ACEOF
17640rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641if { (ac_try="$ac_compile"
17642case "(($ac_try" in
17643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17644 *) ac_try_echo=$ac_try;;
17645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017649 grep -v '^ *+' conftest.er1 >conftest.err
17650 rm -f conftest.er1
17651 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653 (exit $ac_status); } && {
17654 test -z "$ac_c_werror_flag" ||
17655 test ! -s conftest.err
17656 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017657
17658cat >>confdefs.h <<\_ACEOF
17659#define HAVE_SYMLINK 1
17660_ACEOF
17661
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017662 { echo "$as_me:$LINENO: result: yes" >&5
17663echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017664else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017666sed 's/^/| /' conftest.$ac_ext >&5
17667
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017668 { echo "$as_me:$LINENO: result: no" >&5
17669echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017670
17671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672
17673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017674{ echo "$as_me:$LINENO: checking for fchdir" >&5
17675echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017677/* confdefs.h. */
17678_ACEOF
17679cat confdefs.h >>conftest.$ac_ext
17680cat >>conftest.$ac_ext <<_ACEOF
17681/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017682#include <unistd.h>
17683int
17684main ()
17685{
17686void *x=fchdir
17687 ;
17688 return 0;
17689}
17690_ACEOF
17691rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692if { (ac_try="$ac_compile"
17693case "(($ac_try" in
17694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17695 *) ac_try_echo=$ac_try;;
17696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017700 grep -v '^ *+' conftest.er1 >conftest.err
17701 rm -f conftest.er1
17702 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 (exit $ac_status); } && {
17705 test -z "$ac_c_werror_flag" ||
17706 test ! -s conftest.err
17707 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017708
17709cat >>confdefs.h <<\_ACEOF
17710#define HAVE_FCHDIR 1
17711_ACEOF
17712
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017713 { echo "$as_me:$LINENO: result: yes" >&5
17714echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017715else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017717sed 's/^/| /' conftest.$ac_ext >&5
17718
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017719 { echo "$as_me:$LINENO: result: no" >&5
17720echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017721
17722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723
17724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017725{ echo "$as_me:$LINENO: checking for fsync" >&5
17726echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017727cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017728/* confdefs.h. */
17729_ACEOF
17730cat confdefs.h >>conftest.$ac_ext
17731cat >>conftest.$ac_ext <<_ACEOF
17732/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017733#include <unistd.h>
17734int
17735main ()
17736{
17737void *x=fsync
17738 ;
17739 return 0;
17740}
17741_ACEOF
17742rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017743if { (ac_try="$ac_compile"
17744case "(($ac_try" in
17745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17746 *) ac_try_echo=$ac_try;;
17747esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017751 grep -v '^ *+' conftest.er1 >conftest.err
17752 rm -f conftest.er1
17753 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755 (exit $ac_status); } && {
17756 test -z "$ac_c_werror_flag" ||
17757 test ! -s conftest.err
17758 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017759
17760cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017761#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017762_ACEOF
17763
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017764 { echo "$as_me:$LINENO: result: yes" >&5
17765echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017768sed 's/^/| /' conftest.$ac_ext >&5
17769
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017770 { echo "$as_me:$LINENO: result: no" >&5
17771echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017772
17773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774
17775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017776{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17777echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017778cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017779/* confdefs.h. */
17780_ACEOF
17781cat confdefs.h >>conftest.$ac_ext
17782cat >>conftest.$ac_ext <<_ACEOF
17783/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017784#include <unistd.h>
17785int
17786main ()
17787{
17788void *x=fdatasync
17789 ;
17790 return 0;
17791}
17792_ACEOF
17793rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794if { (ac_try="$ac_compile"
17795case "(($ac_try" in
17796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17797 *) ac_try_echo=$ac_try;;
17798esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017802 grep -v '^ *+' conftest.er1 >conftest.err
17803 rm -f conftest.er1
17804 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 (exit $ac_status); } && {
17807 test -z "$ac_c_werror_flag" ||
17808 test ! -s conftest.err
17809 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017810
17811cat >>confdefs.h <<\_ACEOF
17812#define HAVE_FDATASYNC 1
17813_ACEOF
17814
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017815 { echo "$as_me:$LINENO: result: yes" >&5
17816echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017817else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017819sed 's/^/| /' conftest.$ac_ext >&5
17820
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017821 { echo "$as_me:$LINENO: result: no" >&5
17822echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017823
17824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825
17826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017827{ echo "$as_me:$LINENO: checking for epoll" >&5
17828echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017829cat >conftest.$ac_ext <<_ACEOF
17830/* confdefs.h. */
17831_ACEOF
17832cat confdefs.h >>conftest.$ac_ext
17833cat >>conftest.$ac_ext <<_ACEOF
17834/* end confdefs.h. */
17835#include <sys/epoll.h>
17836int
17837main ()
17838{
17839void *x=epoll_create
17840 ;
17841 return 0;
17842}
17843_ACEOF
17844rm -f conftest.$ac_objext
17845if { (ac_try="$ac_compile"
17846case "(($ac_try" in
17847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17848 *) ac_try_echo=$ac_try;;
17849esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017851 (eval "$ac_compile") 2>conftest.er1
17852 ac_status=$?
17853 grep -v '^ *+' conftest.er1 >conftest.err
17854 rm -f conftest.er1
17855 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017857 (exit $ac_status); } && {
17858 test -z "$ac_c_werror_flag" ||
17859 test ! -s conftest.err
17860 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017861
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017862cat >>confdefs.h <<\_ACEOF
17863#define HAVE_EPOLL 1
17864_ACEOF
17865
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017866 { echo "$as_me:$LINENO: result: yes" >&5
17867echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017868else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017869 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017870sed 's/^/| /' conftest.$ac_ext >&5
17871
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017872 { echo "$as_me:$LINENO: result: no" >&5
17873echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017874
17875fi
17876
17877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017878{ echo "$as_me:$LINENO: checking for kqueue" >&5
17879echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017880cat >conftest.$ac_ext <<_ACEOF
17881/* confdefs.h. */
17882_ACEOF
17883cat confdefs.h >>conftest.$ac_ext
17884cat >>conftest.$ac_ext <<_ACEOF
17885/* end confdefs.h. */
17886
17887#include <sys/types.h>
17888#include <sys/event.h>
17889
17890int
17891main ()
17892{
17893int x=kqueue()
17894 ;
17895 return 0;
17896}
17897_ACEOF
17898rm -f conftest.$ac_objext
17899if { (ac_try="$ac_compile"
17900case "(($ac_try" in
17901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17902 *) ac_try_echo=$ac_try;;
17903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017905 (eval "$ac_compile") 2>conftest.er1
17906 ac_status=$?
17907 grep -v '^ *+' conftest.er1 >conftest.err
17908 rm -f conftest.er1
17909 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017911 (exit $ac_status); } && {
17912 test -z "$ac_c_werror_flag" ||
17913 test ! -s conftest.err
17914 } && test -s conftest.$ac_objext; then
17915
17916cat >>confdefs.h <<\_ACEOF
17917#define HAVE_KQUEUE 1
17918_ACEOF
17919
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017920 { echo "$as_me:$LINENO: result: yes" >&5
17921echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017923 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017924sed 's/^/| /' conftest.$ac_ext >&5
17925
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017926 { echo "$as_me:$LINENO: result: no" >&5
17927echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017928
17929fi
17930
17931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017932# On some systems (eg. FreeBSD 5), we would find a definition of the
17933# functions ctermid_r, setgroups in the library, but no prototype
17934# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17935# address to avoid compiler warnings and potential miscompilations
17936# because of the missing prototypes.
17937
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017938{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17939echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017940cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017941/* confdefs.h. */
17942_ACEOF
17943cat confdefs.h >>conftest.$ac_ext
17944cat >>conftest.$ac_ext <<_ACEOF
17945/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017946
17947#include "confdefs.h"
17948#include <stdio.h>
17949
Martin v. Löwisd5843682002-11-21 20:41:28 +000017950int
17951main ()
17952{
17953void* p = ctermid_r
17954 ;
17955 return 0;
17956}
17957_ACEOF
17958rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017959if { (ac_try="$ac_compile"
17960case "(($ac_try" in
17961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17962 *) ac_try_echo=$ac_try;;
17963esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017967 grep -v '^ *+' conftest.er1 >conftest.err
17968 rm -f conftest.er1
17969 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017971 (exit $ac_status); } && {
17972 test -z "$ac_c_werror_flag" ||
17973 test ! -s conftest.err
17974 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017975
17976cat >>confdefs.h <<\_ACEOF
17977#define HAVE_CTERMID_R 1
17978_ACEOF
17979
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017980 { echo "$as_me:$LINENO: result: yes" >&5
17981echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017984sed 's/^/| /' conftest.$ac_ext >&5
17985
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017986 { echo "$as_me:$LINENO: result: no" >&5
17987echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017988
17989fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17992
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017993{ echo "$as_me:$LINENO: checking for flock" >&5
17994echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017996/* confdefs.h. */
17997_ACEOF
17998cat confdefs.h >>conftest.$ac_ext
17999cat >>conftest.$ac_ext <<_ACEOF
18000/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018001
18002#include "confdefs.h"
18003#include <sys/file.h>
18004
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018005int
18006main ()
18007{
18008void* p = flock
18009 ;
18010 return 0;
18011}
18012_ACEOF
18013rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014if { (ac_try="$ac_compile"
18015case "(($ac_try" in
18016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18017 *) ac_try_echo=$ac_try;;
18018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018022 grep -v '^ *+' conftest.er1 >conftest.err
18023 rm -f conftest.er1
18024 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026 (exit $ac_status); } && {
18027 test -z "$ac_c_werror_flag" ||
18028 test ! -s conftest.err
18029 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018030
18031cat >>confdefs.h <<\_ACEOF
18032#define HAVE_FLOCK 1
18033_ACEOF
18034
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018035 { echo "$as_me:$LINENO: result: yes" >&5
18036echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018037else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018039sed 's/^/| /' conftest.$ac_ext >&5
18040
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018041 { echo "$as_me:$LINENO: result: no" >&5
18042echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018043
18044fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18047
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018048{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18049echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018051/* confdefs.h. */
18052_ACEOF
18053cat confdefs.h >>conftest.$ac_ext
18054cat >>conftest.$ac_ext <<_ACEOF
18055/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018056
18057#include "confdefs.h"
18058#include <unistd.h>
18059
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018060int
18061main ()
18062{
18063void* p = getpagesize
18064 ;
18065 return 0;
18066}
18067_ACEOF
18068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069if { (ac_try="$ac_compile"
18070case "(($ac_try" in
18071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18072 *) ac_try_echo=$ac_try;;
18073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018077 grep -v '^ *+' conftest.er1 >conftest.err
18078 rm -f conftest.er1
18079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081 (exit $ac_status); } && {
18082 test -z "$ac_c_werror_flag" ||
18083 test ! -s conftest.err
18084 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018085
18086cat >>confdefs.h <<\_ACEOF
18087#define HAVE_GETPAGESIZE 1
18088_ACEOF
18089
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018090 { echo "$as_me:$LINENO: result: yes" >&5
18091echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018092else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018094sed 's/^/| /' conftest.$ac_ext >&5
18095
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018096 { echo "$as_me:$LINENO: result: no" >&5
18097echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018098
18099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100
18101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018102
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018103for ac_prog in true
18104do
18105 # Extract the first word of "$ac_prog", so it can be a program name with args.
18106set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018107{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18108echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018109if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018110 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018111else
18112 if test -n "$TRUE"; then
18113 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18114else
18115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18116for as_dir in $PATH
18117do
18118 IFS=$as_save_IFS
18119 test -z "$as_dir" && as_dir=.
18120 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121 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 +000018122 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018123 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018124 break 2
18125 fi
18126done
18127done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018128IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018129
18130fi
18131fi
18132TRUE=$ac_cv_prog_TRUE
18133if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018134 { echo "$as_me:$LINENO: result: $TRUE" >&5
18135echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018136else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018137 { echo "$as_me:$LINENO: result: no" >&5
18138echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018139fi
18140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018142 test -n "$TRUE" && break
18143done
18144test -n "$TRUE" || TRUE="/bin/true"
18145
18146
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018147{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18148echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018149if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018150 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018151else
18152 ac_check_lib_save_LIBS=$LIBS
18153LIBS="-lc $LIBS"
18154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018155/* confdefs.h. */
18156_ACEOF
18157cat confdefs.h >>conftest.$ac_ext
18158cat >>conftest.$ac_ext <<_ACEOF
18159/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018161/* Override any GCC internal prototype to avoid an error.
18162 Use char because int might match the return type of a GCC
18163 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018164#ifdef __cplusplus
18165extern "C"
18166#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018167char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018168int
18169main ()
18170{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018172 ;
18173 return 0;
18174}
18175_ACEOF
18176rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018177if { (ac_try="$ac_link"
18178case "(($ac_try" in
18179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18180 *) ac_try_echo=$ac_try;;
18181esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018183 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018185 grep -v '^ *+' conftest.er1 >conftest.err
18186 rm -f conftest.er1
18187 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189 (exit $ac_status); } && {
18190 test -z "$ac_c_werror_flag" ||
18191 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018192 } && test -s conftest$ac_exeext &&
18193 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018194 ac_cv_lib_c_inet_aton=yes
18195else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018197sed 's/^/| /' conftest.$ac_ext >&5
18198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018199 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201
18202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018204LIBS=$ac_check_lib_save_LIBS
18205fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018206{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18207echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18208if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018209 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018210else
18211
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018212{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18213echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018214if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018215 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018216else
18217 ac_check_lib_save_LIBS=$LIBS
18218LIBS="-lresolv $LIBS"
18219cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018220/* confdefs.h. */
18221_ACEOF
18222cat confdefs.h >>conftest.$ac_ext
18223cat >>conftest.$ac_ext <<_ACEOF
18224/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018226/* Override any GCC internal prototype to avoid an error.
18227 Use char because int might match the return type of a GCC
18228 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018229#ifdef __cplusplus
18230extern "C"
18231#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018232char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018233int
18234main ()
18235{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018237 ;
18238 return 0;
18239}
18240_ACEOF
18241rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018242if { (ac_try="$ac_link"
18243case "(($ac_try" in
18244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18245 *) ac_try_echo=$ac_try;;
18246esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018248 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018250 grep -v '^ *+' conftest.er1 >conftest.err
18251 rm -f conftest.er1
18252 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018254 (exit $ac_status); } && {
18255 test -z "$ac_c_werror_flag" ||
18256 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018257 } && test -s conftest$ac_exeext &&
18258 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018259 ac_cv_lib_resolv_inet_aton=yes
18260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018262sed 's/^/| /' conftest.$ac_ext >&5
18263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018264 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018266
18267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018268 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018269LIBS=$ac_check_lib_save_LIBS
18270fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018271{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18272echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18273if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018274 cat >>confdefs.h <<_ACEOF
18275#define HAVE_LIBRESOLV 1
18276_ACEOF
18277
18278 LIBS="-lresolv $LIBS"
18279
18280fi
18281
18282
18283fi
18284
18285
Christian Heimesd0764e22007-12-04 15:00:33 +000018286# On Tru64, chflags seems to be present, but calling it will
18287# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018288{ echo "$as_me:$LINENO: checking for chflags" >&5
18289echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018290if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018291 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018292else
18293 if test "$cross_compiling" = yes; then
18294 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018295else
18296 cat >conftest.$ac_ext <<_ACEOF
18297/* confdefs.h. */
18298_ACEOF
18299cat confdefs.h >>conftest.$ac_ext
18300cat >>conftest.$ac_ext <<_ACEOF
18301/* end confdefs.h. */
18302
18303#include <sys/stat.h>
18304#include <unistd.h>
18305int main(int argc, char*argv[])
18306{
18307 if(chflags(argv[0], 0) != 0)
18308 return 1;
18309 return 0;
18310}
18311
18312_ACEOF
18313rm -f conftest$ac_exeext
18314if { (ac_try="$ac_link"
18315case "(($ac_try" in
18316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18317 *) ac_try_echo=$ac_try;;
18318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018320 (eval "$ac_link") 2>&5
18321 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18324 { (case "(($ac_try" in
18325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18326 *) ac_try_echo=$ac_try;;
18327esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018329 (eval "$ac_try") 2>&5
18330 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018332 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018333 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018334else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018335 echo "$as_me: program exited with status $ac_status" >&5
18336echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018337sed 's/^/| /' conftest.$ac_ext >&5
18338
18339( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018340ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018341fi
18342rm -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 +000018343fi
18344
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018345
18346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018347fi
18348
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018349{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18350echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018351if test $ac_cv_have_chflags = yes
18352then
18353
18354cat >>confdefs.h <<\_ACEOF
18355#define HAVE_CHFLAGS 1
18356_ACEOF
18357
18358fi
18359
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018360{ echo "$as_me:$LINENO: checking for lchflags" >&5
18361echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018362if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018363 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018364else
18365 if test "$cross_compiling" = yes; then
18366 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018367else
18368 cat >conftest.$ac_ext <<_ACEOF
18369/* confdefs.h. */
18370_ACEOF
18371cat confdefs.h >>conftest.$ac_ext
18372cat >>conftest.$ac_ext <<_ACEOF
18373/* end confdefs.h. */
18374
18375#include <sys/stat.h>
18376#include <unistd.h>
18377int main(int argc, char*argv[])
18378{
18379 if(lchflags(argv[0], 0) != 0)
18380 return 1;
18381 return 0;
18382}
18383
18384_ACEOF
18385rm -f conftest$ac_exeext
18386if { (ac_try="$ac_link"
18387case "(($ac_try" in
18388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18389 *) ac_try_echo=$ac_try;;
18390esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018392 (eval "$ac_link") 2>&5
18393 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18396 { (case "(($ac_try" in
18397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18398 *) ac_try_echo=$ac_try;;
18399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018401 (eval "$ac_try") 2>&5
18402 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018404 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018405 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018406else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018407 echo "$as_me: program exited with status $ac_status" >&5
18408echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018409sed 's/^/| /' conftest.$ac_ext >&5
18410
18411( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018412ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018413fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18415fi
18416
18417
Christian Heimesd0764e22007-12-04 15:00:33 +000018418
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018419fi
18420
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018421{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18422echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018423if test $ac_cv_have_lchflags = yes
18424then
18425
18426cat >>confdefs.h <<\_ACEOF
18427#define HAVE_LCHFLAGS 1
18428_ACEOF
18429
18430fi
18431
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018432case $ac_sys_system/$ac_sys_release in
18433Darwin/*)
18434 _CUR_CFLAGS="${CFLAGS}"
18435 _CUR_LDFLAGS="${LDFLAGS}"
18436 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18437 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18438 ;;
18439esac
18440
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018441{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18442echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018443if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018444 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018445else
18446 ac_check_lib_save_LIBS=$LIBS
18447LIBS="-lz $LIBS"
18448cat >conftest.$ac_ext <<_ACEOF
18449/* confdefs.h. */
18450_ACEOF
18451cat confdefs.h >>conftest.$ac_ext
18452cat >>conftest.$ac_ext <<_ACEOF
18453/* end confdefs.h. */
18454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455/* Override any GCC internal prototype to avoid an error.
18456 Use char because int might match the return type of a GCC
18457 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018458#ifdef __cplusplus
18459extern "C"
18460#endif
18461char inflateCopy ();
18462int
18463main ()
18464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018465return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018466 ;
18467 return 0;
18468}
18469_ACEOF
18470rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471if { (ac_try="$ac_link"
18472case "(($ac_try" in
18473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18474 *) ac_try_echo=$ac_try;;
18475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018478 ac_status=$?
18479 grep -v '^ *+' conftest.er1 >conftest.err
18480 rm -f conftest.er1
18481 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018483 (exit $ac_status); } && {
18484 test -z "$ac_c_werror_flag" ||
18485 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018486 } && test -s conftest$ac_exeext &&
18487 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018488 ac_cv_lib_z_inflateCopy=yes
18489else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018490 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018491sed 's/^/| /' conftest.$ac_ext >&5
18492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018493 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018495
18496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018497 conftest$ac_exeext conftest.$ac_ext
18498LIBS=$ac_check_lib_save_LIBS
18499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018500{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18501echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18502if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018503
18504cat >>confdefs.h <<\_ACEOF
18505#define HAVE_ZLIB_COPY 1
18506_ACEOF
18507
18508fi
18509
18510
18511case $ac_sys_system/$ac_sys_release in
18512Darwin/*)
18513 CFLAGS="${_CUR_CFLAGS}"
18514 LDFLAGS="${_CUR_LDFLAGS}"
18515 ;;
18516esac
18517
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018518{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18519echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018521/* confdefs.h. */
18522_ACEOF
18523cat confdefs.h >>conftest.$ac_ext
18524cat >>conftest.$ac_ext <<_ACEOF
18525/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018526
18527#include "confdefs.h"
18528#include <netdb.h>
18529
Martin v. Löwise9416172003-05-03 10:12:45 +000018530int
18531main ()
18532{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018533void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018534 ;
18535 return 0;
18536}
18537_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018538rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018539if { (ac_try="$ac_link"
18540case "(($ac_try" in
18541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18542 *) ac_try_echo=$ac_try;;
18543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018545 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018547 grep -v '^ *+' conftest.er1 >conftest.err
18548 rm -f conftest.er1
18549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018551 (exit $ac_status); } && {
18552 test -z "$ac_c_werror_flag" ||
18553 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018554 } && test -s conftest$ac_exeext &&
18555 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018556
18557cat >>confdefs.h <<\_ACEOF
18558#define HAVE_HSTRERROR 1
18559_ACEOF
18560
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018561 { echo "$as_me:$LINENO: result: yes" >&5
18562echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018565sed 's/^/| /' conftest.$ac_ext >&5
18566
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018567 { echo "$as_me:$LINENO: result: no" >&5
18568echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018569
18570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571
18572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018574
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018575{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18576echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018578/* confdefs.h. */
18579_ACEOF
18580cat confdefs.h >>conftest.$ac_ext
18581cat >>conftest.$ac_ext <<_ACEOF
18582/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018583
18584#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018585#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018586#include <sys/socket.h>
18587#include <netinet/in.h>
18588#include <arpa/inet.h>
18589
Martin v. Löwise9416172003-05-03 10:12:45 +000018590int
18591main ()
18592{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018593void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018594 ;
18595 return 0;
18596}
18597_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018598rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599if { (ac_try="$ac_link"
18600case "(($ac_try" in
18601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18602 *) ac_try_echo=$ac_try;;
18603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018605 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018607 grep -v '^ *+' conftest.er1 >conftest.err
18608 rm -f conftest.er1
18609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611 (exit $ac_status); } && {
18612 test -z "$ac_c_werror_flag" ||
18613 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018614 } && test -s conftest$ac_exeext &&
18615 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018616
18617cat >>confdefs.h <<\_ACEOF
18618#define HAVE_INET_ATON 1
18619_ACEOF
18620
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018621 { echo "$as_me:$LINENO: result: yes" >&5
18622echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018625sed 's/^/| /' conftest.$ac_ext >&5
18626
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018627 { echo "$as_me:$LINENO: result: no" >&5
18628echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018629
18630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631
18632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018634
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018635{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18636echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018638/* confdefs.h. */
18639_ACEOF
18640cat confdefs.h >>conftest.$ac_ext
18641cat >>conftest.$ac_ext <<_ACEOF
18642/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018643
18644#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018645#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018646#include <sys/socket.h>
18647#include <netinet/in.h>
18648#include <arpa/inet.h>
18649
Martin v. Löwise9416172003-05-03 10:12:45 +000018650int
18651main ()
18652{
18653void* p = inet_pton
18654 ;
18655 return 0;
18656}
18657_ACEOF
18658rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018659if { (ac_try="$ac_compile"
18660case "(($ac_try" in
18661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18662 *) ac_try_echo=$ac_try;;
18663esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018667 grep -v '^ *+' conftest.er1 >conftest.err
18668 rm -f conftest.er1
18669 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671 (exit $ac_status); } && {
18672 test -z "$ac_c_werror_flag" ||
18673 test ! -s conftest.err
18674 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018675
18676cat >>confdefs.h <<\_ACEOF
18677#define HAVE_INET_PTON 1
18678_ACEOF
18679
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018680 { echo "$as_me:$LINENO: result: yes" >&5
18681echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018682else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018684sed 's/^/| /' conftest.$ac_ext >&5
18685
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018686 { echo "$as_me:$LINENO: result: no" >&5
18687echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018688
18689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018690
18691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018692
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018693# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018694{ echo "$as_me:$LINENO: checking for setgroups" >&5
18695echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018696cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018697/* confdefs.h. */
18698_ACEOF
18699cat confdefs.h >>conftest.$ac_ext
18700cat >>conftest.$ac_ext <<_ACEOF
18701/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018702
18703#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018704#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018705#ifdef HAVE_GRP_H
18706#include <grp.h>
18707#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018708
Martin v. Löwisd5843682002-11-21 20:41:28 +000018709int
18710main ()
18711{
18712void* p = setgroups
18713 ;
18714 return 0;
18715}
18716_ACEOF
18717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018718if { (ac_try="$ac_compile"
18719case "(($ac_try" in
18720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18721 *) ac_try_echo=$ac_try;;
18722esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018726 grep -v '^ *+' conftest.er1 >conftest.err
18727 rm -f conftest.er1
18728 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018730 (exit $ac_status); } && {
18731 test -z "$ac_c_werror_flag" ||
18732 test ! -s conftest.err
18733 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018734
18735cat >>confdefs.h <<\_ACEOF
18736#define HAVE_SETGROUPS 1
18737_ACEOF
18738
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018739 { echo "$as_me:$LINENO: result: yes" >&5
18740echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018741else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018743sed 's/^/| /' conftest.$ac_ext >&5
18744
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018745 { echo "$as_me:$LINENO: result: no" >&5
18746echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018747
18748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018749
18750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018751
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018752# check for openpty and forkpty
18753
Martin v. Löwis11437992002-04-12 09:54:03 +000018754
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018755for ac_func in openpty
18756do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018757as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18758{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18759echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018760if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018762else
Martin v. Löwis11437992002-04-12 09:54:03 +000018763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018764/* confdefs.h. */
18765_ACEOF
18766cat confdefs.h >>conftest.$ac_ext
18767cat >>conftest.$ac_ext <<_ACEOF
18768/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018769/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18770 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18771#define $ac_func innocuous_$ac_func
18772
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018773/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018774 which can conflict with char $ac_func (); below.
18775 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018776 <limits.h> exists even on freestanding compilers. */
18777
18778#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018779# include <limits.h>
18780#else
18781# include <assert.h>
18782#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018783
18784#undef $ac_func
18785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018786/* Override any GCC internal prototype to avoid an error.
18787 Use char because int might match the return type of a GCC
18788 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018789#ifdef __cplusplus
18790extern "C"
18791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018792char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018793/* The GNU C library defines this for functions which it implements
18794 to always fail with ENOSYS. Some functions are actually named
18795 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018796#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018797choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018798#endif
18799
Skip Montanaro6dead952003-09-25 14:50:04 +000018800int
18801main ()
18802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018803return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018804 ;
18805 return 0;
18806}
18807_ACEOF
18808rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018809if { (ac_try="$ac_link"
18810case "(($ac_try" in
18811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18812 *) ac_try_echo=$ac_try;;
18813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018815 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018817 grep -v '^ *+' conftest.er1 >conftest.err
18818 rm -f conftest.er1
18819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018821 (exit $ac_status); } && {
18822 test -z "$ac_c_werror_flag" ||
18823 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018824 } && test -s conftest$ac_exeext &&
18825 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018826 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018829sed 's/^/| /' conftest.$ac_ext >&5
18830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018831 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018833
18834rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018835 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018836fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018837ac_res=`eval echo '${'$as_ac_var'}'`
18838 { echo "$as_me:$LINENO: result: $ac_res" >&5
18839echo "${ECHO_T}$ac_res" >&6; }
18840if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018841 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018842#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018843_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018844
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018846 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18847echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018848if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018849 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018850else
Martin v. Löwis11437992002-04-12 09:54:03 +000018851 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018852LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018854/* confdefs.h. */
18855_ACEOF
18856cat confdefs.h >>conftest.$ac_ext
18857cat >>conftest.$ac_ext <<_ACEOF
18858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018860/* Override any GCC internal prototype to avoid an error.
18861 Use char because int might match the return type of a GCC
18862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018863#ifdef __cplusplus
18864extern "C"
18865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018866char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018867int
18868main ()
18869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018870return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018871 ;
18872 return 0;
18873}
18874_ACEOF
18875rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018876if { (ac_try="$ac_link"
18877case "(($ac_try" in
18878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18879 *) ac_try_echo=$ac_try;;
18880esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018882 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018884 grep -v '^ *+' conftest.er1 >conftest.err
18885 rm -f conftest.er1
18886 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018888 (exit $ac_status); } && {
18889 test -z "$ac_c_werror_flag" ||
18890 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018891 } && test -s conftest$ac_exeext &&
18892 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018893 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018894else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018896sed 's/^/| /' conftest.$ac_ext >&5
18897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018898 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018900
18901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018903LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018904fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018905{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18906echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18907if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018908 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018909#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018910_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018911 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018912else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018913 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18914echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018915if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018916 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018917else
18918 ac_check_lib_save_LIBS=$LIBS
18919LIBS="-lbsd $LIBS"
18920cat >conftest.$ac_ext <<_ACEOF
18921/* confdefs.h. */
18922_ACEOF
18923cat confdefs.h >>conftest.$ac_ext
18924cat >>conftest.$ac_ext <<_ACEOF
18925/* end confdefs.h. */
18926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018927/* Override any GCC internal prototype to avoid an error.
18928 Use char because int might match the return type of a GCC
18929 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018930#ifdef __cplusplus
18931extern "C"
18932#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018933char openpty ();
18934int
18935main ()
18936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018937return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018938 ;
18939 return 0;
18940}
18941_ACEOF
18942rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018943if { (ac_try="$ac_link"
18944case "(($ac_try" in
18945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18946 *) ac_try_echo=$ac_try;;
18947esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018949 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018950 ac_status=$?
18951 grep -v '^ *+' conftest.er1 >conftest.err
18952 rm -f conftest.er1
18953 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018955 (exit $ac_status); } && {
18956 test -z "$ac_c_werror_flag" ||
18957 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018958 } && test -s conftest$ac_exeext &&
18959 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018960 ac_cv_lib_bsd_openpty=yes
18961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018962 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018963sed 's/^/| /' conftest.$ac_ext >&5
18964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018965 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018967
18968rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018969 conftest$ac_exeext conftest.$ac_ext
18970LIBS=$ac_check_lib_save_LIBS
18971fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018972{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18973echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
18974if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018975 cat >>confdefs.h <<\_ACEOF
18976#define HAVE_OPENPTY 1
18977_ACEOF
18978 LIBS="$LIBS -lbsd"
18979fi
18980
18981
18982fi
18983
Fred Drake8cef4cf2000-06-28 16:40:38 +000018984
18985fi
18986done
18987
Martin v. Löwis11437992002-04-12 09:54:03 +000018988
Fred Drake8cef4cf2000-06-28 16:40:38 +000018989for ac_func in forkpty
18990do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018991as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18992{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18993echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018994if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018995 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018996else
Martin v. Löwis11437992002-04-12 09:54:03 +000018997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018998/* confdefs.h. */
18999_ACEOF
19000cat confdefs.h >>conftest.$ac_ext
19001cat >>conftest.$ac_ext <<_ACEOF
19002/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019003/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19004 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19005#define $ac_func innocuous_$ac_func
19006
Fred Drake8cef4cf2000-06-28 16:40:38 +000019007/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019008 which can conflict with char $ac_func (); below.
19009 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019010 <limits.h> exists even on freestanding compilers. */
19011
19012#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019013# include <limits.h>
19014#else
19015# include <assert.h>
19016#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019017
19018#undef $ac_func
19019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019020/* Override any GCC internal prototype to avoid an error.
19021 Use char because int might match the return type of a GCC
19022 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019023#ifdef __cplusplus
19024extern "C"
19025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019026char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019027/* The GNU C library defines this for functions which it implements
19028 to always fail with ENOSYS. Some functions are actually named
19029 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019030#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019031choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019032#endif
19033
Skip Montanaro6dead952003-09-25 14:50:04 +000019034int
19035main ()
19036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019037return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019038 ;
19039 return 0;
19040}
19041_ACEOF
19042rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019043if { (ac_try="$ac_link"
19044case "(($ac_try" in
19045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19046 *) ac_try_echo=$ac_try;;
19047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019049 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019051 grep -v '^ *+' conftest.er1 >conftest.err
19052 rm -f conftest.er1
19053 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019055 (exit $ac_status); } && {
19056 test -z "$ac_c_werror_flag" ||
19057 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019058 } && test -s conftest$ac_exeext &&
19059 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019065 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019067
19068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019069 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019070fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019071ac_res=`eval echo '${'$as_ac_var'}'`
19072 { echo "$as_me:$LINENO: result: $ac_res" >&5
19073echo "${ECHO_T}$ac_res" >&6; }
19074if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019075 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019076#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019077_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019078
Fred Drake8cef4cf2000-06-28 16:40:38 +000019079else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019080 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19081echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019082if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019083 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019084else
Martin v. Löwis11437992002-04-12 09:54:03 +000019085 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019086LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019087cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019088/* confdefs.h. */
19089_ACEOF
19090cat confdefs.h >>conftest.$ac_ext
19091cat >>conftest.$ac_ext <<_ACEOF
19092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019094/* Override any GCC internal prototype to avoid an error.
19095 Use char because int might match the return type of a GCC
19096 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019097#ifdef __cplusplus
19098extern "C"
19099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019100char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019101int
19102main ()
19103{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019104return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019105 ;
19106 return 0;
19107}
19108_ACEOF
19109rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019110if { (ac_try="$ac_link"
19111case "(($ac_try" in
19112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19113 *) ac_try_echo=$ac_try;;
19114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019116 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019118 grep -v '^ *+' conftest.er1 >conftest.err
19119 rm -f conftest.er1
19120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019122 (exit $ac_status); } && {
19123 test -z "$ac_c_werror_flag" ||
19124 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019125 } && test -s conftest$ac_exeext &&
19126 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019127 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019128else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019130sed 's/^/| /' conftest.$ac_ext >&5
19131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019132 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019134
19135rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019137LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019138fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019139{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19140echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19141if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019142 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019143#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019144_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019145 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019146else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019147 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19148echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019149if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019150 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019151else
19152 ac_check_lib_save_LIBS=$LIBS
19153LIBS="-lbsd $LIBS"
19154cat >conftest.$ac_ext <<_ACEOF
19155/* confdefs.h. */
19156_ACEOF
19157cat confdefs.h >>conftest.$ac_ext
19158cat >>conftest.$ac_ext <<_ACEOF
19159/* end confdefs.h. */
19160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019161/* Override any GCC internal prototype to avoid an error.
19162 Use char because int might match the return type of a GCC
19163 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019164#ifdef __cplusplus
19165extern "C"
19166#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019167char forkpty ();
19168int
19169main ()
19170{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019171return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019172 ;
19173 return 0;
19174}
19175_ACEOF
19176rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019177if { (ac_try="$ac_link"
19178case "(($ac_try" in
19179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19180 *) ac_try_echo=$ac_try;;
19181esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019183 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019184 ac_status=$?
19185 grep -v '^ *+' conftest.er1 >conftest.err
19186 rm -f conftest.er1
19187 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019189 (exit $ac_status); } && {
19190 test -z "$ac_c_werror_flag" ||
19191 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019192 } && test -s conftest$ac_exeext &&
19193 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019194 ac_cv_lib_bsd_forkpty=yes
19195else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019196 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019197sed 's/^/| /' conftest.$ac_ext >&5
19198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019199 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019201
19202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019203 conftest$ac_exeext conftest.$ac_ext
19204LIBS=$ac_check_lib_save_LIBS
19205fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019206{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19207echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19208if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019209 cat >>confdefs.h <<\_ACEOF
19210#define HAVE_FORKPTY 1
19211_ACEOF
19212 LIBS="$LIBS -lbsd"
19213fi
19214
19215
19216fi
19217
Fred Drake8cef4cf2000-06-28 16:40:38 +000019218
19219fi
19220done
19221
Jack Jansendd19cf82001-12-06 22:36:17 +000019222
Christian Heimesb186d002008-03-18 15:15:01 +000019223# Stuff for expat.
19224
19225for ac_func in memmove
19226do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019227as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19228{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19229echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019230if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019231 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019232else
19233 cat >conftest.$ac_ext <<_ACEOF
19234/* confdefs.h. */
19235_ACEOF
19236cat confdefs.h >>conftest.$ac_ext
19237cat >>conftest.$ac_ext <<_ACEOF
19238/* end confdefs.h. */
19239/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19240 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19241#define $ac_func innocuous_$ac_func
19242
19243/* System header to define __stub macros and hopefully few prototypes,
19244 which can conflict with char $ac_func (); below.
19245 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19246 <limits.h> exists even on freestanding compilers. */
19247
19248#ifdef __STDC__
19249# include <limits.h>
19250#else
19251# include <assert.h>
19252#endif
19253
19254#undef $ac_func
19255
19256/* Override any GCC internal prototype to avoid an error.
19257 Use char because int might match the return type of a GCC
19258 builtin and then its argument prototype would still apply. */
19259#ifdef __cplusplus
19260extern "C"
19261#endif
19262char $ac_func ();
19263/* The GNU C library defines this for functions which it implements
19264 to always fail with ENOSYS. Some functions are actually named
19265 something starting with __ and the normal name is an alias. */
19266#if defined __stub_$ac_func || defined __stub___$ac_func
19267choke me
19268#endif
19269
19270int
19271main ()
19272{
19273return $ac_func ();
19274 ;
19275 return 0;
19276}
19277_ACEOF
19278rm -f conftest.$ac_objext conftest$ac_exeext
19279if { (ac_try="$ac_link"
19280case "(($ac_try" in
19281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19282 *) ac_try_echo=$ac_try;;
19283esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019285 (eval "$ac_link") 2>conftest.er1
19286 ac_status=$?
19287 grep -v '^ *+' conftest.er1 >conftest.err
19288 rm -f conftest.er1
19289 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019291 (exit $ac_status); } && {
19292 test -z "$ac_c_werror_flag" ||
19293 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019294 } && test -s conftest$ac_exeext &&
19295 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019296 eval "$as_ac_var=yes"
19297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019298 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019299sed 's/^/| /' conftest.$ac_ext >&5
19300
19301 eval "$as_ac_var=no"
19302fi
19303
19304rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19305 conftest$ac_exeext conftest.$ac_ext
19306fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019307ac_res=`eval echo '${'$as_ac_var'}'`
19308 { echo "$as_me:$LINENO: result: $ac_res" >&5
19309echo "${ECHO_T}$ac_res" >&6; }
19310if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019311 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019312#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019313_ACEOF
19314
19315fi
19316done
19317
19318
Michael W. Hudson54241132001-12-07 15:38:26 +000019319# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019320
19321
19322
19323
19324
19325
Fred Drake8cef4cf2000-06-28 16:40:38 +000019326for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19327do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019328as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19329{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19330echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019331if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019333else
Martin v. Löwis11437992002-04-12 09:54:03 +000019334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019335/* confdefs.h. */
19336_ACEOF
19337cat confdefs.h >>conftest.$ac_ext
19338cat >>conftest.$ac_ext <<_ACEOF
19339/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019340/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19341 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19342#define $ac_func innocuous_$ac_func
19343
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019344/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019345 which can conflict with char $ac_func (); below.
19346 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019347 <limits.h> exists even on freestanding compilers. */
19348
19349#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019350# include <limits.h>
19351#else
19352# include <assert.h>
19353#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019354
19355#undef $ac_func
19356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019357/* Override any GCC internal prototype to avoid an error.
19358 Use char because int might match the return type of a GCC
19359 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019360#ifdef __cplusplus
19361extern "C"
19362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019363char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019364/* The GNU C library defines this for functions which it implements
19365 to always fail with ENOSYS. Some functions are actually named
19366 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019367#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019368choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019369#endif
19370
Skip Montanaro6dead952003-09-25 14:50:04 +000019371int
19372main ()
19373{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019374return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019375 ;
19376 return 0;
19377}
19378_ACEOF
19379rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019380if { (ac_try="$ac_link"
19381case "(($ac_try" in
19382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19383 *) ac_try_echo=$ac_try;;
19384esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019386 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019388 grep -v '^ *+' conftest.er1 >conftest.err
19389 rm -f conftest.er1
19390 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019392 (exit $ac_status); } && {
19393 test -z "$ac_c_werror_flag" ||
19394 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019395 } && test -s conftest$ac_exeext &&
19396 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019397 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019398else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019400sed 's/^/| /' conftest.$ac_ext >&5
19401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019402 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019404
19405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019406 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019407fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019408ac_res=`eval echo '${'$as_ac_var'}'`
19409 { echo "$as_me:$LINENO: result: $ac_res" >&5
19410echo "${ECHO_T}$ac_res" >&6; }
19411if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019412 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019413#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019414_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019415
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019416fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019417done
19418
Michael W. Hudson54241132001-12-07 15:38:26 +000019419
Martin v. Löwis11437992002-04-12 09:54:03 +000019420
19421
19422
Christian Heimesb186d002008-03-18 15:15:01 +000019423for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019424do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019425as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19426{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19427echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019428if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019429 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019430else
Martin v. Löwis11437992002-04-12 09:54:03 +000019431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019432/* confdefs.h. */
19433_ACEOF
19434cat confdefs.h >>conftest.$ac_ext
19435cat >>conftest.$ac_ext <<_ACEOF
19436/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019437/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19438 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19439#define $ac_func innocuous_$ac_func
19440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019441/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019442 which can conflict with char $ac_func (); below.
19443 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019444 <limits.h> exists even on freestanding compilers. */
19445
19446#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019447# include <limits.h>
19448#else
19449# include <assert.h>
19450#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019451
19452#undef $ac_func
19453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019454/* Override any GCC internal prototype to avoid an error.
19455 Use char because int might match the return type of a GCC
19456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019457#ifdef __cplusplus
19458extern "C"
19459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019460char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019461/* The GNU C library defines this for functions which it implements
19462 to always fail with ENOSYS. Some functions are actually named
19463 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019464#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019465choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019466#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019467
Skip Montanaro6dead952003-09-25 14:50:04 +000019468int
19469main ()
19470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019471return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019472 ;
19473 return 0;
19474}
19475_ACEOF
19476rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019477if { (ac_try="$ac_link"
19478case "(($ac_try" in
19479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19480 *) ac_try_echo=$ac_try;;
19481esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019483 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019485 grep -v '^ *+' conftest.er1 >conftest.err
19486 rm -f conftest.er1
19487 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019489 (exit $ac_status); } && {
19490 test -z "$ac_c_werror_flag" ||
19491 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019492 } && test -s conftest$ac_exeext &&
19493 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019494 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019495else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019497sed 's/^/| /' conftest.$ac_ext >&5
19498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019499 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019501
19502rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019504fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019505ac_res=`eval echo '${'$as_ac_var'}'`
19506 { echo "$as_me:$LINENO: result: $ac_res" >&5
19507echo "${ECHO_T}$ac_res" >&6; }
19508if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019509 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019510#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019511_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019512
Martin v. Löwis1142de32002-03-29 16:28:31 +000019513else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019514 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019515 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019516 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19517 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019518esac
19519
Martin v. Löwis1142de32002-03-29 16:28:31 +000019520fi
19521done
19522
19523
Martin v. Löwis11437992002-04-12 09:54:03 +000019524
Martin v. Löwis1142de32002-03-29 16:28:31 +000019525for ac_func in getpgrp
19526do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019527as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19528{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19529echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019530if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019532else
Martin v. Löwis11437992002-04-12 09:54:03 +000019533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019534/* confdefs.h. */
19535_ACEOF
19536cat confdefs.h >>conftest.$ac_ext
19537cat >>conftest.$ac_ext <<_ACEOF
19538/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019539/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19540 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19541#define $ac_func innocuous_$ac_func
19542
Martin v. Löwis1142de32002-03-29 16:28:31 +000019543/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019544 which can conflict with char $ac_func (); below.
19545 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019546 <limits.h> exists even on freestanding compilers. */
19547
19548#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019549# include <limits.h>
19550#else
19551# include <assert.h>
19552#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019553
19554#undef $ac_func
19555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019556/* Override any GCC internal prototype to avoid an error.
19557 Use char because int might match the return type of a GCC
19558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019559#ifdef __cplusplus
19560extern "C"
19561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019562char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019563/* The GNU C library defines this for functions which it implements
19564 to always fail with ENOSYS. Some functions are actually named
19565 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019566#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019567choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019568#endif
19569
Skip Montanaro6dead952003-09-25 14:50:04 +000019570int
19571main ()
19572{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019573return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019574 ;
19575 return 0;
19576}
19577_ACEOF
19578rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019579if { (ac_try="$ac_link"
19580case "(($ac_try" in
19581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19582 *) ac_try_echo=$ac_try;;
19583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019585 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019587 grep -v '^ *+' conftest.er1 >conftest.err
19588 rm -f conftest.er1
19589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019591 (exit $ac_status); } && {
19592 test -z "$ac_c_werror_flag" ||
19593 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019594 } && test -s conftest$ac_exeext &&
19595 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019596 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019599sed 's/^/| /' conftest.$ac_ext >&5
19600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019601 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019603
19604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019605 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019606fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019607ac_res=`eval echo '${'$as_ac_var'}'`
19608 { echo "$as_me:$LINENO: result: $ac_res" >&5
19609echo "${ECHO_T}$ac_res" >&6; }
19610if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019611 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019612#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019613_ACEOF
19614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019615/* confdefs.h. */
19616_ACEOF
19617cat confdefs.h >>conftest.$ac_ext
19618cat >>conftest.$ac_ext <<_ACEOF
19619/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019620#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019621int
19622main ()
19623{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019624getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019625 ;
19626 return 0;
19627}
19628_ACEOF
19629rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019630if { (ac_try="$ac_compile"
19631case "(($ac_try" in
19632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19633 *) ac_try_echo=$ac_try;;
19634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019638 grep -v '^ *+' conftest.er1 >conftest.err
19639 rm -f conftest.er1
19640 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019642 (exit $ac_status); } && {
19643 test -z "$ac_c_werror_flag" ||
19644 test ! -s conftest.err
19645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019646
19647cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019648#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019649_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019650
Martin v. Löwis11437992002-04-12 09:54:03 +000019651
Guido van Rossumf78abae1997-01-21 22:02:36 +000019652else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019654sed 's/^/| /' conftest.$ac_ext >&5
19655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019656
Guido van Rossum627b2d71993-12-24 10:39:16 +000019657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019658
19659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019660
Guido van Rossum627b2d71993-12-24 10:39:16 +000019661fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019662done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019663
Jack Jansen150753c2003-03-29 22:07:47 +000019664
19665for ac_func in setpgrp
19666do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019667as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19668{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19669echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019670if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019672else
Martin v. Löwis11437992002-04-12 09:54:03 +000019673 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019674/* confdefs.h. */
19675_ACEOF
19676cat confdefs.h >>conftest.$ac_ext
19677cat >>conftest.$ac_ext <<_ACEOF
19678/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019679/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19680 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19681#define $ac_func innocuous_$ac_func
19682
Jack Jansen150753c2003-03-29 22:07:47 +000019683/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019684 which can conflict with char $ac_func (); below.
19685 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019686 <limits.h> exists even on freestanding compilers. */
19687
19688#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019689# include <limits.h>
19690#else
19691# include <assert.h>
19692#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019693
19694#undef $ac_func
19695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019696/* Override any GCC internal prototype to avoid an error.
19697 Use char because int might match the return type of a GCC
19698 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019699#ifdef __cplusplus
19700extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019701#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019702char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019703/* The GNU C library defines this for functions which it implements
19704 to always fail with ENOSYS. Some functions are actually named
19705 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019706#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019707choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019708#endif
19709
Skip Montanaro6dead952003-09-25 14:50:04 +000019710int
19711main ()
19712{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019713return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019714 ;
19715 return 0;
19716}
19717_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019718rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019719if { (ac_try="$ac_link"
19720case "(($ac_try" in
19721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19722 *) ac_try_echo=$ac_try;;
19723esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019725 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019727 grep -v '^ *+' conftest.er1 >conftest.err
19728 rm -f conftest.er1
19729 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019731 (exit $ac_status); } && {
19732 test -z "$ac_c_werror_flag" ||
19733 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019734 } && test -s conftest$ac_exeext &&
19735 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019736 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019737else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019739sed 's/^/| /' conftest.$ac_ext >&5
19740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019741 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019743
19744rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019745 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019746fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019747ac_res=`eval echo '${'$as_ac_var'}'`
19748 { echo "$as_me:$LINENO: result: $ac_res" >&5
19749echo "${ECHO_T}$ac_res" >&6; }
19750if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019751 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019752#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019753_ACEOF
19754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019755/* confdefs.h. */
19756_ACEOF
19757cat confdefs.h >>conftest.$ac_ext
19758cat >>conftest.$ac_ext <<_ACEOF
19759/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019760#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019761int
19762main ()
19763{
19764setpgrp(0,0);
19765 ;
19766 return 0;
19767}
19768_ACEOF
19769rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019770if { (ac_try="$ac_compile"
19771case "(($ac_try" in
19772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19773 *) ac_try_echo=$ac_try;;
19774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019776 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019778 grep -v '^ *+' conftest.er1 >conftest.err
19779 rm -f conftest.er1
19780 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019782 (exit $ac_status); } && {
19783 test -z "$ac_c_werror_flag" ||
19784 test ! -s conftest.err
19785 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019786
19787cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019788#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019789_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019790
Jack Jansen150753c2003-03-29 22:07:47 +000019791
19792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019794sed 's/^/| /' conftest.$ac_ext >&5
19795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019796
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019798
19799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019800
19801fi
19802done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019803
Martin v. Löwis11437992002-04-12 09:54:03 +000019804
Thomas Wouters3a584202000-08-05 23:28:51 +000019805for ac_func in gettimeofday
19806do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019807as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19808{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19809echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019810if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019811 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019812else
Martin v. Löwis11437992002-04-12 09:54:03 +000019813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019814/* confdefs.h. */
19815_ACEOF
19816cat confdefs.h >>conftest.$ac_ext
19817cat >>conftest.$ac_ext <<_ACEOF
19818/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019819/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19820 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19821#define $ac_func innocuous_$ac_func
19822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019823/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019824 which can conflict with char $ac_func (); below.
19825 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019826 <limits.h> exists even on freestanding compilers. */
19827
19828#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019829# include <limits.h>
19830#else
19831# include <assert.h>
19832#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019833
19834#undef $ac_func
19835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019836/* Override any GCC internal prototype to avoid an error.
19837 Use char because int might match the return type of a GCC
19838 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019839#ifdef __cplusplus
19840extern "C"
19841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019842char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019843/* The GNU C library defines this for functions which it implements
19844 to always fail with ENOSYS. Some functions are actually named
19845 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019846#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019847choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019848#endif
19849
Skip Montanaro6dead952003-09-25 14:50:04 +000019850int
19851main ()
19852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019853return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 ;
19855 return 0;
19856}
19857_ACEOF
19858rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019859if { (ac_try="$ac_link"
19860case "(($ac_try" in
19861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19862 *) ac_try_echo=$ac_try;;
19863esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019865 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019867 grep -v '^ *+' conftest.er1 >conftest.err
19868 rm -f conftest.er1
19869 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019871 (exit $ac_status); } && {
19872 test -z "$ac_c_werror_flag" ||
19873 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019874 } && test -s conftest$ac_exeext &&
19875 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019876 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019879sed 's/^/| /' conftest.$ac_ext >&5
19880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019881 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019883
19884rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019885 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019886fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019887ac_res=`eval echo '${'$as_ac_var'}'`
19888 { echo "$as_me:$LINENO: result: $ac_res" >&5
19889echo "${ECHO_T}$ac_res" >&6; }
19890if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019891 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019892#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019893_ACEOF
19894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019895/* confdefs.h. */
19896_ACEOF
19897cat confdefs.h >>conftest.$ac_ext
19898cat >>conftest.$ac_ext <<_ACEOF
19899/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019900#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019901int
19902main ()
19903{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019904gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019905 ;
19906 return 0;
19907}
19908_ACEOF
19909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019910if { (ac_try="$ac_compile"
19911case "(($ac_try" in
19912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19913 *) ac_try_echo=$ac_try;;
19914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019918 grep -v '^ *+' conftest.er1 >conftest.err
19919 rm -f conftest.er1
19920 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019922 (exit $ac_status); } && {
19923 test -z "$ac_c_werror_flag" ||
19924 test ! -s conftest.err
19925 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019926 :
19927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019929sed 's/^/| /' conftest.$ac_ext >&5
19930
Martin v. Löwis11437992002-04-12 09:54:03 +000019931
19932cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019933#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019934_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019935
Martin v. Löwis11437992002-04-12 09:54:03 +000019936
Guido van Rossum627b2d71993-12-24 10:39:16 +000019937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019938
19939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019940
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019941fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019942done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019943
Michael W. Hudson54241132001-12-07 15:38:26 +000019944
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019945{ echo "$as_me:$LINENO: checking for major" >&5
19946echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019948/* confdefs.h. */
19949_ACEOF
19950cat confdefs.h >>conftest.$ac_ext
19951cat >>conftest.$ac_ext <<_ACEOF
19952/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019953
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019954#if defined(MAJOR_IN_MKDEV)
19955#include <sys/mkdev.h>
19956#elif defined(MAJOR_IN_SYSMACROS)
19957#include <sys/sysmacros.h>
19958#else
19959#include <sys/types.h>
19960#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019961
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019962int
19963main ()
19964{
19965
19966 makedev(major(0),minor(0));
19967
19968 ;
19969 return 0;
19970}
19971_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019972rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019973if { (ac_try="$ac_link"
19974case "(($ac_try" in
19975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19976 *) ac_try_echo=$ac_try;;
19977esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019979 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019981 grep -v '^ *+' conftest.er1 >conftest.err
19982 rm -f conftest.er1
19983 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019985 (exit $ac_status); } && {
19986 test -z "$ac_c_werror_flag" ||
19987 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019988 } && test -s conftest$ac_exeext &&
19989 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019990
19991
19992cat >>confdefs.h <<\_ACEOF
19993#define HAVE_DEVICE_MACROS 1
19994_ACEOF
19995
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019996 { echo "$as_me:$LINENO: result: yes" >&5
19997echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019998
19999else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020001sed 's/^/| /' conftest.$ac_ext >&5
20002
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020003
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020004 { echo "$as_me:$LINENO: result: no" >&5
20005echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020006
20007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020008
20009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020010 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020011
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020012# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020013# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020014{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20015echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020017/* confdefs.h. */
20018_ACEOF
20019cat confdefs.h >>conftest.$ac_ext
20020cat >>conftest.$ac_ext <<_ACEOF
20021/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020022
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020023#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020024#include <sys/socket.h>
20025#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020026#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020027
Martin v. Löwis11437992002-04-12 09:54:03 +000020028int
20029main ()
20030{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020031getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020032 ;
20033 return 0;
20034}
20035_ACEOF
20036rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020037if { (ac_try="$ac_link"
20038case "(($ac_try" in
20039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20040 *) ac_try_echo=$ac_try;;
20041esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020043 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020045 grep -v '^ *+' conftest.er1 >conftest.err
20046 rm -f conftest.er1
20047 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020049 (exit $ac_status); } && {
20050 test -z "$ac_c_werror_flag" ||
20051 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020052 } && test -s conftest$ac_exeext &&
20053 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020054 have_getaddrinfo=yes
20055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020056 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020057sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020059 have_getaddrinfo=no
20060fi
20061
20062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20063 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020064{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20065echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020066if test $have_getaddrinfo = yes
20067then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020068 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20069echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020070 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020071 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020072else
20073 if test "$cross_compiling" = yes; then
20074 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020075else
Martin v. Löwis11437992002-04-12 09:54:03 +000020076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020077/* confdefs.h. */
20078_ACEOF
20079cat confdefs.h >>conftest.$ac_ext
20080cat >>conftest.$ac_ext <<_ACEOF
20081/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020082
20083#include <sys/types.h>
20084#include <netdb.h>
20085#include <string.h>
20086#include <sys/socket.h>
20087#include <netinet/in.h>
20088
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020089int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020090{
20091 int passive, gaierr, inet4 = 0, inet6 = 0;
20092 struct addrinfo hints, *ai, *aitop;
20093 char straddr[INET6_ADDRSTRLEN], strport[16];
20094
20095 for (passive = 0; passive <= 1; passive++) {
20096 memset(&hints, 0, sizeof(hints));
20097 hints.ai_family = AF_UNSPEC;
20098 hints.ai_flags = passive ? AI_PASSIVE : 0;
20099 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020100 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020101 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20102 (void)gai_strerror(gaierr);
20103 goto bad;
20104 }
20105 for (ai = aitop; ai; ai = ai->ai_next) {
20106 if (ai->ai_addr == NULL ||
20107 ai->ai_addrlen == 0 ||
20108 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20109 straddr, sizeof(straddr), strport, sizeof(strport),
20110 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20111 goto bad;
20112 }
20113 switch (ai->ai_family) {
20114 case AF_INET:
20115 if (strcmp(strport, "54321") != 0) {
20116 goto bad;
20117 }
20118 if (passive) {
20119 if (strcmp(straddr, "0.0.0.0") != 0) {
20120 goto bad;
20121 }
20122 } else {
20123 if (strcmp(straddr, "127.0.0.1") != 0) {
20124 goto bad;
20125 }
20126 }
20127 inet4++;
20128 break;
20129 case AF_INET6:
20130 if (strcmp(strport, "54321") != 0) {
20131 goto bad;
20132 }
20133 if (passive) {
20134 if (strcmp(straddr, "::") != 0) {
20135 goto bad;
20136 }
20137 } else {
20138 if (strcmp(straddr, "::1") != 0) {
20139 goto bad;
20140 }
20141 }
20142 inet6++;
20143 break;
20144 case AF_UNSPEC:
20145 goto bad;
20146 break;
20147 default:
20148 /* another family support? */
20149 break;
20150 }
20151 }
20152 }
20153
20154 if (!(inet4 == 0 || inet4 == 2))
20155 goto bad;
20156 if (!(inet6 == 0 || inet6 == 2))
20157 goto bad;
20158
20159 if (aitop)
20160 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020161 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020162
20163 bad:
20164 if (aitop)
20165 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020166 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020167}
20168
Martin v. Löwis11437992002-04-12 09:54:03 +000020169_ACEOF
20170rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020171if { (ac_try="$ac_link"
20172case "(($ac_try" in
20173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20174 *) ac_try_echo=$ac_try;;
20175esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020177 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020178 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181 { (case "(($ac_try" in
20182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20183 *) ac_try_echo=$ac_try;;
20184esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020186 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020187 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020189 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020190 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020192 echo "$as_me: program exited with status $ac_status" >&5
20193echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020194sed 's/^/| /' conftest.$ac_ext >&5
20195
Martin v. Löwis11437992002-04-12 09:54:03 +000020196( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020197ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020199rm -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 +000020200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020201
20202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020203fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020204
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020207if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20208then
20209 if test $ipv6 = yes
20210 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020211 echo 'Fatal: You must get working getaddrinfo() function.'
20212 echo ' or you can specify "--disable-ipv6"'.
20213 exit 1
20214 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020215else
Martin v. Löwis11437992002-04-12 09:54:03 +000020216
20217cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020218#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020219_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020220
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020222
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020223for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020224do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020225as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20226{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20227echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020228if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020229 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020230else
Martin v. Löwis11437992002-04-12 09:54:03 +000020231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020232/* confdefs.h. */
20233_ACEOF
20234cat confdefs.h >>conftest.$ac_ext
20235cat >>conftest.$ac_ext <<_ACEOF
20236/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020237/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20238 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20239#define $ac_func innocuous_$ac_func
20240
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020241/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020242 which can conflict with char $ac_func (); below.
20243 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020244 <limits.h> exists even on freestanding compilers. */
20245
20246#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020247# include <limits.h>
20248#else
20249# include <assert.h>
20250#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020251
20252#undef $ac_func
20253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020254/* Override any GCC internal prototype to avoid an error.
20255 Use char because int might match the return type of a GCC
20256 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020257#ifdef __cplusplus
20258extern "C"
20259#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020260char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020261/* The GNU C library defines this for functions which it implements
20262 to always fail with ENOSYS. Some functions are actually named
20263 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020264#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020265choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020266#endif
20267
Skip Montanaro6dead952003-09-25 14:50:04 +000020268int
20269main ()
20270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020271return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 ;
20273 return 0;
20274}
20275_ACEOF
20276rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020277if { (ac_try="$ac_link"
20278case "(($ac_try" in
20279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20280 *) ac_try_echo=$ac_try;;
20281esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020283 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020285 grep -v '^ *+' conftest.er1 >conftest.err
20286 rm -f conftest.er1
20287 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020289 (exit $ac_status); } && {
20290 test -z "$ac_c_werror_flag" ||
20291 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020292 } && test -s conftest$ac_exeext &&
20293 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020294 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020297sed 's/^/| /' conftest.$ac_ext >&5
20298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020299 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301
20302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020303 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020304fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020305ac_res=`eval echo '${'$as_ac_var'}'`
20306 { echo "$as_me:$LINENO: result: $ac_res" >&5
20307echo "${ECHO_T}$ac_res" >&6; }
20308if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020309 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020310#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020311_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020312
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020313fi
20314done
20315
Michael W. Hudson54241132001-12-07 15:38:26 +000020316
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020317# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020318{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20319echo $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 +000020320if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020322else
Martin v. Löwis11437992002-04-12 09:54:03 +000020323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020324/* confdefs.h. */
20325_ACEOF
20326cat confdefs.h >>conftest.$ac_ext
20327cat >>conftest.$ac_ext <<_ACEOF
20328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020329#include <sys/types.h>
20330#include <sys/time.h>
20331#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020332
Martin v. Löwis11437992002-04-12 09:54:03 +000020333int
20334main ()
20335{
20336if ((struct tm *) 0)
20337return 0;
20338 ;
20339 return 0;
20340}
20341_ACEOF
20342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020343if { (ac_try="$ac_compile"
20344case "(($ac_try" in
20345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20346 *) ac_try_echo=$ac_try;;
20347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020351 grep -v '^ *+' conftest.er1 >conftest.err
20352 rm -f conftest.er1
20353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020355 (exit $ac_status); } && {
20356 test -z "$ac_c_werror_flag" ||
20357 test ! -s conftest.err
20358 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020359 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020362sed 's/^/| /' conftest.$ac_ext >&5
20363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020364 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020366
20367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020368fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020369{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20370echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020371if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020372
20373cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020374#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020375_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020376
20377fi
20378
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020379{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20380echo $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 +000020381if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020382 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020383else
Martin v. Löwis11437992002-04-12 09:54:03 +000020384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020385/* confdefs.h. */
20386_ACEOF
20387cat confdefs.h >>conftest.$ac_ext
20388cat >>conftest.$ac_ext <<_ACEOF
20389/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020390#include <sys/types.h>
20391#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020392
Martin v. Löwis11437992002-04-12 09:54:03 +000020393int
20394main ()
20395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020396struct tm tm;
20397 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020398 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020399 ;
20400 return 0;
20401}
20402_ACEOF
20403rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020404if { (ac_try="$ac_compile"
20405case "(($ac_try" in
20406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20407 *) ac_try_echo=$ac_try;;
20408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020412 grep -v '^ *+' conftest.er1 >conftest.err
20413 rm -f conftest.er1
20414 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020416 (exit $ac_status); } && {
20417 test -z "$ac_c_werror_flag" ||
20418 test ! -s conftest.err
20419 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020420 ac_cv_struct_tm=time.h
20421else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020423sed 's/^/| /' conftest.$ac_ext >&5
20424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020425 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020427
20428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020429fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020430{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20431echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020432if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020433
20434cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020435#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020436_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020437
20438fi
20439
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020440{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20441echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020442if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020444else
Martin v. Löwis11437992002-04-12 09:54:03 +000020445 cat >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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020451#include <sys/types.h>
20452#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020453
20454
Martin v. Löwis11437992002-04-12 09:54:03 +000020455int
20456main ()
20457{
20458static struct tm ac_aggr;
20459if (ac_aggr.tm_zone)
20460return 0;
20461 ;
20462 return 0;
20463}
20464_ACEOF
20465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020466if { (ac_try="$ac_compile"
20467case "(($ac_try" in
20468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20469 *) ac_try_echo=$ac_try;;
20470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020474 grep -v '^ *+' conftest.er1 >conftest.err
20475 rm -f conftest.er1
20476 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020478 (exit $ac_status); } && {
20479 test -z "$ac_c_werror_flag" ||
20480 test ! -s conftest.err
20481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020482 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020485sed 's/^/| /' conftest.$ac_ext >&5
20486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020488/* confdefs.h. */
20489_ACEOF
20490cat confdefs.h >>conftest.$ac_ext
20491cat >>conftest.$ac_ext <<_ACEOF
20492/* end confdefs.h. */
20493#include <sys/types.h>
20494#include <$ac_cv_struct_tm>
20495
20496
20497int
20498main ()
20499{
20500static struct tm ac_aggr;
20501if (sizeof ac_aggr.tm_zone)
20502return 0;
20503 ;
20504 return 0;
20505}
20506_ACEOF
20507rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020508if { (ac_try="$ac_compile"
20509case "(($ac_try" in
20510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20511 *) ac_try_echo=$ac_try;;
20512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020514 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020516 grep -v '^ *+' conftest.er1 >conftest.err
20517 rm -f conftest.er1
20518 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020520 (exit $ac_status); } && {
20521 test -z "$ac_c_werror_flag" ||
20522 test ! -s conftest.err
20523 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020524 ac_cv_member_struct_tm_tm_zone=yes
20525else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020527sed 's/^/| /' conftest.$ac_ext >&5
20528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020529 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020531
20532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020534
20535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020536fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020537{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20538echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20539if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020540
20541cat >>confdefs.h <<_ACEOF
20542#define HAVE_STRUCT_TM_TM_ZONE 1
20543_ACEOF
20544
20545
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020546fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020547
Martin v. Löwis11437992002-04-12 09:54:03 +000020548if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20549
20550cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020551#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020552_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020553
20554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020555 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20556echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020557if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020558 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020559else
20560 cat >conftest.$ac_ext <<_ACEOF
20561/* confdefs.h. */
20562_ACEOF
20563cat confdefs.h >>conftest.$ac_ext
20564cat >>conftest.$ac_ext <<_ACEOF
20565/* end confdefs.h. */
20566#include <time.h>
20567
20568int
20569main ()
20570{
20571#ifndef tzname
20572 (void) tzname;
20573#endif
20574
20575 ;
20576 return 0;
20577}
20578_ACEOF
20579rm -f conftest.$ac_objext
20580if { (ac_try="$ac_compile"
20581case "(($ac_try" in
20582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20583 *) ac_try_echo=$ac_try;;
20584esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020586 (eval "$ac_compile") 2>conftest.er1
20587 ac_status=$?
20588 grep -v '^ *+' conftest.er1 >conftest.err
20589 rm -f conftest.er1
20590 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020592 (exit $ac_status); } && {
20593 test -z "$ac_c_werror_flag" ||
20594 test ! -s conftest.err
20595 } && test -s conftest.$ac_objext; then
20596 ac_cv_have_decl_tzname=yes
20597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020598 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020599sed 's/^/| /' conftest.$ac_ext >&5
20600
20601 ac_cv_have_decl_tzname=no
20602fi
20603
20604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20605fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020606{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20607echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20608if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020609
20610cat >>confdefs.h <<_ACEOF
20611#define HAVE_DECL_TZNAME 1
20612_ACEOF
20613
20614
20615else
20616 cat >>confdefs.h <<_ACEOF
20617#define HAVE_DECL_TZNAME 0
20618_ACEOF
20619
20620
20621fi
20622
20623
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020624 { echo "$as_me:$LINENO: checking for tzname" >&5
20625echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020626if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020628else
Martin v. Löwis11437992002-04-12 09:54:03 +000020629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020630/* confdefs.h. */
20631_ACEOF
20632cat confdefs.h >>conftest.$ac_ext
20633cat >>conftest.$ac_ext <<_ACEOF
20634/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020635#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020636#if !HAVE_DECL_TZNAME
20637extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020639
Martin v. Löwis11437992002-04-12 09:54:03 +000020640int
20641main ()
20642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020643return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020644 ;
20645 return 0;
20646}
20647_ACEOF
20648rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020649if { (ac_try="$ac_link"
20650case "(($ac_try" in
20651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20652 *) ac_try_echo=$ac_try;;
20653esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020655 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020657 grep -v '^ *+' conftest.er1 >conftest.err
20658 rm -f conftest.er1
20659 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020661 (exit $ac_status); } && {
20662 test -z "$ac_c_werror_flag" ||
20663 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020664 } && test -s conftest$ac_exeext &&
20665 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020666 ac_cv_var_tzname=yes
20667else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020669sed 's/^/| /' conftest.$ac_ext >&5
20670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020671 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020673
20674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020675 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020676fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020677{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20678echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020679 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020680
20681cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020682#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020683_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020684
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020685 fi
20686fi
20687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020688{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20689echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020690if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020691 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020692else
20693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020694/* confdefs.h. */
20695_ACEOF
20696cat confdefs.h >>conftest.$ac_ext
20697cat >>conftest.$ac_ext <<_ACEOF
20698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020699$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020700int
20701main ()
20702{
20703static struct stat ac_aggr;
20704if (ac_aggr.st_rdev)
20705return 0;
20706 ;
20707 return 0;
20708}
20709_ACEOF
20710rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020711if { (ac_try="$ac_compile"
20712case "(($ac_try" in
20713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20714 *) ac_try_echo=$ac_try;;
20715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020719 grep -v '^ *+' conftest.er1 >conftest.err
20720 rm -f conftest.er1
20721 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020723 (exit $ac_status); } && {
20724 test -z "$ac_c_werror_flag" ||
20725 test ! -s conftest.err
20726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020727 ac_cv_member_struct_stat_st_rdev=yes
20728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020730sed 's/^/| /' conftest.$ac_ext >&5
20731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020733/* confdefs.h. */
20734_ACEOF
20735cat confdefs.h >>conftest.$ac_ext
20736cat >>conftest.$ac_ext <<_ACEOF
20737/* end confdefs.h. */
20738$ac_includes_default
20739int
20740main ()
20741{
20742static struct stat ac_aggr;
20743if (sizeof ac_aggr.st_rdev)
20744return 0;
20745 ;
20746 return 0;
20747}
20748_ACEOF
20749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020750if { (ac_try="$ac_compile"
20751case "(($ac_try" in
20752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20753 *) ac_try_echo=$ac_try;;
20754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020756 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020758 grep -v '^ *+' conftest.er1 >conftest.err
20759 rm -f conftest.er1
20760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020762 (exit $ac_status); } && {
20763 test -z "$ac_c_werror_flag" ||
20764 test ! -s conftest.err
20765 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020766 ac_cv_member_struct_stat_st_rdev=yes
20767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020769sed 's/^/| /' conftest.$ac_ext >&5
20770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020771 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020773
20774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020776
20777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020778fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020779{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20780echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20781if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020782
20783cat >>confdefs.h <<_ACEOF
20784#define HAVE_STRUCT_STAT_ST_RDEV 1
20785_ACEOF
20786
20787
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020788fi
20789
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020790{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20791echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020792if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020793 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020794else
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020796/* confdefs.h. */
20797_ACEOF
20798cat confdefs.h >>conftest.$ac_ext
20799cat >>conftest.$ac_ext <<_ACEOF
20800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020801$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020802int
20803main ()
20804{
20805static struct stat ac_aggr;
20806if (ac_aggr.st_blksize)
20807return 0;
20808 ;
20809 return 0;
20810}
20811_ACEOF
20812rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020813if { (ac_try="$ac_compile"
20814case "(($ac_try" in
20815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20816 *) ac_try_echo=$ac_try;;
20817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020821 grep -v '^ *+' conftest.er1 >conftest.err
20822 rm -f conftest.er1
20823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020825 (exit $ac_status); } && {
20826 test -z "$ac_c_werror_flag" ||
20827 test ! -s conftest.err
20828 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020829 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020832sed 's/^/| /' conftest.$ac_ext >&5
20833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020835/* confdefs.h. */
20836_ACEOF
20837cat confdefs.h >>conftest.$ac_ext
20838cat >>conftest.$ac_ext <<_ACEOF
20839/* end confdefs.h. */
20840$ac_includes_default
20841int
20842main ()
20843{
20844static struct stat ac_aggr;
20845if (sizeof ac_aggr.st_blksize)
20846return 0;
20847 ;
20848 return 0;
20849}
20850_ACEOF
20851rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020852if { (ac_try="$ac_compile"
20853case "(($ac_try" in
20854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20855 *) ac_try_echo=$ac_try;;
20856esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020858 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020860 grep -v '^ *+' conftest.er1 >conftest.err
20861 rm -f conftest.er1
20862 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020864 (exit $ac_status); } && {
20865 test -z "$ac_c_werror_flag" ||
20866 test ! -s conftest.err
20867 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020868 ac_cv_member_struct_stat_st_blksize=yes
20869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020871sed 's/^/| /' conftest.$ac_ext >&5
20872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020873 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020875
20876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020878
20879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020880fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020881{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20882echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20883if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020884
Martin v. Löwis11437992002-04-12 09:54:03 +000020885cat >>confdefs.h <<_ACEOF
20886#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20887_ACEOF
20888
20889
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020890fi
20891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020892{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20893echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020894if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020895 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020896else
20897 cat >conftest.$ac_ext <<_ACEOF
20898/* confdefs.h. */
20899_ACEOF
20900cat confdefs.h >>conftest.$ac_ext
20901cat >>conftest.$ac_ext <<_ACEOF
20902/* end confdefs.h. */
20903$ac_includes_default
20904int
20905main ()
20906{
20907static struct stat ac_aggr;
20908if (ac_aggr.st_flags)
20909return 0;
20910 ;
20911 return 0;
20912}
20913_ACEOF
20914rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020915if { (ac_try="$ac_compile"
20916case "(($ac_try" in
20917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20918 *) ac_try_echo=$ac_try;;
20919esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020921 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020922 ac_status=$?
20923 grep -v '^ *+' conftest.er1 >conftest.err
20924 rm -f conftest.er1
20925 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020927 (exit $ac_status); } && {
20928 test -z "$ac_c_werror_flag" ||
20929 test ! -s conftest.err
20930 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020931 ac_cv_member_struct_stat_st_flags=yes
20932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020933 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020934sed 's/^/| /' conftest.$ac_ext >&5
20935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020936 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020937/* confdefs.h. */
20938_ACEOF
20939cat confdefs.h >>conftest.$ac_ext
20940cat >>conftest.$ac_ext <<_ACEOF
20941/* end confdefs.h. */
20942$ac_includes_default
20943int
20944main ()
20945{
20946static struct stat ac_aggr;
20947if (sizeof ac_aggr.st_flags)
20948return 0;
20949 ;
20950 return 0;
20951}
20952_ACEOF
20953rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020954if { (ac_try="$ac_compile"
20955case "(($ac_try" in
20956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20957 *) ac_try_echo=$ac_try;;
20958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020960 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020961 ac_status=$?
20962 grep -v '^ *+' conftest.er1 >conftest.err
20963 rm -f conftest.er1
20964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020966 (exit $ac_status); } && {
20967 test -z "$ac_c_werror_flag" ||
20968 test ! -s conftest.err
20969 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020970 ac_cv_member_struct_stat_st_flags=yes
20971else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020972 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020973sed 's/^/| /' conftest.$ac_ext >&5
20974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020975 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020977
20978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020980
20981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020982fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020983{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20984echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
20985if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020986
20987cat >>confdefs.h <<_ACEOF
20988#define HAVE_STRUCT_STAT_ST_FLAGS 1
20989_ACEOF
20990
20991
20992fi
20993
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020994{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20995echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020996if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020997 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020998else
20999 cat >conftest.$ac_ext <<_ACEOF
21000/* confdefs.h. */
21001_ACEOF
21002cat confdefs.h >>conftest.$ac_ext
21003cat >>conftest.$ac_ext <<_ACEOF
21004/* end confdefs.h. */
21005$ac_includes_default
21006int
21007main ()
21008{
21009static struct stat ac_aggr;
21010if (ac_aggr.st_gen)
21011return 0;
21012 ;
21013 return 0;
21014}
21015_ACEOF
21016rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021017if { (ac_try="$ac_compile"
21018case "(($ac_try" in
21019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21020 *) ac_try_echo=$ac_try;;
21021esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021024 ac_status=$?
21025 grep -v '^ *+' conftest.er1 >conftest.err
21026 rm -f conftest.er1
21027 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021029 (exit $ac_status); } && {
21030 test -z "$ac_c_werror_flag" ||
21031 test ! -s conftest.err
21032 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021033 ac_cv_member_struct_stat_st_gen=yes
21034else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021035 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021036sed 's/^/| /' conftest.$ac_ext >&5
21037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021038 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021039/* confdefs.h. */
21040_ACEOF
21041cat confdefs.h >>conftest.$ac_ext
21042cat >>conftest.$ac_ext <<_ACEOF
21043/* end confdefs.h. */
21044$ac_includes_default
21045int
21046main ()
21047{
21048static struct stat ac_aggr;
21049if (sizeof ac_aggr.st_gen)
21050return 0;
21051 ;
21052 return 0;
21053}
21054_ACEOF
21055rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021056if { (ac_try="$ac_compile"
21057case "(($ac_try" in
21058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21059 *) ac_try_echo=$ac_try;;
21060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021063 ac_status=$?
21064 grep -v '^ *+' conftest.er1 >conftest.err
21065 rm -f conftest.er1
21066 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021068 (exit $ac_status); } && {
21069 test -z "$ac_c_werror_flag" ||
21070 test ! -s conftest.err
21071 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021072 ac_cv_member_struct_stat_st_gen=yes
21073else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021074 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021075sed 's/^/| /' conftest.$ac_ext >&5
21076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021077 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021079
21080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021082
21083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021084fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021085{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21086echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21087if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021088
21089cat >>confdefs.h <<_ACEOF
21090#define HAVE_STRUCT_STAT_ST_GEN 1
21091_ACEOF
21092
21093
21094fi
21095
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021096{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21097echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021098if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021099 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021100else
21101 cat >conftest.$ac_ext <<_ACEOF
21102/* confdefs.h. */
21103_ACEOF
21104cat confdefs.h >>conftest.$ac_ext
21105cat >>conftest.$ac_ext <<_ACEOF
21106/* end confdefs.h. */
21107$ac_includes_default
21108int
21109main ()
21110{
21111static struct stat ac_aggr;
21112if (ac_aggr.st_birthtime)
21113return 0;
21114 ;
21115 return 0;
21116}
21117_ACEOF
21118rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021119if { (ac_try="$ac_compile"
21120case "(($ac_try" in
21121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21122 *) ac_try_echo=$ac_try;;
21123esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021126 ac_status=$?
21127 grep -v '^ *+' conftest.er1 >conftest.err
21128 rm -f conftest.er1
21129 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021131 (exit $ac_status); } && {
21132 test -z "$ac_c_werror_flag" ||
21133 test ! -s conftest.err
21134 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021135 ac_cv_member_struct_stat_st_birthtime=yes
21136else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021137 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021138sed 's/^/| /' conftest.$ac_ext >&5
21139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021140 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021141/* confdefs.h. */
21142_ACEOF
21143cat confdefs.h >>conftest.$ac_ext
21144cat >>conftest.$ac_ext <<_ACEOF
21145/* end confdefs.h. */
21146$ac_includes_default
21147int
21148main ()
21149{
21150static struct stat ac_aggr;
21151if (sizeof ac_aggr.st_birthtime)
21152return 0;
21153 ;
21154 return 0;
21155}
21156_ACEOF
21157rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021158if { (ac_try="$ac_compile"
21159case "(($ac_try" in
21160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21161 *) ac_try_echo=$ac_try;;
21162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021165 ac_status=$?
21166 grep -v '^ *+' conftest.er1 >conftest.err
21167 rm -f conftest.er1
21168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021170 (exit $ac_status); } && {
21171 test -z "$ac_c_werror_flag" ||
21172 test ! -s conftest.err
21173 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021174 ac_cv_member_struct_stat_st_birthtime=yes
21175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021176 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021177sed 's/^/| /' conftest.$ac_ext >&5
21178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021179 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021181
21182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021184
21185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021186fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021187{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21188echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21189if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021190
21191cat >>confdefs.h <<_ACEOF
21192#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21193_ACEOF
21194
21195
21196fi
21197
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021198{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21199echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021200if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021201 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021202else
Martin v. Löwis11437992002-04-12 09:54:03 +000021203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021204/* confdefs.h. */
21205_ACEOF
21206cat confdefs.h >>conftest.$ac_ext
21207cat >>conftest.$ac_ext <<_ACEOF
21208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021209$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021210int
21211main ()
21212{
21213static struct stat ac_aggr;
21214if (ac_aggr.st_blocks)
21215return 0;
21216 ;
21217 return 0;
21218}
21219_ACEOF
21220rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021221if { (ac_try="$ac_compile"
21222case "(($ac_try" in
21223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21224 *) ac_try_echo=$ac_try;;
21225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021229 grep -v '^ *+' conftest.er1 >conftest.err
21230 rm -f conftest.er1
21231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021233 (exit $ac_status); } && {
21234 test -z "$ac_c_werror_flag" ||
21235 test ! -s conftest.err
21236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021237 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021240sed 's/^/| /' conftest.$ac_ext >&5
21241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021243/* confdefs.h. */
21244_ACEOF
21245cat confdefs.h >>conftest.$ac_ext
21246cat >>conftest.$ac_ext <<_ACEOF
21247/* end confdefs.h. */
21248$ac_includes_default
21249int
21250main ()
21251{
21252static struct stat ac_aggr;
21253if (sizeof ac_aggr.st_blocks)
21254return 0;
21255 ;
21256 return 0;
21257}
21258_ACEOF
21259rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021260if { (ac_try="$ac_compile"
21261case "(($ac_try" in
21262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21263 *) ac_try_echo=$ac_try;;
21264esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021266 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021268 grep -v '^ *+' conftest.er1 >conftest.err
21269 rm -f conftest.er1
21270 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021272 (exit $ac_status); } && {
21273 test -z "$ac_c_werror_flag" ||
21274 test ! -s conftest.err
21275 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021276 ac_cv_member_struct_stat_st_blocks=yes
21277else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021279sed 's/^/| /' conftest.$ac_ext >&5
21280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021281 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021283
21284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021286
21287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021288fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021289{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21290echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21291if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021292
Martin v. Löwis11437992002-04-12 09:54:03 +000021293cat >>confdefs.h <<_ACEOF
21294#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21295_ACEOF
21296
21297
21298cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021299#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021300_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021301
21302else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021303 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021304 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021305 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21306 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021307esac
21308
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021309fi
21310
Michael W. Hudson54241132001-12-07 15:38:26 +000021311
Martin v. Löwis11437992002-04-12 09:54:03 +000021312
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021313{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21314echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021315if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021317else
Martin v. Löwis11437992002-04-12 09:54:03 +000021318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021319/* confdefs.h. */
21320_ACEOF
21321cat confdefs.h >>conftest.$ac_ext
21322cat >>conftest.$ac_ext <<_ACEOF
21323/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021324#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021325int
21326main ()
21327{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021328return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021329 ;
21330 return 0;
21331}
21332_ACEOF
21333rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021334if { (ac_try="$ac_compile"
21335case "(($ac_try" in
21336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21337 *) ac_try_echo=$ac_try;;
21338esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021342 grep -v '^ *+' conftest.er1 >conftest.err
21343 rm -f conftest.er1
21344 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021346 (exit $ac_status); } && {
21347 test -z "$ac_c_werror_flag" ||
21348 test ! -s conftest.err
21349 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021350 ac_cv_header_time_altzone=yes
21351else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021353sed 's/^/| /' conftest.$ac_ext >&5
21354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021355 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021356fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21359fi
21360
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021361{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21362echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021363if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021364
21365cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021366#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021367_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021368
21369fi
21370
Guido van Rossumda88dad1995-01-26 00:46:29 +000021371was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021372{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21373echo $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 +000021374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021375/* confdefs.h. */
21376_ACEOF
21377cat confdefs.h >>conftest.$ac_ext
21378cat >>conftest.$ac_ext <<_ACEOF
21379/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021380
21381#include <sys/types.h>
21382#include <sys/select.h>
21383#include <sys/time.h>
21384
Martin v. Löwis11437992002-04-12 09:54:03 +000021385int
21386main ()
21387{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021388;
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 ;
21390 return 0;
21391}
21392_ACEOF
21393rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394if { (ac_try="$ac_compile"
21395case "(($ac_try" in
21396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21397 *) ac_try_echo=$ac_try;;
21398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021400 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021402 grep -v '^ *+' conftest.er1 >conftest.err
21403 rm -f conftest.er1
21404 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021406 (exit $ac_status); } && {
21407 test -z "$ac_c_werror_flag" ||
21408 test ! -s conftest.err
21409 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021410
21411
21412cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021413#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021414_ACEOF
21415
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021416 was_it_defined=yes
21417
Guido van Rossumf78abae1997-01-21 22:02:36 +000021418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021420sed 's/^/| /' conftest.$ac_ext >&5
21421
Thomas Wouters477c8d52006-05-27 19:21:47 +000021422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021423fi
21424
21425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021426{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21427echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021428
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021429{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21430echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021431if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021432 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021433else
Martin v. Löwis11437992002-04-12 09:54:03 +000021434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021435/* confdefs.h. */
21436_ACEOF
21437cat confdefs.h >>conftest.$ac_ext
21438cat >>conftest.$ac_ext <<_ACEOF
21439/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021440
21441# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021442int
21443main ()
21444{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021445struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021446 ;
21447 return 0;
21448}
21449_ACEOF
21450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021451if { (ac_try="$ac_compile"
21452case "(($ac_try" in
21453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21454 *) ac_try_echo=$ac_try;;
21455esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021459 grep -v '^ *+' conftest.er1 >conftest.err
21460 rm -f conftest.er1
21461 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021463 (exit $ac_status); } && {
21464 test -z "$ac_c_werror_flag" ||
21465 test ! -s conftest.err
21466 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021467 ac_cv_struct_addrinfo=yes
21468else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021470sed 's/^/| /' conftest.$ac_ext >&5
21471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021472 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021473fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21476fi
21477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021478{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21479echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021480if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021481
21482cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021483#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021484_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021485
21486fi
21487
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021488{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21489echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021490if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021491 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021492else
Martin v. Löwis11437992002-04-12 09:54:03 +000021493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021494/* confdefs.h. */
21495_ACEOF
21496cat confdefs.h >>conftest.$ac_ext
21497cat >>conftest.$ac_ext <<_ACEOF
21498/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021499
21500# include <sys/types.h>
21501# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021502int
21503main ()
21504{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021505struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021506 ;
21507 return 0;
21508}
21509_ACEOF
21510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021511if { (ac_try="$ac_compile"
21512case "(($ac_try" in
21513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21514 *) ac_try_echo=$ac_try;;
21515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021519 grep -v '^ *+' conftest.er1 >conftest.err
21520 rm -f conftest.er1
21521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021523 (exit $ac_status); } && {
21524 test -z "$ac_c_werror_flag" ||
21525 test ! -s conftest.err
21526 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021527 ac_cv_struct_sockaddr_storage=yes
21528else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021530sed 's/^/| /' conftest.$ac_ext >&5
21531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021532 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021533fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21536fi
21537
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021538{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21539echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021540if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021541
21542cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021543#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021544_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021545
21546fi
21547
Guido van Rossum627b2d71993-12-24 10:39:16 +000021548# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021549
Michael W. Hudson54241132001-12-07 15:38:26 +000021550
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021551{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21552echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021553if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021554 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021555else
Martin v. Löwis11437992002-04-12 09:54:03 +000021556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021557/* confdefs.h. */
21558_ACEOF
21559cat confdefs.h >>conftest.$ac_ext
21560cat >>conftest.$ac_ext <<_ACEOF
21561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021562$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021563int
21564main ()
21565{
21566static int test_array [1 - 2 * !(((char) -1) < 0)];
21567test_array [0] = 0
21568
21569 ;
21570 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021571}
Martin v. Löwis11437992002-04-12 09:54:03 +000021572_ACEOF
21573rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021574if { (ac_try="$ac_compile"
21575case "(($ac_try" in
21576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21577 *) ac_try_echo=$ac_try;;
21578esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021582 grep -v '^ *+' conftest.er1 >conftest.err
21583 rm -f conftest.er1
21584 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021586 (exit $ac_status); } && {
21587 test -z "$ac_c_werror_flag" ||
21588 test ! -s conftest.err
21589 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021590 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021591else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021593sed 's/^/| /' conftest.$ac_ext >&5
21594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021595 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021597
21598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021599fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021600{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21601echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021602if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021603 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021604#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021605_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021606
21607fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021608
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021609{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21610echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021611if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021612 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021613else
21614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021615/* confdefs.h. */
21616_ACEOF
21617cat confdefs.h >>conftest.$ac_ext
21618cat >>conftest.$ac_ext <<_ACEOF
21619/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021620
Martin v. Löwis11437992002-04-12 09:54:03 +000021621int
21622main ()
21623{
21624/* FIXME: Include the comments suggested by Paul. */
21625#ifndef __cplusplus
21626 /* Ultrix mips cc rejects this. */
21627 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021628 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021629 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021630 char const *const *pcpcc;
21631 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021632 /* NEC SVR4.0.2 mips cc rejects this. */
21633 struct point {int x, y;};
21634 static struct point const zero = {0,0};
21635 /* AIX XL C 1.02.0.0 rejects this.
21636 It does not let you subtract one const X* pointer from another in
21637 an arm of an if-expression whose if-part is not a constant
21638 expression */
21639 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021640 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021641 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021642 ++pcpcc;
21643 ppc = (char**) pcpcc;
21644 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021645 { /* SCO 3.2v4 cc rejects this. */
21646 char *t;
21647 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021648
Martin v. Löwis11437992002-04-12 09:54:03 +000021649 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021650 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021651 }
21652 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21653 int x[] = {25, 17};
21654 const int *foo = &x[0];
21655 ++foo;
21656 }
21657 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21658 typedef const int *iptr;
21659 iptr p = 0;
21660 ++p;
21661 }
21662 { /* AIX XL C 1.02.0.0 rejects this saying
21663 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21664 struct s { int j; const int *ap[3]; };
21665 struct s *b; b->j = 5;
21666 }
21667 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21668 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021669 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021671 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021672#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021673
Martin v. Löwis11437992002-04-12 09:54:03 +000021674 ;
21675 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021676}
Martin v. Löwis11437992002-04-12 09:54:03 +000021677_ACEOF
21678rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021679if { (ac_try="$ac_compile"
21680case "(($ac_try" in
21681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21682 *) ac_try_echo=$ac_try;;
21683esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021687 grep -v '^ *+' conftest.er1 >conftest.err
21688 rm -f conftest.er1
21689 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021691 (exit $ac_status); } && {
21692 test -z "$ac_c_werror_flag" ||
21693 test ! -s conftest.err
21694 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021695 ac_cv_c_const=yes
21696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021698sed 's/^/| /' conftest.$ac_ext >&5
21699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021700 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021702
21703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021705{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21706echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021707if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021708
21709cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021710#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021711_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021712
21713fi
21714
Michael W. Hudson54241132001-12-07 15:38:26 +000021715
Guido van Rossumda88dad1995-01-26 00:46:29 +000021716works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021717{ echo "$as_me:$LINENO: checking for working volatile" >&5
21718echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021719cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021720/* confdefs.h. */
21721_ACEOF
21722cat confdefs.h >>conftest.$ac_ext
21723cat >>conftest.$ac_ext <<_ACEOF
21724/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021725
Martin v. Löwis11437992002-04-12 09:54:03 +000021726int
21727main ()
21728{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021729volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021730 ;
21731 return 0;
21732}
21733_ACEOF
21734rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021735if { (ac_try="$ac_compile"
21736case "(($ac_try" in
21737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21738 *) ac_try_echo=$ac_try;;
21739esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021743 grep -v '^ *+' conftest.er1 >conftest.err
21744 rm -f conftest.er1
21745 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021747 (exit $ac_status); } && {
21748 test -z "$ac_c_werror_flag" ||
21749 test ! -s conftest.err
21750 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021751 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021752else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021754sed 's/^/| /' conftest.$ac_ext >&5
21755
Martin v. Löwis11437992002-04-12 09:54:03 +000021756
21757cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021758#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021759_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021760
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021761
Guido van Rossum627b2d71993-12-24 10:39:16 +000021762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021763
21764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021765{ echo "$as_me:$LINENO: result: $works" >&5
21766echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021767
Guido van Rossumda88dad1995-01-26 00:46:29 +000021768works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021769{ echo "$as_me:$LINENO: checking for working signed char" >&5
21770echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021771cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021772/* confdefs.h. */
21773_ACEOF
21774cat confdefs.h >>conftest.$ac_ext
21775cat >>conftest.$ac_ext <<_ACEOF
21776/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021777
Martin v. Löwis11437992002-04-12 09:54:03 +000021778int
21779main ()
21780{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021781signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021782 ;
21783 return 0;
21784}
21785_ACEOF
21786rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021787if { (ac_try="$ac_compile"
21788case "(($ac_try" in
21789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21790 *) ac_try_echo=$ac_try;;
21791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021795 grep -v '^ *+' conftest.er1 >conftest.err
21796 rm -f conftest.er1
21797 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021799 (exit $ac_status); } && {
21800 test -z "$ac_c_werror_flag" ||
21801 test ! -s conftest.err
21802 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021803 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021804else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021806sed 's/^/| /' conftest.$ac_ext >&5
21807
Martin v. Löwis11437992002-04-12 09:54:03 +000021808
21809cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021810#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021811_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021812
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021813
Guido van Rossum7f43da71994-08-01 12:15:30 +000021814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021815
21816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021817{ echo "$as_me:$LINENO: result: $works" >&5
21818echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021819
Guido van Rossumda88dad1995-01-26 00:46:29 +000021820have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021821{ echo "$as_me:$LINENO: checking for prototypes" >&5
21822echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021823cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021824/* confdefs.h. */
21825_ACEOF
21826cat confdefs.h >>conftest.$ac_ext
21827cat >>conftest.$ac_ext <<_ACEOF
21828/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021829int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021830int
21831main ()
21832{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021833return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021834 ;
21835 return 0;
21836}
21837_ACEOF
21838rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021839if { (ac_try="$ac_compile"
21840case "(($ac_try" in
21841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21842 *) ac_try_echo=$ac_try;;
21843esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021847 grep -v '^ *+' conftest.er1 >conftest.err
21848 rm -f conftest.er1
21849 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021851 (exit $ac_status); } && {
21852 test -z "$ac_c_werror_flag" ||
21853 test ! -s conftest.err
21854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021855
21856
21857cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021858#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021859_ACEOF
21860
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021861 have_prototypes=yes
21862
Guido van Rossumf78abae1997-01-21 22:02:36 +000021863else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021865sed 's/^/| /' conftest.$ac_ext >&5
21866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021867
Guido van Rossum7f43da71994-08-01 12:15:30 +000021868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021869
21870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021871{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21872echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021873
Guido van Rossumda88dad1995-01-26 00:46:29 +000021874works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021875{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21876echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021878/* confdefs.h. */
21879_ACEOF
21880cat confdefs.h >>conftest.$ac_ext
21881cat >>conftest.$ac_ext <<_ACEOF
21882/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021883
21884#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021885int foo(int x, ...) {
21886 va_list va;
21887 va_start(va, x);
21888 va_arg(va, int);
21889 va_arg(va, char *);
21890 va_arg(va, double);
21891 return 0;
21892}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021893
Martin v. Löwis11437992002-04-12 09:54:03 +000021894int
21895main ()
21896{
Guido van Rossum90eea071996-08-30 20:58:57 +000021897return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021898 ;
21899 return 0;
21900}
21901_ACEOF
21902rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021903if { (ac_try="$ac_compile"
21904case "(($ac_try" in
21905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21906 *) ac_try_echo=$ac_try;;
21907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021911 grep -v '^ *+' conftest.er1 >conftest.err
21912 rm -f conftest.er1
21913 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021915 (exit $ac_status); } && {
21916 test -z "$ac_c_werror_flag" ||
21917 test ! -s conftest.err
21918 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021919
21920
21921cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021922#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021923_ACEOF
21924
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021925 works=yes
21926
Guido van Rossumf78abae1997-01-21 22:02:36 +000021927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021929sed 's/^/| /' conftest.$ac_ext >&5
21930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021931
Guido van Rossum627b2d71993-12-24 10:39:16 +000021932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021933
21934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021935{ echo "$as_me:$LINENO: result: $works" >&5
21936echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021937
Martin v. Löwisd6320502004-08-12 13:45:08 +000021938# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021939{ echo "$as_me:$LINENO: checking for socketpair" >&5
21940echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021941cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021942/* confdefs.h. */
21943_ACEOF
21944cat confdefs.h >>conftest.$ac_ext
21945cat >>conftest.$ac_ext <<_ACEOF
21946/* end confdefs.h. */
21947
21948#include <sys/types.h>
21949#include <sys/socket.h>
21950
21951int
21952main ()
21953{
21954void *x=socketpair
21955 ;
21956 return 0;
21957}
21958_ACEOF
21959rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021960if { (ac_try="$ac_compile"
21961case "(($ac_try" in
21962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21963 *) ac_try_echo=$ac_try;;
21964esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021968 grep -v '^ *+' conftest.er1 >conftest.err
21969 rm -f conftest.er1
21970 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021972 (exit $ac_status); } && {
21973 test -z "$ac_c_werror_flag" ||
21974 test ! -s conftest.err
21975 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021976
21977cat >>confdefs.h <<\_ACEOF
21978#define HAVE_SOCKETPAIR 1
21979_ACEOF
21980
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021981 { echo "$as_me:$LINENO: result: yes" >&5
21982echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021984 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021985sed 's/^/| /' conftest.$ac_ext >&5
21986
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021987 { echo "$as_me:$LINENO: result: no" >&5
21988echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021989
21990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021991
21992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021993
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021994# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021995{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21996echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021998/* confdefs.h. */
21999_ACEOF
22000cat confdefs.h >>conftest.$ac_ext
22001cat >>conftest.$ac_ext <<_ACEOF
22002/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022003#include <sys/types.h>
22004#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022005int
22006main ()
22007{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022008struct sockaddr x;
22009x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022010 ;
22011 return 0;
22012}
22013_ACEOF
22014rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022015if { (ac_try="$ac_compile"
22016case "(($ac_try" in
22017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22018 *) ac_try_echo=$ac_try;;
22019esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022023 grep -v '^ *+' conftest.er1 >conftest.err
22024 rm -f conftest.er1
22025 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022027 (exit $ac_status); } && {
22028 test -z "$ac_c_werror_flag" ||
22029 test ! -s conftest.err
22030 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022031 { echo "$as_me:$LINENO: result: yes" >&5
22032echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022033
22034cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022035#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022036_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022037
22038else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022040sed 's/^/| /' conftest.$ac_ext >&5
22041
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022042 { echo "$as_me:$LINENO: result: no" >&5
22043echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022045
22046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022047
Guido van Rossumda88dad1995-01-26 00:46:29 +000022048va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022049{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22050echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022051cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022052/* confdefs.h. */
22053_ACEOF
22054cat confdefs.h >>conftest.$ac_ext
22055cat >>conftest.$ac_ext <<_ACEOF
22056/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022057
22058#ifdef HAVE_STDARG_PROTOTYPES
22059#include <stdarg.h>
22060#else
22061#include <varargs.h>
22062#endif
22063
Martin v. Löwis11437992002-04-12 09:54:03 +000022064int
22065main ()
22066{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022067va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022068 ;
22069 return 0;
22070}
22071_ACEOF
22072rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022073if { (ac_try="$ac_compile"
22074case "(($ac_try" in
22075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22076 *) ac_try_echo=$ac_try;;
22077esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022081 grep -v '^ *+' conftest.er1 >conftest.err
22082 rm -f conftest.er1
22083 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022085 (exit $ac_status); } && {
22086 test -z "$ac_c_werror_flag" ||
22087 test ! -s conftest.err
22088 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022089 :
22090else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022092sed 's/^/| /' conftest.$ac_ext >&5
22093
Martin v. Löwis11437992002-04-12 09:54:03 +000022094
22095
22096cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022097#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022098_ACEOF
22099
Guido van Rossumda88dad1995-01-26 00:46:29 +000022100 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022101
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022103
22104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022105{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22106echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022107
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022108# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022109
22110
22111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022112{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22113echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022114if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022115 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022116else
Martin v. Löwis11437992002-04-12 09:54:03 +000022117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022118/* confdefs.h. */
22119_ACEOF
22120cat confdefs.h >>conftest.$ac_ext
22121cat >>conftest.$ac_ext <<_ACEOF
22122/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022123/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22124 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22125#define gethostbyname_r innocuous_gethostbyname_r
22126
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022127/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022128 which can conflict with char gethostbyname_r (); below.
22129 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022130 <limits.h> exists even on freestanding compilers. */
22131
22132#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022133# include <limits.h>
22134#else
22135# include <assert.h>
22136#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022137
22138#undef gethostbyname_r
22139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022140/* Override any GCC internal prototype to avoid an error.
22141 Use char because int might match the return type of a GCC
22142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022143#ifdef __cplusplus
22144extern "C"
22145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022146char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022147/* The GNU C library defines this for functions which it implements
22148 to always fail with ENOSYS. Some functions are actually named
22149 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022150#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022151choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022152#endif
22153
Skip Montanaro6dead952003-09-25 14:50:04 +000022154int
22155main ()
22156{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022157return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022158 ;
22159 return 0;
22160}
22161_ACEOF
22162rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022163if { (ac_try="$ac_link"
22164case "(($ac_try" in
22165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22166 *) ac_try_echo=$ac_try;;
22167esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022169 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022171 grep -v '^ *+' conftest.er1 >conftest.err
22172 rm -f conftest.er1
22173 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022175 (exit $ac_status); } && {
22176 test -z "$ac_c_werror_flag" ||
22177 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022178 } && test -s conftest$ac_exeext &&
22179 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022180 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022183sed 's/^/| /' conftest.$ac_ext >&5
22184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022185 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022187
22188rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022189 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022190fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022191{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22192echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22193if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022194
Martin v. Löwis11437992002-04-12 09:54:03 +000022195 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022196#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022197_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022198
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022199 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22200echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022201 OLD_CFLAGS=$CFLAGS
22202 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022204/* confdefs.h. */
22205_ACEOF
22206cat confdefs.h >>conftest.$ac_ext
22207cat >>conftest.$ac_ext <<_ACEOF
22208/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022209
22210# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022211
Martin v. Löwis11437992002-04-12 09:54:03 +000022212int
22213main ()
22214{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022215
22216 char *name;
22217 struct hostent *he, *res;
22218 char buffer[2048];
22219 int buflen = 2048;
22220 int h_errnop;
22221
22222 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022223
22224 ;
22225 return 0;
22226}
22227_ACEOF
22228rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022229if { (ac_try="$ac_compile"
22230case "(($ac_try" in
22231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22232 *) ac_try_echo=$ac_try;;
22233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022235 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022237 grep -v '^ *+' conftest.er1 >conftest.err
22238 rm -f conftest.er1
22239 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022241 (exit $ac_status); } && {
22242 test -z "$ac_c_werror_flag" ||
22243 test ! -s conftest.err
22244 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022245
22246 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022247#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022248_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022249
Martin v. Löwis11437992002-04-12 09:54:03 +000022250
22251cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022252#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022253_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022255 { echo "$as_me:$LINENO: result: yes" >&5
22256echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022257
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022260sed 's/^/| /' conftest.$ac_ext >&5
22261
Martin v. Löwis11437992002-04-12 09:54:03 +000022262
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022263 { echo "$as_me:$LINENO: result: no" >&5
22264echo "${ECHO_T}no" >&6; }
22265 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22266echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022268/* confdefs.h. */
22269_ACEOF
22270cat confdefs.h >>conftest.$ac_ext
22271cat >>conftest.$ac_ext <<_ACEOF
22272/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022273
22274# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022275
Martin v. Löwis11437992002-04-12 09:54:03 +000022276int
22277main ()
22278{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022279
22280 char *name;
22281 struct hostent *he;
22282 char buffer[2048];
22283 int buflen = 2048;
22284 int h_errnop;
22285
22286 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022287
22288 ;
22289 return 0;
22290}
22291_ACEOF
22292rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022293if { (ac_try="$ac_compile"
22294case "(($ac_try" in
22295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22296 *) ac_try_echo=$ac_try;;
22297esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022301 grep -v '^ *+' conftest.er1 >conftest.err
22302 rm -f conftest.er1
22303 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022305 (exit $ac_status); } && {
22306 test -z "$ac_c_werror_flag" ||
22307 test ! -s conftest.err
22308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022309
22310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022311#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022312_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022313
Martin v. Löwis11437992002-04-12 09:54:03 +000022314
22315cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022316#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022317_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022319 { echo "$as_me:$LINENO: result: yes" >&5
22320echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022321
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022322else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022324sed 's/^/| /' conftest.$ac_ext >&5
22325
Martin v. Löwis11437992002-04-12 09:54:03 +000022326
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022327 { echo "$as_me:$LINENO: result: no" >&5
22328echo "${ECHO_T}no" >&6; }
22329 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22330echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022332/* confdefs.h. */
22333_ACEOF
22334cat confdefs.h >>conftest.$ac_ext
22335cat >>conftest.$ac_ext <<_ACEOF
22336/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022337
22338# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022339
Martin v. Löwis11437992002-04-12 09:54:03 +000022340int
22341main ()
22342{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022343
22344 char *name;
22345 struct hostent *he;
22346 struct hostent_data data;
22347
22348 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022349
22350 ;
22351 return 0;
22352}
22353_ACEOF
22354rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022355if { (ac_try="$ac_compile"
22356case "(($ac_try" in
22357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22358 *) ac_try_echo=$ac_try;;
22359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022363 grep -v '^ *+' conftest.er1 >conftest.err
22364 rm -f conftest.er1
22365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022367 (exit $ac_status); } && {
22368 test -z "$ac_c_werror_flag" ||
22369 test ! -s conftest.err
22370 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022371
22372 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022373#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022374_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022375
Martin v. Löwis11437992002-04-12 09:54:03 +000022376
22377cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022378#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022379_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022380
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022381 { echo "$as_me:$LINENO: result: yes" >&5
22382echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022383
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022384else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022386sed 's/^/| /' conftest.$ac_ext >&5
22387
Martin v. Löwis11437992002-04-12 09:54:03 +000022388
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022389 { echo "$as_me:$LINENO: result: no" >&5
22390echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022391
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022393
22394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022395
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022397
22398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022401
22402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022403 CFLAGS=$OLD_CFLAGS
22404
22405else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022406
Martin v. Löwis11437992002-04-12 09:54:03 +000022407
22408for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022409do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022410as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22411{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22412echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022413if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022414 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022415else
Martin v. Löwis11437992002-04-12 09:54:03 +000022416 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022417/* confdefs.h. */
22418_ACEOF
22419cat confdefs.h >>conftest.$ac_ext
22420cat >>conftest.$ac_ext <<_ACEOF
22421/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022422/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22423 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22424#define $ac_func innocuous_$ac_func
22425
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022426/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022427 which can conflict with char $ac_func (); below.
22428 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022429 <limits.h> exists even on freestanding compilers. */
22430
22431#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022432# include <limits.h>
22433#else
22434# include <assert.h>
22435#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022436
22437#undef $ac_func
22438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022439/* Override any GCC internal prototype to avoid an error.
22440 Use char because int might match the return type of a GCC
22441 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022442#ifdef __cplusplus
22443extern "C"
22444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022445char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022446/* The GNU C library defines this for functions which it implements
22447 to always fail with ENOSYS. Some functions are actually named
22448 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022449#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022450choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022451#endif
22452
Skip Montanaro6dead952003-09-25 14:50:04 +000022453int
22454main ()
22455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022456return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022457 ;
22458 return 0;
22459}
22460_ACEOF
22461rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022462if { (ac_try="$ac_link"
22463case "(($ac_try" in
22464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22465 *) ac_try_echo=$ac_try;;
22466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022468 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022470 grep -v '^ *+' conftest.er1 >conftest.err
22471 rm -f conftest.er1
22472 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022474 (exit $ac_status); } && {
22475 test -z "$ac_c_werror_flag" ||
22476 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022477 } && test -s conftest$ac_exeext &&
22478 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022479 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022480else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022482sed 's/^/| /' conftest.$ac_ext >&5
22483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022484 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022486
22487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022488 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022489fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022490ac_res=`eval echo '${'$as_ac_var'}'`
22491 { echo "$as_me:$LINENO: result: $ac_res" >&5
22492echo "${ECHO_T}$ac_res" >&6; }
22493if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022494 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022495#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022496_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022498fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022499done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022500
Michael W. Hudson54241132001-12-07 15:38:26 +000022501
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022502fi
22503
Michael W. Hudson54241132001-12-07 15:38:26 +000022504
22505
22506
22507
22508
22509
Guido van Rossum627b2d71993-12-24 10:39:16 +000022510# checks for system services
22511# (none yet)
22512
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022513# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022514{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22515echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022516if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022517 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022518else
Martin v. Löwis11437992002-04-12 09:54:03 +000022519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022520/* confdefs.h. */
22521_ACEOF
22522cat confdefs.h >>conftest.$ac_ext
22523cat >>conftest.$ac_ext <<_ACEOF
22524/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022525/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22526 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22527#define __fpu_control innocuous___fpu_control
22528
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022529/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022530 which can conflict with char __fpu_control (); below.
22531 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022532 <limits.h> exists even on freestanding compilers. */
22533
22534#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022535# include <limits.h>
22536#else
22537# include <assert.h>
22538#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022539
22540#undef __fpu_control
22541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022542/* Override any GCC internal prototype to avoid an error.
22543 Use char because int might match the return type of a GCC
22544 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022545#ifdef __cplusplus
22546extern "C"
22547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022548char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022549/* The GNU C library defines this for functions which it implements
22550 to always fail with ENOSYS. Some functions are actually named
22551 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022552#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022553choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022554#endif
22555
Skip Montanaro6dead952003-09-25 14:50:04 +000022556int
22557main ()
22558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022559return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022560 ;
22561 return 0;
22562}
22563_ACEOF
22564rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022565if { (ac_try="$ac_link"
22566case "(($ac_try" in
22567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22568 *) ac_try_echo=$ac_try;;
22569esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022571 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022573 grep -v '^ *+' conftest.er1 >conftest.err
22574 rm -f conftest.er1
22575 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022577 (exit $ac_status); } && {
22578 test -z "$ac_c_werror_flag" ||
22579 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022580 } && test -s conftest$ac_exeext &&
22581 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022582 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022583else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022585sed 's/^/| /' conftest.$ac_ext >&5
22586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022587 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022589
22590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022591 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022592fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022593{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22594echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22595if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022596 :
22597else
Martin v. Löwis11437992002-04-12 09:54:03 +000022598
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022599{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22600echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022601if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022602 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022603else
Martin v. Löwis11437992002-04-12 09:54:03 +000022604 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022605LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022607/* confdefs.h. */
22608_ACEOF
22609cat confdefs.h >>conftest.$ac_ext
22610cat >>conftest.$ac_ext <<_ACEOF
22611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022613/* Override any GCC internal prototype to avoid an error.
22614 Use char because int might match the return type of a GCC
22615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022616#ifdef __cplusplus
22617extern "C"
22618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022619char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022620int
22621main ()
22622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022623return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 ;
22625 return 0;
22626}
22627_ACEOF
22628rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022629if { (ac_try="$ac_link"
22630case "(($ac_try" in
22631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22632 *) ac_try_echo=$ac_try;;
22633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022635 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022637 grep -v '^ *+' conftest.er1 >conftest.err
22638 rm -f conftest.er1
22639 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022641 (exit $ac_status); } && {
22642 test -z "$ac_c_werror_flag" ||
22643 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022644 } && test -s conftest$ac_exeext &&
22645 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022646 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022647else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022649sed 's/^/| /' conftest.$ac_ext >&5
22650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022651 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022653
22654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022656LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022657fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022658{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22659echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22660if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022661 cat >>confdefs.h <<_ACEOF
22662#define HAVE_LIBIEEE 1
22663_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022664
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022665 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022666
Guido van Rossum627b2d71993-12-24 10:39:16 +000022667fi
22668
Michael W. Hudson54241132001-12-07 15:38:26 +000022669
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022670fi
22671
Michael W. Hudson54241132001-12-07 15:38:26 +000022672
Guido van Rossum7f253911997-05-09 02:42:48 +000022673# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022674{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22675echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022677# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022678if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022679 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022680if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022681then
22682
22683cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022684#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022685_ACEOF
22686
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022687 { echo "$as_me:$LINENO: result: yes" >&5
22688echo "${ECHO_T}yes" >&6; }
22689else { echo "$as_me:$LINENO: result: no" >&5
22690echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022691fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022692else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022693 { echo "$as_me:$LINENO: result: no" >&5
22694echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022695fi
22696
Guido van Rossum7f253911997-05-09 02:42:48 +000022697
Guido van Rossum7f43da71994-08-01 12:15:30 +000022698# check for --with-libm=...
22699
Guido van Rossum563e7081996-09-10 18:20:48 +000022700case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022701Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022702*) LIBM=-lm
22703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022704{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22705echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022707# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022708if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022709 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022710if test "$withval" = no
22711then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022712 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22713echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022714elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022715then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022716 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22717echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22718else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22719echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022720 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022721fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022723 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22724echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022725fi
22726
Guido van Rossum7f43da71994-08-01 12:15:30 +000022727
22728# check for --with-libc=...
22729
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022730{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22731echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022733# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022734if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022735 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022736if test "$withval" = no
22737then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022738 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22739echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022740elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022741then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022742 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22743echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22744else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22745echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022746 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022747fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022748else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022749 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22750echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022751fi
22752
Guido van Rossum7f43da71994-08-01 12:15:30 +000022753
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022754# **************************************************
22755# * Check for various properties of floating point *
22756# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022757
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022758{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22759echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022760if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022761 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022762else
22763
22764if test "$cross_compiling" = yes; then
22765 ac_cv_little_endian_double=no
22766else
22767 cat >conftest.$ac_ext <<_ACEOF
22768/* confdefs.h. */
22769_ACEOF
22770cat confdefs.h >>conftest.$ac_ext
22771cat >>conftest.$ac_ext <<_ACEOF
22772/* end confdefs.h. */
22773
22774#include <string.h>
22775int main() {
22776 double x = 9006104071832581.0;
22777 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22778 return 0;
22779 else
22780 return 1;
22781}
22782
22783_ACEOF
22784rm -f conftest$ac_exeext
22785if { (ac_try="$ac_link"
22786case "(($ac_try" in
22787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22788 *) ac_try_echo=$ac_try;;
22789esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022791 (eval "$ac_link") 2>&5
22792 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22795 { (case "(($ac_try" in
22796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22797 *) ac_try_echo=$ac_try;;
22798esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022800 (eval "$ac_try") 2>&5
22801 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022803 (exit $ac_status); }; }; then
22804 ac_cv_little_endian_double=yes
22805else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022806 echo "$as_me: program exited with status $ac_status" >&5
22807echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022808sed 's/^/| /' conftest.$ac_ext >&5
22809
22810( exit $ac_status )
22811ac_cv_little_endian_double=no
22812fi
22813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22814fi
22815
22816
22817fi
22818
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022819{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22820echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022821if test "$ac_cv_little_endian_double" = yes
22822then
22823
22824cat >>confdefs.h <<\_ACEOF
22825#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22826_ACEOF
22827
22828fi
22829
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022830{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22831echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022832if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022833 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022834else
22835
22836if test "$cross_compiling" = yes; then
22837 ac_cv_big_endian_double=no
22838else
22839 cat >conftest.$ac_ext <<_ACEOF
22840/* confdefs.h. */
22841_ACEOF
22842cat confdefs.h >>conftest.$ac_ext
22843cat >>conftest.$ac_ext <<_ACEOF
22844/* end confdefs.h. */
22845
22846#include <string.h>
22847int main() {
22848 double x = 9006104071832581.0;
22849 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22850 return 0;
22851 else
22852 return 1;
22853}
22854
22855_ACEOF
22856rm -f conftest$ac_exeext
22857if { (ac_try="$ac_link"
22858case "(($ac_try" in
22859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22860 *) ac_try_echo=$ac_try;;
22861esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022863 (eval "$ac_link") 2>&5
22864 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22867 { (case "(($ac_try" in
22868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22869 *) ac_try_echo=$ac_try;;
22870esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022872 (eval "$ac_try") 2>&5
22873 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022875 (exit $ac_status); }; }; then
22876 ac_cv_big_endian_double=yes
22877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022878 echo "$as_me: program exited with status $ac_status" >&5
22879echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022880sed 's/^/| /' conftest.$ac_ext >&5
22881
22882( exit $ac_status )
22883ac_cv_big_endian_double=no
22884fi
22885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22886fi
22887
22888
22889fi
22890
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022891{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22892echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022893if test "$ac_cv_big_endian_double" = yes
22894then
22895
22896cat >>confdefs.h <<\_ACEOF
22897#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22898_ACEOF
22899
22900fi
22901
22902# Some ARM platforms use a mixed-endian representation for doubles.
22903# While Python doesn't currently have full support for these platforms
22904# (see e.g., issue 1762561), we can at least make sure that float <-> string
22905# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022906{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22907echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022908if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022909 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022910else
22911
22912if test "$cross_compiling" = yes; then
22913 ac_cv_mixed_endian_double=no
22914else
22915 cat >conftest.$ac_ext <<_ACEOF
22916/* confdefs.h. */
22917_ACEOF
22918cat confdefs.h >>conftest.$ac_ext
22919cat >>conftest.$ac_ext <<_ACEOF
22920/* end confdefs.h. */
22921
22922#include <string.h>
22923int main() {
22924 double x = 9006104071832581.0;
22925 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22926 return 0;
22927 else
22928 return 1;
22929}
22930
22931_ACEOF
22932rm -f conftest$ac_exeext
22933if { (ac_try="$ac_link"
22934case "(($ac_try" in
22935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22936 *) ac_try_echo=$ac_try;;
22937esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022939 (eval "$ac_link") 2>&5
22940 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022942 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22943 { (case "(($ac_try" in
22944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22945 *) ac_try_echo=$ac_try;;
22946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022948 (eval "$ac_try") 2>&5
22949 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022951 (exit $ac_status); }; }; then
22952 ac_cv_mixed_endian_double=yes
22953else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022954 echo "$as_me: program exited with status $ac_status" >&5
22955echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022956sed 's/^/| /' conftest.$ac_ext >&5
22957
22958( exit $ac_status )
22959ac_cv_mixed_endian_double=no
22960fi
22961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22962fi
22963
22964
22965fi
22966
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022967{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22968echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022969if test "$ac_cv_mixed_endian_double" = yes
22970then
22971
22972cat >>confdefs.h <<\_ACEOF
22973#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22974_ACEOF
22975
22976fi
22977
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022978# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022979# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022980# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022981# rounding; this is a problem on x86, where the x87 FPU has a default
22982# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22983# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022984if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22985then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022986 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022987 # x87 control word. It should be, but you never know...
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022988 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22989echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022990 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022991/* confdefs.h. */
22992_ACEOF
22993cat confdefs.h >>conftest.$ac_ext
22994cat >>conftest.$ac_ext <<_ACEOF
22995/* end confdefs.h. */
22996
22997int
22998main ()
22999{
23000
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023001 unsigned short cw;
23002 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23003 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023004
23005 ;
23006 return 0;
23007}
23008_ACEOF
23009rm -f conftest.$ac_objext
23010if { (ac_try="$ac_compile"
23011case "(($ac_try" in
23012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23013 *) ac_try_echo=$ac_try;;
23014esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023016 (eval "$ac_compile") 2>conftest.er1
23017 ac_status=$?
23018 grep -v '^ *+' conftest.er1 >conftest.err
23019 rm -f conftest.er1
23020 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023022 (exit $ac_status); } && {
23023 test -z "$ac_c_werror_flag" ||
23024 test ! -s conftest.err
23025 } && test -s conftest.$ac_objext; then
23026 have_gcc_asm_for_x87=yes
23027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023028 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023029sed 's/^/| /' conftest.$ac_ext >&5
23030
23031 have_gcc_asm_for_x87=no
23032fi
23033
23034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023035 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23036echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023037 if test "$have_gcc_asm_for_x87" = yes
23038 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023039
23040cat >>confdefs.h <<\_ACEOF
23041#define HAVE_GCC_ASM_FOR_X87 1
23042_ACEOF
23043
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023044 fi
23045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023046
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023047# Detect whether system arithmetic is subject to x87-style double
23048# rounding issues. The result of this test has little meaning on non
23049# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23050# mode is round-to-nearest and double rounding issues are present, and
23051# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023052{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23053echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023054# $BASECFLAGS may affect the result
23055ac_save_cc="$CC"
23056CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023057if test "$cross_compiling" = yes; then
23058 ac_cv_x87_double_rounding=no
23059else
23060 cat >conftest.$ac_ext <<_ACEOF
23061/* confdefs.h. */
23062_ACEOF
23063cat confdefs.h >>conftest.$ac_ext
23064cat >>conftest.$ac_ext <<_ACEOF
23065/* end confdefs.h. */
23066
23067#include <stdlib.h>
23068#include <math.h>
23069int main() {
23070 volatile double x, y, z;
23071 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23072 x = 0.99999999999999989; /* 1-2**-53 */
23073 y = 1./x;
23074 if (y != 1.)
23075 exit(0);
23076 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23077 x = 1e16;
23078 y = 2.99999;
23079 z = x + y;
23080 if (z != 1e16+4.)
23081 exit(0);
23082 /* both tests show evidence of double rounding */
23083 exit(1);
23084}
23085
23086_ACEOF
23087rm -f conftest$ac_exeext
23088if { (ac_try="$ac_link"
23089case "(($ac_try" in
23090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23091 *) ac_try_echo=$ac_try;;
23092esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023094 (eval "$ac_link") 2>&5
23095 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23098 { (case "(($ac_try" in
23099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23100 *) ac_try_echo=$ac_try;;
23101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023103 (eval "$ac_try") 2>&5
23104 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023106 (exit $ac_status); }; }; then
23107 ac_cv_x87_double_rounding=no
23108else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023109 echo "$as_me: program exited with status $ac_status" >&5
23110echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023111sed 's/^/| /' conftest.$ac_ext >&5
23112
23113( exit $ac_status )
23114ac_cv_x87_double_rounding=yes
23115fi
23116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23117fi
23118
23119
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023120CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023121{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23122echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023123if test "$ac_cv_x87_double_rounding" = yes
23124then
23125
23126cat >>confdefs.h <<\_ACEOF
23127#define X87_DOUBLE_ROUNDING 1
23128_ACEOF
23129
23130fi
23131
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023132# ************************************
23133# * Check for mathematical functions *
23134# ************************************
23135
23136LIBS_SAVE=$LIBS
23137LIBS="$LIBS $LIBM"
23138
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023139# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23140# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023141{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23142echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023143if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023144 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023145else
23146
23147if test "$cross_compiling" = yes; then
23148 ac_cv_tanh_preserves_zero_sign=no
23149else
23150 cat >conftest.$ac_ext <<_ACEOF
23151/* confdefs.h. */
23152_ACEOF
23153cat confdefs.h >>conftest.$ac_ext
23154cat >>conftest.$ac_ext <<_ACEOF
23155/* end confdefs.h. */
23156
23157#include <math.h>
23158#include <stdlib.h>
23159int main() {
23160 /* return 0 if either negative zeros don't exist
23161 on this platform or if negative zeros exist
23162 and tanh(-0.) == -0. */
23163 if (atan2(0., -1.) == atan2(-0., -1.) ||
23164 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23165 else exit(1);
23166}
23167
23168_ACEOF
23169rm -f conftest$ac_exeext
23170if { (ac_try="$ac_link"
23171case "(($ac_try" in
23172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23173 *) ac_try_echo=$ac_try;;
23174esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023176 (eval "$ac_link") 2>&5
23177 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23180 { (case "(($ac_try" in
23181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23182 *) ac_try_echo=$ac_try;;
23183esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023185 (eval "$ac_try") 2>&5
23186 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023188 (exit $ac_status); }; }; then
23189 ac_cv_tanh_preserves_zero_sign=yes
23190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023191 echo "$as_me: program exited with status $ac_status" >&5
23192echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023193sed 's/^/| /' conftest.$ac_ext >&5
23194
23195( exit $ac_status )
23196ac_cv_tanh_preserves_zero_sign=no
23197fi
23198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23199fi
23200
23201
23202fi
23203
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023204{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23205echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023206if test "$ac_cv_tanh_preserves_zero_sign" = yes
23207then
23208
23209cat >>confdefs.h <<\_ACEOF
23210#define TANH_PRESERVES_ZERO_SIGN 1
23211_ACEOF
23212
23213fi
23214
23215
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023216
Michael W. Hudson54241132001-12-07 15:38:26 +000023217
Christian Heimes99170a52007-12-19 02:07:34 +000023218
23219
23220
23221
23222
Mark Dickinsonf2537862009-04-18 13:58:18 +000023223
Mark Dickinson9c113362009-09-05 10:36:23 +000023224for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23225do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023226as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23227{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23228echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023229if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023230 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023231else
23232 cat >conftest.$ac_ext <<_ACEOF
23233/* confdefs.h. */
23234_ACEOF
23235cat confdefs.h >>conftest.$ac_ext
23236cat >>conftest.$ac_ext <<_ACEOF
23237/* end confdefs.h. */
23238/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23239 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23240#define $ac_func innocuous_$ac_func
23241
23242/* System header to define __stub macros and hopefully few prototypes,
23243 which can conflict with char $ac_func (); below.
23244 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23245 <limits.h> exists even on freestanding compilers. */
23246
23247#ifdef __STDC__
23248# include <limits.h>
23249#else
23250# include <assert.h>
23251#endif
23252
23253#undef $ac_func
23254
23255/* Override any GCC internal prototype to avoid an error.
23256 Use char because int might match the return type of a GCC
23257 builtin and then its argument prototype would still apply. */
23258#ifdef __cplusplus
23259extern "C"
23260#endif
23261char $ac_func ();
23262/* The GNU C library defines this for functions which it implements
23263 to always fail with ENOSYS. Some functions are actually named
23264 something starting with __ and the normal name is an alias. */
23265#if defined __stub_$ac_func || defined __stub___$ac_func
23266choke me
23267#endif
23268
23269int
23270main ()
23271{
23272return $ac_func ();
23273 ;
23274 return 0;
23275}
23276_ACEOF
23277rm -f conftest.$ac_objext conftest$ac_exeext
23278if { (ac_try="$ac_link"
23279case "(($ac_try" in
23280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23281 *) ac_try_echo=$ac_try;;
23282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023284 (eval "$ac_link") 2>conftest.er1
23285 ac_status=$?
23286 grep -v '^ *+' conftest.er1 >conftest.err
23287 rm -f conftest.er1
23288 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023290 (exit $ac_status); } && {
23291 test -z "$ac_c_werror_flag" ||
23292 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023293 } && test -s conftest$ac_exeext &&
23294 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023295 eval "$as_ac_var=yes"
23296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023297 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023298sed 's/^/| /' conftest.$ac_ext >&5
23299
23300 eval "$as_ac_var=no"
23301fi
23302
23303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23304 conftest$ac_exeext conftest.$ac_ext
23305fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023306ac_res=`eval echo '${'$as_ac_var'}'`
23307 { echo "$as_me:$LINENO: result: $ac_res" >&5
23308echo "${ECHO_T}$ac_res" >&6; }
23309if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023310 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023311#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023312_ACEOF
23313
23314fi
23315done
23316
23317
23318
23319
23320
23321
23322for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023323do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023324as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23325{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23326echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023327if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023328 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023329else
23330 cat >conftest.$ac_ext <<_ACEOF
23331/* confdefs.h. */
23332_ACEOF
23333cat confdefs.h >>conftest.$ac_ext
23334cat >>conftest.$ac_ext <<_ACEOF
23335/* end confdefs.h. */
23336/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23337 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23338#define $ac_func innocuous_$ac_func
23339
23340/* System header to define __stub macros and hopefully few prototypes,
23341 which can conflict with char $ac_func (); below.
23342 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23343 <limits.h> exists even on freestanding compilers. */
23344
23345#ifdef __STDC__
23346# include <limits.h>
23347#else
23348# include <assert.h>
23349#endif
23350
23351#undef $ac_func
23352
23353/* Override any GCC internal prototype to avoid an error.
23354 Use char because int might match the return type of a GCC
23355 builtin and then its argument prototype would still apply. */
23356#ifdef __cplusplus
23357extern "C"
23358#endif
23359char $ac_func ();
23360/* The GNU C library defines this for functions which it implements
23361 to always fail with ENOSYS. Some functions are actually named
23362 something starting with __ and the normal name is an alias. */
23363#if defined __stub_$ac_func || defined __stub___$ac_func
23364choke me
23365#endif
23366
23367int
23368main ()
23369{
23370return $ac_func ();
23371 ;
23372 return 0;
23373}
23374_ACEOF
23375rm -f conftest.$ac_objext conftest$ac_exeext
23376if { (ac_try="$ac_link"
23377case "(($ac_try" in
23378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23379 *) ac_try_echo=$ac_try;;
23380esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023382 (eval "$ac_link") 2>conftest.er1
23383 ac_status=$?
23384 grep -v '^ *+' conftest.er1 >conftest.err
23385 rm -f conftest.er1
23386 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023388 (exit $ac_status); } && {
23389 test -z "$ac_c_werror_flag" ||
23390 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023391 } && test -s conftest$ac_exeext &&
23392 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023393 eval "$as_ac_var=yes"
23394else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023395 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023396sed 's/^/| /' conftest.$ac_ext >&5
23397
23398 eval "$as_ac_var=no"
23399fi
23400
23401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23402 conftest$ac_exeext conftest.$ac_ext
23403fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023404ac_res=`eval echo '${'$as_ac_var'}'`
23405 { echo "$as_me:$LINENO: result: $ac_res" >&5
23406echo "${ECHO_T}$ac_res" >&6; }
23407if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023408 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023409#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023410_ACEOF
23411
23412fi
23413done
23414
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023415{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23416echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023417if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023418 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023419else
23420 cat >conftest.$ac_ext <<_ACEOF
23421/* confdefs.h. */
23422_ACEOF
23423cat confdefs.h >>conftest.$ac_ext
23424cat >>conftest.$ac_ext <<_ACEOF
23425/* end confdefs.h. */
23426#include <math.h>
23427
23428int
23429main ()
23430{
23431#ifndef isinf
23432 (void) isinf;
23433#endif
23434
23435 ;
23436 return 0;
23437}
23438_ACEOF
23439rm -f conftest.$ac_objext
23440if { (ac_try="$ac_compile"
23441case "(($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 Dickinson3dc7c6a2009-01-04 15:09:02 +000023446 (eval "$ac_compile") 2>conftest.er1
23447 ac_status=$?
23448 grep -v '^ *+' conftest.er1 >conftest.err
23449 rm -f conftest.er1
23450 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023452 (exit $ac_status); } && {
23453 test -z "$ac_c_werror_flag" ||
23454 test ! -s conftest.err
23455 } && test -s conftest.$ac_objext; then
23456 ac_cv_have_decl_isinf=yes
23457else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023458 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023459sed 's/^/| /' conftest.$ac_ext >&5
23460
23461 ac_cv_have_decl_isinf=no
23462fi
23463
23464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23465fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023466{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23467echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23468if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023469
23470cat >>confdefs.h <<_ACEOF
23471#define HAVE_DECL_ISINF 1
23472_ACEOF
23473
23474
23475else
23476 cat >>confdefs.h <<_ACEOF
23477#define HAVE_DECL_ISINF 0
23478_ACEOF
23479
23480
23481fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023482{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23483echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023484if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023485 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023486else
23487 cat >conftest.$ac_ext <<_ACEOF
23488/* confdefs.h. */
23489_ACEOF
23490cat confdefs.h >>conftest.$ac_ext
23491cat >>conftest.$ac_ext <<_ACEOF
23492/* end confdefs.h. */
23493#include <math.h>
23494
23495int
23496main ()
23497{
23498#ifndef isnan
23499 (void) isnan;
23500#endif
23501
23502 ;
23503 return 0;
23504}
23505_ACEOF
23506rm -f conftest.$ac_objext
23507if { (ac_try="$ac_compile"
23508case "(($ac_try" in
23509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23510 *) ac_try_echo=$ac_try;;
23511esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023513 (eval "$ac_compile") 2>conftest.er1
23514 ac_status=$?
23515 grep -v '^ *+' conftest.er1 >conftest.err
23516 rm -f conftest.er1
23517 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023519 (exit $ac_status); } && {
23520 test -z "$ac_c_werror_flag" ||
23521 test ! -s conftest.err
23522 } && test -s conftest.$ac_objext; then
23523 ac_cv_have_decl_isnan=yes
23524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023525 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023526sed 's/^/| /' conftest.$ac_ext >&5
23527
23528 ac_cv_have_decl_isnan=no
23529fi
23530
23531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23532fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023533{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23534echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23535if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023536
23537cat >>confdefs.h <<_ACEOF
23538#define HAVE_DECL_ISNAN 1
23539_ACEOF
23540
23541
23542else
23543 cat >>confdefs.h <<_ACEOF
23544#define HAVE_DECL_ISNAN 0
23545_ACEOF
23546
23547
23548fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023549{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23550echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023551if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023552 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023553else
23554 cat >conftest.$ac_ext <<_ACEOF
23555/* confdefs.h. */
23556_ACEOF
23557cat confdefs.h >>conftest.$ac_ext
23558cat >>conftest.$ac_ext <<_ACEOF
23559/* end confdefs.h. */
23560#include <math.h>
23561
23562int
23563main ()
23564{
23565#ifndef isfinite
23566 (void) isfinite;
23567#endif
23568
23569 ;
23570 return 0;
23571}
23572_ACEOF
23573rm -f conftest.$ac_objext
23574if { (ac_try="$ac_compile"
23575case "(($ac_try" in
23576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23577 *) ac_try_echo=$ac_try;;
23578esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023580 (eval "$ac_compile") 2>conftest.er1
23581 ac_status=$?
23582 grep -v '^ *+' conftest.er1 >conftest.err
23583 rm -f conftest.er1
23584 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023586 (exit $ac_status); } && {
23587 test -z "$ac_c_werror_flag" ||
23588 test ! -s conftest.err
23589 } && test -s conftest.$ac_objext; then
23590 ac_cv_have_decl_isfinite=yes
23591else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023592 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023593sed 's/^/| /' conftest.$ac_ext >&5
23594
23595 ac_cv_have_decl_isfinite=no
23596fi
23597
23598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23599fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023600{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23601echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23602if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023603
23604cat >>confdefs.h <<_ACEOF
23605#define HAVE_DECL_ISFINITE 1
23606_ACEOF
23607
23608
23609else
23610 cat >>confdefs.h <<_ACEOF
23611#define HAVE_DECL_ISFINITE 0
23612_ACEOF
23613
23614
23615fi
23616
23617
Christian Heimes99170a52007-12-19 02:07:34 +000023618
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023619LIBS=$LIBS_SAVE
23620
Mark Dickinson10683072009-04-18 21:18:19 +000023621# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023622{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23623echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023624if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023625 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023626else
23627 if test "$cross_compiling" = yes; then
23628 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023629else
23630 cat >conftest.$ac_ext <<_ACEOF
23631/* confdefs.h. */
23632_ACEOF
23633cat confdefs.h >>conftest.$ac_ext
23634cat >>conftest.$ac_ext <<_ACEOF
23635/* end confdefs.h. */
23636
23637#include <unistd.h>
23638#include <fcntl.h>
23639#include <stdio.h>
23640#include <semaphore.h>
23641#include <sys/stat.h>
23642
23643int main(void){
23644 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23645 int count;
23646 int res;
23647 if(a==SEM_FAILED){
23648 perror("sem_open");
23649 return 1;
23650
23651 }
23652 res = sem_getvalue(a, &count);
23653 sem_close(a);
23654 return res==-1 ? 1 : 0;
23655}
23656
Mark Dickinson10683072009-04-18 21:18:19 +000023657_ACEOF
23658rm -f conftest$ac_exeext
23659if { (ac_try="$ac_link"
23660case "(($ac_try" in
23661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23662 *) ac_try_echo=$ac_try;;
23663esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023665 (eval "$ac_link") 2>&5
23666 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23669 { (case "(($ac_try" in
23670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23671 *) ac_try_echo=$ac_try;;
23672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023674 (eval "$ac_try") 2>&5
23675 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023677 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023678 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023680 echo "$as_me: program exited with status $ac_status" >&5
23681echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023682sed 's/^/| /' conftest.$ac_ext >&5
23683
23684( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023685ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023686fi
23687rm -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 +000023688fi
23689
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023690
23691
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023692fi
23693
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023694{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23695echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023696if test $ac_cv_broken_sem_getvalue = yes
23697then
23698
23699cat >>confdefs.h <<\_ACEOF
23700#define HAVE_BROKEN_SEM_GETVALUE 1
23701_ACEOF
23702
23703fi
23704
Mark Dickinsonbd792642009-03-18 20:06:12 +000023705# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023706{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23707echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023708# Check whether --enable-big-digits was given.
23709if test "${enable_big_digits+set}" = set; then
23710 enableval=$enable_big_digits; case $enable_big_digits in
23711yes)
23712 enable_big_digits=30 ;;
23713no)
23714 enable_big_digits=15 ;;
2371515|30)
23716 ;;
23717*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023718 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23719echo "$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 +000023720 { (exit 1); exit 1; }; } ;;
23721esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023722{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23723echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023724
23725cat >>confdefs.h <<_ACEOF
23726#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23727_ACEOF
23728
23729
23730else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023731 { echo "$as_me:$LINENO: result: no value specified" >&5
23732echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023733fi
23734
23735
Guido van Rossumef2255b2000-03-10 22:30:29 +000023736# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023737if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023738 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23739echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023740if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023741 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023742fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023743{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23744echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023745else
Martin v. Löwis11437992002-04-12 09:54:03 +000023746 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023747{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23748echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023750/* confdefs.h. */
23751_ACEOF
23752cat confdefs.h >>conftest.$ac_ext
23753cat >>conftest.$ac_ext <<_ACEOF
23754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023755$ac_includes_default
23756#include <wchar.h>
23757_ACEOF
23758rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023759if { (ac_try="$ac_compile"
23760case "(($ac_try" in
23761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23762 *) ac_try_echo=$ac_try;;
23763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023767 grep -v '^ *+' conftest.er1 >conftest.err
23768 rm -f conftest.er1
23769 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023771 (exit $ac_status); } && {
23772 test -z "$ac_c_werror_flag" ||
23773 test ! -s conftest.err
23774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023775 ac_header_compiler=yes
23776else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023778sed 's/^/| /' conftest.$ac_ext >&5
23779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023780 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023782
23783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023784{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23785echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023786
23787# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023788{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23789echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023791/* confdefs.h. */
23792_ACEOF
23793cat confdefs.h >>conftest.$ac_ext
23794cat >>conftest.$ac_ext <<_ACEOF
23795/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023796#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023797_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023798if { (ac_try="$ac_cpp conftest.$ac_ext"
23799case "(($ac_try" in
23800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23801 *) ac_try_echo=$ac_try;;
23802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023804 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023805 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023806 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023807 rm -f conftest.er1
23808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023810 (exit $ac_status); } >/dev/null && {
23811 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23812 test ! -s conftest.err
23813 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023814 ac_header_preproc=yes
23815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023817sed 's/^/| /' conftest.$ac_ext >&5
23818
Martin v. Löwis11437992002-04-12 09:54:03 +000023819 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023821
Martin v. Löwis11437992002-04-12 09:54:03 +000023822rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023823{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23824echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023825
23826# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023827case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23828 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023829 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23830echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23831 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23832echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023833 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023834 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023835 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023836 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23837echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23838 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23839echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23840 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23841echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23842 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23843echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23844 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23845echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23846 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23847echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023848 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023849## -------------------------------------- ##
23850## Report this to http://bugs.python.org/ ##
23851## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023852_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023853 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023854 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023856{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23857echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023858if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023859 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023860else
23861 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023862fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023863{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23864echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023865
23866fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023867if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023868
23869
23870cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023871#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023872_ACEOF
23873
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023874 wchar_h="yes"
23875
Guido van Rossumef2255b2000-03-10 22:30:29 +000023876else
Martin v. Löwis11437992002-04-12 09:54:03 +000023877 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023878
23879fi
23880
Michael W. Hudson54241132001-12-07 15:38:26 +000023881
Martin v. Löwis11437992002-04-12 09:54:03 +000023882
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023883# determine wchar_t size
23884if test "$wchar_h" = yes
23885then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023886 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23887echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23888if test "${ac_cv_type_wchar_t+set}" = set; then
23889 echo $ECHO_N "(cached) $ECHO_C" >&6
23890else
23891 cat >conftest.$ac_ext <<_ACEOF
23892/* confdefs.h. */
23893_ACEOF
23894cat confdefs.h >>conftest.$ac_ext
23895cat >>conftest.$ac_ext <<_ACEOF
23896/* end confdefs.h. */
23897#include <wchar.h>
23898
23899typedef wchar_t ac__type_new_;
23900int
23901main ()
23902{
23903if ((ac__type_new_ *) 0)
23904 return 0;
23905if (sizeof (ac__type_new_))
23906 return 0;
23907 ;
23908 return 0;
23909}
23910_ACEOF
23911rm -f conftest.$ac_objext
23912if { (ac_try="$ac_compile"
23913case "(($ac_try" in
23914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23915 *) ac_try_echo=$ac_try;;
23916esac
23917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23918 (eval "$ac_compile") 2>conftest.er1
23919 ac_status=$?
23920 grep -v '^ *+' conftest.er1 >conftest.err
23921 rm -f conftest.er1
23922 cat conftest.err >&5
23923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23924 (exit $ac_status); } && {
23925 test -z "$ac_c_werror_flag" ||
23926 test ! -s conftest.err
23927 } && test -s conftest.$ac_objext; then
23928 ac_cv_type_wchar_t=yes
23929else
23930 echo "$as_me: failed program was:" >&5
23931sed 's/^/| /' conftest.$ac_ext >&5
23932
23933 ac_cv_type_wchar_t=no
23934fi
23935
23936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23937fi
23938{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23939echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23940
23941# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023942# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23943# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23944# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023945{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23946echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023947if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023948 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023949else
Martin v. Löwis11437992002-04-12 09:54:03 +000023950 if test "$cross_compiling" = yes; then
23951 # Depending upon the size, compute the lo and hi bounds.
23952cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023953/* confdefs.h. */
23954_ACEOF
23955cat confdefs.h >>conftest.$ac_ext
23956cat >>conftest.$ac_ext <<_ACEOF
23957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023958#include <wchar.h>
23959
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023960 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023961int
23962main ()
23963{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023964static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023965test_array [0] = 0
23966
23967 ;
23968 return 0;
23969}
23970_ACEOF
23971rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023972if { (ac_try="$ac_compile"
23973case "(($ac_try" in
23974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23975 *) ac_try_echo=$ac_try;;
23976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023980 grep -v '^ *+' conftest.er1 >conftest.err
23981 rm -f conftest.er1
23982 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023984 (exit $ac_status); } && {
23985 test -z "$ac_c_werror_flag" ||
23986 test ! -s conftest.err
23987 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023988 ac_lo=0 ac_mid=0
23989 while :; do
23990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023991/* confdefs.h. */
23992_ACEOF
23993cat confdefs.h >>conftest.$ac_ext
23994cat >>conftest.$ac_ext <<_ACEOF
23995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023996#include <wchar.h>
23997
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023998 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023999int
24000main ()
24001{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024002static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024003test_array [0] = 0
24004
24005 ;
24006 return 0;
24007}
24008_ACEOF
24009rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024010if { (ac_try="$ac_compile"
24011case "(($ac_try" in
24012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24013 *) ac_try_echo=$ac_try;;
24014esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024018 grep -v '^ *+' conftest.er1 >conftest.err
24019 rm -f conftest.er1
24020 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024022 (exit $ac_status); } && {
24023 test -z "$ac_c_werror_flag" ||
24024 test ! -s conftest.err
24025 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024026 ac_hi=$ac_mid; break
24027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024029sed 's/^/| /' conftest.$ac_ext >&5
24030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024031 ac_lo=`expr $ac_mid + 1`
24032 if test $ac_lo -le $ac_mid; then
24033 ac_lo= ac_hi=
24034 break
24035 fi
24036 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024038
24039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024040 done
24041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024043sed 's/^/| /' conftest.$ac_ext >&5
24044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024046/* confdefs.h. */
24047_ACEOF
24048cat confdefs.h >>conftest.$ac_ext
24049cat >>conftest.$ac_ext <<_ACEOF
24050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024051#include <wchar.h>
24052
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024053 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024054int
24055main ()
24056{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024057static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024058test_array [0] = 0
24059
24060 ;
24061 return 0;
24062}
24063_ACEOF
24064rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024065if { (ac_try="$ac_compile"
24066case "(($ac_try" in
24067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24068 *) ac_try_echo=$ac_try;;
24069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024073 grep -v '^ *+' conftest.er1 >conftest.err
24074 rm -f conftest.er1
24075 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024077 (exit $ac_status); } && {
24078 test -z "$ac_c_werror_flag" ||
24079 test ! -s conftest.err
24080 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024081 ac_hi=-1 ac_mid=-1
24082 while :; do
24083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024084/* confdefs.h. */
24085_ACEOF
24086cat confdefs.h >>conftest.$ac_ext
24087cat >>conftest.$ac_ext <<_ACEOF
24088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024089#include <wchar.h>
24090
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024091 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024092int
24093main ()
24094{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024095static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024096test_array [0] = 0
24097
24098 ;
24099 return 0;
24100}
24101_ACEOF
24102rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024103if { (ac_try="$ac_compile"
24104case "(($ac_try" in
24105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24106 *) ac_try_echo=$ac_try;;
24107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024111 grep -v '^ *+' conftest.er1 >conftest.err
24112 rm -f conftest.er1
24113 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024115 (exit $ac_status); } && {
24116 test -z "$ac_c_werror_flag" ||
24117 test ! -s conftest.err
24118 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024119 ac_lo=$ac_mid; break
24120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024122sed 's/^/| /' conftest.$ac_ext >&5
24123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024124 ac_hi=`expr '(' $ac_mid ')' - 1`
24125 if test $ac_mid -le $ac_hi; then
24126 ac_lo= ac_hi=
24127 break
24128 fi
24129 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024131
24132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024133 done
24134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024136sed 's/^/| /' conftest.$ac_ext >&5
24137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024138 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024140
24141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024143
24144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024145# Binary search between lo and hi bounds.
24146while test "x$ac_lo" != "x$ac_hi"; do
24147 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024149/* confdefs.h. */
24150_ACEOF
24151cat confdefs.h >>conftest.$ac_ext
24152cat >>conftest.$ac_ext <<_ACEOF
24153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024154#include <wchar.h>
24155
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024156 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024157int
24158main ()
24159{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024161test_array [0] = 0
24162
24163 ;
24164 return 0;
24165}
24166_ACEOF
24167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024168if { (ac_try="$ac_compile"
24169case "(($ac_try" in
24170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24171 *) ac_try_echo=$ac_try;;
24172esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024176 grep -v '^ *+' conftest.er1 >conftest.err
24177 rm -f conftest.er1
24178 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024180 (exit $ac_status); } && {
24181 test -z "$ac_c_werror_flag" ||
24182 test ! -s conftest.err
24183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024184 ac_hi=$ac_mid
24185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024187sed 's/^/| /' conftest.$ac_ext >&5
24188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024189 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024191
24192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024193done
24194case $ac_lo in
24195?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024196'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024197 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024198See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024199echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024200See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024201 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024202 else
24203 ac_cv_sizeof_wchar_t=0
24204 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024205esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024206else
Martin v. Löwis11437992002-04-12 09:54:03 +000024207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024208/* confdefs.h. */
24209_ACEOF
24210cat confdefs.h >>conftest.$ac_ext
24211cat >>conftest.$ac_ext <<_ACEOF
24212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024213#include <wchar.h>
24214
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024215 typedef wchar_t ac__type_sizeof_;
24216static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24217static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024218#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024219#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024220int
24221main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024222{
Martin v. Löwis11437992002-04-12 09:54:03 +000024223
24224 FILE *f = fopen ("conftest.val", "w");
24225 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024226 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024227 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024228 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024229 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024230 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024231 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024232 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024233 }
24234 else
24235 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024236 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024237 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024238 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024239 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024240 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024241 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024242
24243 ;
24244 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024245}
Martin v. Löwis11437992002-04-12 09:54:03 +000024246_ACEOF
24247rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024248if { (ac_try="$ac_link"
24249case "(($ac_try" in
24250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24251 *) ac_try_echo=$ac_try;;
24252esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024254 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024255 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024257 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024258 { (case "(($ac_try" in
24259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24260 *) ac_try_echo=$ac_try;;
24261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024263 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024264 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024266 (exit $ac_status); }; }; then
24267 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024268else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024269 echo "$as_me: program exited with status $ac_status" >&5
24270echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024271sed 's/^/| /' conftest.$ac_ext >&5
24272
Martin v. Löwis11437992002-04-12 09:54:03 +000024273( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024274if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024275 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024276See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024277echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024278See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024279 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024280 else
24281 ac_cv_sizeof_wchar_t=0
24282 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024284rm -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 +000024285fi
24286rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024288{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24289echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024290
24291
24292
Martin v. Löwis11437992002-04-12 09:54:03 +000024293cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024294#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024295_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024296
Michael W. Hudson54241132001-12-07 15:38:26 +000024297
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024298fi
24299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024300{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24301echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024302have_ucs4_tcl=no
24303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024304/* confdefs.h. */
24305_ACEOF
24306cat confdefs.h >>conftest.$ac_ext
24307cat >>conftest.$ac_ext <<_ACEOF
24308/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024309
24310#include <tcl.h>
24311#if TCL_UTF_MAX != 6
24312# error "NOT UCS4_TCL"
24313#endif
24314int
24315main ()
24316{
24317
24318 ;
24319 return 0;
24320}
24321_ACEOF
24322rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024323if { (ac_try="$ac_compile"
24324case "(($ac_try" in
24325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24326 *) ac_try_echo=$ac_try;;
24327esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024331 grep -v '^ *+' conftest.er1 >conftest.err
24332 rm -f conftest.er1
24333 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024335 (exit $ac_status); } && {
24336 test -z "$ac_c_werror_flag" ||
24337 test ! -s conftest.err
24338 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024339
24340
24341cat >>confdefs.h <<\_ACEOF
24342#define HAVE_UCS4_TCL 1
24343_ACEOF
24344
24345 have_ucs4_tcl=yes
24346
24347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024349sed 's/^/| /' conftest.$ac_ext >&5
24350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024351
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024353
24354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024355{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24356echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024357
Skip Montanaro6dead952003-09-25 14:50:04 +000024358# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024359if test "$wchar_h" = yes
24360then
24361 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024362 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24363echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024364 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024365 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024366else
24367
24368 if test "$cross_compiling" = yes; then
24369 ac_cv_wchar_t_signed=yes
24370else
24371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024372/* confdefs.h. */
24373_ACEOF
24374cat confdefs.h >>conftest.$ac_ext
24375cat >>conftest.$ac_ext <<_ACEOF
24376/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024377
24378 #include <wchar.h>
24379 int main()
24380 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024381 /* Success: exit code 0 */
24382 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024383 }
24384
24385_ACEOF
24386rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024387if { (ac_try="$ac_link"
24388case "(($ac_try" in
24389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24390 *) ac_try_echo=$ac_try;;
24391esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024393 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024394 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024397 { (case "(($ac_try" in
24398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24399 *) ac_try_echo=$ac_try;;
24400esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024402 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024403 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024405 (exit $ac_status); }; }; then
24406 ac_cv_wchar_t_signed=yes
24407else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024408 echo "$as_me: program exited with status $ac_status" >&5
24409echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024410sed 's/^/| /' conftest.$ac_ext >&5
24411
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024412( exit $ac_status )
24413ac_cv_wchar_t_signed=no
24414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024415rm -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 +000024416fi
24417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024418
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024419fi
24420
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024421 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24422echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024423fi
24424
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024425{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24426echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024427
24428# Check whether --with-wide-unicode was given.
24429if test "${with_wide_unicode+set}" = set; then
24430 withval=$with_wide_unicode;
24431if test "$withval" != no
24432then unicode_size="4"
24433else unicode_size="2"
24434fi
24435
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024436else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024437
Georg Brandl52d168a2008-01-07 18:10:24 +000024438case "$have_ucs4_tcl" in
24439 yes) unicode_size="4" ;;
24440 *) unicode_size="2" ;;
24441esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024442
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024443fi
24444
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024445
24446
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024447
Georg Brandl52d168a2008-01-07 18:10:24 +000024448case "$unicode_size" in
24449 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024450#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024451_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024452 ;;
24453 *) cat >>confdefs.h <<\_ACEOF
24454#define Py_UNICODE_SIZE 2
24455_ACEOF
24456 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024457esac
24458
Michael W. Hudson54241132001-12-07 15:38:26 +000024459
Martin v. Löwis11437992002-04-12 09:54:03 +000024460
24461
Georg Brandl52d168a2008-01-07 18:10:24 +000024462# wchar_t is only usable if it maps to an unsigned type
24463if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024464 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024465then
24466 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024467
Martin v. Löwis11437992002-04-12 09:54:03 +000024468cat >>confdefs.h <<\_ACEOF
24469#define HAVE_USABLE_WCHAR_T 1
24470_ACEOF
24471
Georg Brandl52d168a2008-01-07 18:10:24 +000024472 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024473#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024474_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024475
Georg Brandl52d168a2008-01-07 18:10:24 +000024476elif test "$ac_cv_sizeof_short" = "$unicode_size"
24477then
24478 PY_UNICODE_TYPE="unsigned short"
24479 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024480#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024481_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024482
Georg Brandl52d168a2008-01-07 18:10:24 +000024483elif test "$ac_cv_sizeof_long" = "$unicode_size"
24484then
24485 PY_UNICODE_TYPE="unsigned long"
24486 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024487#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024488_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024489
Georg Brandl52d168a2008-01-07 18:10:24 +000024490else
24491 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024492fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024493{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24494echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024495
24496# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024497{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24498echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024499if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024500 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024502 # See if sys/param.h defines the BYTE_ORDER macro.
24503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024504/* confdefs.h. */
24505_ACEOF
24506cat confdefs.h >>conftest.$ac_ext
24507cat >>conftest.$ac_ext <<_ACEOF
24508/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024509#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024510#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024511
Martin v. Löwis11437992002-04-12 09:54:03 +000024512int
24513main ()
24514{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024515#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24516 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24517 bogus endian macros
24518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024519
24520 ;
24521 return 0;
24522}
24523_ACEOF
24524rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024525if { (ac_try="$ac_compile"
24526case "(($ac_try" in
24527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24528 *) ac_try_echo=$ac_try;;
24529esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024531 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024533 grep -v '^ *+' conftest.er1 >conftest.err
24534 rm -f conftest.er1
24535 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024537 (exit $ac_status); } && {
24538 test -z "$ac_c_werror_flag" ||
24539 test ! -s conftest.err
24540 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024541 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024543/* confdefs.h. */
24544_ACEOF
24545cat confdefs.h >>conftest.$ac_ext
24546cat >>conftest.$ac_ext <<_ACEOF
24547/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024548#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024549#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024550
Martin v. Löwis11437992002-04-12 09:54:03 +000024551int
24552main ()
24553{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024554#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024555 not big endian
24556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024557
24558 ;
24559 return 0;
24560}
24561_ACEOF
24562rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024563if { (ac_try="$ac_compile"
24564case "(($ac_try" in
24565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24566 *) ac_try_echo=$ac_try;;
24567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024571 grep -v '^ *+' conftest.er1 >conftest.err
24572 rm -f conftest.er1
24573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024575 (exit $ac_status); } && {
24576 test -z "$ac_c_werror_flag" ||
24577 test ! -s conftest.err
24578 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024579 ac_cv_c_bigendian=yes
24580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024582sed 's/^/| /' conftest.$ac_ext >&5
24583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024584 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024586
24587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024588else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024590sed 's/^/| /' conftest.$ac_ext >&5
24591
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024592 # It does not; compile a test program.
24593if test "$cross_compiling" = yes; then
24594 # try to guess the endianness by grepping values into an object file
24595 ac_cv_c_bigendian=unknown
24596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024597/* confdefs.h. */
24598_ACEOF
24599cat confdefs.h >>conftest.$ac_ext
24600cat >>conftest.$ac_ext <<_ACEOF
24601/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024602short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24603short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24604void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24605short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24606short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24607void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024608int
24609main ()
24610{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024611 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024612 ;
24613 return 0;
24614}
24615_ACEOF
24616rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024617if { (ac_try="$ac_compile"
24618case "(($ac_try" in
24619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24620 *) ac_try_echo=$ac_try;;
24621esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024625 grep -v '^ *+' conftest.er1 >conftest.err
24626 rm -f conftest.er1
24627 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024629 (exit $ac_status); } && {
24630 test -z "$ac_c_werror_flag" ||
24631 test ! -s conftest.err
24632 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024633 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024634 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024635fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024636if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24637 if test "$ac_cv_c_bigendian" = unknown; then
24638 ac_cv_c_bigendian=no
24639 else
24640 # finding both strings is unlikely to happen, but who knows?
24641 ac_cv_c_bigendian=unknown
24642 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024643fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024644else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024646sed 's/^/| /' conftest.$ac_ext >&5
24647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024648
Martin v. Löwis11437992002-04-12 09:54:03 +000024649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024650
24651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024652else
24653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024654/* confdefs.h. */
24655_ACEOF
24656cat confdefs.h >>conftest.$ac_ext
24657cat >>conftest.$ac_ext <<_ACEOF
24658/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024659$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024660int
24661main ()
24662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024663
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024664 /* Are we little or big endian? From Harbison&Steele. */
24665 union
24666 {
24667 long int l;
24668 char c[sizeof (long int)];
24669 } u;
24670 u.l = 1;
24671 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024672
24673 ;
24674 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024675}
Martin v. Löwis11437992002-04-12 09:54:03 +000024676_ACEOF
24677rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024678if { (ac_try="$ac_link"
24679case "(($ac_try" in
24680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24681 *) ac_try_echo=$ac_try;;
24682esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024684 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024685 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024687 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024688 { (case "(($ac_try" in
24689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24690 *) ac_try_echo=$ac_try;;
24691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024693 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024694 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024696 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024697 ac_cv_c_bigendian=no
24698else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024699 echo "$as_me: program exited with status $ac_status" >&5
24700echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024701sed 's/^/| /' conftest.$ac_ext >&5
24702
Martin v. Löwis11437992002-04-12 09:54:03 +000024703( exit $ac_status )
24704ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024706rm -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 +000024707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024708
24709
Martin v. Löwis11437992002-04-12 09:54:03 +000024710fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024711
24712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24713fi
24714{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24715echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24716case $ac_cv_c_bigendian in
24717 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024718
24719cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024720#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024721_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024722 ;;
24723 no)
24724 ;;
24725 *)
24726 { { echo "$as_me:$LINENO: error: unknown endianness
24727presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24728echo "$as_me: error: unknown endianness
24729presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024730 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024731esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024732
Michael W. Hudson54241132001-12-07 15:38:26 +000024733
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024734# Check whether right shifting a negative integer extends the sign bit
24735# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024736{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24737echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024738if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024739 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024740else
Martin v. Löwis11437992002-04-12 09:54:03 +000024741
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024742if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024743 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024744else
Martin v. Löwis11437992002-04-12 09:54:03 +000024745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024746/* confdefs.h. */
24747_ACEOF
24748cat confdefs.h >>conftest.$ac_ext
24749cat >>conftest.$ac_ext <<_ACEOF
24750/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024751
24752int main()
24753{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024754 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024755}
24756
Martin v. Löwis11437992002-04-12 09:54:03 +000024757_ACEOF
24758rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024759if { (ac_try="$ac_link"
24760case "(($ac_try" in
24761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24762 *) ac_try_echo=$ac_try;;
24763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024765 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024766 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024769 { (case "(($ac_try" in
24770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24771 *) ac_try_echo=$ac_try;;
24772esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024774 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024775 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024777 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024778 ac_cv_rshift_extends_sign=yes
24779else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024780 echo "$as_me: program exited with status $ac_status" >&5
24781echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024782sed 's/^/| /' conftest.$ac_ext >&5
24783
Martin v. Löwis11437992002-04-12 09:54:03 +000024784( exit $ac_status )
24785ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024787rm -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 +000024788fi
24789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024790
24791fi
24792
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024793{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24794echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024795if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024796then
Martin v. Löwis11437992002-04-12 09:54:03 +000024797
24798cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024799#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024800_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024801
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024802fi
24803
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024804# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024805{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24806echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024807if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024809else
Martin v. Löwis11437992002-04-12 09:54:03 +000024810
24811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024812/* confdefs.h. */
24813_ACEOF
24814cat confdefs.h >>conftest.$ac_ext
24815cat >>conftest.$ac_ext <<_ACEOF
24816/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024817#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024818int
24819main ()
24820{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024821
24822 FILE *f = fopen("/dev/null", "r");
24823 flockfile(f);
24824 getc_unlocked(f);
24825 funlockfile(f);
24826
Martin v. Löwis11437992002-04-12 09:54:03 +000024827 ;
24828 return 0;
24829}
24830_ACEOF
24831rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024832if { (ac_try="$ac_link"
24833case "(($ac_try" in
24834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24835 *) ac_try_echo=$ac_try;;
24836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024838 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024840 grep -v '^ *+' conftest.er1 >conftest.err
24841 rm -f conftest.er1
24842 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024844 (exit $ac_status); } && {
24845 test -z "$ac_c_werror_flag" ||
24846 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024847 } && test -s conftest$ac_exeext &&
24848 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024849 ac_cv_have_getc_unlocked=yes
24850else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024852sed 's/^/| /' conftest.$ac_ext >&5
24853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024854 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024856
24857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024858 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024859fi
24860
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024861{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24862echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024863if test "$ac_cv_have_getc_unlocked" = yes
24864then
Martin v. Löwis11437992002-04-12 09:54:03 +000024865
24866cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024867#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024868_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024869
24870fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024871
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024872# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024873# save the value of LIBS so we don't actually link Python with readline
24874LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024875
Gregory P. Smith18820942008-09-07 06:24:49 +000024876# On some systems we need to link readline to a termcap compatible
24877# library. NOTE: Keep the precedence of listed libraries synchronised
24878# with setup.py.
24879py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024880{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24881echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024882for py_libtermcap in "" ncursesw ncurses curses termcap; do
24883 if test -z "$py_libtermcap"; then
24884 READLINE_LIBS="-lreadline"
24885 else
24886 READLINE_LIBS="-lreadline -l$py_libtermcap"
24887 fi
24888 LIBS="$READLINE_LIBS $LIBS_no_readline"
24889 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024890/* confdefs.h. */
24891_ACEOF
24892cat confdefs.h >>conftest.$ac_ext
24893cat >>conftest.$ac_ext <<_ACEOF
24894/* end confdefs.h. */
24895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024896/* Override any GCC internal prototype to avoid an error.
24897 Use char because int might match the return type of a GCC
24898 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024899#ifdef __cplusplus
24900extern "C"
24901#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024902char readline ();
24903int
24904main ()
24905{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024906return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024907 ;
24908 return 0;
24909}
24910_ACEOF
24911rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024912if { (ac_try="$ac_link"
24913case "(($ac_try" in
24914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24915 *) ac_try_echo=$ac_try;;
24916esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024918 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024919 ac_status=$?
24920 grep -v '^ *+' conftest.er1 >conftest.err
24921 rm -f conftest.er1
24922 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024924 (exit $ac_status); } && {
24925 test -z "$ac_c_werror_flag" ||
24926 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024927 } && test -s conftest$ac_exeext &&
24928 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024929 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024930else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024931 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024932sed 's/^/| /' conftest.$ac_ext >&5
24933
Gregory P. Smith18820942008-09-07 06:24:49 +000024934
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024936
24937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024938 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024939 if test $py_cv_lib_readline = yes; then
24940 break
24941 fi
24942done
24943# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24944#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024945if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024946 { echo "$as_me:$LINENO: result: none" >&5
24947echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024948else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024949 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24950echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024951
24952cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024953#define HAVE_LIBREADLINE 1
24954_ACEOF
24955
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024956fi
24957
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024958# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024959{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24960echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024961if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024962 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024963else
24964 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024965LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024966cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024967/* confdefs.h. */
24968_ACEOF
24969cat confdefs.h >>conftest.$ac_ext
24970cat >>conftest.$ac_ext <<_ACEOF
24971/* end confdefs.h. */
24972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024973/* Override any GCC internal prototype to avoid an error.
24974 Use char because int might match the return type of a GCC
24975 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024976#ifdef __cplusplus
24977extern "C"
24978#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024979char rl_callback_handler_install ();
24980int
24981main ()
24982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024983return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024984 ;
24985 return 0;
24986}
24987_ACEOF
24988rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024989if { (ac_try="$ac_link"
24990case "(($ac_try" in
24991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24992 *) ac_try_echo=$ac_try;;
24993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024995 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024997 grep -v '^ *+' conftest.er1 >conftest.err
24998 rm -f conftest.er1
24999 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025001 (exit $ac_status); } && {
25002 test -z "$ac_c_werror_flag" ||
25003 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025004 } && test -s conftest$ac_exeext &&
25005 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025006 ac_cv_lib_readline_rl_callback_handler_install=yes
25007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025008 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025009sed 's/^/| /' conftest.$ac_ext >&5
25010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025011 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025013
25014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025015 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025016LIBS=$ac_check_lib_save_LIBS
25017fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025018{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25019echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25020if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025021
25022cat >>confdefs.h <<\_ACEOF
25023#define HAVE_RL_CALLBACK 1
25024_ACEOF
25025
25026fi
25027
25028
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025029# check for readline 2.2
25030cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025031/* confdefs.h. */
25032_ACEOF
25033cat confdefs.h >>conftest.$ac_ext
25034cat >>conftest.$ac_ext <<_ACEOF
25035/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025036#include <readline/readline.h>
25037_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025038if { (ac_try="$ac_cpp conftest.$ac_ext"
25039case "(($ac_try" in
25040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25041 *) ac_try_echo=$ac_try;;
25042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025044 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025045 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025046 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025047 rm -f conftest.er1
25048 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025050 (exit $ac_status); } >/dev/null && {
25051 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25052 test ! -s conftest.err
25053 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025054 have_readline=yes
25055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025057sed 's/^/| /' conftest.$ac_ext >&5
25058
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025059 have_readline=no
25060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025061
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025062rm -f conftest.err conftest.$ac_ext
25063if test $have_readline = yes
25064then
25065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025066/* confdefs.h. */
25067_ACEOF
25068cat confdefs.h >>conftest.$ac_ext
25069cat >>conftest.$ac_ext <<_ACEOF
25070/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025071#include <readline/readline.h>
25072
25073_ACEOF
25074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025075 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025076
25077cat >>confdefs.h <<\_ACEOF
25078#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25079_ACEOF
25080
25081fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000025082rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025083
25084fi
25085
Martin v. Löwis0daad592001-09-30 21:09:59 +000025086# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025087{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25088echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025089if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025091else
Martin v. Löwis11437992002-04-12 09:54:03 +000025092 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025093LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025095/* confdefs.h. */
25096_ACEOF
25097cat confdefs.h >>conftest.$ac_ext
25098cat >>conftest.$ac_ext <<_ACEOF
25099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025101/* Override any GCC internal prototype to avoid an error.
25102 Use char because int might match the return type of a GCC
25103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025104#ifdef __cplusplus
25105extern "C"
25106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025107char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025108int
25109main ()
25110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025111return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025112 ;
25113 return 0;
25114}
25115_ACEOF
25116rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025117if { (ac_try="$ac_link"
25118case "(($ac_try" in
25119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25120 *) ac_try_echo=$ac_try;;
25121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025123 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025125 grep -v '^ *+' conftest.er1 >conftest.err
25126 rm -f conftest.er1
25127 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025129 (exit $ac_status); } && {
25130 test -z "$ac_c_werror_flag" ||
25131 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025132 } && test -s conftest$ac_exeext &&
25133 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025134 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025135else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025137sed 's/^/| /' conftest.$ac_ext >&5
25138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025139 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025141
25142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025144LIBS=$ac_check_lib_save_LIBS
25145fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025146{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25147echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25148if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025149
Martin v. Löwis11437992002-04-12 09:54:03 +000025150cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025151#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025152_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025153
Martin v. Löwis0daad592001-09-30 21:09:59 +000025154fi
25155
Michael W. Hudson54241132001-12-07 15:38:26 +000025156
Thomas Wouters89d996e2007-09-08 17:39:28 +000025157# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025158{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25159echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025160if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025161 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025162else
25163 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025164LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025165cat >conftest.$ac_ext <<_ACEOF
25166/* confdefs.h. */
25167_ACEOF
25168cat confdefs.h >>conftest.$ac_ext
25169cat >>conftest.$ac_ext <<_ACEOF
25170/* end confdefs.h. */
25171
25172/* Override any GCC internal prototype to avoid an error.
25173 Use char because int might match the return type of a GCC
25174 builtin and then its argument prototype would still apply. */
25175#ifdef __cplusplus
25176extern "C"
25177#endif
25178char rl_completion_display_matches_hook ();
25179int
25180main ()
25181{
25182return rl_completion_display_matches_hook ();
25183 ;
25184 return 0;
25185}
25186_ACEOF
25187rm -f conftest.$ac_objext conftest$ac_exeext
25188if { (ac_try="$ac_link"
25189case "(($ac_try" in
25190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25191 *) ac_try_echo=$ac_try;;
25192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025194 (eval "$ac_link") 2>conftest.er1
25195 ac_status=$?
25196 grep -v '^ *+' conftest.er1 >conftest.err
25197 rm -f conftest.er1
25198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025200 (exit $ac_status); } && {
25201 test -z "$ac_c_werror_flag" ||
25202 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025203 } && test -s conftest$ac_exeext &&
25204 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025205 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25206else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025207 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025208sed 's/^/| /' conftest.$ac_ext >&5
25209
25210 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25211fi
25212
25213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25214 conftest$ac_exeext conftest.$ac_ext
25215LIBS=$ac_check_lib_save_LIBS
25216fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025217{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25218echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25219if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025220
25221cat >>confdefs.h <<\_ACEOF
25222#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25223_ACEOF
25224
25225fi
25226
25227
Martin v. Löwis0daad592001-09-30 21:09:59 +000025228# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025229{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25230echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025231if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025232 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025233else
Martin v. Löwis11437992002-04-12 09:54:03 +000025234 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025235LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025236cat >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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025243/* Override any GCC internal prototype to avoid an error.
25244 Use char because int might match the return type of a GCC
25245 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025246#ifdef __cplusplus
25247extern "C"
25248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025249char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025250int
25251main ()
25252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025253return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025254 ;
25255 return 0;
25256}
25257_ACEOF
25258rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025259if { (ac_try="$ac_link"
25260case "(($ac_try" in
25261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25262 *) ac_try_echo=$ac_try;;
25263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025265 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025267 grep -v '^ *+' conftest.er1 >conftest.err
25268 rm -f conftest.er1
25269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025271 (exit $ac_status); } && {
25272 test -z "$ac_c_werror_flag" ||
25273 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025274 } && test -s conftest$ac_exeext &&
25275 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025276 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025277else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025279sed 's/^/| /' conftest.$ac_ext >&5
25280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025281 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025283
25284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025285 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025286LIBS=$ac_check_lib_save_LIBS
25287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025288{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25289echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25290if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025291
Martin v. Löwis11437992002-04-12 09:54:03 +000025292cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025293#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025294_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025295
Guido van Rossum353ae582001-07-10 16:45:32 +000025296fi
25297
Jack Jansendd19cf82001-12-06 22:36:17 +000025298
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025299# also in readline 4.2
25300cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025301/* confdefs.h. */
25302_ACEOF
25303cat confdefs.h >>conftest.$ac_ext
25304cat >>conftest.$ac_ext <<_ACEOF
25305/* end confdefs.h. */
25306#include <readline/readline.h>
25307_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025308if { (ac_try="$ac_cpp conftest.$ac_ext"
25309case "(($ac_try" in
25310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25311 *) ac_try_echo=$ac_try;;
25312esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025314 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025315 ac_status=$?
25316 grep -v '^ *+' conftest.er1 >conftest.err
25317 rm -f conftest.er1
25318 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025320 (exit $ac_status); } >/dev/null && {
25321 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25322 test ! -s conftest.err
25323 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025324 have_readline=yes
25325else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025326 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025327sed 's/^/| /' conftest.$ac_ext >&5
25328
25329 have_readline=no
25330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025331
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025332rm -f conftest.err conftest.$ac_ext
25333if test $have_readline = yes
25334then
25335 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025336/* confdefs.h. */
25337_ACEOF
25338cat confdefs.h >>conftest.$ac_ext
25339cat >>conftest.$ac_ext <<_ACEOF
25340/* end confdefs.h. */
25341#include <readline/readline.h>
25342
25343_ACEOF
25344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25345 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25346
25347cat >>confdefs.h <<\_ACEOF
25348#define HAVE_RL_CATCH_SIGNAL 1
25349_ACEOF
25350
25351fi
Antoine Pitrou6103ab12009-10-24 20:11:21 +000025352rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025353
25354fi
25355
Martin v. Löwis82bca632006-02-10 20:49:30 +000025356# End of readline checks: restore LIBS
25357LIBS=$LIBS_no_readline
25358
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025359{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25360echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025361if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025362 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025363else
Martin v. Löwis11437992002-04-12 09:54:03 +000025364
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025365if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025366 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025367else
Martin v. Löwis11437992002-04-12 09:54:03 +000025368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025369/* confdefs.h. */
25370_ACEOF
25371cat confdefs.h >>conftest.$ac_ext
25372cat >>conftest.$ac_ext <<_ACEOF
25373/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025374
25375int main()
25376{
25377 int val1 = nice(1);
25378 if (val1 != -1 && val1 == nice(2))
25379 exit(0);
25380 exit(1);
25381}
25382
Martin v. Löwis11437992002-04-12 09:54:03 +000025383_ACEOF
25384rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025385if { (ac_try="$ac_link"
25386case "(($ac_try" in
25387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25388 *) ac_try_echo=$ac_try;;
25389esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025391 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025392 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025395 { (case "(($ac_try" in
25396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25397 *) ac_try_echo=$ac_try;;
25398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025400 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025401 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025403 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025404 ac_cv_broken_nice=yes
25405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025406 echo "$as_me: program exited with status $ac_status" >&5
25407echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025408sed 's/^/| /' conftest.$ac_ext >&5
25409
Martin v. Löwis11437992002-04-12 09:54:03 +000025410( exit $ac_status )
25411ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025413rm -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 +000025414fi
25415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025416
25417fi
25418
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025419{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25420echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025421if test "$ac_cv_broken_nice" = yes
25422then
Martin v. Löwis11437992002-04-12 09:54:03 +000025423
25424cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025425#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025426_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025427
25428fi
25429
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025430{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25431echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025432if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025433 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025434else
25435 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025436 ac_cv_broken_poll=no
25437else
25438 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025439/* confdefs.h. */
25440_ACEOF
25441cat confdefs.h >>conftest.$ac_ext
25442cat >>conftest.$ac_ext <<_ACEOF
25443/* end confdefs.h. */
25444
25445#include <poll.h>
25446
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025447int main()
25448{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025449 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025450 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025451
25452 close (42);
25453
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025454 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025455 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025456 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025457 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025458 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025459 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025460 return 1;
25461}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025462
25463_ACEOF
25464rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025465if { (ac_try="$ac_link"
25466case "(($ac_try" in
25467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25468 *) ac_try_echo=$ac_try;;
25469esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025471 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025472 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025474 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025475 { (case "(($ac_try" in
25476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25477 *) ac_try_echo=$ac_try;;
25478esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025480 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025481 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025483 (exit $ac_status); }; }; then
25484 ac_cv_broken_poll=yes
25485else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025486 echo "$as_me: program exited with status $ac_status" >&5
25487echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025488sed 's/^/| /' conftest.$ac_ext >&5
25489
25490( exit $ac_status )
25491ac_cv_broken_poll=no
25492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025493rm -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 +000025494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025495
25496
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025497fi
25498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025499{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25500echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025501if test "$ac_cv_broken_poll" = yes
25502then
25503
25504cat >>confdefs.h <<\_ACEOF
25505#define HAVE_BROKEN_POLL 1
25506_ACEOF
25507
25508fi
25509
Brett Cannon43802422005-02-10 20:48:03 +000025510# 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 +000025511# (which is not required by ISO C or UNIX spec) and/or if we support
25512# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025513{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25514echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025515if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025516 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025517else
25518 cat >conftest.$ac_ext <<_ACEOF
25519/* confdefs.h. */
25520_ACEOF
25521cat confdefs.h >>conftest.$ac_ext
25522cat >>conftest.$ac_ext <<_ACEOF
25523/* end confdefs.h. */
25524#include <sys/types.h>
25525#include <$ac_cv_struct_tm>
25526
25527
25528int
25529main ()
25530{
25531static struct tm ac_aggr;
25532if (ac_aggr.tm_zone)
25533return 0;
25534 ;
25535 return 0;
25536}
25537_ACEOF
25538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025539if { (ac_try="$ac_compile"
25540case "(($ac_try" in
25541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25542 *) ac_try_echo=$ac_try;;
25543esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025545 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025546 ac_status=$?
25547 grep -v '^ *+' conftest.er1 >conftest.err
25548 rm -f conftest.er1
25549 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025551 (exit $ac_status); } && {
25552 test -z "$ac_c_werror_flag" ||
25553 test ! -s conftest.err
25554 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025555 ac_cv_member_struct_tm_tm_zone=yes
25556else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025557 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025558sed 's/^/| /' conftest.$ac_ext >&5
25559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025560 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025561/* confdefs.h. */
25562_ACEOF
25563cat confdefs.h >>conftest.$ac_ext
25564cat >>conftest.$ac_ext <<_ACEOF
25565/* end confdefs.h. */
25566#include <sys/types.h>
25567#include <$ac_cv_struct_tm>
25568
25569
25570int
25571main ()
25572{
25573static struct tm ac_aggr;
25574if (sizeof ac_aggr.tm_zone)
25575return 0;
25576 ;
25577 return 0;
25578}
25579_ACEOF
25580rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025581if { (ac_try="$ac_compile"
25582case "(($ac_try" in
25583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25584 *) ac_try_echo=$ac_try;;
25585esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025587 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025588 ac_status=$?
25589 grep -v '^ *+' conftest.er1 >conftest.err
25590 rm -f conftest.er1
25591 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025593 (exit $ac_status); } && {
25594 test -z "$ac_c_werror_flag" ||
25595 test ! -s conftest.err
25596 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025597 ac_cv_member_struct_tm_tm_zone=yes
25598else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025599 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025600sed 's/^/| /' conftest.$ac_ext >&5
25601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025602 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025604
25605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025607
25608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025609fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025610{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25611echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25612if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025613
25614cat >>confdefs.h <<_ACEOF
25615#define HAVE_STRUCT_TM_TM_ZONE 1
25616_ACEOF
25617
25618
25619fi
25620
25621if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25622
25623cat >>confdefs.h <<\_ACEOF
25624#define HAVE_TM_ZONE 1
25625_ACEOF
25626
25627else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025628 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25629echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025630if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025631 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025632else
25633 cat >conftest.$ac_ext <<_ACEOF
25634/* confdefs.h. */
25635_ACEOF
25636cat confdefs.h >>conftest.$ac_ext
25637cat >>conftest.$ac_ext <<_ACEOF
25638/* end confdefs.h. */
25639#include <time.h>
25640
25641int
25642main ()
25643{
25644#ifndef tzname
25645 (void) tzname;
25646#endif
25647
25648 ;
25649 return 0;
25650}
25651_ACEOF
25652rm -f conftest.$ac_objext
25653if { (ac_try="$ac_compile"
25654case "(($ac_try" in
25655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25656 *) ac_try_echo=$ac_try;;
25657esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025659 (eval "$ac_compile") 2>conftest.er1
25660 ac_status=$?
25661 grep -v '^ *+' conftest.er1 >conftest.err
25662 rm -f conftest.er1
25663 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025665 (exit $ac_status); } && {
25666 test -z "$ac_c_werror_flag" ||
25667 test ! -s conftest.err
25668 } && test -s conftest.$ac_objext; then
25669 ac_cv_have_decl_tzname=yes
25670else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025671 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025672sed 's/^/| /' conftest.$ac_ext >&5
25673
25674 ac_cv_have_decl_tzname=no
25675fi
25676
25677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25678fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025679{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25680echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25681if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025682
25683cat >>confdefs.h <<_ACEOF
25684#define HAVE_DECL_TZNAME 1
25685_ACEOF
25686
25687
25688else
25689 cat >>confdefs.h <<_ACEOF
25690#define HAVE_DECL_TZNAME 0
25691_ACEOF
25692
25693
25694fi
25695
25696
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025697 { echo "$as_me:$LINENO: checking for tzname" >&5
25698echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025699if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025700 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025701else
25702 cat >conftest.$ac_ext <<_ACEOF
25703/* confdefs.h. */
25704_ACEOF
25705cat confdefs.h >>conftest.$ac_ext
25706cat >>conftest.$ac_ext <<_ACEOF
25707/* end confdefs.h. */
25708#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025709#if !HAVE_DECL_TZNAME
25710extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025711#endif
25712
25713int
25714main ()
25715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025716return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025717 ;
25718 return 0;
25719}
25720_ACEOF
25721rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025722if { (ac_try="$ac_link"
25723case "(($ac_try" in
25724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25725 *) ac_try_echo=$ac_try;;
25726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025728 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025729 ac_status=$?
25730 grep -v '^ *+' conftest.er1 >conftest.err
25731 rm -f conftest.er1
25732 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025734 (exit $ac_status); } && {
25735 test -z "$ac_c_werror_flag" ||
25736 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025737 } && test -s conftest$ac_exeext &&
25738 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025739 ac_cv_var_tzname=yes
25740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025741 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025742sed 's/^/| /' conftest.$ac_ext >&5
25743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025744 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025746
25747rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025748 conftest$ac_exeext conftest.$ac_ext
25749fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025750{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25751echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025752 if test $ac_cv_var_tzname = yes; then
25753
25754cat >>confdefs.h <<\_ACEOF
25755#define HAVE_TZNAME 1
25756_ACEOF
25757
25758 fi
25759fi
25760
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025761
Martin v. Löwis1d459062005-03-14 21:23:33 +000025762# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025763{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25764echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025765if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025766 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025767else
25768
25769if test "$cross_compiling" = yes; then
25770 ac_cv_working_tzset=no
25771else
25772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025773/* confdefs.h. */
25774_ACEOF
25775cat confdefs.h >>conftest.$ac_ext
25776cat >>conftest.$ac_ext <<_ACEOF
25777/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025778
25779#include <stdlib.h>
25780#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025781#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025782
25783#if HAVE_TZNAME
25784extern char *tzname[];
25785#endif
25786
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025787int main()
25788{
Brett Cannon18367812003-09-19 00:59:16 +000025789 /* Note that we need to ensure that not only does tzset(3)
25790 do 'something' with localtime, but it works as documented
25791 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025792 This includes making sure that tzname is set properly if
25793 tm->tm_zone does not exist since it is the alternative way
25794 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025795
25796 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025797 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025798 */
25799
Martin v. Löwis1d459062005-03-14 21:23:33 +000025800 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025801 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25802
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025803 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025804 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025805 if (localtime(&groundhogday)->tm_hour != 0)
25806 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025807#if HAVE_TZNAME
25808 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25809 if (strcmp(tzname[0], "UTC") ||
25810 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25811 exit(1);
25812#endif
Brett Cannon18367812003-09-19 00:59:16 +000025813
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025814 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025815 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025816 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025817 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025818#if HAVE_TZNAME
25819 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25820 exit(1);
25821#endif
Brett Cannon18367812003-09-19 00:59:16 +000025822
25823 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25824 tzset();
25825 if (localtime(&groundhogday)->tm_hour != 11)
25826 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025827#if HAVE_TZNAME
25828 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25829 exit(1);
25830#endif
25831
25832#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025833 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25834 exit(1);
25835 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25836 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025837#endif
Brett Cannon18367812003-09-19 00:59:16 +000025838
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025839 exit(0);
25840}
25841
25842_ACEOF
25843rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025844if { (ac_try="$ac_link"
25845case "(($ac_try" in
25846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25847 *) ac_try_echo=$ac_try;;
25848esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025850 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025851 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025854 { (case "(($ac_try" in
25855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25856 *) ac_try_echo=$ac_try;;
25857esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025859 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025860 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025862 (exit $ac_status); }; }; then
25863 ac_cv_working_tzset=yes
25864else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025865 echo "$as_me: program exited with status $ac_status" >&5
25866echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025867sed 's/^/| /' conftest.$ac_ext >&5
25868
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025869( exit $ac_status )
25870ac_cv_working_tzset=no
25871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025872rm -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 +000025873fi
25874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025875
25876fi
25877
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025878{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25879echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025880if test "$ac_cv_working_tzset" = yes
25881then
25882
25883cat >>confdefs.h <<\_ACEOF
25884#define HAVE_WORKING_TZSET 1
25885_ACEOF
25886
25887fi
25888
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025889# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025890{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25891echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025892if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025893 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025894else
25895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025896/* confdefs.h. */
25897_ACEOF
25898cat confdefs.h >>conftest.$ac_ext
25899cat >>conftest.$ac_ext <<_ACEOF
25900/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025901#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025902int
25903main ()
25904{
25905
25906struct stat st;
25907st.st_mtim.tv_nsec = 1;
25908
25909 ;
25910 return 0;
25911}
25912_ACEOF
25913rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025914if { (ac_try="$ac_compile"
25915case "(($ac_try" in
25916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25917 *) ac_try_echo=$ac_try;;
25918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025922 grep -v '^ *+' conftest.er1 >conftest.err
25923 rm -f conftest.er1
25924 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025926 (exit $ac_status); } && {
25927 test -z "$ac_c_werror_flag" ||
25928 test ! -s conftest.err
25929 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025930 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025931else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025933sed 's/^/| /' conftest.$ac_ext >&5
25934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025935 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025936fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25939fi
25940
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025941{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25942echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025943if test "$ac_cv_stat_tv_nsec" = yes
25944then
25945
25946cat >>confdefs.h <<\_ACEOF
25947#define HAVE_STAT_TV_NSEC 1
25948_ACEOF
25949
25950fi
25951
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025952# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025953{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25954echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025955if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025957else
25958 cat >conftest.$ac_ext <<_ACEOF
25959/* confdefs.h. */
25960_ACEOF
25961cat confdefs.h >>conftest.$ac_ext
25962cat >>conftest.$ac_ext <<_ACEOF
25963/* end confdefs.h. */
25964#include <sys/stat.h>
25965int
25966main ()
25967{
25968
25969struct stat st;
25970st.st_mtimespec.tv_nsec = 1;
25971
25972 ;
25973 return 0;
25974}
25975_ACEOF
25976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025977if { (ac_try="$ac_compile"
25978case "(($ac_try" in
25979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25980 *) ac_try_echo=$ac_try;;
25981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025984 ac_status=$?
25985 grep -v '^ *+' conftest.er1 >conftest.err
25986 rm -f conftest.er1
25987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025989 (exit $ac_status); } && {
25990 test -z "$ac_c_werror_flag" ||
25991 test ! -s conftest.err
25992 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025993 ac_cv_stat_tv_nsec2=yes
25994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025995 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025996sed 's/^/| /' conftest.$ac_ext >&5
25997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025998 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025999fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26002fi
26003
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026004{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26005echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026006if test "$ac_cv_stat_tv_nsec2" = yes
26007then
26008
26009cat >>confdefs.h <<\_ACEOF
26010#define HAVE_STAT_TV_NSEC2 1
26011_ACEOF
26012
26013fi
26014
Jack Jansen666b1e72001-10-31 12:11:48 +000026015# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026016{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26017echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026018if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026019 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026020else
Martin v. Löwis11437992002-04-12 09:54:03 +000026021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026022/* confdefs.h. */
26023_ACEOF
26024cat confdefs.h >>conftest.$ac_ext
26025cat >>conftest.$ac_ext <<_ACEOF
26026/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026027#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026028int
26029main ()
26030{
Jack Jansen666b1e72001-10-31 12:11:48 +000026031
26032 int rtn;
26033 rtn = mvwdelch(0,0,0);
26034
Martin v. Löwis11437992002-04-12 09:54:03 +000026035 ;
26036 return 0;
26037}
26038_ACEOF
26039rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026040if { (ac_try="$ac_compile"
26041case "(($ac_try" in
26042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26043 *) ac_try_echo=$ac_try;;
26044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026048 grep -v '^ *+' conftest.er1 >conftest.err
26049 rm -f conftest.er1
26050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026052 (exit $ac_status); } && {
26053 test -z "$ac_c_werror_flag" ||
26054 test ! -s conftest.err
26055 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026056 ac_cv_mvwdelch_is_expression=yes
26057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026059sed 's/^/| /' conftest.$ac_ext >&5
26060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026061 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026062fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26065fi
26066
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026067{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26068echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026069
26070if test "$ac_cv_mvwdelch_is_expression" = yes
26071then
Martin v. Löwis11437992002-04-12 09:54:03 +000026072
26073cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026074#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026075_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026076
26077fi
26078
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026079{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26080echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026081if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026082 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026083else
Martin v. Löwis11437992002-04-12 09:54:03 +000026084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026085/* confdefs.h. */
26086_ACEOF
26087cat confdefs.h >>conftest.$ac_ext
26088cat >>conftest.$ac_ext <<_ACEOF
26089/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026090#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026091int
26092main ()
26093{
Jack Jansen666b1e72001-10-31 12:11:48 +000026094
26095 WINDOW *w;
26096 w->_flags = 0;
26097
Martin v. Löwis11437992002-04-12 09:54:03 +000026098 ;
26099 return 0;
26100}
26101_ACEOF
26102rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026103if { (ac_try="$ac_compile"
26104case "(($ac_try" in
26105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26106 *) ac_try_echo=$ac_try;;
26107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026111 grep -v '^ *+' conftest.er1 >conftest.err
26112 rm -f conftest.er1
26113 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026115 (exit $ac_status); } && {
26116 test -z "$ac_c_werror_flag" ||
26117 test ! -s conftest.err
26118 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026119 ac_cv_window_has_flags=yes
26120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026122sed 's/^/| /' conftest.$ac_ext >&5
26123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026124 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026125fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26128fi
26129
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026130{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26131echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026132
Jack Jansen666b1e72001-10-31 12:11:48 +000026133
26134if test "$ac_cv_window_has_flags" = yes
26135then
Martin v. Löwis11437992002-04-12 09:54:03 +000026136
26137cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026138#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026139_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026140
26141fi
26142
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026143{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26144echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026145cat >conftest.$ac_ext <<_ACEOF
26146/* confdefs.h. */
26147_ACEOF
26148cat confdefs.h >>conftest.$ac_ext
26149cat >>conftest.$ac_ext <<_ACEOF
26150/* end confdefs.h. */
26151#include <curses.h>
26152int
26153main ()
26154{
26155void *x=is_term_resized
26156 ;
26157 return 0;
26158}
26159_ACEOF
26160rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026161if { (ac_try="$ac_compile"
26162case "(($ac_try" in
26163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26164 *) ac_try_echo=$ac_try;;
26165esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026167 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026168 ac_status=$?
26169 grep -v '^ *+' conftest.er1 >conftest.err
26170 rm -f conftest.er1
26171 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026173 (exit $ac_status); } && {
26174 test -z "$ac_c_werror_flag" ||
26175 test ! -s conftest.err
26176 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026177
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026178cat >>confdefs.h <<\_ACEOF
26179#define HAVE_CURSES_IS_TERM_RESIZED 1
26180_ACEOF
26181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026182 { echo "$as_me:$LINENO: result: yes" >&5
26183echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026184else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026185 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026186sed 's/^/| /' conftest.$ac_ext >&5
26187
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026188 { echo "$as_me:$LINENO: result: no" >&5
26189echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026190
26191fi
26192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26194
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026195{ echo "$as_me:$LINENO: checking for resize_term" >&5
26196echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026197cat >conftest.$ac_ext <<_ACEOF
26198/* confdefs.h. */
26199_ACEOF
26200cat confdefs.h >>conftest.$ac_ext
26201cat >>conftest.$ac_ext <<_ACEOF
26202/* end confdefs.h. */
26203#include <curses.h>
26204int
26205main ()
26206{
26207void *x=resize_term
26208 ;
26209 return 0;
26210}
26211_ACEOF
26212rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026213if { (ac_try="$ac_compile"
26214case "(($ac_try" in
26215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26216 *) ac_try_echo=$ac_try;;
26217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026219 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026220 ac_status=$?
26221 grep -v '^ *+' conftest.er1 >conftest.err
26222 rm -f conftest.er1
26223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026225 (exit $ac_status); } && {
26226 test -z "$ac_c_werror_flag" ||
26227 test ! -s conftest.err
26228 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026229
26230cat >>confdefs.h <<\_ACEOF
26231#define HAVE_CURSES_RESIZE_TERM 1
26232_ACEOF
26233
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026234 { echo "$as_me:$LINENO: result: yes" >&5
26235echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026237 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026238sed 's/^/| /' conftest.$ac_ext >&5
26239
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026240 { echo "$as_me:$LINENO: result: no" >&5
26241echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026242
26243fi
26244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26246
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026247{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26248echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026249cat >conftest.$ac_ext <<_ACEOF
26250/* confdefs.h. */
26251_ACEOF
26252cat confdefs.h >>conftest.$ac_ext
26253cat >>conftest.$ac_ext <<_ACEOF
26254/* end confdefs.h. */
26255#include <curses.h>
26256int
26257main ()
26258{
26259void *x=resizeterm
26260 ;
26261 return 0;
26262}
26263_ACEOF
26264rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026265if { (ac_try="$ac_compile"
26266case "(($ac_try" in
26267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26268 *) ac_try_echo=$ac_try;;
26269esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026271 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026272 ac_status=$?
26273 grep -v '^ *+' conftest.er1 >conftest.err
26274 rm -f conftest.er1
26275 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026277 (exit $ac_status); } && {
26278 test -z "$ac_c_werror_flag" ||
26279 test ! -s conftest.err
26280 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026281
26282cat >>confdefs.h <<\_ACEOF
26283#define HAVE_CURSES_RESIZETERM 1
26284_ACEOF
26285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026286 { echo "$as_me:$LINENO: result: yes" >&5
26287echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026289 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026290sed 's/^/| /' conftest.$ac_ext >&5
26291
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026292 { echo "$as_me:$LINENO: result: no" >&5
26293echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026294
26295fi
26296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26298
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026299{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26300echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026301
26302if test -r /dev/ptmx
26303then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026304 { echo "$as_me:$LINENO: result: yes" >&5
26305echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026306
26307cat >>confdefs.h <<\_ACEOF
26308#define HAVE_DEV_PTMX 1
26309_ACEOF
26310
Thomas Wouters89f507f2006-12-13 04:49:30 +000026311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026312 { echo "$as_me:$LINENO: result: no" >&5
26313echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026314fi
26315
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026316{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26317echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026318
26319if test -r /dev/ptc
26320then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026321 { echo "$as_me:$LINENO: result: yes" >&5
26322echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026323
26324cat >>confdefs.h <<\_ACEOF
26325#define HAVE_DEV_PTC 1
26326_ACEOF
26327
Thomas Wouters89f507f2006-12-13 04:49:30 +000026328else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026329 { echo "$as_me:$LINENO: result: no" >&5
26330echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026331fi
26332
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026333{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26334echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026335if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026336 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026337else
26338 if test "$cross_compiling" = yes; then
26339 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026340else
26341 cat >conftest.$ac_ext <<_ACEOF
26342/* confdefs.h. */
26343_ACEOF
26344cat confdefs.h >>conftest.$ac_ext
26345cat >>conftest.$ac_ext <<_ACEOF
26346/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026347
Thomas Wouters477c8d52006-05-27 19:21:47 +000026348#include <stdio.h>
26349#include <stddef.h>
26350#include <string.h>
26351
Christian Heimes2c181612007-12-17 20:04:13 +000026352#ifdef HAVE_SYS_TYPES_H
26353#include <sys/types.h>
26354#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026355
26356#ifdef HAVE_SSIZE_T
26357typedef ssize_t Py_ssize_t;
26358#elif SIZEOF_VOID_P == SIZEOF_LONG
26359typedef long Py_ssize_t;
26360#else
26361typedef int Py_ssize_t;
26362#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026363
Christian Heimes2c181612007-12-17 20:04:13 +000026364int main()
26365{
26366 char buffer[256];
26367
Thomas Wouters477c8d52006-05-27 19:21:47 +000026368 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26369 return 1;
26370
Thomas Wouters89f507f2006-12-13 04:49:30 +000026371 if (strcmp(buffer, "123"))
26372 return 1;
26373
26374 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26375 return 1;
26376
26377 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026378 return 1;
26379
26380 return 0;
26381}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026382
Thomas Wouters477c8d52006-05-27 19:21:47 +000026383_ACEOF
26384rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026385if { (ac_try="$ac_link"
26386case "(($ac_try" in
26387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26388 *) ac_try_echo=$ac_try;;
26389esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026391 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026392 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026395 { (case "(($ac_try" in
26396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26397 *) ac_try_echo=$ac_try;;
26398esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026400 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026401 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026403 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026404 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026406 echo "$as_me: program exited with status $ac_status" >&5
26407echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026408sed 's/^/| /' conftest.$ac_ext >&5
26409
26410( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026411ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026412fi
26413rm -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 +000026414fi
26415
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026416
26417
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026418fi
26419
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026420{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26421echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026422if test $ac_cv_have_size_t_format = yes
26423then
26424
26425cat >>confdefs.h <<\_ACEOF
26426#define PY_FORMAT_SIZE_T "z"
26427_ACEOF
26428
26429fi
26430
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026431{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26432echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026433if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026434 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026435else
Martin v. Löwis11437992002-04-12 09:54:03 +000026436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026437/* confdefs.h. */
26438_ACEOF
26439cat confdefs.h >>conftest.$ac_ext
26440cat >>conftest.$ac_ext <<_ACEOF
26441/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026442
26443#ifdef HAVE_SYS_TYPES_H
26444#include <sys/types.h>
26445#endif
26446#ifdef HAVE_SYS_SOCKET_H
26447#include <sys/socket.h>
26448#endif
26449
26450
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026451typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026452int
26453main ()
26454{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026455if ((ac__type_new_ *) 0)
26456 return 0;
26457if (sizeof (ac__type_new_))
26458 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026459 ;
26460 return 0;
26461}
26462_ACEOF
26463rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026464if { (ac_try="$ac_compile"
26465case "(($ac_try" in
26466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26467 *) ac_try_echo=$ac_try;;
26468esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026472 grep -v '^ *+' conftest.er1 >conftest.err
26473 rm -f conftest.er1
26474 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026476 (exit $ac_status); } && {
26477 test -z "$ac_c_werror_flag" ||
26478 test ! -s conftest.err
26479 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026480 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026481else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026483sed 's/^/| /' conftest.$ac_ext >&5
26484
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026485 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026487
26488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026489fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026490{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26491echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26492if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026493 :
26494else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026495
Martin v. Löwis01c04012002-11-11 14:58:44 +000026496cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026497#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026498_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026499
26500fi
26501
Michael W. Hudson54241132001-12-07 15:38:26 +000026502
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026503{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26504echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026505if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026506 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026507else
26508 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026509 ac_cv_broken_mbstowcs=no
26510else
26511 cat >conftest.$ac_ext <<_ACEOF
26512/* confdefs.h. */
26513_ACEOF
26514cat confdefs.h >>conftest.$ac_ext
26515cat >>conftest.$ac_ext <<_ACEOF
26516/* end confdefs.h. */
26517
26518#include<stdlib.h>
26519int main() {
26520 size_t len = -1;
26521 const char *str = "text";
26522 len = mbstowcs(NULL, str, 0);
26523 return (len != 4);
26524}
26525
26526_ACEOF
26527rm -f conftest$ac_exeext
26528if { (ac_try="$ac_link"
26529case "(($ac_try" in
26530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26531 *) ac_try_echo=$ac_try;;
26532esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026534 (eval "$ac_link") 2>&5
26535 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026537 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26538 { (case "(($ac_try" in
26539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26540 *) ac_try_echo=$ac_try;;
26541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026543 (eval "$ac_try") 2>&5
26544 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026546 (exit $ac_status); }; }; then
26547 ac_cv_broken_mbstowcs=no
26548else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026549 echo "$as_me: program exited with status $ac_status" >&5
26550echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026551sed 's/^/| /' conftest.$ac_ext >&5
26552
26553( exit $ac_status )
26554ac_cv_broken_mbstowcs=yes
26555fi
26556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26557fi
26558
26559
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026560fi
26561
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026562{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26563echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026564if test "$ac_cv_broken_mbstowcs" = yes
26565then
26566
26567cat >>confdefs.h <<\_ACEOF
26568#define HAVE_BROKEN_MBSTOWCS 1
26569_ACEOF
26570
26571fi
26572
Antoine Pitroub52ec782009-01-25 16:34:23 +000026573# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026574{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26575echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026576
26577# Check whether --with-computed-gotos was given.
26578if test "${with_computed_gotos+set}" = set; then
26579 withval=$with_computed_gotos;
26580if test "$withval" != no
26581then
26582
26583cat >>confdefs.h <<\_ACEOF
26584#define USE_COMPUTED_GOTOS 1
26585_ACEOF
26586
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026587 { echo "$as_me:$LINENO: result: yes" >&5
26588echo "${ECHO_T}yes" >&6; }
26589else { echo "$as_me:$LINENO: result: no" >&5
26590echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026591fi
26592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026593 { echo "$as_me:$LINENO: result: no" >&5
26594echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026595fi
26596
26597
26598
Michael W. Hudson54241132001-12-07 15:38:26 +000026599
26600
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026601for h in `(cd $srcdir;echo Python/thread_*.h)`
26602do
26603 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26604done
26605
Michael W. Hudson54241132001-12-07 15:38:26 +000026606
Neal Norwitzd24499d2005-12-18 21:36:39 +000026607SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026608{ echo "$as_me:$LINENO: checking for build directories" >&5
26609echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026610for dir in $SRCDIRS; do
26611 if test ! -d $dir; then
26612 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026613 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026614done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026615{ echo "$as_me:$LINENO: result: done" >&5
26616echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026617
Guido van Rossum627b2d71993-12-24 10:39:16 +000026618# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026619ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026620
Martin v. Löwis11437992002-04-12 09:54:03 +000026621cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026622# This file is a shell script that caches the results of configure
26623# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026624# scripts and configure runs, see configure's option --config-cache.
26625# It is not useful on other systems. If it contains results you don't
26626# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026627#
Martin v. Löwis11437992002-04-12 09:54:03 +000026628# config.status only pays attention to the cache file if you give it
26629# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026630#
Skip Montanaro6dead952003-09-25 14:50:04 +000026631# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026632# loading this file, other *unset* `ac_cv_foo' will be assigned the
26633# following values.
26634
26635_ACEOF
26636
Guido van Rossumf78abae1997-01-21 22:02:36 +000026637# The following way of writing the cache mishandles newlines in values,
26638# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026639# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026640# Ultrix sh set writes to stderr and can't be redirected directly,
26641# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026642(
26643 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26644 eval ac_val=\$$ac_var
26645 case $ac_val in #(
26646 *${as_nl}*)
26647 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026648 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26649echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026650 esac
26651 case $ac_var in #(
26652 _ | IFS | as_nl) ;; #(
26653 *) $as_unset $ac_var ;;
26654 esac ;;
26655 esac
26656 done
26657
Martin v. Löwis11437992002-04-12 09:54:03 +000026658 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026659 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26660 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026661 # `set' does not quote correctly, so add quotes (double-quote
26662 # substitution turns \\\\ into \\, and sed turns \\ into \).
26663 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026664 "s/'/'\\\\''/g;
26665 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026666 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026667 *)
26668 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026669 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026670 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026671 esac |
26672 sort
26673) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026674 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026675 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026676 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026677 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026678 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26679 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026680 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26681 :end' >>confcache
26682if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26683 if test -w "$cache_file"; then
26684 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026685 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26686echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026687 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026688 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026689 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26690echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026691 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026692fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026693rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026695test "x$prefix" = xNONE && prefix=$ac_default_prefix
26696# Let make expand exec_prefix.
26697test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026698
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026699DEFS=-DHAVE_CONFIG_H
26700
Skip Montanaro6dead952003-09-25 14:50:04 +000026701ac_libobjs=
26702ac_ltlibobjs=
26703for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26704 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026705 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026706 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026707 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26708 # will be set to the directory where LIBOBJS objects are built.
26709 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26710 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026711done
26712LIBOBJS=$ac_libobjs
26713
26714LTLIBOBJS=$ac_ltlibobjs
26715
26716
Martin v. Löwis11437992002-04-12 09:54:03 +000026717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026718: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026719ac_clean_files_save=$ac_clean_files
26720ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026721{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26722echo "$as_me: creating $CONFIG_STATUS" >&6;}
26723cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026724#! $SHELL
26725# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026726# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026727# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026728# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026729
Martin v. Löwis11437992002-04-12 09:54:03 +000026730debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026731ac_cs_recheck=false
26732ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026733SHELL=\${CONFIG_SHELL-$SHELL}
26734_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026735
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026736cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026737## --------------------- ##
26738## M4sh Initialization. ##
26739## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026741# Be more Bourne compatible
26742DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026743if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26744 emulate sh
26745 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026746 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026747 # is contrary to our usage. Disable this feature.
26748 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026749 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026750else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026751 case `(set -o) 2>/dev/null` in
26752 *posix*) set -o posix ;;
26753esac
26754
Michael W. Hudson54241132001-12-07 15:38:26 +000026755fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026756
26757
Michael W. Hudson54241132001-12-07 15:38:26 +000026758
Michael W. Hudson54241132001-12-07 15:38:26 +000026759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026760# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026761# Avoid depending upon Character Ranges.
26762as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26763as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26764as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26765as_cr_digits='0123456789'
26766as_cr_alnum=$as_cr_Letters$as_cr_digits
26767
26768# The user is always right.
26769if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026770 echo "#! /bin/sh" >conf$$.sh
26771 echo "exit 0" >>conf$$.sh
26772 chmod +x conf$$.sh
26773 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26774 PATH_SEPARATOR=';'
26775 else
26776 PATH_SEPARATOR=:
26777 fi
26778 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026779fi
26780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026781# Support unset when possible.
26782if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26783 as_unset=unset
26784else
26785 as_unset=false
26786fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026788
26789# IFS
26790# We need space, tab and new line, in precisely that order. Quoting is
26791# there to prevent editors from complaining about space-tab.
26792# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26793# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026794as_nl='
26795'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026796IFS=" "" $as_nl"
26797
26798# Find who we are. Look in the path if we contain no directory separator.
26799case $0 in
26800 *[\\/]* ) as_myself=$0 ;;
26801 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026802for as_dir in $PATH
26803do
26804 IFS=$as_save_IFS
26805 test -z "$as_dir" && as_dir=.
26806 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26807done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026808IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026810 ;;
26811esac
26812# We did not find ourselves, most probably we were run as `sh COMMAND'
26813# in which case we are not to be found in the path.
26814if test "x$as_myself" = x; then
26815 as_myself=$0
26816fi
26817if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026818 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026819 { (exit 1); exit 1; }
26820fi
26821
26822# Work around bugs in pre-3.0 UWIN ksh.
26823for as_var in ENV MAIL MAILPATH
26824do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26825done
26826PS1='$ '
26827PS2='> '
26828PS4='+ '
26829
26830# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026831for as_var in \
26832 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26833 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26834 LC_TELEPHONE LC_TIME
26835do
26836 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26837 eval $as_var=C; export $as_var
26838 else
26839 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26840 fi
26841done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026842
26843# Required to use basename.
26844if expr a : '\(a\)' >/dev/null 2>&1 &&
26845 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26846 as_expr=expr
26847else
26848 as_expr=false
26849fi
26850
26851if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26852 as_basename=basename
26853else
26854 as_basename=false
26855fi
26856
26857
26858# Name of the executable.
26859as_me=`$as_basename -- "$0" ||
26860$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26861 X"$0" : 'X\(//\)$' \| \
26862 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026863echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026864 sed '/^.*\/\([^/][^/]*\)\/*$/{
26865 s//\1/
26866 q
26867 }
26868 /^X\/\(\/\/\)$/{
26869 s//\1/
26870 q
26871 }
26872 /^X\/\(\/\).*/{
26873 s//\1/
26874 q
26875 }
26876 s/.*/./; q'`
26877
26878# CDPATH.
26879$as_unset CDPATH
26880
26881
26882
Martin v. Löwis11437992002-04-12 09:54:03 +000026883 as_lineno_1=$LINENO
26884 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026885 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026886 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026887
Martin v. Löwis11437992002-04-12 09:54:03 +000026888 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26889 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026890 # line-number line after each line using $LINENO; the second 'sed'
26891 # does the real work. The second script uses 'N' to pair each
26892 # line-number line with the line containing $LINENO, and appends
26893 # trailing '-' during substitution so that $LINENO is not a special
26894 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026895 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026896 # scripts with optimization help from Paolo Bonzini. Blame Lee
26897 # E. McMahon (1931-1989) for sed's syntax. :-)
26898 sed -n '
26899 p
26900 /[$]LINENO/=
26901 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026902 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026903 s/[$]LINENO.*/&-/
26904 t lineno
26905 b
26906 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026907 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026908 :loop
26909 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026910 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026911 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026912 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026913 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026914 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026915 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026916
Martin v. Löwis11437992002-04-12 09:54:03 +000026917 # Don't try to exec as it changes $[0], causing all sort of problems
26918 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026919 # original and so on. Autoconf is especially sensitive to this).
26920 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026921 # Exit status is that of the last command.
26922 exit
26923}
26924
26925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026926if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26927 as_dirname=dirname
26928else
26929 as_dirname=false
26930fi
26931
26932ECHO_C= ECHO_N= ECHO_T=
26933case `echo -n x` in
26934-n*)
26935 case `echo 'x\c'` in
26936 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26937 *) ECHO_C='\c';;
26938 esac;;
26939*)
26940 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026941esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026943if expr a : '\(a\)' >/dev/null 2>&1 &&
26944 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026945 as_expr=expr
26946else
26947 as_expr=false
26948fi
26949
26950rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026951if test -d conf$$.dir; then
26952 rm -f conf$$.dir/conf$$.file
26953else
26954 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026955 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026957echo >conf$$.file
26958if ln -s conf$$.file conf$$ 2>/dev/null; then
26959 as_ln_s='ln -s'
26960 # ... but there are two gotchas:
26961 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26962 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26963 # In both cases, we have to default to `cp -p'.
26964 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026965 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026966elif ln conf$$.file conf$$ 2>/dev/null; then
26967 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026968else
26969 as_ln_s='cp -p'
26970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026971rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26972rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026973
Skip Montanaro6dead952003-09-25 14:50:04 +000026974if mkdir -p . 2>/dev/null; then
26975 as_mkdir_p=:
26976else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026977 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026978 as_mkdir_p=false
26979fi
26980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026981if test -x / >/dev/null 2>&1; then
26982 as_test_x='test -x'
26983else
26984 if ls -dL / >/dev/null 2>&1; then
26985 as_ls_L_option=L
26986 else
26987 as_ls_L_option=
26988 fi
26989 as_test_x='
26990 eval sh -c '\''
26991 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026992 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026993 else
26994 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026995 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026996 esac;
26997 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26998 ???[sx]*):;;*)false;;esac;fi
26999 '\'' sh
27000 '
27001fi
27002as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027003
27004# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027005as_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 +000027006
27007# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027008as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027009
27010
Martin v. Löwis11437992002-04-12 09:54:03 +000027011exec 6>&1
27012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027013# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027014# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027015# values after options handling.
27016ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027017This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027018generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027019
27020 CONFIG_FILES = $CONFIG_FILES
27021 CONFIG_HEADERS = $CONFIG_HEADERS
27022 CONFIG_LINKS = $CONFIG_LINKS
27023 CONFIG_COMMANDS = $CONFIG_COMMANDS
27024 $ $0 $@
27025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027026on `(hostname || uname -n) 2>/dev/null | sed 1q`
27027"
27028
Martin v. Löwis11437992002-04-12 09:54:03 +000027029_ACEOF
27030
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027031cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027032# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027033config_files="$ac_config_files"
27034config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027036_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027037
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027038cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027039ac_cs_usage="\
27040\`$as_me' instantiates files from templates according to the
27041current configuration.
27042
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027043Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027044
27045 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027046 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027047 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027048 -d, --debug don't remove temporary files
27049 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027050 --file=FILE[:TEMPLATE]
27051 instantiate the configuration file FILE
27052 --header=FILE[:TEMPLATE]
27053 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027054
27055Configuration files:
27056$config_files
27057
27058Configuration headers:
27059$config_headers
27060
27061Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027063_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027064cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027065ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027066python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027067configured by $0, generated by GNU Autoconf 2.61,
27068 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027069
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027070Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027071This config.status script is free software; the Free Software Foundation
27072gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027073
27074ac_pwd='$ac_pwd'
27075srcdir='$srcdir'
27076INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027077_ACEOF
27078
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027079cat >>$CONFIG_STATUS <<\_ACEOF
27080# If no file are specified by the user, then we need to provide default
27081# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027082ac_need_defaults=:
27083while test $# != 0
27084do
27085 case $1 in
27086 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027087 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27088 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027089 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027090 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027091 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027092 ac_option=$1
27093 ac_optarg=$2
27094 ac_shift=shift
27095 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027096 esac
27097
Skip Montanaro6dead952003-09-25 14:50:04 +000027098 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027099 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027100 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27101 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027102 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027103 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027104 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027105 debug=: ;;
27106 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027107 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027108 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027109 ac_need_defaults=false;;
27110 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027111 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027112 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027113 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027114 --he | --h)
27115 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027116 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027117Try \`$0 --help' for more information." >&2
27118 { (exit 1); exit 1; }; };;
27119 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027120 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027121 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27122 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27123 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027124
27125 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027126 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027127Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027128 { (exit 1); exit 1; }; } ;;
27129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027130 *) ac_config_targets="$ac_config_targets $1"
27131 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027132
27133 esac
27134 shift
27135done
27136
Skip Montanaro6dead952003-09-25 14:50:04 +000027137ac_configure_extra_args=
27138
27139if $ac_cs_silent; then
27140 exec 6>/dev/null
27141 ac_configure_extra_args="$ac_configure_extra_args --silent"
27142fi
27143
27144_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027145cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027146if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027147 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27148 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027149 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027150 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027151fi
27152
Martin v. Löwis11437992002-04-12 09:54:03 +000027153_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027154cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027155exec 5>>config.log
27156{
27157 echo
27158 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27159## Running $as_me. ##
27160_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027161 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027162} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027164_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027165cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027166_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027167
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027168cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027169
27170# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027171for ac_config_target in $ac_config_targets
27172do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027173 case $ac_config_target in
27174 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27175 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27176 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027177 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27178 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027179 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27180 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027181 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027183 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27184echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027185 { (exit 1); exit 1; }; };;
27186 esac
27187done
27188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027189
Martin v. Löwis11437992002-04-12 09:54:03 +000027190# If the user did not use the arguments to specify the items to instantiate,
27191# then the envvar interface is used. Set only those that are not.
27192# We use the long form for the default assignment because of an extremely
27193# bizarre bug on SunOS 4.1.3.
27194if $ac_need_defaults; then
27195 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27196 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27197fi
27198
Skip Montanaro6dead952003-09-25 14:50:04 +000027199# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027200# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027201# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027202# Hook for its removal unless debugging.
27203# Note that there is a small window in which the directory will not be cleaned:
27204# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027205$debug ||
27206{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027207 tmp=
27208 trap 'exit_status=$?
27209 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27210' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027211 trap '{ (exit 1); exit 1; }' 1 2 13 15
27212}
Martin v. Löwis11437992002-04-12 09:54:03 +000027213# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027214
Martin v. Löwis11437992002-04-12 09:54:03 +000027215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027216 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027217 test -n "$tmp" && test -d "$tmp"
27218} ||
27219{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027220 tmp=./conf$$-$RANDOM
27221 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027222} ||
27223{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027224 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027225 { (exit 1); exit 1; }
27226}
27227
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027228#
27229# Set up the sed scripts for CONFIG_FILES section.
27230#
27231
27232# No need to generate the scripts if there are no CONFIG_FILES.
27233# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027234if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027235
27236_ACEOF
27237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027240ac_delim='%!_!# '
27241for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027242 cat >conf$$subs.sed <<_ACEOF
27243SHELL!$SHELL$ac_delim
27244PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27245PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27246PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27247PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27248PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27249PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27250exec_prefix!$exec_prefix$ac_delim
27251prefix!$prefix$ac_delim
27252program_transform_name!$program_transform_name$ac_delim
27253bindir!$bindir$ac_delim
27254sbindir!$sbindir$ac_delim
27255libexecdir!$libexecdir$ac_delim
27256datarootdir!$datarootdir$ac_delim
27257datadir!$datadir$ac_delim
27258sysconfdir!$sysconfdir$ac_delim
27259sharedstatedir!$sharedstatedir$ac_delim
27260localstatedir!$localstatedir$ac_delim
27261includedir!$includedir$ac_delim
27262oldincludedir!$oldincludedir$ac_delim
27263docdir!$docdir$ac_delim
27264infodir!$infodir$ac_delim
27265htmldir!$htmldir$ac_delim
27266dvidir!$dvidir$ac_delim
27267pdfdir!$pdfdir$ac_delim
27268psdir!$psdir$ac_delim
27269libdir!$libdir$ac_delim
27270localedir!$localedir$ac_delim
27271mandir!$mandir$ac_delim
27272DEFS!$DEFS$ac_delim
27273ECHO_C!$ECHO_C$ac_delim
27274ECHO_N!$ECHO_N$ac_delim
27275ECHO_T!$ECHO_T$ac_delim
27276LIBS!$LIBS$ac_delim
27277build_alias!$build_alias$ac_delim
27278host_alias!$host_alias$ac_delim
27279target_alias!$target_alias$ac_delim
27280VERSION!$VERSION$ac_delim
27281SOVERSION!$SOVERSION$ac_delim
27282CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27283UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27284ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27285PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27286PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27287PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27288PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27289PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27290FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27291FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27292FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27293FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27294FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27295MACHDEP!$MACHDEP$ac_delim
27296SGI_ABI!$SGI_ABI$ac_delim
27297CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27298EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27299CC!$CC$ac_delim
27300CFLAGS!$CFLAGS$ac_delim
27301LDFLAGS!$LDFLAGS$ac_delim
27302CPPFLAGS!$CPPFLAGS$ac_delim
27303ac_ct_CC!$ac_ct_CC$ac_delim
27304EXEEXT!$EXEEXT$ac_delim
27305OBJEXT!$OBJEXT$ac_delim
27306CXX!$CXX$ac_delim
27307MAINCC!$MAINCC$ac_delim
27308CPP!$CPP$ac_delim
27309GREP!$GREP$ac_delim
27310EGREP!$EGREP$ac_delim
27311BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27312LIBRARY!$LIBRARY$ac_delim
27313LDLIBRARY!$LDLIBRARY$ac_delim
27314DLLLIBRARY!$DLLLIBRARY$ac_delim
27315BLDLIBRARY!$BLDLIBRARY$ac_delim
27316LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27317INSTSONAME!$INSTSONAME$ac_delim
27318RUNSHARED!$RUNSHARED$ac_delim
27319LINKCC!$LINKCC$ac_delim
27320GNULD!$GNULD$ac_delim
27321RANLIB!$RANLIB$ac_delim
27322AR!$AR$ac_delim
27323ARFLAGS!$ARFLAGS$ac_delim
27324SVNVERSION!$SVNVERSION$ac_delim
27325INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27326INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27327INSTALL_DATA!$INSTALL_DATA$ac_delim
27328LN!$LN$ac_delim
27329OPT!$OPT$ac_delim
27330BASECFLAGS!$BASECFLAGS$ac_delim
27331UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27332OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27333LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27334SO!$SO$ac_delim
27335LDSHARED!$LDSHARED$ac_delim
27336BLDSHARED!$BLDSHARED$ac_delim
27337CCSHARED!$CCSHARED$ac_delim
27338LINKFORSHARED!$LINKFORSHARED$ac_delim
27339CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27340_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027341
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027342 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027343 break
27344 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027345 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27346echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027347 { (exit 1); exit 1; }; }
27348 else
27349 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027350 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027351done
27352
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027353ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27354if test -n "$ac_eof"; then
27355 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27356 ac_eof=`expr $ac_eof + 1`
27357fi
27358
27359cat >>$CONFIG_STATUS <<_ACEOF
27360cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27361/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027362_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027363sed '
27364s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27365s/^/s,@/; s/!/@,|#_!!_#|/
27366:n
27367t n
27368s/'"$ac_delim"'$/,g/; t
27369s/$/\\/; p
27370N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27371' >>$CONFIG_STATUS <conf$$subs.sed
27372rm -f conf$$subs.sed
27373cat >>$CONFIG_STATUS <<_ACEOF
27374CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027375_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027376
27377
27378ac_delim='%!_!# '
27379for ac_last_try in false false false false false :; do
27380 cat >conf$$subs.sed <<_ACEOF
27381SHLIBS!$SHLIBS$ac_delim
27382USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27383SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27384USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27385LDLAST!$LDLAST$ac_delim
27386THREADOBJ!$THREADOBJ$ac_delim
27387DLINCLDIR!$DLINCLDIR$ac_delim
27388DYNLOADFILE!$DYNLOADFILE$ac_delim
27389MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27390TRUE!$TRUE$ac_delim
27391LIBOBJS!$LIBOBJS$ac_delim
27392HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27393HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27394HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27395HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27396HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27397LIBM!$LIBM$ac_delim
27398LIBC!$LIBC$ac_delim
27399THREADHEADERS!$THREADHEADERS$ac_delim
27400SRCDIRS!$SRCDIRS$ac_delim
27401LTLIBOBJS!$LTLIBOBJS$ac_delim
27402_ACEOF
27403
27404 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27405 break
27406 elif $ac_last_try; then
27407 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27408echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027409 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027410 else
27411 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27412 fi
27413done
27414
27415ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27416if test -n "$ac_eof"; then
27417 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27418 ac_eof=`expr $ac_eof + 1`
27419fi
27420
27421cat >>$CONFIG_STATUS <<_ACEOF
27422cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27423/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027424_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027425sed '
27426s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27427s/^/s,@/; s/!/@,|#_!!_#|/
27428:n
27429t n
27430s/'"$ac_delim"'$/,g/; t
27431s/$/\\/; p
27432N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27433' >>$CONFIG_STATUS <conf$$subs.sed
27434rm -f conf$$subs.sed
27435cat >>$CONFIG_STATUS <<_ACEOF
27436:end
27437s/|#_!!_#|//g
27438CEOF$ac_eof
27439_ACEOF
27440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027441
27442# VPATH may cause trouble with some makes, so we remove $(srcdir),
27443# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27444# trailing colons and then remove the whole line if VPATH becomes empty
27445# (actually we leave an empty line to preserve line numbers).
27446if test "x$srcdir" = x.; then
27447 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27448s/:*\$(srcdir):*/:/
27449s/:*\${srcdir}:*/:/
27450s/:*@srcdir@:*/:/
27451s/^\([^=]*=[ ]*\):*/\1/
27452s/:*$//
27453s/^[^=]*=[ ]*$//
27454}'
27455fi
27456
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027457cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027458fi # test -n "$CONFIG_FILES"
27459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027460
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027461for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027462do
27463 case $ac_tag in
27464 :[FHLC]) ac_mode=$ac_tag; continue;;
27465 esac
27466 case $ac_mode$ac_tag in
27467 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027468 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27469echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027470 { (exit 1); exit 1; }; };;
27471 :[FH]-) ac_tag=-:-;;
27472 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27473 esac
27474 ac_save_IFS=$IFS
27475 IFS=:
27476 set x $ac_tag
27477 IFS=$ac_save_IFS
27478 shift
27479 ac_file=$1
27480 shift
27481
27482 case $ac_mode in
27483 :L) ac_source=$1;;
27484 :[FH])
27485 ac_file_inputs=
27486 for ac_f
27487 do
27488 case $ac_f in
27489 -) ac_f="$tmp/stdin";;
27490 *) # Look for the file first in the build tree, then in the source tree
27491 # (if the path is not absolute). The absolute path cannot be DOS-style,
27492 # because $ac_f cannot contain `:'.
27493 test -f "$ac_f" ||
27494 case $ac_f in
27495 [\\/$]*) false;;
27496 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27497 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027498 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27499echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027500 { (exit 1); exit 1; }; };;
27501 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027502 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027503 done
27504
27505 # Let's still pretend it is `configure' which instantiates (i.e., don't
27506 # use $as_me), people would be surprised to read:
27507 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027508 configure_input="Generated from "`IFS=:
27509 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027510 if test x"$ac_file" != x-; then
27511 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027512 { echo "$as_me:$LINENO: creating $ac_file" >&5
27513echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027514 fi
27515
27516 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027517 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027518 esac
27519 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027520 esac
27521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027522 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027523$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027524 X"$ac_file" : 'X\(//\)[^/]' \| \
27525 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027526 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027527echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027528 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27529 s//\1/
27530 q
27531 }
27532 /^X\(\/\/\)[^/].*/{
27533 s//\1/
27534 q
27535 }
27536 /^X\(\/\/\)$/{
27537 s//\1/
27538 q
27539 }
27540 /^X\(\/\).*/{
27541 s//\1/
27542 q
27543 }
27544 s/.*/./; q'`
27545 { as_dir="$ac_dir"
27546 case $as_dir in #(
27547 -*) as_dir=./$as_dir;;
27548 esac
27549 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027550 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027551 while :; do
27552 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027553 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027554 *) as_qdir=$as_dir;;
27555 esac
27556 as_dirs="'$as_qdir' $as_dirs"
27557 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027558$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027559 X"$as_dir" : 'X\(//\)[^/]' \| \
27560 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027561 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027562echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027563 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27564 s//\1/
27565 q
27566 }
27567 /^X\(\/\/\)[^/].*/{
27568 s//\1/
27569 q
27570 }
27571 /^X\(\/\/\)$/{
27572 s//\1/
27573 q
27574 }
27575 /^X\(\/\).*/{
27576 s//\1/
27577 q
27578 }
27579 s/.*/./; q'`
27580 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027581 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027582 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027583 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27584echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027585 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027586 ac_builddir=.
27587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027588case "$ac_dir" in
27589.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27590*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027591 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027592 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027593 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027594 case $ac_top_builddir_sub in
27595 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27596 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27597 esac ;;
27598esac
27599ac_abs_top_builddir=$ac_pwd
27600ac_abs_builddir=$ac_pwd$ac_dir_suffix
27601# for backward compatibility:
27602ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027603
27604case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027605 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027606 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027607 ac_top_srcdir=$ac_top_builddir_sub
27608 ac_abs_top_srcdir=$ac_pwd ;;
27609 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027610 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027611 ac_top_srcdir=$srcdir
27612 ac_abs_top_srcdir=$srcdir ;;
27613 *) # Relative name.
27614 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27615 ac_top_srcdir=$ac_top_build_prefix$srcdir
27616 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027617esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027619
Martin v. Löwis11437992002-04-12 09:54:03 +000027620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027621 case $ac_mode in
27622 :F)
27623 #
27624 # CONFIG_FILE
27625 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027626
27627 case $INSTALL in
27628 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027629 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027630 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027631_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027632
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027633cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027634# If the template does not know about datarootdir, expand it.
27635# FIXME: This hack should be removed a few years after 2.60.
27636ac_datarootdir_hack=; ac_datarootdir_seen=
27637
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027638case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027639 p
27640 q
27641}
27642/@datadir@/p
27643/@docdir@/p
27644/@infodir@/p
27645/@localedir@/p
27646/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027647' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027648*datarootdir*) ac_datarootdir_seen=yes;;
27649*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027650 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27651echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027652_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027653cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027654 ac_datarootdir_hack='
27655 s&@datadir@&$datadir&g
27656 s&@docdir@&$docdir&g
27657 s&@infodir@&$infodir&g
27658 s&@localedir@&$localedir&g
27659 s&@mandir@&$mandir&g
27660 s&\\\${datarootdir}&$datarootdir&g' ;;
27661esac
27662_ACEOF
27663
27664# Neutralize VPATH when `$srcdir' = `.'.
27665# Shell code in configure.ac might set extrasub.
27666# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027667cat >>$CONFIG_STATUS <<_ACEOF
27668 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027669$extrasub
27670_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027671cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027672:t
27673/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027674s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027675s&@top_builddir@&$ac_top_builddir_sub&;t t
27676s&@srcdir@&$ac_srcdir&;t t
27677s&@abs_srcdir@&$ac_abs_srcdir&;t t
27678s&@top_srcdir@&$ac_top_srcdir&;t t
27679s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27680s&@builddir@&$ac_builddir&;t t
27681s&@abs_builddir@&$ac_abs_builddir&;t t
27682s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27683s&@INSTALL@&$ac_INSTALL&;t t
27684$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027685" $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 +000027686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027687test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27688 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27689 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027690 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027691which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027692echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027693which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027695 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027696 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027697 -) cat "$tmp/out"; rm -f "$tmp/out";;
27698 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27699 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027700 ;;
27701 :H)
27702 #
27703 # CONFIG_HEADER
27704 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027705_ACEOF
27706
27707# Transform confdefs.h into a sed script `conftest.defines', that
27708# substitutes the proper values into config.h.in to produce config.h.
27709rm -f conftest.defines conftest.tail
27710# First, append a space to every undef/define line, to ease matching.
27711echo 's/$/ /' >conftest.defines
27712# Then, protect against being on the right side of a sed subst, or in
27713# an unquoted here document, in config.status. If some macros were
27714# called several times there might be several #defines for the same
27715# symbol, which is useless. But do not sort them, since the last
27716# AC_DEFINE must be honored.
27717ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27718# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27719# NAME is the cpp macro being defined, VALUE is the value it is being given.
27720# PARAMS is the parameter list in the macro definition--in most cases, it's
27721# just an empty string.
27722ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27723ac_dB='\\)[ (].*,\\1define\\2'
27724ac_dC=' '
27725ac_dD=' ,'
27726
27727uniq confdefs.h |
27728 sed -n '
27729 t rset
27730 :rset
27731 s/^[ ]*#[ ]*define[ ][ ]*//
27732 t ok
27733 d
27734 :ok
27735 s/[\\&,]/\\&/g
27736 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27737 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27738 ' >>conftest.defines
27739
27740# Remove the space that was appended to ease matching.
27741# Then replace #undef with comments. This is necessary, for
27742# example, in the case of _POSIX_SOURCE, which is predefined and required
27743# on some systems where configure will not decide to define it.
27744# (The regexp can be short, since the line contains either #define or #undef.)
27745echo 's/ $//
27746s,^[ #]*u.*,/* & */,' >>conftest.defines
27747
27748# Break up conftest.defines:
27749ac_max_sed_lines=50
27750
27751# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27752# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27753# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27754# et cetera.
27755ac_in='$ac_file_inputs'
27756ac_out='"$tmp/out1"'
27757ac_nxt='"$tmp/out2"'
27758
27759while :
27760do
27761 # Write a here document:
27762 cat >>$CONFIG_STATUS <<_ACEOF
27763 # First, check the format of the line:
27764 cat >"\$tmp/defines.sed" <<\\CEOF
27765/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27766/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27767b
27768:def
27769_ACEOF
27770 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27771 echo 'CEOF
27772 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27773 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27774 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27775 grep . conftest.tail >/dev/null || break
27776 rm -f conftest.defines
27777 mv conftest.tail conftest.defines
27778done
27779rm -f conftest.defines conftest.tail
27780
27781echo "ac_result=$ac_in" >>$CONFIG_STATUS
27782cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027783 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027784 echo "/* $configure_input */" >"$tmp/config.h"
27785 cat "$ac_result" >>"$tmp/config.h"
27786 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27787 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27788echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027789 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027790 rm -f $ac_file
27791 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027792 fi
27793 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027794 echo "/* $configure_input */"
27795 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027796 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027797 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027798 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027800
27801 esac
27802
27803done # for ac_tag
27804
Guido van Rossum627b2d71993-12-24 10:39:16 +000027805
Martin v. Löwis11437992002-04-12 09:54:03 +000027806{ (exit 0); exit 0; }
27807_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027808chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027809ac_clean_files=$ac_clean_files_save
27810
27811
27812# configure is writing to config.log, and then calls config.status.
27813# config.status does its own redirection, appending to config.log.
27814# Unfortunately, on DOS this fails, as config.log is still kept open
27815# by configure, so config.status won't be able to write to it; its
27816# output is simply discarded. So we exec the FD to /dev/null,
27817# effectively closing config.log, so it can be properly (re)opened and
27818# appended to by config.status. When coming back to configure, we
27819# need to make the FD available again.
27820if test "$no_create" != yes; then
27821 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027822 ac_config_status_args=
27823 test "$silent" = yes &&
27824 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027825 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027826 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027827 exec 5>>config.log
27828 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27829 # would make configure fail if this is the last instruction.
27830 $ac_cs_success || { (exit 1); exit 1; }
27831fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027832
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027833
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027834echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027835if test ! -f Modules/Setup
27836then
27837 cp $srcdir/Modules/Setup.dist Modules/Setup
27838fi
27839
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027840echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027841if test ! -f Modules/Setup.local
27842then
27843 echo "# Edit this file for local setup changes" >Modules/Setup.local
27844fi
27845
27846echo "creating Makefile"
27847$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27848 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027849 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027850mv config.c Modules