blob: 95c609878ad5ae7b47532271f282654e266424da [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson99f03762010-04-11 22:15:28 +00002# From configure.in Revision: 79975 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
Benjamin Peterson99f03762010-04-11 22:15:28 +0000713LDCXXSHARED
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000719PKG_CONFIG
720LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000721USE_SIGNAL_MODULE
722SIGNAL_OBJS
723USE_THREAD_MODULE
724LDLAST
725THREADOBJ
726DLINCLDIR
727DYNLOADFILE
728MACHDEP_OBJS
729TRUE
730LIBOBJS
731HAVE_GETHOSTBYNAME_R_6_ARG
732HAVE_GETHOSTBYNAME_R_5_ARG
733HAVE_GETHOSTBYNAME_R_3_ARG
734HAVE_GETHOSTBYNAME_R
735HAVE_GETHOSTBYNAME
736LIBM
737LIBC
738THREADHEADERS
739SRCDIRS
740LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000741ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000742 ac_precious_vars='build_alias
743host_alias
744target_alias
745CC
746CFLAGS
747LDFLAGS
748LIBS
749CPPFLAGS
750CPP'
751
Guido van Rossum627b2d71993-12-24 10:39:16 +0000752
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754ac_init_help=
755ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756# The variables have the same names as the options, with
757# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000758cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000759exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761no_recursion=
762prefix=NONE
763program_prefix=NONE
764program_suffix=NONE
765program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770x_includes=NONE
771x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000772
773# Installation directory options.
774# These are left unexpanded so users can "make install exec_prefix=/foo"
775# and all the variables that are supposed to be based on exec_prefix
776# by default will actually change.
777# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779bindir='${exec_prefix}/bin'
780sbindir='${exec_prefix}/sbin'
781libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000782datarootdir='${prefix}/share'
783datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784sysconfdir='${prefix}/etc'
785sharedstatedir='${prefix}/com'
786localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000787includedir='${prefix}/include'
788oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000789docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
790infodir='${datarootdir}/info'
791htmldir='${docdir}'
792dvidir='${docdir}'
793pdfdir='${docdir}'
794psdir='${docdir}'
795libdir='${exec_prefix}/lib'
796localedir='${datarootdir}/locale'
797mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000800ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 # If the previous option needs an argument, assign it.
804 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000805 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806 ac_prev=
807 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810 case $ac_option in
811 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
812 *) ac_optarg=yes ;;
813 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815 # Accept the important Cygnus configure options, so we can diagnose typos.
816
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817 case $ac_dashdash$ac_option in
818 --)
819 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821 -bindir | --bindir | --bindi | --bind | --bin | --bi)
822 ac_prev=bindir ;;
823 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825
826 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000829 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 -cache-file | --cache-file | --cache-fil | --cache-fi \
832 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
833 ac_prev=cache_file ;;
834 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
835 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836 cache_file=$ac_optarg ;;
837
838 --config-cache | -C)
839 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
847 | --dataroo | --dataro | --datar)
848 ac_prev=datarootdir ;;
849 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
850 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
851 datarootdir=$ac_optarg ;;
852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000854 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000856 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
857 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000859 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
860 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
862 -docdir | --docdir | --docdi | --doc | --do)
863 ac_prev=docdir ;;
864 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
865 docdir=$ac_optarg ;;
866
867 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
868 ac_prev=dvidir ;;
869 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
870 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
872 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000873 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000875 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
876 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000878 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
879 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
882 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
883 | --exec | --exe | --ex)
884 ac_prev=exec_prefix ;;
885 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
886 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
887 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
890 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891 # Obsolete; use --with-gas.
892 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 -help | --help | --hel | --he | -h)
895 ac_init_help=long ;;
896 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
897 ac_init_help=recursive ;;
898 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
899 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
901 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
907 ac_prev=htmldir ;;
908 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
909 | --ht=*)
910 htmldir=$ac_optarg ;;
911
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -includedir | --includedir | --includedi | --included | --include \
913 | --includ | --inclu | --incl | --inc)
914 ac_prev=includedir ;;
915 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
916 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -infodir | --infodir | --infodi | --infod | --info | --inf)
920 ac_prev=infodir ;;
921 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libdir | --libdir | --libdi | --libd)
925 ac_prev=libdir ;;
926 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
930 | --libexe | --libex | --libe)
931 ac_prev=libexecdir ;;
932 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
933 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -localedir | --localedir | --localedi | --localed | --locale)
937 ac_prev=localedir ;;
938 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
939 localedir=$ac_optarg ;;
940
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 ac_prev=localstatedir ;;
944 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
948 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
949 ac_prev=mandir ;;
950 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Obsolete; use --without-fp.
955 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
957 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959 no_create=yes ;;
960
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
963 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
966 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
967 | --oldin | --oldi | --old | --ol | --o)
968 ac_prev=oldincludedir ;;
969 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
970 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
971 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
975 ac_prev=prefix ;;
976 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -program-prefix | --program-prefix | --program-prefi | --program-pref \
980 | --program-pre | --program-pr | --program-p)
981 ac_prev=program_prefix ;;
982 -program-prefix=* | --program-prefix=* | --program-prefi=* \
983 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -program-suffix | --program-suffix | --program-suffi | --program-suff \
987 | --program-suf | --program-su | --program-s)
988 ac_prev=program_suffix ;;
989 -program-suffix=* | --program-suffix=* | --program-suffi=* \
990 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -program-transform-name | --program-transform-name \
994 | --program-transform-nam | --program-transform-na \
995 | --program-transform-n | --program-transform- \
996 | --program-transform | --program-transfor \
997 | --program-transfo | --program-transf \
998 | --program-trans | --program-tran \
999 | --progr-tra | --program-tr | --program-t)
1000 ac_prev=program_transform_name ;;
1001 -program-transform-name=* | --program-transform-name=* \
1002 | --program-transform-nam=* | --program-transform-na=* \
1003 | --program-transform-n=* | --program-transform-=* \
1004 | --program-transform=* | --program-transfor=* \
1005 | --program-transfo=* | --program-transf=* \
1006 | --program-trans=* | --program-tran=* \
1007 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001010 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1011 ac_prev=pdfdir ;;
1012 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1013 pdfdir=$ac_optarg ;;
1014
1015 -psdir | --psdir | --psdi | --psd | --ps)
1016 ac_prev=psdir ;;
1017 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1018 psdir=$ac_optarg ;;
1019
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1021 | -silent | --silent | --silen | --sile | --sil)
1022 silent=yes ;;
1023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1025 ac_prev=sbindir ;;
1026 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1027 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1031 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1032 | --sharedst | --shareds | --shared | --share | --shar \
1033 | --sha | --sh)
1034 ac_prev=sharedstatedir ;;
1035 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1036 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1037 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1038 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 -site | --site | --sit)
1042 ac_prev=site ;;
1043 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1047 ac_prev=srcdir ;;
1048 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1052 | --syscon | --sysco | --sysc | --sys | --sy)
1053 ac_prev=sysconfdir ;;
1054 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1055 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1064 verbose=yes ;;
1065
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 -version | --version | --versio | --versi | --vers | -V)
1067 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
1069 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001070 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001072 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1073 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001075 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1076 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001079 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001081 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1082 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001084 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1085 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 --x)
1088 # Obsolete; use --with-x.
1089 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1092 | --x-incl | --x-inc | --x-in | --x-i)
1093 ac_prev=x_includes ;;
1094 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1095 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1099 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1100 ac_prev=x_libraries ;;
1101 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1102 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001105 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001106Try \`$0 --help' for more information." >&2
1107 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 ;;
1109
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 *=*)
1111 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1112 # Reject names that are not valid shell variable names.
1113 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001114 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001116 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 export $ac_envvar ;;
1118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001121 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001123 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 ;;
1126
1127 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128done
1129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001132 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134fi
1135
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001136# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1138 datadir sysconfdir sharedstatedir localstatedir includedir \
1139 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1140 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001142 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 [\\/$]* | ?:[\\/]* ) continue;;
1145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001147 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001148 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001149done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001150
Martin v. Löwis11437992002-04-12 09:54:03 +00001151# There might be people who depend on the old broken behavior: `$host'
1152# used to hold the argument of --host etc.
1153# FIXME: To remove some day.
1154build=$build_alias
1155host=$host_alias
1156target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158# FIXME: To remove some day.
1159if test "x$host_alias" != x; then
1160 if test "x$build_alias" = x; then
1161 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001162 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 +00001163 If a cross compiler is detected then cross compile mode will be used." >&2
1164 elif test "x$build_alias" != "x$host_alias"; then
1165 cross_compiling=yes
1166 fi
1167fi
1168
1169ac_tool_prefix=
1170test -n "$host_alias" && ac_tool_prefix=$host_alias-
1171
1172test "$silent" = yes && exec 6>/dev/null
1173
Guido van Rossum627b2d71993-12-24 10:39:16 +00001174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175ac_pwd=`pwd` && test -n "$ac_pwd" &&
1176ac_ls_di=`ls -di .` &&
1177ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001178 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001179 { (exit 1); exit 1; }; }
1180test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001181 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001182 { (exit 1); exit 1; }; }
1183
1184
Guido van Rossum627b2d71993-12-24 10:39:16 +00001185# Find the source files, if location was not specified.
1186if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001188 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001189 ac_confdir=`$as_dirname -- "$0" ||
1190$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1191 X"$0" : 'X\(//\)[^/]' \| \
1192 X"$0" : 'X\(//\)$' \| \
1193 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1194echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001195 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)[^/].*/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\/\)$/{
1204 s//\1/
1205 q
1206 }
1207 /^X\(\/\).*/{
1208 s//\1/
1209 q
1210 }
1211 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001213 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214 srcdir=..
1215 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216else
1217 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001219if test ! -r "$srcdir/$ac_unique_file"; then
1220 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001221 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1225ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001226 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001227 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001228 pwd)`
1229# When building in place, set srcdir=.
1230if test "$ac_abs_confdir" = "$ac_pwd"; then
1231 srcdir=.
1232fi
1233# Remove unnecessary trailing slashes from srcdir.
1234# Double slashes in file names in object file debugging info
1235# mess up M-x gdb in Emacs.
1236case $srcdir in
1237*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1238esac
1239for ac_var in $ac_precious_vars; do
1240 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_env_${ac_var}_value=\$${ac_var}
1242 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1244done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246#
1247# Report the --help message.
1248#
1249if test "$ac_init_help" = "long"; then
1250 # Omit some internal or obsolete options to make the list less imposing.
1251 # This message is too long to be a string in the A/UX 3.1 sh.
1252 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001253\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001254
1255Usage: $0 [OPTION]... [VAR=VALUE]...
1256
1257To assign environment variables (e.g., CC, CFLAGS...), specify them as
1258VAR=VALUE. See below for descriptions of some of the useful variables.
1259
1260Defaults for the options are specified in brackets.
1261
1262Configuration:
1263 -h, --help display this help and exit
1264 --help=short display options specific to this package
1265 --help=recursive display the short help of all the included packages
1266 -V, --version display version information and exit
1267 -q, --quiet, --silent do not print \`checking...' messages
1268 --cache-file=FILE cache test results in FILE [disabled]
1269 -C, --config-cache alias for \`--cache-file=config.cache'
1270 -n, --no-create do not create output files
1271 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1272
Martin v. Löwis11437992002-04-12 09:54:03 +00001273Installation directories:
1274 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001275 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001277 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001278
1279By default, \`make install' will install all the files in
1280\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1281an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1282for instance \`--prefix=\$HOME'.
1283
1284For better control, use the options below.
1285
1286Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001287 --bindir=DIR user executables [EPREFIX/bin]
1288 --sbindir=DIR system admin executables [EPREFIX/sbin]
1289 --libexecdir=DIR program executables [EPREFIX/libexec]
1290 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1291 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1292 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1293 --libdir=DIR object code libraries [EPREFIX/lib]
1294 --includedir=DIR C header files [PREFIX/include]
1295 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1296 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1297 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1298 --infodir=DIR info documentation [DATAROOTDIR/info]
1299 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1300 --mandir=DIR man documentation [DATAROOTDIR/man]
1301 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1302 --htmldir=DIR html documentation [DOCDIR]
1303 --dvidir=DIR dvi documentation [DOCDIR]
1304 --pdfdir=DIR pdf documentation [DOCDIR]
1305 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001306_ACEOF
1307
1308 cat <<\_ACEOF
1309_ACEOF
1310fi
1311
1312if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001313 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001314 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001315 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 cat <<\_ACEOF
1317
1318Optional Features:
1319 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1320 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001321 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001322 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-framework[=INSTALLDIR]
1324 Build (MacOSX|Darwin) framework
1325 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001326 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332Optional Packages:
1333 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1334 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001335 --with-universal-archs=ARCH
1336 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001337 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001338 --with-framework-name=FRAMEWORK
1339 specify an alternate name of the framework built
1340 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001342 --with-cxx-main=<compiler>
1343 compile main() and link python executable with C++
1344 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with-suffix=.exe set executable suffix
1346 --with-pydebug build with Py_DEBUG defined
1347 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001348 --with-system-expat build pyexpat module using an installed expat
1349 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001361 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001362 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001363 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001364 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001369 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001370 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1371 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001372
1373Some influential environment variables:
1374 CC C compiler command
1375 CFLAGS C compiler flags
1376 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1377 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378 LIBS libraries to pass to the linker, e.g. -l<library>
1379 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1380 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 CPP C preprocessor
1382
1383Use these variables to override the choices made by `configure' or to help
1384it to find libraries and programs with nonstandard names/locations.
1385
Georg Brandle2e15612009-05-20 18:25:10 +00001386Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001388ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001389fi
1390
1391if test "$ac_init_help" = "recursive"; then
1392 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001393 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001394 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_builddir=.
1396
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397case "$ac_dir" in
1398.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001400 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001401 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001402 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001403 case $ac_top_builddir_sub in
1404 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1405 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1406 esac ;;
1407esac
1408ac_abs_top_builddir=$ac_pwd
1409ac_abs_builddir=$ac_pwd$ac_dir_suffix
1410# for backward compatibility:
1411ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001416 ac_top_srcdir=$ac_top_builddir_sub
1417 ac_abs_top_srcdir=$ac_pwd ;;
1418 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001420 ac_top_srcdir=$srcdir
1421 ac_abs_top_srcdir=$srcdir ;;
1422 *) # Relative name.
1423 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1424 ac_top_srcdir=$ac_top_build_prefix$srcdir
1425 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001426esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001427ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001429 cd "$ac_dir" || { ac_status=$?; continue; }
1430 # Check for guested configure.
1431 if test -f "$ac_srcdir/configure.gnu"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1434 elif test -f "$ac_srcdir/configure"; then
1435 echo &&
1436 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001437 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001438 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001439 fi || ac_status=$?
1440 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 done
1442fi
1443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001445if $ac_init_version; then
1446 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001447python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001448generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014512002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This configure script is free software; the Free Software Foundation
1453gives unlimited permission to copy, distribute and modify it.
1454_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001455 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001458This file contains any messages produced by compilers while
1459running configure, to aid debugging if configure makes a mistake.
1460
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001461It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001462generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001463
1464 $ $0 $@
1465
1466_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001468{
1469cat <<_ASUNAME
1470## --------- ##
1471## Platform. ##
1472## --------- ##
1473
1474hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1475uname -m = `(uname -m) 2>/dev/null || echo unknown`
1476uname -r = `(uname -r) 2>/dev/null || echo unknown`
1477uname -s = `(uname -s) 2>/dev/null || echo unknown`
1478uname -v = `(uname -v) 2>/dev/null || echo unknown`
1479
1480/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1481/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1482
1483/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1484/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1485/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001487/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1488/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1489/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1490
1491_ASUNAME
1492
1493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1494for as_dir in $PATH
1495do
1496 IFS=$as_save_IFS
1497 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001498 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001499done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001501
1502} >&5
1503
1504cat >&5 <<_ACEOF
1505
1506
1507## ----------- ##
1508## Core tests. ##
1509## ----------- ##
1510
1511_ACEOF
1512
1513
1514# Keep a trace of the command line.
1515# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001516# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001518# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001519ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001520ac_configure_args0=
1521ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001522ac_must_keep_next=false
1523for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001524do
Skip Montanaro6dead952003-09-25 14:50:04 +00001525 for ac_arg
1526 do
1527 case $ac_arg in
1528 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1529 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1530 | -silent | --silent | --silen | --sile | --sil)
1531 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001533 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001534 esac
1535 case $ac_pass in
1536 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1537 2)
1538 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1539 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001540 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001541 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542 case $ac_arg in
1543 *=* | --config-cache | -C | -disable-* | --disable-* \
1544 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1545 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1546 | -with-* | --with-* | -without-* | --without-* | --x)
1547 case "$ac_configure_args0 " in
1548 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1549 esac
1550 ;;
1551 -* ) ac_must_keep_next=true ;;
1552 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001553 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001555 ;;
1556 esac
1557 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001558done
Skip Montanaro6dead952003-09-25 14:50:04 +00001559$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1560$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 +00001561
1562# When interrupted or exit'd, cleanup temporary files, and complete
1563# config.log. We remove comments because anyway the quotes in there
1564# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565# WARNING: Use '\'' to represent an apostrophe within the trap.
1566# 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 +00001567trap 'exit_status=$?
1568 # Save into config.log some information that might help in debugging.
1569 {
1570 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001571
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 cat <<\_ASBOX
1573## ---------------- ##
1574## Cache variables. ##
1575## ---------------- ##
1576_ASBOX
1577 echo
1578 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579(
1580 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1581 eval ac_val=\$$ac_var
1582 case $ac_val in #(
1583 *${as_nl}*)
1584 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001585 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1586echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 esac
1588 case $ac_var in #(
1589 _ | IFS | as_nl) ;; #(
1590 *) $as_unset $ac_var ;;
1591 esac ;;
1592 esac
1593 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1596 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 "s/'\''/'\''\\\\'\'''\''/g;
1599 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1600 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001601 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001603 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 esac |
1605 sort
1606)
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001608
1609 cat <<\_ASBOX
1610## ----------------- ##
1611## Output variables. ##
1612## ----------------- ##
1613_ASBOX
1614 echo
1615 for ac_var in $ac_subst_vars
1616 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 eval ac_val=\$$ac_var
1618 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001619 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001621 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001622 done | sort
1623 echo
1624
1625 if test -n "$ac_subst_files"; then
1626 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627## ------------------- ##
1628## File substitutions. ##
1629## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001630_ASBOX
1631 echo
1632 for ac_var in $ac_subst_files
1633 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 eval ac_val=\$$ac_var
1635 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001636 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001638 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001639 done | sort
1640 echo
1641 fi
1642
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 if test -s confdefs.h; then
1644 cat <<\_ASBOX
1645## ----------- ##
1646## confdefs.h. ##
1647## ----------- ##
1648_ASBOX
1649 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 echo
1652 fi
1653 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001654 echo "$as_me: caught signal $ac_signal"
1655 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 rm -f core *.core core.conftest.* &&
1658 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001659 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001660' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001661for ac_signal in 1 2 13 15; do
1662 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1663done
1664ac_signal=0
1665
1666# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001667rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001668
1669# Predefined preprocessor variables.
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_NAME "$PACKAGE_NAME"
1673_ACEOF
1674
1675
1676cat >>confdefs.h <<_ACEOF
1677#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1678_ACEOF
1679
1680
1681cat >>confdefs.h <<_ACEOF
1682#define PACKAGE_VERSION "$PACKAGE_VERSION"
1683_ACEOF
1684
1685
1686cat >>confdefs.h <<_ACEOF
1687#define PACKAGE_STRING "$PACKAGE_STRING"
1688_ACEOF
1689
1690
1691cat >>confdefs.h <<_ACEOF
1692#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1693_ACEOF
1694
1695
1696# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001697# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001698if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001699 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001700elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001701 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001703 set x "$ac_default_prefix/share/config.site" \
1704 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001706shift
1707for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001708do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001710 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1711echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001713 . "$ac_site_file"
1714 fi
1715done
1716
1717if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 # Some versions of bash will fail to source /dev/null (special
1719 # files actually), so we avoid doing that.
1720 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001721 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1722echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001724 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1725 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 esac
1727 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001729 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1730echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 >$cache_file
1732fi
1733
1734# Check that the precious variables saved in the cache have kept the same
1735# value.
1736ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001737for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1739 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001740 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1741 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 case $ac_old_set,$ac_new_set in
1743 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001744 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1745echo "$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 +00001746 ac_cache_corrupted=: ;;
1747 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1749echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 ac_cache_corrupted=: ;;
1751 ,);;
1752 *)
1753 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001754 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1755echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1756 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1757echo "$as_me: former value: $ac_old_val" >&2;}
1758 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1759echo "$as_me: current value: $ac_new_val" >&2;}
1760 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 fi;;
1762 esac
1763 # Pass precious variables to config.status.
1764 if test "$ac_new_set" = set; then
1765 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001766 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001767 *) ac_arg=$ac_var=$ac_new_val ;;
1768 esac
1769 case " $ac_configure_args " in
1770 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1771 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1772 esac
1773 fi
1774done
1775if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001776 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1777echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1778 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1779echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001780 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001781fi
1782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
Guido van Rossum7f43da71994-08-01 12:15:30 +00001807ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001809ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1810ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1811ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812
Guido van Rossum627b2d71993-12-24 10:39:16 +00001813
Michael W. Hudson54241132001-12-07 15:38:26 +00001814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001815ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
Benjamin Petersond23f8222009-04-05 19:13:16 +00001819if test "$prefix" != "/"; then
1820 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1821fi
1822
1823
Martin v. Löwis11437992002-04-12 09:54:03 +00001824
1825
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001826
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001827
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001828# We don't use PACKAGE_ variables, and they cause conflicts
1829# with other autoconf-based packages that include Python.h
1830grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1831rm confdefs.h
1832mv confdefs.h.new confdefs.h
1833
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001834
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001835VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001836
Martin v. Löwis1142de32002-03-29 16:28:31 +00001837
1838SOVERSION=1.0
1839
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001840# The later defininition of _XOPEN_SOURCE disables certain features
1841# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1842
1843cat >>confdefs.h <<\_ACEOF
1844#define _GNU_SOURCE 1
1845_ACEOF
1846
1847
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001848# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1849# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1850# them.
1851
1852cat >>confdefs.h <<\_ACEOF
1853#define _NETBSD_SOURCE 1
1854_ACEOF
1855
1856
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001857# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1858# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1859# them.
1860
1861cat >>confdefs.h <<\_ACEOF
1862#define __BSD_VISIBLE 1
1863_ACEOF
1864
1865
Martin v. Löwisd6320502004-08-12 13:45:08 +00001866# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1867# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1868
1869cat >>confdefs.h <<\_ACEOF
1870#define _BSD_TYPES 1
1871_ACEOF
1872
1873
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001874# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1875# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1876# them.
1877
1878cat >>confdefs.h <<\_ACEOF
1879#define _DARWIN_C_SOURCE 1
1880_ACEOF
1881
1882
1883
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001884define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001885
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001886# Arguments passed to configure.
1887
1888CONFIG_ARGS="$ac_configure_args"
1889
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001890{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1891echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001892# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001893if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001894 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001895 case $enableval in
1896 yes)
1897 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001898 if test ! -d "${enableval}"
1899 then
1900 enableval=/
1901 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902 ;;
1903 esac
1904 case $enableval in
1905 no)
1906 UNIVERSALSDK=
1907 enable_universalsdk=
1908 ;;
1909 *)
1910 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001911 if test ! -d "${UNIVERSALSDK}"
1912 then
1913 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1914echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1915 { (exit 1); exit 1; }; }
1916 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001917 ;;
1918 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001919
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001920
Thomas Wouters477c8d52006-05-27 19:21:47 +00001921else
1922
1923 UNIVERSALSDK=
1924 enable_universalsdk=
1925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001926fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001927
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001928if test -n "${UNIVERSALSDK}"
1929then
1930 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1931echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1932else
1933 { echo "$as_me:$LINENO: result: no" >&5
1934echo "${ECHO_T}no" >&6; }
1935fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001937
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001938
1939
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001940UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001941
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001942{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1943echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001944
1945# Check whether --with-universal-archs was given.
1946if test "${with_universal_archs+set}" = set; then
1947 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001948 { echo "$as_me:$LINENO: result: $withval" >&5
1949echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001950 UNIVERSAL_ARCHS="$withval"
1951
1952else
1953
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001954 { echo "$as_me:$LINENO: result: 32-bit" >&5
1955echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001956
1957fi
1958
1959
1960
1961
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001962
1963# Check whether --with-framework-name was given.
1964if test "${with_framework_name+set}" = set; then
1965 withval=$with_framework_name;
1966 PYTHONFRAMEWORK=${withval}
1967 PYTHONFRAMEWORKDIR=${withval}.framework
1968 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1969
1970else
1971
1972 PYTHONFRAMEWORK=Python
1973 PYTHONFRAMEWORKDIR=Python.framework
1974 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1975
1976fi
1977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001978# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001979if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001980 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001981 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001982 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001983 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001984 esac
1985 case $enableval in
1986 no)
1987 PYTHONFRAMEWORK=
1988 PYTHONFRAMEWORKDIR=no-framework
1989 PYTHONFRAMEWORKPREFIX=
1990 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001991 FRAMEWORKINSTALLFIRST=
1992 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001993 FRAMEWORKALTINSTALLFIRST=
1994 FRAMEWORKALTINSTALLLAST=
1995 if test "x${prefix}" = "xNONE"; then
1996 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1997 else
1998 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1999 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002000 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002001 ;;
2002 *)
2003 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002004 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002005 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002006 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002007 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2008 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002009
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002010 if test "x${prefix}" = "xNONE" ; then
2011 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2012 else
2013 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2014 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002015 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002016
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002017 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002018 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002019 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002021 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002022
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002023 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2024
2025 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2026
Jack Jansene578a632001-08-15 01:27:14 +00002027 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002028
Guido van Rossum563e7081996-09-10 18:20:48 +00002029else
Martin v. Löwis11437992002-04-12 09:54:03 +00002030
Jack Jansene578a632001-08-15 01:27:14 +00002031 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002032 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002033 PYTHONFRAMEWORKPREFIX=
2034 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002035 FRAMEWORKINSTALLFIRST=
2036 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002037 FRAMEWORKALTINSTALLFIRST=
2038 FRAMEWORKALTINSTALLLAST=
2039 if test "x${prefix}" = "xNONE" ; then
2040 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2041 else
2042 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2043 fi
Jack Jansene578a632001-08-15 01:27:14 +00002044 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002045
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002047fi
2048
Thomas Wouters477c8d52006-05-27 19:21:47 +00002049
2050
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
2052
2053
2054
Jack Jansene578a632001-08-15 01:27:14 +00002055
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002056
2057
2058
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002059
Jack Jansene578a632001-08-15 01:27:14 +00002060##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002061## AC_HELP_STRING(--with-dyld,
2062## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002063##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064# Set name for machine-dependent library files
2065
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002066{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2067echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002068if test -z "$MACHDEP"
2069then
Guido van Rossum563e7081996-09-10 18:20:48 +00002070 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002071 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002072 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002073 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002074 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002075 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002076 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_md_system=`echo $ac_sys_system |
2078 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2079 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002080 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002081 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002082
Guido van Rossum07397971997-04-29 21:49:50 +00002083 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002084 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002085 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002086 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002087 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002088 esac
2089fi
Guido van Rossum91922671997-10-09 20:24:13 +00002090
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002091# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2092# disable features if it is defined, without any means to access these
2093# features as extensions. For these systems, we skip the definition of
2094# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2095# some feature, make sure there is no alternative way to access this
2096# feature. Also, when using wildcards, make sure you have verified the
2097# need for not defining _XOPEN_SOURCE on all systems matching the
2098# wildcard, and that the wildcard does not include future systems
2099# (which may remove their limitations).
2100case $ac_sys_system/$ac_sys_release in
2101 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2102 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002103 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002104 # In addition, Stefan Krah confirms that issue #1244610 exists through
2105 # OpenBSD 4.6, but is fixed in 4.7.
2106 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002107 define_xopen_source=no
2108 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2109 # also defined. This can be overridden by defining _BSD_SOURCE
2110 # As this has a different meaning on Linux, only define it on OpenBSD
2111
2112cat >>confdefs.h <<\_ACEOF
2113#define _BSD_SOURCE 1
2114_ACEOF
2115
2116 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002117 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002118 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2119 # also defined. This can be overridden by defining _BSD_SOURCE
2120 # As this has a different meaning on Linux, only define it on OpenBSD
2121
2122cat >>confdefs.h <<\_ACEOF
2123#define _BSD_SOURCE 1
2124_ACEOF
2125
2126 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002127 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2128 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2129 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002130 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 +00002131 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002132 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2133 # of union __?sigval. Reported by Stuart Bishop.
2134 SunOS/5.6)
2135 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002136 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2137 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002138 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002139 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002140 define_xopen_source=no;;
2141 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002142 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002143 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002144 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002145 # On FreeBSD 4, the math functions C89 does not cover are never defined
2146 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2147 FreeBSD/4.*)
2148 define_xopen_source=no;;
2149 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2150 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2151 # identifies itself as Darwin/7.*
2152 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2153 # disables platform specific features beyond repair.
2154 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2155 # has no effect, don't bother defining them
2156 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002157 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00002158 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00002159 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002160 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2161 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2162 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002163 AIX/4)
2164 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002165 AIX/5)
2166 if test `uname -r` -eq 1; then
2167 define_xopen_source=no
2168 fi
2169 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002170 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2171 # defining NI_NUMERICHOST.
2172 QNX/6.3.2)
2173 define_xopen_source=no
2174 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002175
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002176esac
2177
2178if test $define_xopen_source = yes
2179then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002180 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2181 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002182 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2183 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002184 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002185 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002186
2187cat >>confdefs.h <<\_ACEOF
2188#define _XOPEN_SOURCE 500
2189_ACEOF
2190
2191 ;;
2192 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002193
2194cat >>confdefs.h <<\_ACEOF
2195#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002196_ACEOF
2197
Skip Montanarof0d5f792004-08-15 14:08:23 +00002198 ;;
2199 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002200
2201 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2202 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2203 # several APIs are not declared. Since this is also needed in some
2204 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002205 # except for Solaris 10, where it must not be defined,
2206 # as it implies XPG4.2
2207 case $ac_sys_system/$ac_sys_release in
2208 SunOS/5.10)
2209 ;;
2210 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002211
2212cat >>confdefs.h <<\_ACEOF
2213#define _XOPEN_SOURCE_EXTENDED 1
2214_ACEOF
2215
Martin v. Löwis7dece662005-11-26 11:38:24 +00002216 ;;
2217 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002218
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002219
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002220cat >>confdefs.h <<\_ACEOF
2221#define _POSIX_C_SOURCE 200112L
2222_ACEOF
2223
2224
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002225fi
2226
Guido van Rossum91922671997-10-09 20:24:13 +00002227#
2228# SGI compilers allow the specification of the both the ABI and the
2229# ISA on the command line. Depending on the values of these switches,
2230# different and often incompatable code will be generated.
2231#
2232# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2233# thus supply support for various ABI/ISA combinations. The MACHDEP
2234# variable is also adjusted.
2235#
2236
2237if test ! -z "$SGI_ABI"
2238then
2239 CC="cc $SGI_ABI"
2240 LDFLAGS="$SGI_ABI $LDFLAGS"
2241 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2242fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002243{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2244echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002245
Jack Jansen6b08a402004-06-03 12:41:45 +00002246# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2247# it may influence the way we can build extensions, so distutils
2248# needs to check it
2249
Thomas Wouters477c8d52006-05-27 19:21:47 +00002250
Jack Jansen6b08a402004-06-03 12:41:45 +00002251CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002252EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002253
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002254{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2255echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002256ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002257{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2258echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002259
Guido van Rossum627b2d71993-12-24 10:39:16 +00002260# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002261
2262# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2263# for debug/optimization stuff. BASECFLAGS is for flags that are required
2264# just to get things to compile and link. Users are free to override OPT
2265# when running configure or make. The build should not break if they do.
2266# BASECFLAGS should generally not be messed with, however.
2267
2268# XXX shouldn't some/most/all of this code be merged with the stuff later
2269# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002270{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2271echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002273# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002274if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002275 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002276 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002277 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002278 without_gcc=yes;;
2279 yes) CC=gcc
2280 without_gcc=no;;
2281 *) CC=$withval
2282 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002283 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002284else
Martin v. Löwis11437992002-04-12 09:54:03 +00002285
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002286 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002287 AIX*) CC=cc_r
2288 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002289 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002290 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002291fi
2292
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002293{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2294echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002295
Guido van Rossum8b131c51995-03-09 14:10:13 +00002296# If the user switches compilers, we can't believe the cache
2297if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2298then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002299 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002300(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002301echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002302(it is also a good idea to do 'make clean' before compiling)" >&2;}
2303 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002304fi
2305
Victor Stinner00d6a1d2010-03-25 01:02:29 +00002306save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002307ac_ext=c
2308ac_cpp='$CPP $CPPFLAGS'
2309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2311ac_compiler_gnu=$ac_cv_c_compiler_gnu
2312if test -n "$ac_tool_prefix"; then
2313 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2314set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002315{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2316echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002317if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002319else
2320 if test -n "$CC"; then
2321 ac_cv_prog_CC="$CC" # Let the user override the test.
2322else
Martin v. Löwis11437992002-04-12 09:54:03 +00002323as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2324for as_dir in $PATH
2325do
2326 IFS=$as_save_IFS
2327 test -z "$as_dir" && as_dir=.
2328 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329 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 +00002330 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002331 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002332 break 2
2333 fi
2334done
2335done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002337
Jack Jansendd19cf82001-12-06 22:36:17 +00002338fi
2339fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002340CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002341if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002342 { echo "$as_me:$LINENO: result: $CC" >&5
2343echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002344else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002345 { echo "$as_me:$LINENO: result: no" >&5
2346echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002347fi
2348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349
Martin v. Löwis11437992002-04-12 09:54:03 +00002350fi
2351if test -z "$ac_cv_prog_CC"; then
2352 ac_ct_CC=$CC
2353 # Extract the first word of "gcc", so it can be a program name with args.
2354set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002355{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2356echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002357if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002359else
2360 if test -n "$ac_ct_CC"; then
2361 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2362else
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
2368 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369 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 +00002370 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002371 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002372 break 2
2373 fi
2374done
2375done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002377
2378fi
2379fi
2380ac_ct_CC=$ac_cv_prog_ac_ct_CC
2381if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002382 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2383echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002384else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002385 { echo "$as_me:$LINENO: result: no" >&5
2386echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002387fi
2388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389 if test "x$ac_ct_CC" = x; then
2390 CC=""
2391 else
2392 case $cross_compiling:$ac_tool_warned in
2393yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002394{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2395whose name does not start with the host triplet. If you think this
2396configuration is useful to you, please write to autoconf@gnu.org." >&5
2397echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2398whose name does not start with the host triplet. If you think this
2399configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400ac_tool_warned=yes ;;
2401esac
2402 CC=$ac_ct_CC
2403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002404else
2405 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002406fi
2407
Jack Jansendd19cf82001-12-06 22:36:17 +00002408if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 if test -n "$ac_tool_prefix"; then
2410 # 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 +00002411set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002412{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002414if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002415 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002416else
2417 if test -n "$CC"; then
2418 ac_cv_prog_CC="$CC" # Let the user override the test.
2419else
Martin v. Löwis11437992002-04-12 09:54:03 +00002420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2421for as_dir in $PATH
2422do
2423 IFS=$as_save_IFS
2424 test -z "$as_dir" && as_dir=.
2425 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426 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 +00002427 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002428 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002429 break 2
2430 fi
2431done
2432done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002433IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002434
2435fi
2436fi
2437CC=$ac_cv_prog_CC
2438if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002439 { echo "$as_me:$LINENO: result: $CC" >&5
2440echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002441else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002442 { echo "$as_me:$LINENO: result: no" >&5
2443echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002444fi
2445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002448fi
2449if test -z "$CC"; then
2450 # Extract the first word of "cc", so it can be a program name with args.
2451set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002452{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2453echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002454if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002455 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002456else
2457 if test -n "$CC"; then
2458 ac_cv_prog_CC="$CC" # Let the user override the test.
2459else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002460 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2462for as_dir in $PATH
2463do
2464 IFS=$as_save_IFS
2465 test -z "$as_dir" && as_dir=.
2466 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 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 +00002468 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2469 ac_prog_rejected=yes
2470 continue
2471 fi
2472 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002473 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 break 2
2475 fi
2476done
2477done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002480if test $ac_prog_rejected = yes; then
2481 # We found a bogon in the path, so make sure we never use it.
2482 set dummy $ac_cv_prog_CC
2483 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002485 # We chose a different compiler from the bogus one.
2486 # However, it has the same basename, so the bogon will be chosen
2487 # first if we set CC to just the basename; use the full file name.
2488 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002490 fi
2491fi
2492fi
2493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002494CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002495if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002496 { echo "$as_me:$LINENO: result: $CC" >&5
2497echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002499 { echo "$as_me:$LINENO: result: no" >&5
2500echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501fi
2502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503
Martin v. Löwis11437992002-04-12 09:54:03 +00002504fi
2505if test -z "$CC"; then
2506 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 do
2509 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002511{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2512echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002513if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002515else
2516 if test -n "$CC"; then
2517 ac_cv_prog_CC="$CC" # Let the user override the test.
2518else
Martin v. Löwis11437992002-04-12 09:54:03 +00002519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2520for as_dir in $PATH
2521do
2522 IFS=$as_save_IFS
2523 test -z "$as_dir" && as_dir=.
2524 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 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 +00002526 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002527 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002530done
2531done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
2534fi
2535fi
2536CC=$ac_cv_prog_CC
2537if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002538 { echo "$as_me:$LINENO: result: $CC" >&5
2539echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002541 { echo "$as_me:$LINENO: result: no" >&5
2542echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002543fi
2544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 test -n "$CC" && break
2547 done
2548fi
2549if test -z "$CC"; then
2550 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002552do
2553 # Extract the first word of "$ac_prog", so it can be a program name with args.
2554set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002555{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2556echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002557if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002559else
2560 if test -n "$ac_ct_CC"; then
2561 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2562else
2563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2564for as_dir in $PATH
2565do
2566 IFS=$as_save_IFS
2567 test -z "$as_dir" && as_dir=.
2568 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 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 +00002570 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002571 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 break 2
2573 fi
2574done
2575done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578fi
2579fi
2580ac_ct_CC=$ac_cv_prog_ac_ct_CC
2581if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002582 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2583echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002585 { echo "$as_me:$LINENO: result: no" >&5
2586echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 test -n "$ac_ct_CC" && break
2591done
Michael W. Hudson54241132001-12-07 15:38:26 +00002592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 if test "x$ac_ct_CC" = x; then
2594 CC=""
2595 else
2596 case $cross_compiling:$ac_tool_warned in
2597yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002598{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2599whose name does not start with the host triplet. If you think this
2600configuration is useful to you, please write to autoconf@gnu.org." >&5
2601echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2602whose name does not start with the host triplet. If you think this
2603configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604ac_tool_warned=yes ;;
2605esac
2606 CC=$ac_ct_CC
2607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002608fi
2609
2610fi
2611
2612
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002613test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002614See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002615echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002616See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002617 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002618
2619# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002620echo "$as_me:$LINENO: checking for C compiler version" >&5
2621ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622{ (ac_try="$ac_compiler --version >&5"
2623case "(($ac_try" in
2624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2625 *) ac_try_echo=$ac_try;;
2626esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632{ (ac_try="$ac_compiler -v >&5"
2633case "(($ac_try" in
2634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2635 *) ac_try_echo=$ac_try;;
2636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642{ (ac_try="$ac_compiler -V >&5"
2643case "(($ac_try" in
2644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2645 *) ac_try_echo=$ac_try;;
2646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 (exit $ac_status); }
2652
2653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002654/* confdefs.h. */
2655_ACEOF
2656cat confdefs.h >>conftest.$ac_ext
2657cat >>conftest.$ac_ext <<_ACEOF
2658/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660int
2661main ()
2662{
2663
2664 ;
2665 return 0;
2666}
2667_ACEOF
2668ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002669ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002670# Try to create an executable without -o first, disregard a.out.
2671# It will help us diagnose broken compilers, and finding out an intuition
2672# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002673{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2674echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2675ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2676#
2677# List of possible output files, starting from the most likely.
2678# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2679# only as a last resort. b.out is created by i960 compilers.
2680ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2681#
2682# The IRIX 6 linker writes into existing files which may not be
2683# executable, retaining their permissions. Remove them first so a
2684# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685ac_rmfiles=
2686for ac_file in $ac_files
2687do
2688 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002689 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2691 esac
2692done
2693rm -f $ac_rmfiles
2694
2695if { (ac_try="$ac_link_default"
2696case "(($ac_try" in
2697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698 *) ac_try_echo=$ac_try;;
2699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2706# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2707# in a Makefile. We should not override ac_cv_exeext if it was cached,
2708# so that the user can short-circuit this test for compilers unknown to
2709# Autoconf.
2710for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002711do
2712 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002714 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002715 ;;
2716 [ab].out )
2717 # We found the default executable, but exeext='' is most
2718 # certainly right.
2719 break;;
2720 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2722 then :; else
2723 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2724 fi
2725 # We set ac_cv_exeext here because the later test for it is not
2726 # safe: cross compilers may not add the suffix if given an `-o'
2727 # argument, so we may need to know it at that point already.
2728 # Even if this section looks crufty: it has the advantage of
2729 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002730 break;;
2731 * )
2732 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 esac
2734done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735test "$ac_cv_exeext" = no && ac_cv_exeext=
2736
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002737else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 ac_file=''
2739fi
2740
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002741{ echo "$as_me:$LINENO: result: $ac_file" >&5
2742echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002745sed 's/^/| /' conftest.$ac_ext >&5
2746
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002747{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002748See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002749echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002750See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002751 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002752fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002753
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002754ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002757# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002758{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2759echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002760# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2761# If not cross compiling, check that we can run a simple program.
2762if test "$cross_compiling" != yes; then
2763 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764 { (case "(($ac_try" in
2765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2766 *) ac_try_echo=$ac_try;;
2767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 (exit $ac_status); }; }; then
2773 cross_compiling=no
2774 else
2775 if test "$cross_compiling" = maybe; then
2776 cross_compiling=yes
2777 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002778 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002779If you meant to cross compile, use \`--host'.
2780See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002781echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002782If you meant to cross compile, use \`--host'.
2783See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002784 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 fi
2786 fi
2787fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002788{ echo "$as_me:$LINENO: result: yes" >&5
2789echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002790
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002792ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002793# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002794# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2796echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2797{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2798echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002799
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002800{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2801echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802if { (ac_try="$ac_link"
2803case "(($ac_try" in
2804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2805 *) ac_try_echo=$ac_try;;
2806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002808 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002812 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2813# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2814# work properly (i.e., refer to `conftest.exe'), while it won't with
2815# `rm'.
2816for ac_file in conftest.exe conftest conftest.*; do
2817 test -f "$ac_file" || continue
2818 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002819 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002820 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2821 break;;
2822 * ) break;;
2823 esac
2824done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002825else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002826 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002827See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002828echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002829See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002830 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002831fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002832
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002833rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002834{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2835echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002836
2837rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002838EXEEXT=$ac_cv_exeext
2839ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002840{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2841echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002842if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002843 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002844else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002845 cat >conftest.$ac_ext <<_ACEOF
2846/* confdefs.h. */
2847_ACEOF
2848cat confdefs.h >>conftest.$ac_ext
2849cat >>conftest.$ac_ext <<_ACEOF
2850/* end confdefs.h. */
2851
2852int
2853main ()
2854{
2855
2856 ;
2857 return 0;
2858}
2859_ACEOF
2860rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861if { (ac_try="$ac_compile"
2862case "(($ac_try" in
2863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2864 *) ac_try_echo=$ac_try;;
2865esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002867 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002868 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002870 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002871 for ac_file in conftest.o conftest.obj conftest.*; do
2872 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002874 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2876 break;;
2877 esac
2878done
2879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002881sed 's/^/| /' conftest.$ac_ext >&5
2882
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002883{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002884See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002885echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002886See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002887 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002888fi
2889
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002890rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002891fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2893echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002894OBJEXT=$ac_cv_objext
2895ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002896{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2897echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002898if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002899 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002900else
2901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002902/* confdefs.h. */
2903_ACEOF
2904cat confdefs.h >>conftest.$ac_ext
2905cat >>conftest.$ac_ext <<_ACEOF
2906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002907
Martin v. Löwis11437992002-04-12 09:54:03 +00002908int
2909main ()
2910{
2911#ifndef __GNUC__
2912 choke me
2913#endif
2914
2915 ;
2916 return 0;
2917}
2918_ACEOF
2919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002920if { (ac_try="$ac_compile"
2921case "(($ac_try" in
2922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2923 *) ac_try_echo=$ac_try;;
2924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002928 grep -v '^ *+' conftest.er1 >conftest.err
2929 rm -f conftest.er1
2930 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002932 (exit $ac_status); } && {
2933 test -z "$ac_c_werror_flag" ||
2934 test ! -s conftest.err
2935 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002936 ac_compiler_gnu=yes
2937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002939sed 's/^/| /' conftest.$ac_ext >&5
2940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943
2944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002945ac_cv_c_compiler_gnu=$ac_compiler_gnu
2946
2947fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002948{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2949echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2950GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002951ac_test_CFLAGS=${CFLAGS+set}
2952ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002953{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2954echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002955if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002957else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958 ac_save_c_werror_flag=$ac_c_werror_flag
2959 ac_c_werror_flag=yes
2960 ac_cv_prog_cc_g=no
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002994 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002997sed 's/^/| /' conftest.$ac_ext >&5
2998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002999 CFLAGS=""
3000 cat >conftest.$ac_ext <<_ACEOF
3001/* confdefs.h. */
3002_ACEOF
3003cat confdefs.h >>conftest.$ac_ext
3004cat >>conftest.$ac_ext <<_ACEOF
3005/* end confdefs.h. */
3006
3007int
3008main ()
3009{
3010
3011 ;
3012 return 0;
3013}
3014_ACEOF
3015rm -f conftest.$ac_objext
3016if { (ac_try="$ac_compile"
3017case "(($ac_try" in
3018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3019 *) ac_try_echo=$ac_try;;
3020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022 (eval "$ac_compile") 2>conftest.er1
3023 ac_status=$?
3024 grep -v '^ *+' conftest.er1 >conftest.err
3025 rm -f conftest.er1
3026 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (exit $ac_status); } && {
3029 test -z "$ac_c_werror_flag" ||
3030 test ! -s conftest.err
3031 } && test -s conftest.$ac_objext; then
3032 :
3033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003034 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003035sed 's/^/| /' conftest.$ac_ext >&5
3036
3037 ac_c_werror_flag=$ac_save_c_werror_flag
3038 CFLAGS="-g"
3039 cat >conftest.$ac_ext <<_ACEOF
3040/* confdefs.h. */
3041_ACEOF
3042cat confdefs.h >>conftest.$ac_ext
3043cat >>conftest.$ac_ext <<_ACEOF
3044/* end confdefs.h. */
3045
3046int
3047main ()
3048{
3049
3050 ;
3051 return 0;
3052}
3053_ACEOF
3054rm -f conftest.$ac_objext
3055if { (ac_try="$ac_compile"
3056case "(($ac_try" in
3057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3058 *) ac_try_echo=$ac_try;;
3059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061 (eval "$ac_compile") 2>conftest.er1
3062 ac_status=$?
3063 grep -v '^ *+' conftest.er1 >conftest.err
3064 rm -f conftest.er1
3065 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067 (exit $ac_status); } && {
3068 test -z "$ac_c_werror_flag" ||
3069 test ! -s conftest.err
3070 } && test -s conftest.$ac_objext; then
3071 ac_cv_prog_cc_g=yes
3072else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003073 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074sed 's/^/| /' conftest.$ac_ext >&5
3075
3076
Guido van Rossum627b2d71993-12-24 10:39:16 +00003077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078
3079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003081
3082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3083fi
3084
3085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086 ac_c_werror_flag=$ac_save_c_werror_flag
3087fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003088{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3089echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003090if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003091 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003092elif test $ac_cv_prog_cc_g = yes; then
3093 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003094 CFLAGS="-g -O2"
3095 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003096 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003097 fi
3098else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099 if test "$GCC" = yes; then
3100 CFLAGS="-O2"
3101 else
3102 CFLAGS=
3103 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003105{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3106echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003108 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003109else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003111ac_save_CC=$CC
3112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003113/* confdefs.h. */
3114_ACEOF
3115cat confdefs.h >>conftest.$ac_ext
3116cat >>conftest.$ac_ext <<_ACEOF
3117/* end confdefs.h. */
3118#include <stdarg.h>
3119#include <stdio.h>
3120#include <sys/types.h>
3121#include <sys/stat.h>
3122/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3123struct buf { int x; };
3124FILE * (*rcsopen) (struct buf *, struct stat *, int);
3125static char *e (p, i)
3126 char **p;
3127 int i;
3128{
3129 return p[i];
3130}
3131static char *f (char * (*g) (char **, int), char **p, ...)
3132{
3133 char *s;
3134 va_list v;
3135 va_start (v,p);
3136 s = g (p, va_arg (v,int));
3137 va_end (v);
3138 return s;
3139}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003140
3141/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3142 function prototypes and stuff, but not '\xHH' hex character constants.
3143 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003144 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003145 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3146 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003148int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003150/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3151 inside strings and character constants. */
3152#define FOO(x) 'x'
3153int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3154
Skip Montanaro6dead952003-09-25 14:50:04 +00003155int test (int i, double x);
3156struct s1 {int (*f) (int a);};
3157struct s2 {int (*f) (double a);};
3158int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3159int argc;
3160char **argv;
3161int
3162main ()
3163{
3164return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3165 ;
3166 return 0;
3167}
3168_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3170 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003171do
3172 CC="$ac_save_CC $ac_arg"
3173 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174if { (ac_try="$ac_compile"
3175case "(($ac_try" in
3176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3177 *) ac_try_echo=$ac_try;;
3178esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003182 grep -v '^ *+' conftest.er1 >conftest.err
3183 rm -f conftest.er1
3184 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 (exit $ac_status); } && {
3187 test -z "$ac_c_werror_flag" ||
3188 test ! -s conftest.err
3189 } && test -s conftest.$ac_objext; then
3190 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003193sed 's/^/| /' conftest.$ac_ext >&5
3194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195
Skip Montanaro6dead952003-09-25 14:50:04 +00003196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197
3198rm -f core conftest.err conftest.$ac_objext
3199 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003200done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003202CC=$ac_save_CC
3203
3204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205# AC_CACHE_VAL
3206case "x$ac_cv_prog_cc_c89" in
3207 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003208 { echo "$as_me:$LINENO: result: none needed" >&5
3209echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003211 { echo "$as_me:$LINENO: result: unsupported" >&5
3212echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003213 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003215 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3216echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003217esac
3218
Skip Montanaro6dead952003-09-25 14:50:04 +00003219
Martin v. Löwis11437992002-04-12 09:54:03 +00003220ac_ext=c
3221ac_cpp='$CPP $CPPFLAGS'
3222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3224ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003226CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003227
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003228
3229
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003230{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3231echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003234if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003235 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003236
3237 case $withval in
3238 no) with_cxx_main=no
3239 MAINCC='$(CC)';;
3240 yes) with_cxx_main=yes
3241 MAINCC='$(CXX)';;
3242 *) with_cxx_main=yes
3243 MAINCC=$withval
3244 if test -z "$CXX"
3245 then
3246 CXX=$withval
3247 fi;;
3248 esac
3249else
3250
3251 with_cxx_main=no
3252 MAINCC='$(CC)'
3253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254fi
3255
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003256{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3257echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003258
3259preset_cxx="$CXX"
3260if test -z "$CXX"
3261then
3262 case "$CC" in
3263 gcc) # Extract the first word of "g++", so it can be a program name with args.
3264set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003265{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3266echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003267if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003268 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003269else
3270 case $CXX in
3271 [\\/]* | ?:[\\/]*)
3272 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3273 ;;
3274 *)
3275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3276for as_dir in notfound
3277do
3278 IFS=$as_save_IFS
3279 test -z "$as_dir" && as_dir=.
3280 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003281 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 +00003282 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003283 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003284 break 2
3285 fi
3286done
3287done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003288IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003289
3290 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3291 ;;
3292esac
3293fi
3294CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003295if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003296 { echo "$as_me:$LINENO: result: $CXX" >&5
3297echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003299 { echo "$as_me:$LINENO: result: no" >&5
3300echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003302
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003303 ;;
3304 cc) # Extract the first word of "c++", so it can be a program name with args.
3305set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003306{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003308if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003309 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003310else
3311 case $CXX in
3312 [\\/]* | ?:[\\/]*)
3313 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3314 ;;
3315 *)
3316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317for as_dir in notfound
3318do
3319 IFS=$as_save_IFS
3320 test -z "$as_dir" && as_dir=.
3321 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003322 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 +00003323 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003324 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003325 break 2
3326 fi
3327done
3328done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003329IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003330
3331 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3332 ;;
3333esac
3334fi
3335CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003336if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003337 { echo "$as_me:$LINENO: result: $CXX" >&5
3338echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003340 { echo "$as_me:$LINENO: result: no" >&5
3341echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003344 ;;
3345 esac
3346 if test "$CXX" = "notfound"
3347 then
3348 CXX=""
3349 fi
3350fi
3351if test -z "$CXX"
3352then
3353 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3354do
3355 # Extract the first word of "$ac_prog", so it can be a program name with args.
3356set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003357{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3358echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003359if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003360 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003361else
3362 if test -n "$CXX"; then
3363 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3364else
3365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3366for as_dir in $PATH
3367do
3368 IFS=$as_save_IFS
3369 test -z "$as_dir" && as_dir=.
3370 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371 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 +00003372 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003373 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003374 break 2
3375 fi
3376done
3377done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003378IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003379
3380fi
3381fi
3382CXX=$ac_cv_prog_CXX
3383if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003384 { echo "$as_me:$LINENO: result: $CXX" >&5
3385echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003387 { echo "$as_me:$LINENO: result: no" >&5
3388echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003389fi
3390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003392 test -n "$CXX" && break
3393done
3394test -n "$CXX" || CXX="notfound"
3395
3396 if test "$CXX" = "notfound"
3397 then
3398 CXX=""
3399 fi
3400fi
3401if test "$preset_cxx" != "$CXX"
3402then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003403 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003404
3405 By default, distutils will build C++ extension modules with \"$CXX\".
3406 If this is not intended, then set CXX on the configure command line.
3407 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003408echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003409
3410 By default, distutils will build C++ extension modules with \"$CXX\".
3411 If this is not intended, then set CXX on the configure command line.
3412 " >&2;}
3413fi
3414
3415
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003416# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003417
3418ac_ext=c
3419ac_cpp='$CPP $CPPFLAGS'
3420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003423{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3424echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003425# On Suns, sometimes $CPP names a directory.
3426if test -n "$CPP" && test -d "$CPP"; then
3427 CPP=
3428fi
3429if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003431 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003432else
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # Double quotes because CPP needs to be expanded
3434 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3435 do
3436 ac_preproc_ok=false
3437for ac_c_preproc_warn_flag in '' yes
3438do
3439 # Use a header file that comes with gcc, so configuring glibc
3440 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003441 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3442 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003443 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003444 # not just through cpp. "Syntax error" is here to catch this case.
3445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003446/* confdefs.h. */
3447_ACEOF
3448cat confdefs.h >>conftest.$ac_ext
3449cat >>conftest.$ac_ext <<_ACEOF
3450/* end confdefs.h. */
3451#ifdef __STDC__
3452# include <limits.h>
3453#else
3454# include <assert.h>
3455#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003456 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003457_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458if { (ac_try="$ac_cpp conftest.$ac_ext"
3459case "(($ac_try" in
3460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3461 *) ac_try_echo=$ac_try;;
3462esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003466 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 rm -f conftest.er1
3468 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003470 (exit $ac_status); } >/dev/null && {
3471 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3472 test ! -s conftest.err
3473 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003474 :
3475else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003477sed 's/^/| /' conftest.$ac_ext >&5
3478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 # Broken: fails on valid input.
3480continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482
Martin v. Löwis11437992002-04-12 09:54:03 +00003483rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 # can be detected and how.
3487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003488/* confdefs.h. */
3489_ACEOF
3490cat confdefs.h >>conftest.$ac_ext
3491cat >>conftest.$ac_ext <<_ACEOF
3492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003493#include <ac_nonexistent.h>
3494_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003495if { (ac_try="$ac_cpp conftest.$ac_ext"
3496case "(($ac_try" in
3497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3498 *) ac_try_echo=$ac_try;;
3499esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003501 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003502 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003503 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 rm -f conftest.er1
3505 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507 (exit $ac_status); } >/dev/null && {
3508 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3509 test ! -s conftest.err
3510 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 # Broken: success on invalid input.
3512continue
3513else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003515sed 's/^/| /' conftest.$ac_ext >&5
3516
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # Passes both tests.
3518ac_preproc_ok=:
3519break
3520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521
Martin v. Löwis11437992002-04-12 09:54:03 +00003522rm -f conftest.err conftest.$ac_ext
3523
3524done
3525# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3526rm -f conftest.err conftest.$ac_ext
3527if $ac_preproc_ok; then
3528 break
3529fi
3530
3531 done
3532 ac_cv_prog_CPP=$CPP
3533
3534fi
3535 CPP=$ac_cv_prog_CPP
3536else
3537 ac_cv_prog_CPP=$CPP
3538fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003539{ echo "$as_me:$LINENO: result: $CPP" >&5
3540echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003541ac_preproc_ok=false
3542for ac_c_preproc_warn_flag in '' yes
3543do
3544 # Use a header file that comes with gcc, so configuring glibc
3545 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003546 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3547 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # On the NeXT, cc -E runs the code through the compiler's parser,
3549 # not just through cpp. "Syntax error" is here to catch this case.
3550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003551/* confdefs.h. */
3552_ACEOF
3553cat confdefs.h >>conftest.$ac_ext
3554cat >>conftest.$ac_ext <<_ACEOF
3555/* end confdefs.h. */
3556#ifdef __STDC__
3557# include <limits.h>
3558#else
3559# include <assert.h>
3560#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003561 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563if { (ac_try="$ac_cpp conftest.$ac_ext"
3564case "(($ac_try" in
3565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3566 *) ac_try_echo=$ac_try;;
3567esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003570 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003571 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 rm -f conftest.er1
3573 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575 (exit $ac_status); } >/dev/null && {
3576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3577 test ! -s conftest.err
3578 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 :
3580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003582sed 's/^/| /' conftest.$ac_ext >&5
3583
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Broken: fails on valid input.
3585continue
3586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588rm -f conftest.err conftest.$ac_ext
3589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 # can be detected and how.
3592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003593/* confdefs.h. */
3594_ACEOF
3595cat confdefs.h >>conftest.$ac_ext
3596cat >>conftest.$ac_ext <<_ACEOF
3597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003598#include <ac_nonexistent.h>
3599_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600if { (ac_try="$ac_cpp conftest.$ac_ext"
3601case "(($ac_try" in
3602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3603 *) ac_try_echo=$ac_try;;
3604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003607 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003608 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 rm -f conftest.er1
3610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612 (exit $ac_status); } >/dev/null && {
3613 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3614 test ! -s conftest.err
3615 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 # Broken: success on invalid input.
3617continue
3618else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003620sed 's/^/| /' conftest.$ac_ext >&5
3621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # Passes both tests.
3623ac_preproc_ok=:
3624break
3625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627rm -f conftest.err conftest.$ac_ext
3628
3629done
3630# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3631rm -f conftest.err conftest.$ac_ext
3632if $ac_preproc_ok; then
3633 :
3634else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003635 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003636See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003637echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003638See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003639 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640fi
3641
3642ac_ext=c
3643ac_cpp='$CPP $CPPFLAGS'
3644ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3645ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3646ac_compiler_gnu=$ac_cv_c_compiler_gnu
3647
3648
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003649{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3650echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003652 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003653else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003654 # Extract the first word of "grep ggrep" to use in msg output
3655if test -z "$GREP"; then
3656set dummy grep ggrep; ac_prog_name=$2
3657if test "${ac_cv_path_GREP+set}" = set; then
3658 echo $ECHO_N "(cached) $ECHO_C" >&6
3659else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003661# Loop through the user's path and test for each of PROGNAME-LIST
3662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
3667 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003668 for ac_exec_ext in '' $ac_executable_extensions; do
3669 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3670 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3671 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 # Check for GNU $ac_path_GREP
3673case `"$ac_path_GREP" --version 2>&1` in
3674*GNU*)
3675 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3676*)
3677 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003678 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679 while :
3680 do
3681 cat "conftest.in" "conftest.in" >"conftest.tmp"
3682 mv "conftest.tmp" "conftest.in"
3683 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003684 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3686 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3687 ac_count=`expr $ac_count + 1`
3688 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3689 # Best one so far, save it but keep looking for a better one
3690 ac_cv_path_GREP="$ac_path_GREP"
3691 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003692 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 # 10*(2^10) chars as input seems more than enough
3694 test $ac_count -gt 10 && break
3695 done
3696 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3697esac
3698
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003699
3700 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 done
3702done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003703
3704done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003706
3707
3708fi
3709
3710GREP="$ac_cv_path_GREP"
3711if test -z "$GREP"; then
3712 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3713echo "$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 +00003714 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003715fi
3716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717else
3718 ac_cv_path_GREP=$GREP
3719fi
3720
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003723{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3724echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 GREP="$ac_cv_path_GREP"
3726
3727
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003728{ echo "$as_me:$LINENO: checking for egrep" >&5
3729echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003731 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732else
3733 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3734 then ac_cv_path_EGREP="$GREP -E"
3735 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003736 # Extract the first word of "egrep" to use in msg output
3737if test -z "$EGREP"; then
3738set dummy egrep; ac_prog_name=$2
3739if test "${ac_cv_path_EGREP+set}" = set; then
3740 echo $ECHO_N "(cached) $ECHO_C" >&6
3741else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003743# Loop through the user's path and test for each of PROGNAME-LIST
3744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3746do
3747 IFS=$as_save_IFS
3748 test -z "$as_dir" && as_dir=.
3749 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003750 for ac_exec_ext in '' $ac_executable_extensions; do
3751 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3752 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3753 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754 # Check for GNU $ac_path_EGREP
3755case `"$ac_path_EGREP" --version 2>&1` in
3756*GNU*)
3757 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3758*)
3759 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003760 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761 while :
3762 do
3763 cat "conftest.in" "conftest.in" >"conftest.tmp"
3764 mv "conftest.tmp" "conftest.in"
3765 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003766 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3768 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3769 ac_count=`expr $ac_count + 1`
3770 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3771 # Best one so far, save it but keep looking for a better one
3772 ac_cv_path_EGREP="$ac_path_EGREP"
3773 ac_path_EGREP_max=$ac_count
3774 fi
3775 # 10*(2^10) chars as input seems more than enough
3776 test $ac_count -gt 10 && break
3777 done
3778 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3779esac
3780
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003781
3782 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003783 done
3784done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003785
3786done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003788
3789
3790fi
3791
3792EGREP="$ac_cv_path_EGREP"
3793if test -z "$EGREP"; then
3794 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3795echo "$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 +00003796 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003797fi
3798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799else
3800 ac_cv_path_EGREP=$EGREP
3801fi
3802
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804 fi
3805fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003806{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3807echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003809
3810
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003811
3812{ echo "$as_me:$LINENO: checking for AIX" >&5
3813echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3814cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003815/* confdefs.h. */
3816_ACEOF
3817cat confdefs.h >>conftest.$ac_ext
3818cat >>conftest.$ac_ext <<_ACEOF
3819/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003820#ifdef _AIX
3821 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003822#endif
3823
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003824_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3826 $EGREP "yes" >/dev/null 2>&1; then
3827 { echo "$as_me:$LINENO: result: yes" >&5
3828echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003829cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003830#define _ALL_SOURCE 1
3831_ACEOF
3832
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003833else
3834 { echo "$as_me:$LINENO: result: no" >&5
3835echo "${ECHO_T}no" >&6; }
3836fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00003837rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003838
3839
3840
3841# Check for unsupported systems
3842case $ac_sys_system/$ac_sys_release in
3843atheos*|Linux*/1*)
3844 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3845 echo See README for details.
3846 exit 1;;
3847esac
3848
3849
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003850{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3851echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003852
3853# Check whether --with-suffix was given.
3854if test "${with_suffix+set}" = set; then
3855 withval=$with_suffix;
3856 case $withval in
3857 no) EXEEXT=;;
3858 yes) EXEEXT=.exe;;
3859 *) EXEEXT=$withval;;
3860 esac
3861fi
3862
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003863{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3864echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003865
3866# Test whether we're running on a non-case-sensitive system, in which
3867# case we give a warning if no ext is given
3868
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003869{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3870echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003871if test ! -d CaseSensitiveTestDir; then
3872mkdir CaseSensitiveTestDir
3873fi
3874
3875if test -d casesensitivetestdir
3876then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003877 { echo "$as_me:$LINENO: result: yes" >&5
3878echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003879 BUILDEXEEXT=.exe
3880else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003881 { echo "$as_me:$LINENO: result: no" >&5
3882echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003883 BUILDEXEEXT=$EXEEXT
3884fi
3885rmdir CaseSensitiveTestDir
3886
3887case $MACHDEP in
3888bsdos*)
3889 case $CC in
3890 gcc) CC="$CC -D_HAVE_BSDI";;
3891 esac;;
3892esac
3893
3894case $ac_sys_system in
3895hp*|HP*)
3896 case $CC in
3897 cc|*/cc) CC="$CC -Ae";;
3898 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003899SunOS*)
3900 # Some functions have a prototype only with that define, e.g. confstr
3901
3902cat >>confdefs.h <<\_ACEOF
3903#define __EXTENSIONS__ 1
3904_ACEOF
3905
3906 ;;
3907esac
3908
3909
3910
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003911{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3912echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003913if test -z "$LIBRARY"
3914then
3915 LIBRARY='libpython$(VERSION).a'
3916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003917{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3918echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003919
3920# LDLIBRARY is the name of the library to link against (as opposed to the
3921# name of the library into which to insert object files). BLDLIBRARY is also
3922# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3923# is blank as the main program is not linked directly against LDLIBRARY.
3924# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3925# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3926# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3927# DLLLIBRARY is the shared (i.e., DLL) library.
3928#
3929# RUNSHARED is used to run shared python without installed libraries
3930#
3931# INSTSONAME is the name of the shared library that will be use to install
3932# on the system - some systems like version suffix, others don't
3933
3934
3935
3936
3937
3938
3939LDLIBRARY="$LIBRARY"
3940BLDLIBRARY='$(LDLIBRARY)'
3941INSTSONAME='$(LDLIBRARY)'
3942DLLLIBRARY=''
3943LDLIBRARYDIR=''
3944RUNSHARED=''
3945
3946# LINKCC is the command that links the python executable -- default is $(CC).
3947# If CXX is set, and if it is needed to link a main function that was
3948# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3949# python might then depend on the C++ runtime
3950# This is altered for AIX in order to build the export list before
3951# linking.
3952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003953{ echo "$as_me:$LINENO: checking LINKCC" >&5
3954echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003955if test -z "$LINKCC"
3956then
3957 LINKCC='$(PURIFY) $(MAINCC)'
3958 case $ac_sys_system in
3959 AIX*)
3960 exp_extra="\"\""
3961 if test $ac_sys_release -ge 5 -o \
3962 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3963 exp_extra="."
3964 fi
3965 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003966 QNX*)
3967 # qcc must be used because the other compilers do not
3968 # support -N.
3969 LINKCC=qcc;;
3970 esac
3971fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003972{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3973echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003974
3975# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3976# make sure we default having it set to "no": this is used by
3977# distutils.unixccompiler to know if it should add --enable-new-dtags
3978# to linker command lines, and failing to detect GNU ld simply results
3979# in the same bahaviour as before.
3980
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003981{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3982echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003983ac_prog=ld
3984if test "$GCC" = yes; then
3985 ac_prog=`$CC -print-prog-name=ld`
3986fi
3987case `"$ac_prog" -V 2>&1 < /dev/null` in
3988 *GNU*)
3989 GNULD=yes;;
3990 *)
3991 GNULD=no;;
3992esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003993{ echo "$as_me:$LINENO: result: $GNULD" >&5
3994echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003995
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003996{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3997echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003998# Check whether --enable-shared was given.
3999if test "${enable_shared+set}" = set; then
4000 enableval=$enable_shared;
4001fi
4002
4003
4004if test -z "$enable_shared"
4005then
4006 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004007 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004008 enable_shared="yes";;
4009 *)
4010 enable_shared="no";;
4011 esac
4012fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004013{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4014echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004015
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004016{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4017echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004018# Check whether --enable-profiling was given.
4019if test "${enable_profiling+set}" = set; then
4020 enableval=$enable_profiling; ac_save_cc="$CC"
4021 CC="$CC -pg"
4022 if test "$cross_compiling" = yes; then
4023 ac_enable_profiling="no"
4024else
4025 cat >conftest.$ac_ext <<_ACEOF
4026/* confdefs.h. */
4027_ACEOF
4028cat confdefs.h >>conftest.$ac_ext
4029cat >>conftest.$ac_ext <<_ACEOF
4030/* end confdefs.h. */
4031int main() { return 0; }
4032_ACEOF
4033rm -f conftest$ac_exeext
4034if { (ac_try="$ac_link"
4035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004040 (eval "$ac_link") 2>&5
4041 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4044 { (case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004049 (eval "$ac_try") 2>&5
4050 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004052 (exit $ac_status); }; }; then
4053 ac_enable_profiling="yes"
4054else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004055 echo "$as_me: program exited with status $ac_status" >&5
4056echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004057sed 's/^/| /' conftest.$ac_ext >&5
4058
4059( exit $ac_status )
4060ac_enable_profiling="no"
4061fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4063fi
4064
4065
4066 CC="$ac_save_cc"
4067fi
4068
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004069{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4070echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004071
4072case "$ac_enable_profiling" in
4073 "yes")
4074 BASECFLAGS="-pg $BASECFLAGS"
4075 LDFLAGS="-pg $LDFLAGS"
4076 ;;
4077esac
4078
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004079{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4080echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004081
4082# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4083# library that we build, but we do not want to link against it (we
4084# will find it with a -framework option). For this reason there is an
4085# extra variable BLDLIBRARY against which Python and the extension
4086# modules are linked, BLDLIBRARY. This is normally the same as
4087# LDLIBRARY, but empty for MacOSX framework builds.
4088if test "$enable_framework"
4089then
4090 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4091 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4092 BLDLIBRARY=''
4093else
4094 BLDLIBRARY='$(LDLIBRARY)'
4095fi
4096
4097# Other platforms follow
4098if test $enable_shared = "yes"; then
4099
4100cat >>confdefs.h <<\_ACEOF
4101#define Py_ENABLE_SHARED 1
4102_ACEOF
4103
4104 case $ac_sys_system in
4105 CYGWIN*)
4106 LDLIBRARY='libpython$(VERSION).dll.a'
4107 DLLLIBRARY='libpython$(VERSION).dll'
4108 ;;
4109 SunOS*)
4110 LDLIBRARY='libpython$(VERSION).so'
4111 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4112 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4113 INSTSONAME="$LDLIBRARY".$SOVERSION
4114 ;;
4115 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4116 LDLIBRARY='libpython$(VERSION).so'
4117 BLDLIBRARY='-L. -lpython$(VERSION)'
4118 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4119 case $ac_sys_system in
4120 FreeBSD*)
4121 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4122 ;;
4123 esac
4124 INSTSONAME="$LDLIBRARY".$SOVERSION
4125 ;;
4126 hp*|HP*)
4127 case `uname -m` in
4128 ia64)
4129 LDLIBRARY='libpython$(VERSION).so'
4130 ;;
4131 *)
4132 LDLIBRARY='libpython$(VERSION).sl'
4133 ;;
4134 esac
4135 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4136 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4137 ;;
4138 OSF*)
4139 LDLIBRARY='libpython$(VERSION).so'
4140 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4141 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4142 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004143 Darwin*)
4144 LDLIBRARY='libpython$(VERSION).dylib'
4145 BLDLIBRARY='-L. -lpython$(VERSION)'
4146 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4147 ;;
4148
4149 esac
4150else # shared is disabled
4151 case $ac_sys_system in
4152 CYGWIN*)
4153 BLDLIBRARY='$(LIBRARY)'
4154 LDLIBRARY='libpython$(VERSION).dll.a'
4155 ;;
4156 esac
4157fi
4158
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004159{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4160echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004161
4162if test -n "$ac_tool_prefix"; then
4163 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4164set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004165{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4166echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004167if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004168 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004169else
4170 if test -n "$RANLIB"; then
4171 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4172else
4173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_exec_ext in '' $ac_executable_extensions; do
4179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4180 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004181 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004182 break 2
4183 fi
4184done
4185done
4186IFS=$as_save_IFS
4187
4188fi
4189fi
4190RANLIB=$ac_cv_prog_RANLIB
4191if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004192 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4193echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004195 { echo "$as_me:$LINENO: result: no" >&5
4196echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004197fi
4198
4199
4200fi
4201if test -z "$ac_cv_prog_RANLIB"; then
4202 ac_ct_RANLIB=$RANLIB
4203 # Extract the first word of "ranlib", so it can be a program name with args.
4204set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004205{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004207if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004208 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004209else
4210 if test -n "$ac_ct_RANLIB"; then
4211 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4212else
4213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214for as_dir in $PATH
4215do
4216 IFS=$as_save_IFS
4217 test -z "$as_dir" && as_dir=.
4218 for ac_exec_ext in '' $ac_executable_extensions; do
4219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4220 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004221 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004222 break 2
4223 fi
4224done
4225done
4226IFS=$as_save_IFS
4227
4228fi
4229fi
4230ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4231if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004232 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4233echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004234else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004235 { echo "$as_me:$LINENO: result: no" >&5
4236echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004237fi
4238
4239 if test "x$ac_ct_RANLIB" = x; then
4240 RANLIB=":"
4241 else
4242 case $cross_compiling:$ac_tool_warned in
4243yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004244{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4245whose name does not start with the host triplet. If you think this
4246configuration is useful to you, please write to autoconf@gnu.org." >&5
4247echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4248whose name does not start with the host triplet. If you think this
4249configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004250ac_tool_warned=yes ;;
4251esac
4252 RANLIB=$ac_ct_RANLIB
4253 fi
4254else
4255 RANLIB="$ac_cv_prog_RANLIB"
4256fi
4257
4258
4259for ac_prog in ar aal
4260do
4261 # Extract the first word of "$ac_prog", so it can be a program name with args.
4262set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004263{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004265if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004266 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004267else
4268 if test -n "$AR"; then
4269 ac_cv_prog_AR="$AR" # Let the user override the test.
4270else
4271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4272for as_dir in $PATH
4273do
4274 IFS=$as_save_IFS
4275 test -z "$as_dir" && as_dir=.
4276 for ac_exec_ext in '' $ac_executable_extensions; do
4277 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4278 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004279 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004280 break 2
4281 fi
4282done
4283done
4284IFS=$as_save_IFS
4285
4286fi
4287fi
4288AR=$ac_cv_prog_AR
4289if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004290 { echo "$as_me:$LINENO: result: $AR" >&5
4291echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004293 { echo "$as_me:$LINENO: result: no" >&5
4294echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004295fi
4296
4297
4298 test -n "$AR" && break
4299done
4300test -n "$AR" || AR="ar"
4301
4302
4303# tweak ARFLAGS only if the user didn't set it on the command line
4304
4305if test -z "$ARFLAGS"
4306then
4307 ARFLAGS="rc"
4308fi
4309
4310
4311# Extract the first word of "svnversion", so it can be a program name with args.
4312set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004313{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4314echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004315if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004316 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004317else
4318 if test -n "$SVNVERSION"; then
4319 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4320else
4321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4322for as_dir in $PATH
4323do
4324 IFS=$as_save_IFS
4325 test -z "$as_dir" && as_dir=.
4326 for ac_exec_ext in '' $ac_executable_extensions; do
4327 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4328 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004329 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004330 break 2
4331 fi
4332done
4333done
4334IFS=$as_save_IFS
4335
4336 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4337fi
4338fi
4339SVNVERSION=$ac_cv_prog_SVNVERSION
4340if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004341 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4342echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004344 { echo "$as_me:$LINENO: result: no" >&5
4345echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004346fi
4347
4348
4349if test $SVNVERSION = found
4350then
4351 SVNVERSION="svnversion \$(srcdir)"
4352else
4353 SVNVERSION="echo Unversioned directory"
4354fi
4355
4356case $MACHDEP in
4357bsdos*|hp*|HP*)
4358 # install -d does not work on BSDI or HP-UX
4359 if test -z "$INSTALL"
4360 then
4361 INSTALL="${srcdir}/install-sh -c"
4362 fi
4363esac
4364ac_aux_dir=
4365for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4366 if test -f "$ac_dir/install-sh"; then
4367 ac_aux_dir=$ac_dir
4368 ac_install_sh="$ac_aux_dir/install-sh -c"
4369 break
4370 elif test -f "$ac_dir/install.sh"; then
4371 ac_aux_dir=$ac_dir
4372 ac_install_sh="$ac_aux_dir/install.sh -c"
4373 break
4374 elif test -f "$ac_dir/shtool"; then
4375 ac_aux_dir=$ac_dir
4376 ac_install_sh="$ac_aux_dir/shtool install -c"
4377 break
4378 fi
4379done
4380if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004381 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4382echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004383 { (exit 1); exit 1; }; }
4384fi
4385
4386# These three variables are undocumented and unsupported,
4387# and are intended to be withdrawn in a future Autoconf release.
4388# They can cause serious problems if a builder's source tree is in a directory
4389# whose full name contains unusual characters.
4390ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4391ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4392ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4393
4394
4395# Find a good install program. We prefer a C program (faster),
4396# so one script is as good as another. But avoid the broken or
4397# incompatible versions:
4398# SysV /etc/install, /usr/sbin/install
4399# SunOS /usr/etc/install
4400# IRIX /sbin/install
4401# AIX /bin/install
4402# AmigaOS /C/install, which installs bootblocks on floppy discs
4403# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4404# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4405# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4406# OS/2's system install, which has a completely different semantic
4407# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004408{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4409echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004410if test -z "$INSTALL"; then
4411if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004412 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004413else
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415for as_dir in $PATH
4416do
4417 IFS=$as_save_IFS
4418 test -z "$as_dir" && as_dir=.
4419 # Account for people who put trailing slashes in PATH elements.
4420case $as_dir/ in
4421 ./ | .// | /cC/* | \
4422 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4423 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4424 /usr/ucb/* ) ;;
4425 *)
4426 # OSF1 and SCO ODT 3.0 have their own names for install.
4427 # Don't use installbsd from OSF since it installs stuff as root
4428 # by default.
4429 for ac_prog in ginstall scoinst install; do
4430 for ac_exec_ext in '' $ac_executable_extensions; do
4431 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4432 if test $ac_prog = install &&
4433 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4434 # AIX install. It has an incompatible calling convention.
4435 :
4436 elif test $ac_prog = install &&
4437 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4438 # program-specific install script used by HP pwplus--don't use.
4439 :
4440 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004441 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4442 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004443 fi
4444 fi
4445 done
4446 done
4447 ;;
4448esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004449done
4450IFS=$as_save_IFS
4451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004452
4453fi
4454 if test "${ac_cv_path_install+set}" = set; then
4455 INSTALL=$ac_cv_path_install
4456 else
4457 # As a last resort, use the slow shell script. Don't cache a
4458 # value for INSTALL within a source directory, because that will
4459 # break other packages using the cache if that directory is
4460 # removed, or if the value is a relative name.
4461 INSTALL=$ac_install_sh
4462 fi
4463fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4465echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466
4467# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4468# It thinks the first close brace ends the variable substitution.
4469test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4470
4471test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4472
4473test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4474
4475
4476# Not every filesystem supports hard links
4477
4478if test -z "$LN" ; then
4479 case $ac_sys_system in
4480 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004481 *) LN=ln;;
4482 esac
4483fi
4484
4485# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004486{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4487echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004488
4489# Check whether --with-pydebug was given.
4490if test "${with_pydebug+set}" = set; then
4491 withval=$with_pydebug;
4492if test "$withval" != no
4493then
4494
4495cat >>confdefs.h <<\_ACEOF
4496#define Py_DEBUG 1
4497_ACEOF
4498
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004499 { echo "$as_me:$LINENO: result: yes" >&5
4500echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004501 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004502else { echo "$as_me:$LINENO: result: no" >&5
4503echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004504fi
4505else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004506 { echo "$as_me:$LINENO: result: no" >&5
4507echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004508fi
4509
4510
4511# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4512# merged with this chunk of code?
4513
4514# Optimizer/debugger flags
4515# ------------------------
4516# (The following bit of code is complicated enough - please keep things
4517# indented properly. Just pretend you're editing Python code. ;-)
4518
4519# There are two parallel sets of case statements below, one that checks to
4520# see if OPT was set and one that does BASECFLAGS setting based upon
4521# compiler and platform. BASECFLAGS tweaks need to be made even if the
4522# user set OPT.
4523
4524# tweak OPT based on compiler and platform, only if the user didn't set
4525# it on the command line
4526
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00004527if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004528then
4529 case $GCC in
4530 yes)
4531 if test "$CC" != 'g++' ; then
4532 STRICT_PROTO="-Wstrict-prototypes"
4533 fi
4534 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4535 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4536 WRAP="-fwrapv"
4537 fi
4538 case $ac_cv_prog_cc_g in
4539 yes)
4540 if test "$Py_DEBUG" = 'true' ; then
4541 # Optimization messes up debuggers, so turn it off for
4542 # debug builds.
4543 OPT="-g -Wall $STRICT_PROTO"
4544 else
4545 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4546 fi
4547 ;;
4548 *)
4549 OPT="-O3 -Wall $STRICT_PROTO"
4550 ;;
4551 esac
4552 case $ac_sys_system in
4553 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4554 ;;
4555 esac
4556 ;;
4557
4558 *)
4559 OPT="-O"
4560 ;;
4561 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004562fi
4563
4564
4565
4566# The -arch flags for universal builds on OSX
4567UNIVERSAL_ARCH_FLAGS=
4568
4569
4570# tweak BASECFLAGS based on compiler and platform
4571case $GCC in
4572yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004573 # Python doesn't violate C99 aliasing rules, but older versions of
4574 # GCC produce warnings for legal Python code. Enable
4575 # -fno-strict-aliasing on versions of GCC that support but produce
4576 # warnings. See Issue3326
4577 { echo "$as_me:$LINENO: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
4578echo $ECHO_N "checking whether $CC accepts and needs -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004579 ac_save_cc="$CC"
4580 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004581 save_CFLAGS="$CFLAGS"
4582 if test "${ac_cv_no_strict_aliasing+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004583 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004584else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004585 cat >conftest.$ac_ext <<_ACEOF
4586/* confdefs.h. */
4587_ACEOF
4588cat confdefs.h >>conftest.$ac_ext
4589cat >>conftest.$ac_ext <<_ACEOF
4590/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004591
4592int
4593main ()
4594{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004595int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004596 ;
4597 return 0;
4598}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004599_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004600rm -f conftest.$ac_objext
4601if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004602case "(($ac_try" in
4603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4604 *) ac_try_echo=$ac_try;;
4605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004607 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004608 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004609 grep -v '^ *+' conftest.er1 >conftest.err
4610 rm -f conftest.er1
4611 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004613 (exit $ac_status); } && {
4614 test -z "$ac_c_werror_flag" ||
4615 test ! -s conftest.err
4616 } && test -s conftest.$ac_objext; then
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004617 CC="$ac_save_cc -fstrict-aliasing"
4618 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
4619 cat >conftest.$ac_ext <<_ACEOF
4620/* confdefs.h. */
4621_ACEOF
4622cat confdefs.h >>conftest.$ac_ext
4623cat >>conftest.$ac_ext <<_ACEOF
4624/* end confdefs.h. */
4625
4626int
4627main ()
4628{
4629void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
4630 ;
4631 return 0;
4632}
4633_ACEOF
4634rm -f conftest.$ac_objext
4635if { (ac_try="$ac_compile"
4636case "(($ac_try" in
4637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4638 *) ac_try_echo=$ac_try;;
4639esac
4640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4641 (eval "$ac_compile") 2>conftest.er1
4642 ac_status=$?
4643 grep -v '^ *+' conftest.er1 >conftest.err
4644 rm -f conftest.er1
4645 cat conftest.err >&5
4646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4647 (exit $ac_status); } && {
4648 test -z "$ac_c_werror_flag" ||
4649 test ! -s conftest.err
4650 } && test -s conftest.$ac_objext; then
4651 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004653 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654sed 's/^/| /' conftest.$ac_ext >&5
4655
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004656 ac_cv_no_strict_aliasing=yes
4657fi
4658
4659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4660else
4661 echo "$as_me: failed program was:" >&5
4662sed 's/^/| /' conftest.$ac_ext >&5
4663
4664 ac_cv_no_strict_aliasing=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665fi
4666
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004668fi
4669
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004670 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004671 CC="$ac_save_cc"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00004672 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing" >&5
4673echo "${ECHO_T}$ac_cv_no_strict_aliasing" >&6; }
4674 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675 then
4676 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4677 fi
4678
4679 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4680 # support. Without this, treatment of subnormals doesn't follow
4681 # the standard.
4682 case $ac_sys_machine in
4683 alpha*)
4684 BASECFLAGS="$BASECFLAGS -mieee"
4685 ;;
4686 esac
4687
4688 case $ac_sys_system in
4689 SCO_SV*)
4690 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4691 ;;
4692 # is there any other compiler on Darwin besides gcc?
4693 Darwin*)
4694 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4695 # used to be here, but non-Apple gcc doesn't accept them.
4696
4697
4698 if test "${enable_universalsdk}"; then
4699 UNIVERSAL_ARCH_FLAGS=""
4700 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4701 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4702 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00004703 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4705 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004706 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004707 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004708
4709 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4710 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004711 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004712 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004713
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004714 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4715 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004716 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004717 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004718
4719 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4720 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004721 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004722 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004725 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4726echo "$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 +00004727 { (exit 1); exit 1; }; }
4728
4729 fi
4730
4731
4732 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4733 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4734 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4735 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4736 fi
4737 fi
4738
4739 # Calculate the right deployment target for this build.
4740 #
4741 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4742 if test ${cur_target} '>' 10.2; then
4743 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004744 if test ${enable_universalsdk}; then
4745 if test "${UNIVERSAL_ARCHS}" = "all"; then
4746 # Ensure that the default platform for a
4747 # 4-way universal build is OSX 10.5,
4748 # that's the first OS release where
4749 # 4-way builds make sense.
4750 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004751
4752 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4753 cur_target='10.5'
4754
4755 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4756 cur_target='10.5'
4757
4758 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4759 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004760 fi
4761 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004762 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004763 # On Intel macs default to a deployment
4764 # target of 10.4, that's the first OSX
4765 # release with Intel support.
4766 cur_target="10.4"
4767 fi
4768 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769 fi
4770 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4771
4772 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4773 # environment with a value that is the same as what we'll use
4774 # in the Makefile to ensure that we'll get the same compiler
4775 # environment during configure and build time.
4776 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4777 export MACOSX_DEPLOYMENT_TARGET
4778 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4779
4780 ;;
4781 OSF*)
4782 BASECFLAGS="$BASECFLAGS -mieee"
4783 ;;
4784 esac
4785 ;;
4786
4787*)
4788 case $ac_sys_system in
4789 OpenUNIX*|UnixWare*)
4790 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4791 ;;
4792 OSF*)
4793 BASECFLAGS="$BASECFLAGS -ieee -std"
4794 ;;
4795 SCO_SV*)
4796 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4797 ;;
4798 esac
4799 ;;
4800esac
4801
4802if test "$Py_DEBUG" = 'true'; then
4803 :
4804else
4805 OPT="-DNDEBUG $OPT"
4806fi
4807
4808if test "$ac_arch_flags"
4809then
4810 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4811fi
4812
4813# disable check for icc since it seems to pass, but generates a warning
4814if test "$CC" = icc
4815then
4816 ac_cv_opt_olimit_ok=no
4817fi
4818
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004819{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4820echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004822 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823else
4824 ac_save_cc="$CC"
4825CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004826cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827/* confdefs.h. */
4828_ACEOF
4829cat confdefs.h >>conftest.$ac_ext
4830cat >>conftest.$ac_ext <<_ACEOF
4831/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004832
4833int
4834main ()
4835{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004836int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004837 ;
4838 return 0;
4839}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004841rm -f conftest.$ac_objext
4842if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843case "(($ac_try" in
4844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4845 *) ac_try_echo=$ac_try;;
4846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004848 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004849 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004850 grep -v '^ *+' conftest.er1 >conftest.err
4851 rm -f conftest.er1
4852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004854 (exit $ac_status); } && {
4855 test -z "$ac_c_werror_flag" ||
4856 test ! -s conftest.err
4857 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858 ac_cv_opt_olimit_ok=yes
4859else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004860 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004861sed 's/^/| /' conftest.$ac_ext >&5
4862
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004863 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004864fi
4865
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867CC="$ac_save_cc"
4868fi
4869
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004870{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4871echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872if test $ac_cv_opt_olimit_ok = yes; then
4873 case $ac_sys_system in
4874 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4875 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4876 # environment?
4877 Darwin*)
4878 ;;
4879 *)
4880 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4881 ;;
4882 esac
4883else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004884 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4885echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004886 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004887 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888else
4889 ac_save_cc="$CC"
4890 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891 cat >conftest.$ac_ext <<_ACEOF
4892/* confdefs.h. */
4893_ACEOF
4894cat confdefs.h >>conftest.$ac_ext
4895cat >>conftest.$ac_ext <<_ACEOF
4896/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004897
4898int
4899main ()
4900{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004901int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004902 ;
4903 return 0;
4904}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004906rm -f conftest.$ac_objext
4907if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908case "(($ac_try" in
4909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4910 *) ac_try_echo=$ac_try;;
4911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004913 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004915 grep -v '^ *+' conftest.er1 >conftest.err
4916 rm -f conftest.er1
4917 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004919 (exit $ac_status); } && {
4920 test -z "$ac_c_werror_flag" ||
4921 test ! -s conftest.err
4922 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923 ac_cv_olimit_ok=yes
4924else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004925 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926sed 's/^/| /' conftest.$ac_ext >&5
4927
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004928 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929fi
4930
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932 CC="$ac_save_cc"
4933fi
4934
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004935 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4936echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937 if test $ac_cv_olimit_ok = yes; then
4938 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4939 fi
4940fi
4941
4942# Check whether GCC supports PyArg_ParseTuple format
4943if test "$GCC" = "yes"
4944then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004945 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4946echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 save_CFLAGS=$CFLAGS
4948 CFLAGS="$CFLAGS -Werror"
4949 cat >conftest.$ac_ext <<_ACEOF
4950/* confdefs.h. */
4951_ACEOF
4952cat confdefs.h >>conftest.$ac_ext
4953cat >>conftest.$ac_ext <<_ACEOF
4954/* end confdefs.h. */
4955
4956 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4957
4958int
4959main ()
4960{
4961
4962 ;
4963 return 0;
4964}
4965_ACEOF
4966rm -f conftest.$ac_objext
4967if { (ac_try="$ac_compile"
4968case "(($ac_try" in
4969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4970 *) ac_try_echo=$ac_try;;
4971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 (eval "$ac_compile") 2>conftest.er1
4974 ac_status=$?
4975 grep -v '^ *+' conftest.er1 >conftest.err
4976 rm -f conftest.er1
4977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979 (exit $ac_status); } && {
4980 test -z "$ac_c_werror_flag" ||
4981 test ! -s conftest.err
4982 } && test -s conftest.$ac_objext; then
4983
4984cat >>confdefs.h <<\_ACEOF
4985#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4986_ACEOF
4987
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004988 { echo "$as_me:$LINENO: result: yes" >&5
4989echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004991 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992sed 's/^/| /' conftest.$ac_ext >&5
4993
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004994 { echo "$as_me:$LINENO: result: no" >&5
4995echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996
4997fi
4998
4999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5000 CFLAGS=$save_CFLAGS
5001fi
5002
5003# On some compilers, pthreads are available without further options
5004# (e.g. MacOS X). On some of these systems, the compiler will not
5005# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5006# So we have to see first whether pthreads are available without
5007# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005008{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5009echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005011 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012else
5013 if test "$cross_compiling" = yes; then
5014 ac_cv_pthread_is_default=no
5015else
5016 cat >conftest.$ac_ext <<_ACEOF
5017/* confdefs.h. */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h. */
5022
5023#include <pthread.h>
5024
5025void* routine(void* p){return NULL;}
5026
5027int main(){
5028 pthread_t p;
5029 if(pthread_create(&p,NULL,routine,NULL)!=0)
5030 return 1;
5031 (void)pthread_detach(p);
5032 return 0;
5033}
5034
5035_ACEOF
5036rm -f conftest$ac_exeext
5037if { (ac_try="$ac_link"
5038case "(($ac_try" in
5039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5040 *) ac_try_echo=$ac_try;;
5041esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043 (eval "$ac_link") 2>&5
5044 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5047 { (case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052 (eval "$ac_try") 2>&5
5053 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 (exit $ac_status); }; }; then
5056
5057 ac_cv_pthread_is_default=yes
5058 ac_cv_kthread=no
5059 ac_cv_pthread=no
5060
5061else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005062 echo "$as_me: program exited with status $ac_status" >&5
5063echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064sed 's/^/| /' conftest.$ac_ext >&5
5065
5066( exit $ac_status )
5067ac_cv_pthread_is_default=no
5068fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5070fi
5071
5072
5073
5074fi
5075
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005076{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5077echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078
5079
5080if test $ac_cv_pthread_is_default = yes
5081then
5082 ac_cv_kpthread=no
5083else
5084# -Kpthread, if available, provides the right #defines
5085# and linker options to make pthread_create available
5086# Some compilers won't report that they do not support -Kpthread,
5087# so we need to run a program to see whether it really made the
5088# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005089{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5090echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005091if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005092 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093else
5094 ac_save_cc="$CC"
5095CC="$CC -Kpthread"
5096if test "$cross_compiling" = yes; then
5097 ac_cv_kpthread=no
5098else
5099 cat >conftest.$ac_ext <<_ACEOF
5100/* confdefs.h. */
5101_ACEOF
5102cat confdefs.h >>conftest.$ac_ext
5103cat >>conftest.$ac_ext <<_ACEOF
5104/* end confdefs.h. */
5105
5106#include <pthread.h>
5107
5108void* routine(void* p){return NULL;}
5109
5110int main(){
5111 pthread_t p;
5112 if(pthread_create(&p,NULL,routine,NULL)!=0)
5113 return 1;
5114 (void)pthread_detach(p);
5115 return 0;
5116}
5117
5118_ACEOF
5119rm -f conftest$ac_exeext
5120if { (ac_try="$ac_link"
5121case "(($ac_try" in
5122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5123 *) ac_try_echo=$ac_try;;
5124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126 (eval "$ac_link") 2>&5
5127 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5130 { (case "(($ac_try" in
5131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5132 *) ac_try_echo=$ac_try;;
5133esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135 (eval "$ac_try") 2>&5
5136 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138 (exit $ac_status); }; }; then
5139 ac_cv_kpthread=yes
5140else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005141 echo "$as_me: program exited with status $ac_status" >&5
5142echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143sed 's/^/| /' conftest.$ac_ext >&5
5144
5145( exit $ac_status )
5146ac_cv_kpthread=no
5147fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5149fi
5150
5151
5152CC="$ac_save_cc"
5153fi
5154
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005155{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5156echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005157fi
5158
5159if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5160then
5161# -Kthread, if available, provides the right #defines
5162# and linker options to make pthread_create available
5163# Some compilers won't report that they do not support -Kthread,
5164# so we need to run a program to see whether it really made the
5165# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005166{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5167echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005169 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170else
5171 ac_save_cc="$CC"
5172CC="$CC -Kthread"
5173if test "$cross_compiling" = yes; then
5174 ac_cv_kthread=no
5175else
5176 cat >conftest.$ac_ext <<_ACEOF
5177/* confdefs.h. */
5178_ACEOF
5179cat confdefs.h >>conftest.$ac_ext
5180cat >>conftest.$ac_ext <<_ACEOF
5181/* end confdefs.h. */
5182
5183#include <pthread.h>
5184
5185void* routine(void* p){return NULL;}
5186
5187int main(){
5188 pthread_t p;
5189 if(pthread_create(&p,NULL,routine,NULL)!=0)
5190 return 1;
5191 (void)pthread_detach(p);
5192 return 0;
5193}
5194
5195_ACEOF
5196rm -f conftest$ac_exeext
5197if { (ac_try="$ac_link"
5198case "(($ac_try" in
5199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5200 *) ac_try_echo=$ac_try;;
5201esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005203 (eval "$ac_link") 2>&5
5204 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005206 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5207 { (case "(($ac_try" in
5208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5209 *) ac_try_echo=$ac_try;;
5210esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212 (eval "$ac_try") 2>&5
5213 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215 (exit $ac_status); }; }; then
5216 ac_cv_kthread=yes
5217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005218 echo "$as_me: program exited with status $ac_status" >&5
5219echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220sed 's/^/| /' conftest.$ac_ext >&5
5221
5222( exit $ac_status )
5223ac_cv_kthread=no
5224fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5226fi
5227
5228
5229CC="$ac_save_cc"
5230fi
5231
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005232{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5233echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234fi
5235
5236if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5237then
5238# -pthread, if available, provides the right #defines
5239# and linker options to make pthread_create available
5240# Some compilers won't report that they do not support -pthread,
5241# so we need to run a program to see whether it really made the
5242# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005243{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5244echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005246 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247else
5248 ac_save_cc="$CC"
5249CC="$CC -pthread"
5250if test "$cross_compiling" = yes; then
5251 ac_cv_pthread=no
5252else
5253 cat >conftest.$ac_ext <<_ACEOF
5254/* confdefs.h. */
5255_ACEOF
5256cat confdefs.h >>conftest.$ac_ext
5257cat >>conftest.$ac_ext <<_ACEOF
5258/* end confdefs.h. */
5259
5260#include <pthread.h>
5261
5262void* routine(void* p){return NULL;}
5263
5264int main(){
5265 pthread_t p;
5266 if(pthread_create(&p,NULL,routine,NULL)!=0)
5267 return 1;
5268 (void)pthread_detach(p);
5269 return 0;
5270}
5271
5272_ACEOF
5273rm -f conftest$ac_exeext
5274if { (ac_try="$ac_link"
5275case "(($ac_try" in
5276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5277 *) ac_try_echo=$ac_try;;
5278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280 (eval "$ac_link") 2>&5
5281 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5284 { (case "(($ac_try" in
5285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5286 *) ac_try_echo=$ac_try;;
5287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289 (eval "$ac_try") 2>&5
5290 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292 (exit $ac_status); }; }; then
5293 ac_cv_pthread=yes
5294else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005295 echo "$as_me: program exited with status $ac_status" >&5
5296echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297sed 's/^/| /' conftest.$ac_ext >&5
5298
5299( exit $ac_status )
5300ac_cv_pthread=no
5301fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5303fi
5304
5305
5306CC="$ac_save_cc"
5307fi
5308
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005309{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5310echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311fi
5312
5313# If we have set a CC compiler flag for thread support then
5314# check if it works for CXX, too.
5315ac_cv_cxx_thread=no
5316if test ! -z "$CXX"
5317then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005318{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5319echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320ac_save_cxx="$CXX"
5321
5322if test "$ac_cv_kpthread" = "yes"
5323then
5324 CXX="$CXX -Kpthread"
5325 ac_cv_cxx_thread=yes
5326elif test "$ac_cv_kthread" = "yes"
5327then
5328 CXX="$CXX -Kthread"
5329 ac_cv_cxx_thread=yes
5330elif test "$ac_cv_pthread" = "yes"
5331then
5332 CXX="$CXX -pthread"
5333 ac_cv_cxx_thread=yes
5334fi
5335
5336if test $ac_cv_cxx_thread = yes
5337then
5338 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5339 $CXX -c conftest.$ac_ext 2>&5
5340 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5341 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5342 then
5343 ac_cv_cxx_thread=yes
5344 else
5345 ac_cv_cxx_thread=no
5346 fi
5347 rm -fr conftest*
5348fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005349{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5350echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351fi
5352CXX="$ac_save_cxx"
5353
5354
5355# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005356{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5357echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005359 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360else
5361 cat >conftest.$ac_ext <<_ACEOF
5362/* confdefs.h. */
5363_ACEOF
5364cat confdefs.h >>conftest.$ac_ext
5365cat >>conftest.$ac_ext <<_ACEOF
5366/* end confdefs.h. */
5367#include <stdlib.h>
5368#include <stdarg.h>
5369#include <string.h>
5370#include <float.h>
5371
5372int
5373main ()
5374{
5375
5376 ;
5377 return 0;
5378}
5379_ACEOF
5380rm -f conftest.$ac_objext
5381if { (ac_try="$ac_compile"
5382case "(($ac_try" in
5383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5384 *) ac_try_echo=$ac_try;;
5385esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387 (eval "$ac_compile") 2>conftest.er1
5388 ac_status=$?
5389 grep -v '^ *+' conftest.er1 >conftest.err
5390 rm -f conftest.er1
5391 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 (exit $ac_status); } && {
5394 test -z "$ac_c_werror_flag" ||
5395 test ! -s conftest.err
5396 } && test -s conftest.$ac_objext; then
5397 ac_cv_header_stdc=yes
5398else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005399 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400sed 's/^/| /' conftest.$ac_ext >&5
5401
5402 ac_cv_header_stdc=no
5403fi
5404
5405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5406
5407if test $ac_cv_header_stdc = yes; then
5408 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5409 cat >conftest.$ac_ext <<_ACEOF
5410/* confdefs.h. */
5411_ACEOF
5412cat confdefs.h >>conftest.$ac_ext
5413cat >>conftest.$ac_ext <<_ACEOF
5414/* end confdefs.h. */
5415#include <string.h>
5416
5417_ACEOF
5418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5419 $EGREP "memchr" >/dev/null 2>&1; then
5420 :
5421else
5422 ac_cv_header_stdc=no
5423fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00005424rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425
5426fi
5427
5428if test $ac_cv_header_stdc = yes; then
5429 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5430 cat >conftest.$ac_ext <<_ACEOF
5431/* confdefs.h. */
5432_ACEOF
5433cat confdefs.h >>conftest.$ac_ext
5434cat >>conftest.$ac_ext <<_ACEOF
5435/* end confdefs.h. */
5436#include <stdlib.h>
5437
5438_ACEOF
5439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5440 $EGREP "free" >/dev/null 2>&1; then
5441 :
5442else
5443 ac_cv_header_stdc=no
5444fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00005445rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
5447fi
5448
5449if test $ac_cv_header_stdc = yes; then
5450 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5451 if test "$cross_compiling" = yes; then
5452 :
5453else
5454 cat >conftest.$ac_ext <<_ACEOF
5455/* confdefs.h. */
5456_ACEOF
5457cat confdefs.h >>conftest.$ac_ext
5458cat >>conftest.$ac_ext <<_ACEOF
5459/* end confdefs.h. */
5460#include <ctype.h>
5461#include <stdlib.h>
5462#if ((' ' & 0x0FF) == 0x020)
5463# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5464# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5465#else
5466# define ISLOWER(c) \
5467 (('a' <= (c) && (c) <= 'i') \
5468 || ('j' <= (c) && (c) <= 'r') \
5469 || ('s' <= (c) && (c) <= 'z'))
5470# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5471#endif
5472
5473#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5474int
5475main ()
5476{
5477 int i;
5478 for (i = 0; i < 256; i++)
5479 if (XOR (islower (i), ISLOWER (i))
5480 || toupper (i) != TOUPPER (i))
5481 return 2;
5482 return 0;
5483}
5484_ACEOF
5485rm -f conftest$ac_exeext
5486if { (ac_try="$ac_link"
5487case "(($ac_try" in
5488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5489 *) ac_try_echo=$ac_try;;
5490esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492 (eval "$ac_link") 2>&5
5493 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5496 { (case "(($ac_try" in
5497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5498 *) ac_try_echo=$ac_try;;
5499esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501 (eval "$ac_try") 2>&5
5502 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504 (exit $ac_status); }; }; then
5505 :
5506else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005507 echo "$as_me: program exited with status $ac_status" >&5
5508echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509sed 's/^/| /' conftest.$ac_ext >&5
5510
5511( exit $ac_status )
5512ac_cv_header_stdc=no
5513fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5515fi
5516
5517
5518fi
5519fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005520{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5521echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522if test $ac_cv_header_stdc = yes; then
5523
5524cat >>confdefs.h <<\_ACEOF
5525#define STDC_HEADERS 1
5526_ACEOF
5527
5528fi
5529
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005530# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5541 inttypes.h stdint.h unistd.h
5542do
5543as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5544{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5545echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5546if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5547 echo $ECHO_N "(cached) $ECHO_C" >&6
5548else
5549 cat >conftest.$ac_ext <<_ACEOF
5550/* confdefs.h. */
5551_ACEOF
5552cat confdefs.h >>conftest.$ac_ext
5553cat >>conftest.$ac_ext <<_ACEOF
5554/* end confdefs.h. */
5555$ac_includes_default
5556
5557#include <$ac_header>
5558_ACEOF
5559rm -f conftest.$ac_objext
5560if { (ac_try="$ac_compile"
5561case "(($ac_try" in
5562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5563 *) ac_try_echo=$ac_try;;
5564esac
5565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5566 (eval "$ac_compile") 2>conftest.er1
5567 ac_status=$?
5568 grep -v '^ *+' conftest.er1 >conftest.err
5569 rm -f conftest.er1
5570 cat conftest.err >&5
5571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572 (exit $ac_status); } && {
5573 test -z "$ac_c_werror_flag" ||
5574 test ! -s conftest.err
5575 } && test -s conftest.$ac_objext; then
5576 eval "$as_ac_Header=yes"
5577else
5578 echo "$as_me: failed program was:" >&5
5579sed 's/^/| /' conftest.$ac_ext >&5
5580
5581 eval "$as_ac_Header=no"
5582fi
5583
5584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5585fi
5586ac_res=`eval echo '${'$as_ac_Header'}'`
5587 { echo "$as_me:$LINENO: result: $ac_res" >&5
5588echo "${ECHO_T}$ac_res" >&6; }
5589if test `eval echo '${'$as_ac_Header'}'` = yes; then
5590 cat >>confdefs.h <<_ACEOF
5591#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5592_ACEOF
5593
5594fi
5595
5596done
5597
5598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599
Martin v. Löwis11437992002-04-12 09:54:03 +00005600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
Anthony Baxter8a560de2004-10-13 15:30:56 +00005635
Martin v. Löwisc3001752005-01-23 09:27:24 +00005636
Martin v. Löwis11017b12006-01-14 18:12:57 +00005637
Thomas Wouters477c8d52006-05-27 19:21:47 +00005638
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005639
5640
5641
5642
5643
5644
5645
5646
Thomas Wouters89f507f2006-12-13 04:49:30 +00005647
Christian Heimes043d6f62008-01-07 17:19:16 +00005648
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005649
5650
Christian Heimesbbe741d2008-03-28 10:53:29 +00005651
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005652
Ronald Oussoren755740f2010-02-07 19:56:39 +00005653
5654
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005655for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5656fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005657ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005658shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005659unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005660sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5661sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005662sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005663sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005664sys/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 +00005665sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005666bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005667do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005668as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005669if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005670 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5671echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005672if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005674fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005675ac_res=`eval echo '${'$as_ac_Header'}'`
5676 { echo "$as_me:$LINENO: result: $ac_res" >&5
5677echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005678else
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005680{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5681echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005683/* confdefs.h. */
5684_ACEOF
5685cat confdefs.h >>conftest.$ac_ext
5686cat >>conftest.$ac_ext <<_ACEOF
5687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005688$ac_includes_default
5689#include <$ac_header>
5690_ACEOF
5691rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005692if { (ac_try="$ac_compile"
5693case "(($ac_try" in
5694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5695 *) ac_try_echo=$ac_try;;
5696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005698 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005700 grep -v '^ *+' conftest.er1 >conftest.err
5701 rm -f conftest.er1
5702 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005704 (exit $ac_status); } && {
5705 test -z "$ac_c_werror_flag" ||
5706 test ! -s conftest.err
5707 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005708 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005709else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005711sed 's/^/| /' conftest.$ac_ext >&5
5712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005713 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005715
5716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005717{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5718echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005719
5720# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005721{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5722echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005723cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005724/* confdefs.h. */
5725_ACEOF
5726cat confdefs.h >>conftest.$ac_ext
5727cat >>conftest.$ac_ext <<_ACEOF
5728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005729#include <$ac_header>
5730_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005731if { (ac_try="$ac_cpp conftest.$ac_ext"
5732case "(($ac_try" in
5733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5734 *) ac_try_echo=$ac_try;;
5735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005737 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005739 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005740 rm -f conftest.er1
5741 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005743 (exit $ac_status); } >/dev/null && {
5744 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5745 test ! -s conftest.err
5746 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005747 ac_header_preproc=yes
5748else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005750sed 's/^/| /' conftest.$ac_ext >&5
5751
Martin v. Löwis11437992002-04-12 09:54:03 +00005752 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005754
Martin v. Löwis11437992002-04-12 09:54:03 +00005755rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005756{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5757echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005758
5759# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005760case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5761 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005762 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5763echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5765echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005766 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005767 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005768 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005769 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5770echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5771 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5772echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5773 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5774echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5775 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5776echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5777 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5778echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5779 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5780echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005782## -------------------------------------- ##
5783## Report this to http://bugs.python.org/ ##
5784## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005785_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005786 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005787 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005788esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005789{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5790echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005791if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005792 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005793else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005794 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005795fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005796ac_res=`eval echo '${'$as_ac_Header'}'`
5797 { echo "$as_me:$LINENO: result: $ac_res" >&5
5798echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005799
5800fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005801if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005803#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005804_ACEOF
5805
5806fi
5807
Guido van Rossum627b2d71993-12-24 10:39:16 +00005808done
5809
Martin v. Löwis11437992002-04-12 09:54:03 +00005810
5811
5812
5813
5814
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005815ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005816for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005817 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5818{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5819echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005820if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005822else
Martin v. Löwis11437992002-04-12 09:54:03 +00005823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005824/* confdefs.h. */
5825_ACEOF
5826cat confdefs.h >>conftest.$ac_ext
5827cat >>conftest.$ac_ext <<_ACEOF
5828/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005829#include <sys/types.h>
5830#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005831
Martin v. Löwis11437992002-04-12 09:54:03 +00005832int
5833main ()
5834{
5835if ((DIR *) 0)
5836return 0;
5837 ;
5838 return 0;
5839}
5840_ACEOF
5841rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005842if { (ac_try="$ac_compile"
5843case "(($ac_try" in
5844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5845 *) ac_try_echo=$ac_try;;
5846esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005850 grep -v '^ *+' conftest.er1 >conftest.err
5851 rm -f conftest.er1
5852 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005854 (exit $ac_status); } && {
5855 test -z "$ac_c_werror_flag" ||
5856 test ! -s conftest.err
5857 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005858 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005859else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005861sed 's/^/| /' conftest.$ac_ext >&5
5862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005863 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005865
5866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005867fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005868ac_res=`eval echo '${'$as_ac_Header'}'`
5869 { echo "$as_me:$LINENO: result: $ac_res" >&5
5870echo "${ECHO_T}$ac_res" >&6; }
5871if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005872 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005873#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005874_ACEOF
5875
5876ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005879done
5880# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5881if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005882 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5883echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005884if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886else
Martin v. Löwis11437992002-04-12 09:54:03 +00005887 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005889/* confdefs.h. */
5890_ACEOF
5891cat confdefs.h >>conftest.$ac_ext
5892cat >>conftest.$ac_ext <<_ACEOF
5893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005895/* Override any GCC internal prototype to avoid an error.
5896 Use char because int might match the return type of a GCC
5897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005898#ifdef __cplusplus
5899extern "C"
5900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005901char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005902int
5903main ()
5904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005905return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005906 ;
5907 return 0;
5908}
5909_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005910for ac_lib in '' dir; do
5911 if test -z "$ac_lib"; then
5912 ac_res="none required"
5913 else
5914 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005915 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005916 fi
5917 rm -f conftest.$ac_objext conftest$ac_exeext
5918if { (ac_try="$ac_link"
5919case "(($ac_try" in
5920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921 *) ac_try_echo=$ac_try;;
5922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005924 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005925 ac_status=$?
5926 grep -v '^ *+' conftest.er1 >conftest.err
5927 rm -f conftest.er1
5928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005930 (exit $ac_status); } && {
5931 test -z "$ac_c_werror_flag" ||
5932 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005933 } && test -s conftest$ac_exeext &&
5934 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005935 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005937 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005938sed 's/^/| /' conftest.$ac_ext >&5
5939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940
Thomas Wouters477c8d52006-05-27 19:21:47 +00005941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942
5943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5944 conftest$ac_exeext
5945 if test "${ac_cv_search_opendir+set}" = set; then
5946 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005948done
5949if test "${ac_cv_search_opendir+set}" = set; then
5950 :
5951else
5952 ac_cv_search_opendir=no
5953fi
5954rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005955LIBS=$ac_func_search_save_LIBS
5956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005957{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5958echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005959ac_res=$ac_cv_search_opendir
5960if test "$ac_res" != no; then
5961 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005962
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005964
Michael W. Hudson54241132001-12-07 15:38:26 +00005965else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005966 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5967echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005968if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005970else
5971 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005972cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005973/* confdefs.h. */
5974_ACEOF
5975cat confdefs.h >>conftest.$ac_ext
5976cat >>conftest.$ac_ext <<_ACEOF
5977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005979/* Override any GCC internal prototype to avoid an error.
5980 Use char because int might match the return type of a GCC
5981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005982#ifdef __cplusplus
5983extern "C"
5984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005985char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005986int
5987main ()
5988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005989return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005990 ;
5991 return 0;
5992}
5993_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005994for ac_lib in '' x; do
5995 if test -z "$ac_lib"; then
5996 ac_res="none required"
5997 else
5998 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006000 fi
6001 rm -f conftest.$ac_objext conftest$ac_exeext
6002if { (ac_try="$ac_link"
6003case "(($ac_try" in
6004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6005 *) ac_try_echo=$ac_try;;
6006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006008 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006009 ac_status=$?
6010 grep -v '^ *+' conftest.er1 >conftest.err
6011 rm -f conftest.er1
6012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006014 (exit $ac_status); } && {
6015 test -z "$ac_c_werror_flag" ||
6016 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006017 } && test -s conftest$ac_exeext &&
6018 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006019 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006021 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006022sed 's/^/| /' conftest.$ac_ext >&5
6023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006024
Thomas Wouters477c8d52006-05-27 19:21:47 +00006025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006026
6027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6028 conftest$ac_exeext
6029 if test "${ac_cv_search_opendir+set}" = set; then
6030 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006032done
6033if test "${ac_cv_search_opendir+set}" = set; then
6034 :
6035else
6036 ac_cv_search_opendir=no
6037fi
6038rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006039LIBS=$ac_func_search_save_LIBS
6040fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006041{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6042echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006043ac_res=$ac_cv_search_opendir
6044if test "$ac_res" != no; then
6045 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006047fi
6048
6049fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006050
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006051{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6052echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006054 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055else
6056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006057/* confdefs.h. */
6058_ACEOF
6059cat confdefs.h >>conftest.$ac_ext
6060cat >>conftest.$ac_ext <<_ACEOF
6061/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006062#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063int
6064main ()
6065{
6066return makedev(0, 0);
6067 ;
6068 return 0;
6069}
6070_ACEOF
6071rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072if { (ac_try="$ac_link"
6073case "(($ac_try" in
6074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6075 *) ac_try_echo=$ac_try;;
6076esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006078 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006080 grep -v '^ *+' conftest.er1 >conftest.err
6081 rm -f conftest.er1
6082 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006084 (exit $ac_status); } && {
6085 test -z "$ac_c_werror_flag" ||
6086 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006087 } && test -s conftest$ac_exeext &&
6088 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089 ac_cv_header_sys_types_h_makedev=yes
6090else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006092sed 's/^/| /' conftest.$ac_ext >&5
6093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006094 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096
6097rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006098 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099
6100fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006101{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6102echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103
6104if test $ac_cv_header_sys_types_h_makedev = no; then
6105if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006106 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6107echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006109 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006111{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6112echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113else
6114 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006115{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6116echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006118/* confdefs.h. */
6119_ACEOF
6120cat confdefs.h >>conftest.$ac_ext
6121cat >>conftest.$ac_ext <<_ACEOF
6122/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123$ac_includes_default
6124#include <sys/mkdev.h>
6125_ACEOF
6126rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127if { (ac_try="$ac_compile"
6128case "(($ac_try" in
6129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6130 *) ac_try_echo=$ac_try;;
6131esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006135 grep -v '^ *+' conftest.er1 >conftest.err
6136 rm -f conftest.er1
6137 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139 (exit $ac_status); } && {
6140 test -z "$ac_c_werror_flag" ||
6141 test ! -s conftest.err
6142 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143 ac_header_compiler=yes
6144else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006146sed 's/^/| /' conftest.$ac_ext >&5
6147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006148 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150
6151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006152{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6153echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154
6155# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006156{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6157echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006159/* confdefs.h. */
6160_ACEOF
6161cat confdefs.h >>conftest.$ac_ext
6162cat >>conftest.$ac_ext <<_ACEOF
6163/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164#include <sys/mkdev.h>
6165_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166if { (ac_try="$ac_cpp conftest.$ac_ext"
6167case "(($ac_try" in
6168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6169 *) ac_try_echo=$ac_try;;
6170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006174 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175 rm -f conftest.er1
6176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178 (exit $ac_status); } >/dev/null && {
6179 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6180 test ! -s conftest.err
6181 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182 ac_header_preproc=yes
6183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006185sed 's/^/| /' conftest.$ac_ext >&5
6186
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187 ac_header_preproc=no
6188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006191{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6192echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193
6194# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006195case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6196 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006201 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006202 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006203 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006204 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6205echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6206 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6207echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6208 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6209echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6210 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6211echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6212 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6213echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6214 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6215echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006217## -------------------------------------- ##
6218## Report this to http://bugs.python.org/ ##
6219## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006220_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006222 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006224{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6225echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006227 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228else
6229 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6230fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006231{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6232echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006233
6234fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006235if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236
6237cat >>confdefs.h <<\_ACEOF
6238#define MAJOR_IN_MKDEV 1
6239_ACEOF
6240
6241fi
6242
6243
6244
6245 if test $ac_cv_header_sys_mkdev_h = no; then
6246 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006247 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6248echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006250 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006252{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6253echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254else
6255 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006256{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6257echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006259/* confdefs.h. */
6260_ACEOF
6261cat confdefs.h >>conftest.$ac_ext
6262cat >>conftest.$ac_ext <<_ACEOF
6263/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264$ac_includes_default
6265#include <sys/sysmacros.h>
6266_ACEOF
6267rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006268if { (ac_try="$ac_compile"
6269case "(($ac_try" in
6270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6271 *) ac_try_echo=$ac_try;;
6272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006276 grep -v '^ *+' conftest.er1 >conftest.err
6277 rm -f conftest.er1
6278 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006280 (exit $ac_status); } && {
6281 test -z "$ac_c_werror_flag" ||
6282 test ! -s conftest.err
6283 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284 ac_header_compiler=yes
6285else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006287sed 's/^/| /' conftest.$ac_ext >&5
6288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006289 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006291
6292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006293{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6294echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295
6296# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006297{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6298echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006300/* confdefs.h. */
6301_ACEOF
6302cat confdefs.h >>conftest.$ac_ext
6303cat >>conftest.$ac_ext <<_ACEOF
6304/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305#include <sys/sysmacros.h>
6306_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006307if { (ac_try="$ac_cpp conftest.$ac_ext"
6308case "(($ac_try" in
6309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6310 *) ac_try_echo=$ac_try;;
6311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006313 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006315 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316 rm -f conftest.er1
6317 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006319 (exit $ac_status); } >/dev/null && {
6320 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6321 test ! -s conftest.err
6322 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006323 ac_header_preproc=yes
6324else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006326sed 's/^/| /' conftest.$ac_ext >&5
6327
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006328 ac_header_preproc=no
6329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006330
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006332{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6333echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334
6335# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006336case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6337 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006342 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006343 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006344 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006345 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6346echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6347 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6348echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6349 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6350echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6351 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6352echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6353 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6354echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6355 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6356echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006357 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006358## -------------------------------------- ##
6359## Report this to http://bugs.python.org/ ##
6360## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006361_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006363 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006365{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6366echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006368 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369else
6370 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6371fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006372{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6373echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006374
6375fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006376if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006377
6378cat >>confdefs.h <<\_ACEOF
6379#define MAJOR_IN_SYSMACROS 1
6380_ACEOF
6381
6382fi
6383
6384
6385 fi
6386fi
6387
Michael W. Hudson54241132001-12-07 15:38:26 +00006388
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006389# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006390
6391for ac_header in term.h
6392do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006393as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6394{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6395echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006396if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006398else
6399 cat >conftest.$ac_ext <<_ACEOF
6400/* confdefs.h. */
6401_ACEOF
6402cat confdefs.h >>conftest.$ac_ext
6403cat >>conftest.$ac_ext <<_ACEOF
6404/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006405
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006406#ifdef HAVE_CURSES_H
6407#include <curses.h>
6408#endif
6409
6410
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006411#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006412_ACEOF
6413rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414if { (ac_try="$ac_compile"
6415case "(($ac_try" in
6416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6417 *) ac_try_echo=$ac_try;;
6418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421 ac_status=$?
6422 grep -v '^ *+' conftest.er1 >conftest.err
6423 rm -f conftest.er1
6424 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006426 (exit $ac_status); } && {
6427 test -z "$ac_c_werror_flag" ||
6428 test ! -s conftest.err
6429 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006430 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006431else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006432 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006433sed 's/^/| /' conftest.$ac_ext >&5
6434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006435 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006437
6438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006439fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006440ac_res=`eval echo '${'$as_ac_Header'}'`
6441 { echo "$as_me:$LINENO: result: $ac_res" >&5
6442echo "${ECHO_T}$ac_res" >&6; }
6443if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006444 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006445#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006446_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006447
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006448fi
6449
6450done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006451
6452
Martin v. Löwis11017b12006-01-14 18:12:57 +00006453# On Linux, netlink.h requires asm/types.h
6454
6455for ac_header in linux/netlink.h
6456do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006457as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6458{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6459echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006460if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006462else
6463 cat >conftest.$ac_ext <<_ACEOF
6464/* confdefs.h. */
6465_ACEOF
6466cat confdefs.h >>conftest.$ac_ext
6467cat >>conftest.$ac_ext <<_ACEOF
6468/* end confdefs.h. */
6469
6470#ifdef HAVE_ASM_TYPES_H
6471#include <asm/types.h>
6472#endif
6473#ifdef HAVE_SYS_SOCKET_H
6474#include <sys/socket.h>
6475#endif
6476
6477
6478#include <$ac_header>
6479_ACEOF
6480rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006481if { (ac_try="$ac_compile"
6482case "(($ac_try" in
6483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6484 *) ac_try_echo=$ac_try;;
6485esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488 ac_status=$?
6489 grep -v '^ *+' conftest.er1 >conftest.err
6490 rm -f conftest.er1
6491 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006493 (exit $ac_status); } && {
6494 test -z "$ac_c_werror_flag" ||
6495 test ! -s conftest.err
6496 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006497 eval "$as_ac_Header=yes"
6498else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006499 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006500sed 's/^/| /' conftest.$ac_ext >&5
6501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006502 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006504
6505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006506fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006507ac_res=`eval echo '${'$as_ac_Header'}'`
6508 { echo "$as_me:$LINENO: result: $ac_res" >&5
6509echo "${ECHO_T}$ac_res" >&6; }
6510if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006511 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006512#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006513_ACEOF
6514
6515fi
6516
6517done
6518
6519
Guido van Rossum627b2d71993-12-24 10:39:16 +00006520# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006521was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006522{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6523echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006524cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006525/* confdefs.h. */
6526_ACEOF
6527cat confdefs.h >>conftest.$ac_ext
6528cat >>conftest.$ac_ext <<_ACEOF
6529/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006531
6532_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006534 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006535 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536else
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538
6539cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006540#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006541_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006542
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006543
Guido van Rossum627b2d71993-12-24 10:39:16 +00006544fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00006545rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006546
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006547{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6548echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006549
Neal Norwitz11690112002-07-30 01:08:28 +00006550# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006551{ echo "$as_me:$LINENO: checking for makedev" >&5
6552echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006553cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006554/* confdefs.h. */
6555_ACEOF
6556cat confdefs.h >>conftest.$ac_ext
6557cat >>conftest.$ac_ext <<_ACEOF
6558/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006559#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006560int
6561main ()
6562{
6563 makedev(0, 0)
6564 ;
6565 return 0;
6566}
6567_ACEOF
6568rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006569if { (ac_try="$ac_link"
6570case "(($ac_try" in
6571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6572 *) ac_try_echo=$ac_try;;
6573esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006575 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006577 grep -v '^ *+' conftest.er1 >conftest.err
6578 rm -f conftest.er1
6579 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006581 (exit $ac_status); } && {
6582 test -z "$ac_c_werror_flag" ||
6583 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006584 } && test -s conftest$ac_exeext &&
6585 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006586 ac_cv_has_makedev=yes
6587else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006589sed 's/^/| /' conftest.$ac_ext >&5
6590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006591 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006593
6594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006595 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006596if test "$ac_cv_has_makedev" = "no"; then
6597 # we didn't link, try if _OSF_SOURCE will allow us to link
6598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006599/* confdefs.h. */
6600_ACEOF
6601cat confdefs.h >>conftest.$ac_ext
6602cat >>conftest.$ac_ext <<_ACEOF
6603/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006604
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006605#define _OSF_SOURCE 1
6606#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006607
Neal Norwitz11690112002-07-30 01:08:28 +00006608int
6609main ()
6610{
6611 makedev(0, 0)
6612 ;
6613 return 0;
6614}
6615_ACEOF
6616rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006617if { (ac_try="$ac_link"
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_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006632 } && test -s conftest$ac_exeext &&
6633 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006634 ac_cv_has_makedev=yes
6635else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006637sed 's/^/| /' conftest.$ac_ext >&5
6638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006639 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006641
6642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006643 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006644 if test "$ac_cv_has_makedev" = "yes"; then
6645
6646cat >>confdefs.h <<\_ACEOF
6647#define _OSF_SOURCE 1
6648_ACEOF
6649
6650 fi
6651fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006652{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6653echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006654if test "$ac_cv_has_makedev" = "yes"; then
6655
6656cat >>confdefs.h <<\_ACEOF
6657#define HAVE_MAKEDEV 1
6658_ACEOF
6659
6660fi
6661
Martin v. Löwis399a6892002-10-04 10:22:02 +00006662# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6663# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6664# defined, but the compiler does not support pragma redefine_extname,
6665# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6666# structures (such as rlimit64) without declaring them. As a
6667# work-around, disable LFS on such configurations
6668
6669use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006670{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6671echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006673/* confdefs.h. */
6674_ACEOF
6675cat confdefs.h >>conftest.$ac_ext
6676cat >>conftest.$ac_ext <<_ACEOF
6677/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006678
6679#define _LARGEFILE_SOURCE 1
6680#define _FILE_OFFSET_BITS 64
6681#include <sys/resource.h>
6682
Martin v. Löwis399a6892002-10-04 10:22:02 +00006683int
6684main ()
6685{
6686struct rlimit foo;
6687 ;
6688 return 0;
6689}
6690_ACEOF
6691rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006692if { (ac_try="$ac_compile"
6693case "(($ac_try" in
6694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6695 *) ac_try_echo=$ac_try;;
6696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006698 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006700 grep -v '^ *+' conftest.er1 >conftest.err
6701 rm -f conftest.er1
6702 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006704 (exit $ac_status); } && {
6705 test -z "$ac_c_werror_flag" ||
6706 test ! -s conftest.err
6707 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006708 sol_lfs_bug=no
6709else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006711sed 's/^/| /' conftest.$ac_ext >&5
6712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006713 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006715
6716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006717{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6718echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006719if test "$sol_lfs_bug" = "yes"; then
6720 use_lfs=no
6721fi
6722
6723if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006724# Two defines needed to enable largefile support on various platforms
6725# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006726
Martin v. Löwis11437992002-04-12 09:54:03 +00006727cat >>confdefs.h <<\_ACEOF
6728#define _LARGEFILE_SOURCE 1
6729_ACEOF
6730
6731
6732cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006733#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006734_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006735
Martin v. Löwis399a6892002-10-04 10:22:02 +00006736fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006737
Guido van Rossum84e7b241996-08-19 21:59:00 +00006738# Add some code to confdefs.h so that the test for off_t works on SCO
6739cat >> confdefs.h <<\EOF
6740#if defined(SCO_DS)
6741#undef _OFF_T
6742#endif
6743EOF
6744
Guido van Rossumef2255b2000-03-10 22:30:29 +00006745# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006746{ echo "$as_me:$LINENO: checking for mode_t" >&5
6747echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006748if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006749 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006750else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006751 cat >conftest.$ac_ext <<_ACEOF
6752/* confdefs.h. */
6753_ACEOF
6754cat confdefs.h >>conftest.$ac_ext
6755cat >>conftest.$ac_ext <<_ACEOF
6756/* end confdefs.h. */
6757$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006758typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006759int
6760main ()
6761{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006762if ((ac__type_new_ *) 0)
6763 return 0;
6764if (sizeof (ac__type_new_))
6765 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006766 ;
6767 return 0;
6768}
6769_ACEOF
6770rm -f conftest.$ac_objext
6771if { (ac_try="$ac_compile"
6772case "(($ac_try" in
6773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6774 *) ac_try_echo=$ac_try;;
6775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006777 (eval "$ac_compile") 2>conftest.er1
6778 ac_status=$?
6779 grep -v '^ *+' conftest.er1 >conftest.err
6780 rm -f conftest.er1
6781 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006783 (exit $ac_status); } && {
6784 test -z "$ac_c_werror_flag" ||
6785 test ! -s conftest.err
6786 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006787 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006788else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006790sed 's/^/| /' conftest.$ac_ext >&5
6791
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006792 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794
6795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006796fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006797{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6798echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6799if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006800 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006801else
Martin v. Löwis11437992002-04-12 09:54:03 +00006802
6803cat >>confdefs.h <<_ACEOF
6804#define mode_t int
6805_ACEOF
6806
6807fi
6808
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006809{ echo "$as_me:$LINENO: checking for off_t" >&5
6810echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006811if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006812 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006813else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006814 cat >conftest.$ac_ext <<_ACEOF
6815/* confdefs.h. */
6816_ACEOF
6817cat confdefs.h >>conftest.$ac_ext
6818cat >>conftest.$ac_ext <<_ACEOF
6819/* end confdefs.h. */
6820$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006821typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006822int
6823main ()
6824{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006825if ((ac__type_new_ *) 0)
6826 return 0;
6827if (sizeof (ac__type_new_))
6828 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006829 ;
6830 return 0;
6831}
6832_ACEOF
6833rm -f conftest.$ac_objext
6834if { (ac_try="$ac_compile"
6835case "(($ac_try" in
6836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6837 *) ac_try_echo=$ac_try;;
6838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006840 (eval "$ac_compile") 2>conftest.er1
6841 ac_status=$?
6842 grep -v '^ *+' conftest.er1 >conftest.err
6843 rm -f conftest.er1
6844 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006846 (exit $ac_status); } && {
6847 test -z "$ac_c_werror_flag" ||
6848 test ! -s conftest.err
6849 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006850 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006853sed 's/^/| /' conftest.$ac_ext >&5
6854
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006855 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857
6858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006859fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006860{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6861echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6862if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006863 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006864else
Martin v. Löwis11437992002-04-12 09:54:03 +00006865
6866cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006867#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006868_ACEOF
6869
6870fi
6871
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006872{ echo "$as_me:$LINENO: checking for pid_t" >&5
6873echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006874if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006875 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006876else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006877 cat >conftest.$ac_ext <<_ACEOF
6878/* confdefs.h. */
6879_ACEOF
6880cat confdefs.h >>conftest.$ac_ext
6881cat >>conftest.$ac_ext <<_ACEOF
6882/* end confdefs.h. */
6883$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006884typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006885int
6886main ()
6887{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006888if ((ac__type_new_ *) 0)
6889 return 0;
6890if (sizeof (ac__type_new_))
6891 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006892 ;
6893 return 0;
6894}
6895_ACEOF
6896rm -f conftest.$ac_objext
6897if { (ac_try="$ac_compile"
6898case "(($ac_try" in
6899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6900 *) ac_try_echo=$ac_try;;
6901esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006903 (eval "$ac_compile") 2>conftest.er1
6904 ac_status=$?
6905 grep -v '^ *+' conftest.er1 >conftest.err
6906 rm -f conftest.er1
6907 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006909 (exit $ac_status); } && {
6910 test -z "$ac_c_werror_flag" ||
6911 test ! -s conftest.err
6912 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006913 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006914else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006916sed 's/^/| /' conftest.$ac_ext >&5
6917
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006918 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920
6921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006922fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006923{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6924echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6925if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006926 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006927else
Martin v. Löwis11437992002-04-12 09:54:03 +00006928
6929cat >>confdefs.h <<_ACEOF
6930#define pid_t int
6931_ACEOF
6932
6933fi
6934
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006935{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6936echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006937if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006938 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006939else
6940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006941/* confdefs.h. */
6942_ACEOF
6943cat confdefs.h >>conftest.$ac_ext
6944cat >>conftest.$ac_ext <<_ACEOF
6945/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006946#include <sys/types.h>
6947#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949int
6950main ()
6951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006953 ;
6954 return 0;
6955}
6956_ACEOF
6957rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006958if { (ac_try="$ac_compile"
6959case "(($ac_try" in
6960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6961 *) ac_try_echo=$ac_try;;
6962esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006966 grep -v '^ *+' conftest.er1 >conftest.err
6967 rm -f conftest.er1
6968 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970 (exit $ac_status); } && {
6971 test -z "$ac_c_werror_flag" ||
6972 test ! -s conftest.err
6973 } && test -s conftest.$ac_objext; then
6974 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006975else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006977sed 's/^/| /' conftest.$ac_ext >&5
6978
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006979 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006981
6982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006984{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6985echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006986
Martin v. Löwis11437992002-04-12 09:54:03 +00006987cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006989_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006990
Michael W. Hudson54241132001-12-07 15:38:26 +00006991
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006992{ echo "$as_me:$LINENO: checking for size_t" >&5
6993echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006994if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006995 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006997 cat >conftest.$ac_ext <<_ACEOF
6998/* confdefs.h. */
6999_ACEOF
7000cat confdefs.h >>conftest.$ac_ext
7001cat >>conftest.$ac_ext <<_ACEOF
7002/* end confdefs.h. */
7003$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007004typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007005int
7006main ()
7007{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007008if ((ac__type_new_ *) 0)
7009 return 0;
7010if (sizeof (ac__type_new_))
7011 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007012 ;
7013 return 0;
7014}
7015_ACEOF
7016rm -f conftest.$ac_objext
7017if { (ac_try="$ac_compile"
7018case "(($ac_try" in
7019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7020 *) ac_try_echo=$ac_try;;
7021esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007023 (eval "$ac_compile") 2>conftest.er1
7024 ac_status=$?
7025 grep -v '^ *+' conftest.er1 >conftest.err
7026 rm -f conftest.er1
7027 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007029 (exit $ac_status); } && {
7030 test -z "$ac_c_werror_flag" ||
7031 test ! -s conftest.err
7032 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007033 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007034else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007036sed 's/^/| /' conftest.$ac_ext >&5
7037
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007038 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040
7041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007042fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007043{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7044echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7045if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007046 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007047else
Martin v. Löwis11437992002-04-12 09:54:03 +00007048
7049cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007050#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007051_ACEOF
7052
7053fi
7054
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007055{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7056echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007057if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007058 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007059else
7060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007061/* confdefs.h. */
7062_ACEOF
7063cat confdefs.h >>conftest.$ac_ext
7064cat >>conftest.$ac_ext <<_ACEOF
7065/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007067
7068_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007070 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007071 ac_cv_type_uid_t=yes
7072else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073 ac_cv_type_uid_t=no
7074fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00007075rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007076
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007077fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007078{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7079echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007080if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007081
Martin v. Löwis11437992002-04-12 09:54:03 +00007082cat >>confdefs.h <<\_ACEOF
7083#define uid_t int
7084_ACEOF
7085
7086
7087cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007088#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007089_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007090
7091fi
7092
Mark Dickinsonbd792642009-03-18 20:06:12 +00007093
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007094 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7095echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007096if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007097 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007098else
7099 ac_cv_c_uint32_t=no
7100 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7101 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7102 cat >conftest.$ac_ext <<_ACEOF
7103/* confdefs.h. */
7104_ACEOF
7105cat confdefs.h >>conftest.$ac_ext
7106cat >>conftest.$ac_ext <<_ACEOF
7107/* end confdefs.h. */
7108$ac_includes_default
7109int
7110main ()
7111{
7112static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7113test_array [0] = 0
7114
7115 ;
7116 return 0;
7117}
7118_ACEOF
7119rm -f conftest.$ac_objext
7120if { (ac_try="$ac_compile"
7121case "(($ac_try" in
7122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7123 *) ac_try_echo=$ac_try;;
7124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007126 (eval "$ac_compile") 2>conftest.er1
7127 ac_status=$?
7128 grep -v '^ *+' conftest.er1 >conftest.err
7129 rm -f conftest.er1
7130 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007132 (exit $ac_status); } && {
7133 test -z "$ac_c_werror_flag" ||
7134 test ! -s conftest.err
7135 } && test -s conftest.$ac_objext; then
7136 case $ac_type in
7137 uint32_t) ac_cv_c_uint32_t=yes ;;
7138 *) ac_cv_c_uint32_t=$ac_type ;;
7139esac
7140
7141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007142 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007143sed 's/^/| /' conftest.$ac_ext >&5
7144
7145
7146fi
7147
7148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7149 test "$ac_cv_c_uint32_t" != no && break
7150 done
7151fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007152{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7153echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007154 case $ac_cv_c_uint32_t in #(
7155 no|yes) ;; #(
7156 *)
7157
7158cat >>confdefs.h <<\_ACEOF
7159#define _UINT32_T 1
7160_ACEOF
7161
7162
7163cat >>confdefs.h <<_ACEOF
7164#define uint32_t $ac_cv_c_uint32_t
7165_ACEOF
7166;;
7167 esac
7168
7169
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007170 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7171echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007172if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007173 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007174else
7175 ac_cv_c_uint64_t=no
7176 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7177 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7178 cat >conftest.$ac_ext <<_ACEOF
7179/* confdefs.h. */
7180_ACEOF
7181cat confdefs.h >>conftest.$ac_ext
7182cat >>conftest.$ac_ext <<_ACEOF
7183/* end confdefs.h. */
7184$ac_includes_default
7185int
7186main ()
7187{
7188static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7189test_array [0] = 0
7190
7191 ;
7192 return 0;
7193}
7194_ACEOF
7195rm -f conftest.$ac_objext
7196if { (ac_try="$ac_compile"
7197case "(($ac_try" in
7198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7199 *) ac_try_echo=$ac_try;;
7200esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007202 (eval "$ac_compile") 2>conftest.er1
7203 ac_status=$?
7204 grep -v '^ *+' conftest.er1 >conftest.err
7205 rm -f conftest.er1
7206 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007208 (exit $ac_status); } && {
7209 test -z "$ac_c_werror_flag" ||
7210 test ! -s conftest.err
7211 } && test -s conftest.$ac_objext; then
7212 case $ac_type in
7213 uint64_t) ac_cv_c_uint64_t=yes ;;
7214 *) ac_cv_c_uint64_t=$ac_type ;;
7215esac
7216
7217else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007218 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007219sed 's/^/| /' conftest.$ac_ext >&5
7220
7221
7222fi
7223
7224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7225 test "$ac_cv_c_uint64_t" != no && break
7226 done
7227fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007228{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7229echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007230 case $ac_cv_c_uint64_t in #(
7231 no|yes) ;; #(
7232 *)
7233
7234cat >>confdefs.h <<\_ACEOF
7235#define _UINT64_T 1
7236_ACEOF
7237
7238
7239cat >>confdefs.h <<_ACEOF
7240#define uint64_t $ac_cv_c_uint64_t
7241_ACEOF
7242;;
7243 esac
7244
7245
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007246 { echo "$as_me:$LINENO: checking for int32_t" >&5
7247echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007248if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007249 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007250else
7251 ac_cv_c_int32_t=no
7252 for ac_type in 'int32_t' 'int' 'long int' \
7253 'long long int' 'short int' 'signed char'; do
7254 cat >conftest.$ac_ext <<_ACEOF
7255/* confdefs.h. */
7256_ACEOF
7257cat confdefs.h >>conftest.$ac_ext
7258cat >>conftest.$ac_ext <<_ACEOF
7259/* end confdefs.h. */
7260$ac_includes_default
7261int
7262main ()
7263{
7264static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7265test_array [0] = 0
7266
7267 ;
7268 return 0;
7269}
7270_ACEOF
7271rm -f conftest.$ac_objext
7272if { (ac_try="$ac_compile"
7273case "(($ac_try" in
7274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7275 *) ac_try_echo=$ac_try;;
7276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007278 (eval "$ac_compile") 2>conftest.er1
7279 ac_status=$?
7280 grep -v '^ *+' conftest.er1 >conftest.err
7281 rm -f conftest.er1
7282 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007284 (exit $ac_status); } && {
7285 test -z "$ac_c_werror_flag" ||
7286 test ! -s conftest.err
7287 } && test -s conftest.$ac_objext; then
7288 cat >conftest.$ac_ext <<_ACEOF
7289/* confdefs.h. */
7290_ACEOF
7291cat confdefs.h >>conftest.$ac_ext
7292cat >>conftest.$ac_ext <<_ACEOF
7293/* end confdefs.h. */
7294$ac_includes_default
7295int
7296main ()
7297{
7298static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007299 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007300test_array [0] = 0
7301
7302 ;
7303 return 0;
7304}
7305_ACEOF
7306rm -f conftest.$ac_objext
7307if { (ac_try="$ac_compile"
7308case "(($ac_try" in
7309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7310 *) ac_try_echo=$ac_try;;
7311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007313 (eval "$ac_compile") 2>conftest.er1
7314 ac_status=$?
7315 grep -v '^ *+' conftest.er1 >conftest.err
7316 rm -f conftest.er1
7317 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007319 (exit $ac_status); } && {
7320 test -z "$ac_c_werror_flag" ||
7321 test ! -s conftest.err
7322 } && test -s conftest.$ac_objext; then
7323 :
7324else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007325 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007326sed 's/^/| /' conftest.$ac_ext >&5
7327
7328 case $ac_type in
7329 int32_t) ac_cv_c_int32_t=yes ;;
7330 *) ac_cv_c_int32_t=$ac_type ;;
7331esac
7332
7333fi
7334
7335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7336else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007337 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007338sed 's/^/| /' conftest.$ac_ext >&5
7339
7340
7341fi
7342
7343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7344 test "$ac_cv_c_int32_t" != no && break
7345 done
7346fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007347{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7348echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007349 case $ac_cv_c_int32_t in #(
7350 no|yes) ;; #(
7351 *)
7352
7353cat >>confdefs.h <<_ACEOF
7354#define int32_t $ac_cv_c_int32_t
7355_ACEOF
7356;;
7357 esac
7358
7359
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007360 { echo "$as_me:$LINENO: checking for int64_t" >&5
7361echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007362if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007363 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007364else
7365 ac_cv_c_int64_t=no
7366 for ac_type in 'int64_t' 'int' 'long int' \
7367 'long long int' 'short int' 'signed char'; do
7368 cat >conftest.$ac_ext <<_ACEOF
7369/* confdefs.h. */
7370_ACEOF
7371cat confdefs.h >>conftest.$ac_ext
7372cat >>conftest.$ac_ext <<_ACEOF
7373/* end confdefs.h. */
7374$ac_includes_default
7375int
7376main ()
7377{
7378static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7379test_array [0] = 0
7380
7381 ;
7382 return 0;
7383}
7384_ACEOF
7385rm -f conftest.$ac_objext
7386if { (ac_try="$ac_compile"
7387case "(($ac_try" in
7388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7389 *) ac_try_echo=$ac_try;;
7390esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007392 (eval "$ac_compile") 2>conftest.er1
7393 ac_status=$?
7394 grep -v '^ *+' conftest.er1 >conftest.err
7395 rm -f conftest.er1
7396 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007398 (exit $ac_status); } && {
7399 test -z "$ac_c_werror_flag" ||
7400 test ! -s conftest.err
7401 } && test -s conftest.$ac_objext; then
7402 cat >conftest.$ac_ext <<_ACEOF
7403/* confdefs.h. */
7404_ACEOF
7405cat confdefs.h >>conftest.$ac_ext
7406cat >>conftest.$ac_ext <<_ACEOF
7407/* end confdefs.h. */
7408$ac_includes_default
7409int
7410main ()
7411{
7412static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007413 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007414test_array [0] = 0
7415
7416 ;
7417 return 0;
7418}
7419_ACEOF
7420rm -f conftest.$ac_objext
7421if { (ac_try="$ac_compile"
7422case "(($ac_try" in
7423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7424 *) ac_try_echo=$ac_try;;
7425esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007427 (eval "$ac_compile") 2>conftest.er1
7428 ac_status=$?
7429 grep -v '^ *+' conftest.er1 >conftest.err
7430 rm -f conftest.er1
7431 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007433 (exit $ac_status); } && {
7434 test -z "$ac_c_werror_flag" ||
7435 test ! -s conftest.err
7436 } && test -s conftest.$ac_objext; then
7437 :
7438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007439 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007440sed 's/^/| /' conftest.$ac_ext >&5
7441
7442 case $ac_type in
7443 int64_t) ac_cv_c_int64_t=yes ;;
7444 *) ac_cv_c_int64_t=$ac_type ;;
7445esac
7446
7447fi
7448
7449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007451 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007452sed 's/^/| /' conftest.$ac_ext >&5
7453
7454
7455fi
7456
7457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7458 test "$ac_cv_c_int64_t" != no && break
7459 done
7460fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007461{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7462echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007463 case $ac_cv_c_int64_t in #(
7464 no|yes) ;; #(
7465 *)
7466
7467cat >>confdefs.h <<_ACEOF
7468#define int64_t $ac_cv_c_int64_t
7469_ACEOF
7470;;
7471 esac
7472
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007473{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7474echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007475if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007476 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007477else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007478 cat >conftest.$ac_ext <<_ACEOF
7479/* confdefs.h. */
7480_ACEOF
7481cat confdefs.h >>conftest.$ac_ext
7482cat >>conftest.$ac_ext <<_ACEOF
7483/* end confdefs.h. */
7484$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007485typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007486int
7487main ()
7488{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007489if ((ac__type_new_ *) 0)
7490 return 0;
7491if (sizeof (ac__type_new_))
7492 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007493 ;
7494 return 0;
7495}
7496_ACEOF
7497rm -f conftest.$ac_objext
7498if { (ac_try="$ac_compile"
7499case "(($ac_try" in
7500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7501 *) ac_try_echo=$ac_try;;
7502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007504 (eval "$ac_compile") 2>conftest.er1
7505 ac_status=$?
7506 grep -v '^ *+' conftest.er1 >conftest.err
7507 rm -f conftest.er1
7508 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007510 (exit $ac_status); } && {
7511 test -z "$ac_c_werror_flag" ||
7512 test ! -s conftest.err
7513 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007514 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007516 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007517sed 's/^/| /' conftest.$ac_ext >&5
7518
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007519 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007521
7522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007523fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007524{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7525echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7526if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007527
7528cat >>confdefs.h <<\_ACEOF
7529#define HAVE_SSIZE_T 1
7530_ACEOF
7531
7532fi
7533
Jack Jansendd19cf82001-12-06 22:36:17 +00007534
Michael W. Hudson54241132001-12-07 15:38:26 +00007535# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007536# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007537{ echo "$as_me:$LINENO: checking for int" >&5
7538echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7539if test "${ac_cv_type_int+set}" = set; then
7540 echo $ECHO_N "(cached) $ECHO_C" >&6
7541else
7542 cat >conftest.$ac_ext <<_ACEOF
7543/* confdefs.h. */
7544_ACEOF
7545cat confdefs.h >>conftest.$ac_ext
7546cat >>conftest.$ac_ext <<_ACEOF
7547/* end confdefs.h. */
7548$ac_includes_default
7549typedef int ac__type_new_;
7550int
7551main ()
7552{
7553if ((ac__type_new_ *) 0)
7554 return 0;
7555if (sizeof (ac__type_new_))
7556 return 0;
7557 ;
7558 return 0;
7559}
7560_ACEOF
7561rm -f conftest.$ac_objext
7562if { (ac_try="$ac_compile"
7563case "(($ac_try" in
7564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7565 *) ac_try_echo=$ac_try;;
7566esac
7567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7568 (eval "$ac_compile") 2>conftest.er1
7569 ac_status=$?
7570 grep -v '^ *+' conftest.er1 >conftest.err
7571 rm -f conftest.er1
7572 cat conftest.err >&5
7573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7574 (exit $ac_status); } && {
7575 test -z "$ac_c_werror_flag" ||
7576 test ! -s conftest.err
7577 } && test -s conftest.$ac_objext; then
7578 ac_cv_type_int=yes
7579else
7580 echo "$as_me: failed program was:" >&5
7581sed 's/^/| /' conftest.$ac_ext >&5
7582
7583 ac_cv_type_int=no
7584fi
7585
7586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7587fi
7588{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7589echo "${ECHO_T}$ac_cv_type_int" >&6; }
7590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591# The cast to long int works around a bug in the HP C Compiler
7592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7594# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007595{ echo "$as_me:$LINENO: checking size of int" >&5
7596echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007597if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007598 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007599else
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 if test "$cross_compiling" = yes; then
7601 # Depending upon the size, compute the lo and hi bounds.
7602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007603/* confdefs.h. */
7604_ACEOF
7605cat confdefs.h >>conftest.$ac_ext
7606cat >>conftest.$ac_ext <<_ACEOF
7607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007608$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007609 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007610int
7611main ()
7612{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007613static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007614test_array [0] = 0
7615
7616 ;
7617 return 0;
7618}
7619_ACEOF
7620rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007621if { (ac_try="$ac_compile"
7622case "(($ac_try" in
7623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7624 *) ac_try_echo=$ac_try;;
7625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007629 grep -v '^ *+' conftest.er1 >conftest.err
7630 rm -f conftest.er1
7631 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633 (exit $ac_status); } && {
7634 test -z "$ac_c_werror_flag" ||
7635 test ! -s conftest.err
7636 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007637 ac_lo=0 ac_mid=0
7638 while :; do
7639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007640/* confdefs.h. */
7641_ACEOF
7642cat confdefs.h >>conftest.$ac_ext
7643cat >>conftest.$ac_ext <<_ACEOF
7644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007645$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007646 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007647int
7648main ()
7649{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007650static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007651test_array [0] = 0
7652
7653 ;
7654 return 0;
7655}
7656_ACEOF
7657rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007658if { (ac_try="$ac_compile"
7659case "(($ac_try" in
7660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7661 *) ac_try_echo=$ac_try;;
7662esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007666 grep -v '^ *+' conftest.er1 >conftest.err
7667 rm -f conftest.er1
7668 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 (exit $ac_status); } && {
7671 test -z "$ac_c_werror_flag" ||
7672 test ! -s conftest.err
7673 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 ac_hi=$ac_mid; break
7675else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007677sed 's/^/| /' conftest.$ac_ext >&5
7678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679 ac_lo=`expr $ac_mid + 1`
7680 if test $ac_lo -le $ac_mid; then
7681 ac_lo= ac_hi=
7682 break
7683 fi
7684 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686
7687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007688 done
7689else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007691sed 's/^/| /' conftest.$ac_ext >&5
7692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007694/* confdefs.h. */
7695_ACEOF
7696cat confdefs.h >>conftest.$ac_ext
7697cat >>conftest.$ac_ext <<_ACEOF
7698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007699$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007700 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007701int
7702main ()
7703{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007704static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007705test_array [0] = 0
7706
7707 ;
7708 return 0;
7709}
7710_ACEOF
7711rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712if { (ac_try="$ac_compile"
7713case "(($ac_try" in
7714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7715 *) ac_try_echo=$ac_try;;
7716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007720 grep -v '^ *+' conftest.er1 >conftest.err
7721 rm -f conftest.er1
7722 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007724 (exit $ac_status); } && {
7725 test -z "$ac_c_werror_flag" ||
7726 test ! -s conftest.err
7727 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 ac_hi=-1 ac_mid=-1
7729 while :; do
7730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007731/* confdefs.h. */
7732_ACEOF
7733cat confdefs.h >>conftest.$ac_ext
7734cat >>conftest.$ac_ext <<_ACEOF
7735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007736$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007737 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007738int
7739main ()
7740{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007741static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007742test_array [0] = 0
7743
7744 ;
7745 return 0;
7746}
7747_ACEOF
7748rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749if { (ac_try="$ac_compile"
7750case "(($ac_try" in
7751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7752 *) ac_try_echo=$ac_try;;
7753esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007757 grep -v '^ *+' conftest.er1 >conftest.err
7758 rm -f conftest.er1
7759 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 (exit $ac_status); } && {
7762 test -z "$ac_c_werror_flag" ||
7763 test ! -s conftest.err
7764 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 ac_lo=$ac_mid; break
7766else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007768sed 's/^/| /' conftest.$ac_ext >&5
7769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770 ac_hi=`expr '(' $ac_mid ')' - 1`
7771 if test $ac_mid -le $ac_hi; then
7772 ac_lo= ac_hi=
7773 break
7774 fi
7775 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777
7778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007779 done
7780else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007782sed 's/^/| /' conftest.$ac_ext >&5
7783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786
7787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789
7790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007791# Binary search between lo and hi bounds.
7792while test "x$ac_lo" != "x$ac_hi"; do
7793 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007795/* confdefs.h. */
7796_ACEOF
7797cat confdefs.h >>conftest.$ac_ext
7798cat >>conftest.$ac_ext <<_ACEOF
7799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007800$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007801 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007802int
7803main ()
7804{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007805static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007806test_array [0] = 0
7807
7808 ;
7809 return 0;
7810}
7811_ACEOF
7812rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813if { (ac_try="$ac_compile"
7814case "(($ac_try" in
7815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7816 *) ac_try_echo=$ac_try;;
7817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007821 grep -v '^ *+' conftest.er1 >conftest.err
7822 rm -f conftest.er1
7823 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 (exit $ac_status); } && {
7826 test -z "$ac_c_werror_flag" ||
7827 test ! -s conftest.err
7828 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007829 ac_hi=$ac_mid
7830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007832sed 's/^/| /' conftest.$ac_ext >&5
7833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836
7837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007838done
7839case $ac_lo in
7840?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007842 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007843See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007844echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007845See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007846 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847 else
7848 ac_cv_sizeof_int=0
7849 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007850esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851else
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007853/* confdefs.h. */
7854_ACEOF
7855cat confdefs.h >>conftest.$ac_ext
7856cat >>conftest.$ac_ext <<_ACEOF
7857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007858$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007859 typedef int ac__type_sizeof_;
7860static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7861static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007862#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007863#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007864int
7865main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007866{
Martin v. Löwis11437992002-04-12 09:54:03 +00007867
7868 FILE *f = fopen ("conftest.val", "w");
7869 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007871 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007874 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007876 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 }
7878 else
7879 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007883 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
7887 ;
7888 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007889}
Martin v. Löwis11437992002-04-12 09:54:03 +00007890_ACEOF
7891rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892if { (ac_try="$ac_link"
7893case "(($ac_try" in
7894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7895 *) ac_try_echo=$ac_try;;
7896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902 { (case "(($ac_try" in
7903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7904 *) ac_try_echo=$ac_try;;
7905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 (exit $ac_status); }; }; then
7911 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007912else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007913 echo "$as_me: program exited with status $ac_status" >&5
7914echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007915sed 's/^/| /' conftest.$ac_ext >&5
7916
Martin v. Löwis11437992002-04-12 09:54:03 +00007917( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007918if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007920See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007921echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007922See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007923 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924 else
7925 ac_cv_sizeof_int=0
7926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928rm -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 +00007929fi
7930rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007931fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007932{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7933echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934
7935
7936
Martin v. Löwis11437992002-04-12 09:54:03 +00007937cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007938#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007939_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007940
7941
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007942{ echo "$as_me:$LINENO: checking for long" >&5
7943echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7944if test "${ac_cv_type_long+set}" = set; then
7945 echo $ECHO_N "(cached) $ECHO_C" >&6
7946else
7947 cat >conftest.$ac_ext <<_ACEOF
7948/* confdefs.h. */
7949_ACEOF
7950cat confdefs.h >>conftest.$ac_ext
7951cat >>conftest.$ac_ext <<_ACEOF
7952/* end confdefs.h. */
7953$ac_includes_default
7954typedef long ac__type_new_;
7955int
7956main ()
7957{
7958if ((ac__type_new_ *) 0)
7959 return 0;
7960if (sizeof (ac__type_new_))
7961 return 0;
7962 ;
7963 return 0;
7964}
7965_ACEOF
7966rm -f conftest.$ac_objext
7967if { (ac_try="$ac_compile"
7968case "(($ac_try" in
7969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7970 *) ac_try_echo=$ac_try;;
7971esac
7972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7973 (eval "$ac_compile") 2>conftest.er1
7974 ac_status=$?
7975 grep -v '^ *+' conftest.er1 >conftest.err
7976 rm -f conftest.er1
7977 cat conftest.err >&5
7978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7979 (exit $ac_status); } && {
7980 test -z "$ac_c_werror_flag" ||
7981 test ! -s conftest.err
7982 } && test -s conftest.$ac_objext; then
7983 ac_cv_type_long=yes
7984else
7985 echo "$as_me: failed program was:" >&5
7986sed 's/^/| /' conftest.$ac_ext >&5
7987
7988 ac_cv_type_long=no
7989fi
7990
7991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7992fi
7993{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7994echo "${ECHO_T}$ac_cv_type_long" >&6; }
7995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996# The cast to long int works around a bug in the HP C Compiler
7997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7999# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008000{ echo "$as_me:$LINENO: checking size of long" >&5
8001echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008002if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008003 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008004else
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 if test "$cross_compiling" = yes; then
8006 # Depending upon the size, compute the lo and hi bounds.
8007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008008/* confdefs.h. */
8009_ACEOF
8010cat confdefs.h >>conftest.$ac_ext
8011cat >>conftest.$ac_ext <<_ACEOF
8012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008013$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008014 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008015int
8016main ()
8017{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008018static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008019test_array [0] = 0
8020
8021 ;
8022 return 0;
8023}
8024_ACEOF
8025rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026if { (ac_try="$ac_compile"
8027case "(($ac_try" in
8028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8029 *) ac_try_echo=$ac_try;;
8030esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008034 grep -v '^ *+' conftest.er1 >conftest.err
8035 rm -f conftest.er1
8036 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038 (exit $ac_status); } && {
8039 test -z "$ac_c_werror_flag" ||
8040 test ! -s conftest.err
8041 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 ac_lo=0 ac_mid=0
8043 while :; do
8044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008045/* confdefs.h. */
8046_ACEOF
8047cat confdefs.h >>conftest.$ac_ext
8048cat >>conftest.$ac_ext <<_ACEOF
8049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008050$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008051 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008052int
8053main ()
8054{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008055static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008056test_array [0] = 0
8057
8058 ;
8059 return 0;
8060}
8061_ACEOF
8062rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063if { (ac_try="$ac_compile"
8064case "(($ac_try" in
8065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8066 *) ac_try_echo=$ac_try;;
8067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008071 grep -v '^ *+' conftest.er1 >conftest.err
8072 rm -f conftest.er1
8073 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075 (exit $ac_status); } && {
8076 test -z "$ac_c_werror_flag" ||
8077 test ! -s conftest.err
8078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ac_hi=$ac_mid; break
8080else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008082sed 's/^/| /' conftest.$ac_ext >&5
8083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084 ac_lo=`expr $ac_mid + 1`
8085 if test $ac_lo -le $ac_mid; then
8086 ac_lo= ac_hi=
8087 break
8088 fi
8089 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091
8092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 done
8094else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008096sed 's/^/| /' conftest.$ac_ext >&5
8097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008099/* confdefs.h. */
8100_ACEOF
8101cat confdefs.h >>conftest.$ac_ext
8102cat >>conftest.$ac_ext <<_ACEOF
8103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008104$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008105 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008106int
8107main ()
8108{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008109static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008110test_array [0] = 0
8111
8112 ;
8113 return 0;
8114}
8115_ACEOF
8116rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117if { (ac_try="$ac_compile"
8118case "(($ac_try" in
8119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8120 *) ac_try_echo=$ac_try;;
8121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008125 grep -v '^ *+' conftest.er1 >conftest.err
8126 rm -f conftest.er1
8127 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129 (exit $ac_status); } && {
8130 test -z "$ac_c_werror_flag" ||
8131 test ! -s conftest.err
8132 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 ac_hi=-1 ac_mid=-1
8134 while :; do
8135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008136/* confdefs.h. */
8137_ACEOF
8138cat confdefs.h >>conftest.$ac_ext
8139cat >>conftest.$ac_ext <<_ACEOF
8140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008141$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008142 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008143int
8144main ()
8145{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008146static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008147test_array [0] = 0
8148
8149 ;
8150 return 0;
8151}
8152_ACEOF
8153rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008154if { (ac_try="$ac_compile"
8155case "(($ac_try" in
8156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8157 *) ac_try_echo=$ac_try;;
8158esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008162 grep -v '^ *+' conftest.er1 >conftest.err
8163 rm -f conftest.er1
8164 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166 (exit $ac_status); } && {
8167 test -z "$ac_c_werror_flag" ||
8168 test ! -s conftest.err
8169 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 ac_lo=$ac_mid; break
8171else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008173sed 's/^/| /' conftest.$ac_ext >&5
8174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008175 ac_hi=`expr '(' $ac_mid ')' - 1`
8176 if test $ac_mid -le $ac_hi; then
8177 ac_lo= ac_hi=
8178 break
8179 fi
8180 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008182
8183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 done
8185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008187sed 's/^/| /' conftest.$ac_ext >&5
8188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008191
8192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194
8195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008196# Binary search between lo and hi bounds.
8197while test "x$ac_lo" != "x$ac_hi"; do
8198 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008200/* confdefs.h. */
8201_ACEOF
8202cat confdefs.h >>conftest.$ac_ext
8203cat >>conftest.$ac_ext <<_ACEOF
8204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008205$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008206 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008207int
8208main ()
8209{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008210static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008211test_array [0] = 0
8212
8213 ;
8214 return 0;
8215}
8216_ACEOF
8217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218if { (ac_try="$ac_compile"
8219case "(($ac_try" in
8220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8221 *) ac_try_echo=$ac_try;;
8222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008226 grep -v '^ *+' conftest.er1 >conftest.err
8227 rm -f conftest.er1
8228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 (exit $ac_status); } && {
8231 test -z "$ac_c_werror_flag" ||
8232 test ! -s conftest.err
8233 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 ac_hi=$ac_mid
8235else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008237sed 's/^/| /' conftest.$ac_ext >&5
8238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241
8242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008243done
8244case $ac_lo in
8245?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008247 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008248See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008249echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008250See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008251 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 else
8253 ac_cv_sizeof_long=0
8254 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008255esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008256else
Martin v. Löwis11437992002-04-12 09:54:03 +00008257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008258/* confdefs.h. */
8259_ACEOF
8260cat confdefs.h >>conftest.$ac_ext
8261cat >>conftest.$ac_ext <<_ACEOF
8262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008263$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008264 typedef long ac__type_sizeof_;
8265static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8266static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008267#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008268#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008269int
8270main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008271{
Martin v. Löwis11437992002-04-12 09:54:03 +00008272
8273 FILE *f = fopen ("conftest.val", "w");
8274 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008276 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008277 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008279 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008280 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008281 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008282 }
8283 else
8284 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008286 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008288 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008291
8292 ;
8293 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008294}
Martin v. Löwis11437992002-04-12 09:54:03 +00008295_ACEOF
8296rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297if { (ac_try="$ac_link"
8298case "(($ac_try" in
8299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8300 *) ac_try_echo=$ac_try;;
8301esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008304 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307 { (case "(($ac_try" in
8308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8309 *) ac_try_echo=$ac_try;;
8310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008315 (exit $ac_status); }; }; then
8316 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008318 echo "$as_me: program exited with status $ac_status" >&5
8319echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008320sed 's/^/| /' conftest.$ac_ext >&5
8321
Martin v. Löwis11437992002-04-12 09:54:03 +00008322( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008324 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008325See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008326echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008327See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008328 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329 else
8330 ac_cv_sizeof_long=0
8331 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008333rm -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 +00008334fi
8335rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008336fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008337{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8338echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339
8340
8341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008343#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008345
8346
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008347{ echo "$as_me:$LINENO: checking for void *" >&5
8348echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8349if test "${ac_cv_type_void_p+set}" = set; then
8350 echo $ECHO_N "(cached) $ECHO_C" >&6
8351else
8352 cat >conftest.$ac_ext <<_ACEOF
8353/* confdefs.h. */
8354_ACEOF
8355cat confdefs.h >>conftest.$ac_ext
8356cat >>conftest.$ac_ext <<_ACEOF
8357/* end confdefs.h. */
8358$ac_includes_default
8359typedef void * ac__type_new_;
8360int
8361main ()
8362{
8363if ((ac__type_new_ *) 0)
8364 return 0;
8365if (sizeof (ac__type_new_))
8366 return 0;
8367 ;
8368 return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext
8372if { (ac_try="$ac_compile"
8373case "(($ac_try" in
8374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8375 *) ac_try_echo=$ac_try;;
8376esac
8377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8378 (eval "$ac_compile") 2>conftest.er1
8379 ac_status=$?
8380 grep -v '^ *+' conftest.er1 >conftest.err
8381 rm -f conftest.er1
8382 cat conftest.err >&5
8383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8384 (exit $ac_status); } && {
8385 test -z "$ac_c_werror_flag" ||
8386 test ! -s conftest.err
8387 } && test -s conftest.$ac_objext; then
8388 ac_cv_type_void_p=yes
8389else
8390 echo "$as_me: failed program was:" >&5
8391sed 's/^/| /' conftest.$ac_ext >&5
8392
8393 ac_cv_type_void_p=no
8394fi
8395
8396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8397fi
8398{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8399echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401# The cast to long int works around a bug in the HP C Compiler
8402# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8403# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8404# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008405{ echo "$as_me:$LINENO: checking size of void *" >&5
8406echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008407if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008408 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008409else
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 if test "$cross_compiling" = yes; then
8411 # Depending upon the size, compute the lo and hi bounds.
8412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* confdefs.h. */
8414_ACEOF
8415cat confdefs.h >>conftest.$ac_ext
8416cat >>conftest.$ac_ext <<_ACEOF
8417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008418$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008419 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008420int
8421main ()
8422{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008424test_array [0] = 0
8425
8426 ;
8427 return 0;
8428}
8429_ACEOF
8430rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431if { (ac_try="$ac_compile"
8432case "(($ac_try" in
8433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8434 *) ac_try_echo=$ac_try;;
8435esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008439 grep -v '^ *+' conftest.er1 >conftest.err
8440 rm -f conftest.er1
8441 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443 (exit $ac_status); } && {
8444 test -z "$ac_c_werror_flag" ||
8445 test ! -s conftest.err
8446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 ac_lo=0 ac_mid=0
8448 while :; do
8449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008450/* confdefs.h. */
8451_ACEOF
8452cat confdefs.h >>conftest.$ac_ext
8453cat >>conftest.$ac_ext <<_ACEOF
8454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008455$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008456 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008457int
8458main ()
8459{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008460static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008461test_array [0] = 0
8462
8463 ;
8464 return 0;
8465}
8466_ACEOF
8467rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468if { (ac_try="$ac_compile"
8469case "(($ac_try" in
8470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8471 *) ac_try_echo=$ac_try;;
8472esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008476 grep -v '^ *+' conftest.er1 >conftest.err
8477 rm -f conftest.er1
8478 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480 (exit $ac_status); } && {
8481 test -z "$ac_c_werror_flag" ||
8482 test ! -s conftest.err
8483 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_hi=$ac_mid; break
8485else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008487sed 's/^/| /' conftest.$ac_ext >&5
8488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489 ac_lo=`expr $ac_mid + 1`
8490 if test $ac_lo -le $ac_mid; then
8491 ac_lo= ac_hi=
8492 break
8493 fi
8494 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496
8497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 done
8499else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008501sed 's/^/| /' conftest.$ac_ext >&5
8502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008504/* confdefs.h. */
8505_ACEOF
8506cat confdefs.h >>conftest.$ac_ext
8507cat >>conftest.$ac_ext <<_ACEOF
8508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008509$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008510 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008511int
8512main ()
8513{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008514static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008515test_array [0] = 0
8516
8517 ;
8518 return 0;
8519}
8520_ACEOF
8521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522if { (ac_try="$ac_compile"
8523case "(($ac_try" in
8524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8525 *) ac_try_echo=$ac_try;;
8526esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008530 grep -v '^ *+' conftest.er1 >conftest.err
8531 rm -f conftest.er1
8532 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534 (exit $ac_status); } && {
8535 test -z "$ac_c_werror_flag" ||
8536 test ! -s conftest.err
8537 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 ac_hi=-1 ac_mid=-1
8539 while :; do
8540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008541/* confdefs.h. */
8542_ACEOF
8543cat confdefs.h >>conftest.$ac_ext
8544cat >>conftest.$ac_ext <<_ACEOF
8545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008547 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008548int
8549main ()
8550{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008551static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008552test_array [0] = 0
8553
8554 ;
8555 return 0;
8556}
8557_ACEOF
8558rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559if { (ac_try="$ac_compile"
8560case "(($ac_try" in
8561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8562 *) ac_try_echo=$ac_try;;
8563esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008567 grep -v '^ *+' conftest.er1 >conftest.err
8568 rm -f conftest.er1
8569 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 (exit $ac_status); } && {
8572 test -z "$ac_c_werror_flag" ||
8573 test ! -s conftest.err
8574 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ac_lo=$ac_mid; break
8576else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008578sed 's/^/| /' conftest.$ac_ext >&5
8579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580 ac_hi=`expr '(' $ac_mid ')' - 1`
8581 if test $ac_mid -le $ac_hi; then
8582 ac_lo= ac_hi=
8583 break
8584 fi
8585 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587
8588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 done
8590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008592sed 's/^/| /' conftest.$ac_ext >&5
8593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596
8597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599
8600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008601# Binary search between lo and hi bounds.
8602while test "x$ac_lo" != "x$ac_hi"; do
8603 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008605/* confdefs.h. */
8606_ACEOF
8607cat confdefs.h >>conftest.$ac_ext
8608cat >>conftest.$ac_ext <<_ACEOF
8609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008610$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008611 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008612int
8613main ()
8614{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008615static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008616test_array [0] = 0
8617
8618 ;
8619 return 0;
8620}
8621_ACEOF
8622rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623if { (ac_try="$ac_compile"
8624case "(($ac_try" in
8625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8626 *) ac_try_echo=$ac_try;;
8627esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008631 grep -v '^ *+' conftest.er1 >conftest.err
8632 rm -f conftest.er1
8633 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 (exit $ac_status); } && {
8636 test -z "$ac_c_werror_flag" ||
8637 test ! -s conftest.err
8638 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_hi=$ac_mid
8640else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008642sed 's/^/| /' conftest.$ac_ext >&5
8643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646
8647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008648done
8649case $ac_lo in
8650?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008651'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008652 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008653See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008654echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008655See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008656 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657 else
8658 ac_cv_sizeof_void_p=0
8659 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008660esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008661else
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008663/* confdefs.h. */
8664_ACEOF
8665cat confdefs.h >>conftest.$ac_ext
8666cat >>conftest.$ac_ext <<_ACEOF
8667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008669 typedef void * ac__type_sizeof_;
8670static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8671static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008672#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008673#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008674int
8675main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008676{
Martin v. Löwis11437992002-04-12 09:54:03 +00008677
8678 FILE *f = fopen ("conftest.val", "w");
8679 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008681 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008684 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008686 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 }
8688 else
8689 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008691 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008693 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008696
8697 ;
8698 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008699}
Martin v. Löwis11437992002-04-12 09:54:03 +00008700_ACEOF
8701rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702if { (ac_try="$ac_link"
8703case "(($ac_try" in
8704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8705 *) ac_try_echo=$ac_try;;
8706esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712 { (case "(($ac_try" in
8713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8714 *) ac_try_echo=$ac_try;;
8715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008717 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 (exit $ac_status); }; }; then
8721 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008722else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008723 echo "$as_me: program exited with status $ac_status" >&5
8724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008725sed 's/^/| /' conftest.$ac_ext >&5
8726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008729 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008730See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008731echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008732See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008733 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734 else
8735 ac_cv_sizeof_void_p=0
8736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738rm -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 +00008739fi
8740rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008741fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008742{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8743echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744
8745
8746
Martin v. Löwis11437992002-04-12 09:54:03 +00008747cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008748#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008749_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008750
8751
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008752{ echo "$as_me:$LINENO: checking for short" >&5
8753echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8754if test "${ac_cv_type_short+set}" = set; then
8755 echo $ECHO_N "(cached) $ECHO_C" >&6
8756else
8757 cat >conftest.$ac_ext <<_ACEOF
8758/* confdefs.h. */
8759_ACEOF
8760cat confdefs.h >>conftest.$ac_ext
8761cat >>conftest.$ac_ext <<_ACEOF
8762/* end confdefs.h. */
8763$ac_includes_default
8764typedef short ac__type_new_;
8765int
8766main ()
8767{
8768if ((ac__type_new_ *) 0)
8769 return 0;
8770if (sizeof (ac__type_new_))
8771 return 0;
8772 ;
8773 return 0;
8774}
8775_ACEOF
8776rm -f conftest.$ac_objext
8777if { (ac_try="$ac_compile"
8778case "(($ac_try" in
8779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8780 *) ac_try_echo=$ac_try;;
8781esac
8782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8783 (eval "$ac_compile") 2>conftest.er1
8784 ac_status=$?
8785 grep -v '^ *+' conftest.er1 >conftest.err
8786 rm -f conftest.er1
8787 cat conftest.err >&5
8788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8789 (exit $ac_status); } && {
8790 test -z "$ac_c_werror_flag" ||
8791 test ! -s conftest.err
8792 } && test -s conftest.$ac_objext; then
8793 ac_cv_type_short=yes
8794else
8795 echo "$as_me: failed program was:" >&5
8796sed 's/^/| /' conftest.$ac_ext >&5
8797
8798 ac_cv_type_short=no
8799fi
8800
8801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8802fi
8803{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8804echo "${ECHO_T}$ac_cv_type_short" >&6; }
8805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806# The cast to long int works around a bug in the HP C Compiler
8807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8809# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008810{ echo "$as_me:$LINENO: checking size of short" >&5
8811echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008812if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008813 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008814else
Martin v. Löwis11437992002-04-12 09:54:03 +00008815 if test "$cross_compiling" = yes; then
8816 # Depending upon the size, compute the lo and hi bounds.
8817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008818/* confdefs.h. */
8819_ACEOF
8820cat confdefs.h >>conftest.$ac_ext
8821cat >>conftest.$ac_ext <<_ACEOF
8822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008823$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008824 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008825int
8826main ()
8827{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008828static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008829test_array [0] = 0
8830
8831 ;
8832 return 0;
8833}
8834_ACEOF
8835rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836if { (ac_try="$ac_compile"
8837case "(($ac_try" in
8838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8839 *) ac_try_echo=$ac_try;;
8840esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008844 grep -v '^ *+' conftest.er1 >conftest.err
8845 rm -f conftest.er1
8846 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848 (exit $ac_status); } && {
8849 test -z "$ac_c_werror_flag" ||
8850 test ! -s conftest.err
8851 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ac_lo=0 ac_mid=0
8853 while :; do
8854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008855/* confdefs.h. */
8856_ACEOF
8857cat confdefs.h >>conftest.$ac_ext
8858cat >>conftest.$ac_ext <<_ACEOF
8859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008860$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008861 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008862int
8863main ()
8864{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008865static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008866test_array [0] = 0
8867
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873if { (ac_try="$ac_compile"
8874case "(($ac_try" in
8875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8876 *) ac_try_echo=$ac_try;;
8877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008881 grep -v '^ *+' conftest.er1 >conftest.err
8882 rm -f conftest.er1
8883 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885 (exit $ac_status); } && {
8886 test -z "$ac_c_werror_flag" ||
8887 test ! -s conftest.err
8888 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ac_hi=$ac_mid; break
8890else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008892sed 's/^/| /' conftest.$ac_ext >&5
8893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894 ac_lo=`expr $ac_mid + 1`
8895 if test $ac_lo -le $ac_mid; then
8896 ac_lo= ac_hi=
8897 break
8898 fi
8899 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901
8902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 done
8904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008906sed 's/^/| /' conftest.$ac_ext >&5
8907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008909/* confdefs.h. */
8910_ACEOF
8911cat confdefs.h >>conftest.$ac_ext
8912cat >>conftest.$ac_ext <<_ACEOF
8913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008914$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008915 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008916int
8917main ()
8918{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008919static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008920test_array [0] = 0
8921
8922 ;
8923 return 0;
8924}
8925_ACEOF
8926rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927if { (ac_try="$ac_compile"
8928case "(($ac_try" in
8929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8930 *) ac_try_echo=$ac_try;;
8931esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008935 grep -v '^ *+' conftest.er1 >conftest.err
8936 rm -f conftest.er1
8937 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008939 (exit $ac_status); } && {
8940 test -z "$ac_c_werror_flag" ||
8941 test ! -s conftest.err
8942 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 ac_hi=-1 ac_mid=-1
8944 while :; do
8945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008946/* confdefs.h. */
8947_ACEOF
8948cat confdefs.h >>conftest.$ac_ext
8949cat >>conftest.$ac_ext <<_ACEOF
8950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008951$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008952 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008953int
8954main ()
8955{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008956static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008957test_array [0] = 0
8958
8959 ;
8960 return 0;
8961}
8962_ACEOF
8963rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964if { (ac_try="$ac_compile"
8965case "(($ac_try" in
8966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8967 *) ac_try_echo=$ac_try;;
8968esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008972 grep -v '^ *+' conftest.er1 >conftest.err
8973 rm -f conftest.er1
8974 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 (exit $ac_status); } && {
8977 test -z "$ac_c_werror_flag" ||
8978 test ! -s conftest.err
8979 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ac_lo=$ac_mid; break
8981else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008983sed 's/^/| /' conftest.$ac_ext >&5
8984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985 ac_hi=`expr '(' $ac_mid ')' - 1`
8986 if test $ac_mid -le $ac_hi; then
8987 ac_lo= ac_hi=
8988 break
8989 fi
8990 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008992
8993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 done
8995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008997sed 's/^/| /' conftest.$ac_ext >&5
8998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001
9002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004
9005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009006# Binary search between lo and hi bounds.
9007while test "x$ac_lo" != "x$ac_hi"; do
9008 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009010/* confdefs.h. */
9011_ACEOF
9012cat confdefs.h >>conftest.$ac_ext
9013cat >>conftest.$ac_ext <<_ACEOF
9014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009015$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009016 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009017int
9018main ()
9019{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009020static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009021test_array [0] = 0
9022
9023 ;
9024 return 0;
9025}
9026_ACEOF
9027rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028if { (ac_try="$ac_compile"
9029case "(($ac_try" in
9030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9031 *) ac_try_echo=$ac_try;;
9032esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009036 grep -v '^ *+' conftest.er1 >conftest.err
9037 rm -f conftest.er1
9038 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040 (exit $ac_status); } && {
9041 test -z "$ac_c_werror_flag" ||
9042 test ! -s conftest.err
9043 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 ac_hi=$ac_mid
9045else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009047sed 's/^/| /' conftest.$ac_ext >&5
9048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051
9052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009053done
9054case $ac_lo in
9055?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009056'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009057 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009058See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009059echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009060See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009061 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009062 else
9063 ac_cv_sizeof_short=0
9064 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009065esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009066else
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009068/* confdefs.h. */
9069_ACEOF
9070cat confdefs.h >>conftest.$ac_ext
9071cat >>conftest.$ac_ext <<_ACEOF
9072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009073$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009074 typedef short ac__type_sizeof_;
9075static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9076static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009077#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009078#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009079int
9080main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009081{
Martin v. Löwis11437992002-04-12 09:54:03 +00009082
9083 FILE *f = fopen ("conftest.val", "w");
9084 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009085 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009086 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009088 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009089 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009090 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009091 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009092 }
9093 else
9094 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009095 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009096 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009097 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009098 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009100 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009101
9102 ;
9103 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009104}
Martin v. Löwis11437992002-04-12 09:54:03 +00009105_ACEOF
9106rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107if { (ac_try="$ac_link"
9108case "(($ac_try" in
9109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9110 *) ac_try_echo=$ac_try;;
9111esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009117 { (case "(($ac_try" in
9118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9119 *) ac_try_echo=$ac_try;;
9120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009122 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 (exit $ac_status); }; }; then
9126 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009128 echo "$as_me: program exited with status $ac_status" >&5
9129echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009130sed 's/^/| /' conftest.$ac_ext >&5
9131
Martin v. Löwis11437992002-04-12 09:54:03 +00009132( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009133if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009134 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009135See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009136echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009137See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009138 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009139 else
9140 ac_cv_sizeof_short=0
9141 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143rm -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 +00009144fi
9145rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009146fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009147{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9148echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009149
9150
9151
Martin v. Löwis11437992002-04-12 09:54:03 +00009152cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009153#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009154_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009155
9156
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009157{ echo "$as_me:$LINENO: checking for float" >&5
9158echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9159if test "${ac_cv_type_float+set}" = set; then
9160 echo $ECHO_N "(cached) $ECHO_C" >&6
9161else
9162 cat >conftest.$ac_ext <<_ACEOF
9163/* confdefs.h. */
9164_ACEOF
9165cat confdefs.h >>conftest.$ac_ext
9166cat >>conftest.$ac_ext <<_ACEOF
9167/* end confdefs.h. */
9168$ac_includes_default
9169typedef float ac__type_new_;
9170int
9171main ()
9172{
9173if ((ac__type_new_ *) 0)
9174 return 0;
9175if (sizeof (ac__type_new_))
9176 return 0;
9177 ;
9178 return 0;
9179}
9180_ACEOF
9181rm -f conftest.$ac_objext
9182if { (ac_try="$ac_compile"
9183case "(($ac_try" in
9184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9185 *) ac_try_echo=$ac_try;;
9186esac
9187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9188 (eval "$ac_compile") 2>conftest.er1
9189 ac_status=$?
9190 grep -v '^ *+' conftest.er1 >conftest.err
9191 rm -f conftest.er1
9192 cat conftest.err >&5
9193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9194 (exit $ac_status); } && {
9195 test -z "$ac_c_werror_flag" ||
9196 test ! -s conftest.err
9197 } && test -s conftest.$ac_objext; then
9198 ac_cv_type_float=yes
9199else
9200 echo "$as_me: failed program was:" >&5
9201sed 's/^/| /' conftest.$ac_ext >&5
9202
9203 ac_cv_type_float=no
9204fi
9205
9206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9207fi
9208{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9209echo "${ECHO_T}$ac_cv_type_float" >&6; }
9210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211# The cast to long int works around a bug in the HP C Compiler
9212# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9213# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9214# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009215{ echo "$as_me:$LINENO: checking size of float" >&5
9216echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009217if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009218 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009219else
Martin v. Löwis11437992002-04-12 09:54:03 +00009220 if test "$cross_compiling" = yes; then
9221 # Depending upon the size, compute the lo and hi bounds.
9222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009223/* confdefs.h. */
9224_ACEOF
9225cat confdefs.h >>conftest.$ac_ext
9226cat >>conftest.$ac_ext <<_ACEOF
9227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009228$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009229 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009230int
9231main ()
9232{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009234test_array [0] = 0
9235
9236 ;
9237 return 0;
9238}
9239_ACEOF
9240rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241if { (ac_try="$ac_compile"
9242case "(($ac_try" in
9243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9244 *) ac_try_echo=$ac_try;;
9245esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009247 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009249 grep -v '^ *+' conftest.er1 >conftest.err
9250 rm -f conftest.er1
9251 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253 (exit $ac_status); } && {
9254 test -z "$ac_c_werror_flag" ||
9255 test ! -s conftest.err
9256 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 ac_lo=0 ac_mid=0
9258 while :; do
9259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009260/* confdefs.h. */
9261_ACEOF
9262cat confdefs.h >>conftest.$ac_ext
9263cat >>conftest.$ac_ext <<_ACEOF
9264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009265$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009266 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009267int
9268main ()
9269{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009270static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009271test_array [0] = 0
9272
9273 ;
9274 return 0;
9275}
9276_ACEOF
9277rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278if { (ac_try="$ac_compile"
9279case "(($ac_try" in
9280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9281 *) ac_try_echo=$ac_try;;
9282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009284 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009286 grep -v '^ *+' conftest.er1 >conftest.err
9287 rm -f conftest.er1
9288 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290 (exit $ac_status); } && {
9291 test -z "$ac_c_werror_flag" ||
9292 test ! -s conftest.err
9293 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_hi=$ac_mid; break
9295else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009297sed 's/^/| /' conftest.$ac_ext >&5
9298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009299 ac_lo=`expr $ac_mid + 1`
9300 if test $ac_lo -le $ac_mid; then
9301 ac_lo= ac_hi=
9302 break
9303 fi
9304 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306
9307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 done
9309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009311sed 's/^/| /' conftest.$ac_ext >&5
9312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009314/* confdefs.h. */
9315_ACEOF
9316cat confdefs.h >>conftest.$ac_ext
9317cat >>conftest.$ac_ext <<_ACEOF
9318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009319$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009320 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009321int
9322main ()
9323{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009324static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009325test_array [0] = 0
9326
9327 ;
9328 return 0;
9329}
9330_ACEOF
9331rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009332if { (ac_try="$ac_compile"
9333case "(($ac_try" in
9334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9335 *) ac_try_echo=$ac_try;;
9336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009338 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009340 grep -v '^ *+' conftest.er1 >conftest.err
9341 rm -f conftest.er1
9342 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344 (exit $ac_status); } && {
9345 test -z "$ac_c_werror_flag" ||
9346 test ! -s conftest.err
9347 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 ac_hi=-1 ac_mid=-1
9349 while :; do
9350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009351/* confdefs.h. */
9352_ACEOF
9353cat confdefs.h >>conftest.$ac_ext
9354cat >>conftest.$ac_ext <<_ACEOF
9355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009356$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009357 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009358int
9359main ()
9360{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009361static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009362test_array [0] = 0
9363
9364 ;
9365 return 0;
9366}
9367_ACEOF
9368rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369if { (ac_try="$ac_compile"
9370case "(($ac_try" in
9371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9372 *) ac_try_echo=$ac_try;;
9373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009377 grep -v '^ *+' conftest.er1 >conftest.err
9378 rm -f conftest.er1
9379 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381 (exit $ac_status); } && {
9382 test -z "$ac_c_werror_flag" ||
9383 test ! -s conftest.err
9384 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 ac_lo=$ac_mid; break
9386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009388sed 's/^/| /' conftest.$ac_ext >&5
9389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009390 ac_hi=`expr '(' $ac_mid ')' - 1`
9391 if test $ac_mid -le $ac_hi; then
9392 ac_lo= ac_hi=
9393 break
9394 fi
9395 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009397
9398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 done
9400else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009402sed 's/^/| /' conftest.$ac_ext >&5
9403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406
9407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409
9410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009411# Binary search between lo and hi bounds.
9412while test "x$ac_lo" != "x$ac_hi"; do
9413 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009415/* confdefs.h. */
9416_ACEOF
9417cat confdefs.h >>conftest.$ac_ext
9418cat >>conftest.$ac_ext <<_ACEOF
9419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009420$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009421 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009422int
9423main ()
9424{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009425static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009426test_array [0] = 0
9427
9428 ;
9429 return 0;
9430}
9431_ACEOF
9432rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433if { (ac_try="$ac_compile"
9434case "(($ac_try" in
9435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9436 *) ac_try_echo=$ac_try;;
9437esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009441 grep -v '^ *+' conftest.er1 >conftest.err
9442 rm -f conftest.er1
9443 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445 (exit $ac_status); } && {
9446 test -z "$ac_c_werror_flag" ||
9447 test ! -s conftest.err
9448 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ac_hi=$ac_mid
9450else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009452sed 's/^/| /' conftest.$ac_ext >&5
9453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456
9457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009458done
9459case $ac_lo in
9460?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009462 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009463See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009464echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009465See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009466 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467 else
9468 ac_cv_sizeof_float=0
9469 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009470esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009471else
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009473/* confdefs.h. */
9474_ACEOF
9475cat confdefs.h >>conftest.$ac_ext
9476cat >>conftest.$ac_ext <<_ACEOF
9477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009478$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009479 typedef float ac__type_sizeof_;
9480static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9481static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009482#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009483#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009484int
9485main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009486{
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
9488 FILE *f = fopen ("conftest.val", "w");
9489 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009491 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009494 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009495 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009496 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 }
9498 else
9499 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009500 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009501 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009503 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009506
9507 ;
9508 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009509}
Martin v. Löwis11437992002-04-12 09:54:03 +00009510_ACEOF
9511rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512if { (ac_try="$ac_link"
9513case "(($ac_try" in
9514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9515 *) ac_try_echo=$ac_try;;
9516esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522 { (case "(($ac_try" in
9523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9524 *) ac_try_echo=$ac_try;;
9525esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009527 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 (exit $ac_status); }; }; then
9531 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009532else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009533 echo "$as_me: program exited with status $ac_status" >&5
9534echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009535sed 's/^/| /' conftest.$ac_ext >&5
9536
Martin v. Löwis11437992002-04-12 09:54:03 +00009537( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009538if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009539 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009540See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009541echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009542See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009543 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009544 else
9545 ac_cv_sizeof_float=0
9546 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548rm -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 +00009549fi
9550rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009551fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009552{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9553echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009554
9555
9556
Martin v. Löwis11437992002-04-12 09:54:03 +00009557cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009558#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009559_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009560
9561
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009562{ echo "$as_me:$LINENO: checking for double" >&5
9563echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9564if test "${ac_cv_type_double+set}" = set; then
9565 echo $ECHO_N "(cached) $ECHO_C" >&6
9566else
9567 cat >conftest.$ac_ext <<_ACEOF
9568/* confdefs.h. */
9569_ACEOF
9570cat confdefs.h >>conftest.$ac_ext
9571cat >>conftest.$ac_ext <<_ACEOF
9572/* end confdefs.h. */
9573$ac_includes_default
9574typedef double ac__type_new_;
9575int
9576main ()
9577{
9578if ((ac__type_new_ *) 0)
9579 return 0;
9580if (sizeof (ac__type_new_))
9581 return 0;
9582 ;
9583 return 0;
9584}
9585_ACEOF
9586rm -f conftest.$ac_objext
9587if { (ac_try="$ac_compile"
9588case "(($ac_try" in
9589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9590 *) ac_try_echo=$ac_try;;
9591esac
9592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9593 (eval "$ac_compile") 2>conftest.er1
9594 ac_status=$?
9595 grep -v '^ *+' conftest.er1 >conftest.err
9596 rm -f conftest.er1
9597 cat conftest.err >&5
9598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9599 (exit $ac_status); } && {
9600 test -z "$ac_c_werror_flag" ||
9601 test ! -s conftest.err
9602 } && test -s conftest.$ac_objext; then
9603 ac_cv_type_double=yes
9604else
9605 echo "$as_me: failed program was:" >&5
9606sed 's/^/| /' conftest.$ac_ext >&5
9607
9608 ac_cv_type_double=no
9609fi
9610
9611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9612fi
9613{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9614echo "${ECHO_T}$ac_cv_type_double" >&6; }
9615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616# The cast to long int works around a bug in the HP C Compiler
9617# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9618# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9619# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009620{ echo "$as_me:$LINENO: checking size of double" >&5
9621echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009622if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009624else
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 if test "$cross_compiling" = yes; then
9626 # Depending upon the size, compute the lo and hi bounds.
9627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009628/* confdefs.h. */
9629_ACEOF
9630cat confdefs.h >>conftest.$ac_ext
9631cat >>conftest.$ac_ext <<_ACEOF
9632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009633$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009634 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009635int
9636main ()
9637{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009638static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009639test_array [0] = 0
9640
9641 ;
9642 return 0;
9643}
9644_ACEOF
9645rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646if { (ac_try="$ac_compile"
9647case "(($ac_try" in
9648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9649 *) ac_try_echo=$ac_try;;
9650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009654 grep -v '^ *+' conftest.er1 >conftest.err
9655 rm -f conftest.er1
9656 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658 (exit $ac_status); } && {
9659 test -z "$ac_c_werror_flag" ||
9660 test ! -s conftest.err
9661 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 ac_lo=0 ac_mid=0
9663 while :; do
9664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009665/* confdefs.h. */
9666_ACEOF
9667cat confdefs.h >>conftest.$ac_ext
9668cat >>conftest.$ac_ext <<_ACEOF
9669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009670$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009671 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009672int
9673main ()
9674{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009675static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009676test_array [0] = 0
9677
9678 ;
9679 return 0;
9680}
9681_ACEOF
9682rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683if { (ac_try="$ac_compile"
9684case "(($ac_try" in
9685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9686 *) ac_try_echo=$ac_try;;
9687esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009691 grep -v '^ *+' conftest.er1 >conftest.err
9692 rm -f conftest.er1
9693 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695 (exit $ac_status); } && {
9696 test -z "$ac_c_werror_flag" ||
9697 test ! -s conftest.err
9698 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_hi=$ac_mid; break
9700else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009702sed 's/^/| /' conftest.$ac_ext >&5
9703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704 ac_lo=`expr $ac_mid + 1`
9705 if test $ac_lo -le $ac_mid; then
9706 ac_lo= ac_hi=
9707 break
9708 fi
9709 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711
9712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 done
9714else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009716sed 's/^/| /' conftest.$ac_ext >&5
9717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009719/* confdefs.h. */
9720_ACEOF
9721cat confdefs.h >>conftest.$ac_ext
9722cat >>conftest.$ac_ext <<_ACEOF
9723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009724$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009725 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009726int
9727main ()
9728{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009730test_array [0] = 0
9731
9732 ;
9733 return 0;
9734}
9735_ACEOF
9736rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737if { (ac_try="$ac_compile"
9738case "(($ac_try" in
9739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9740 *) ac_try_echo=$ac_try;;
9741esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009745 grep -v '^ *+' conftest.er1 >conftest.err
9746 rm -f conftest.er1
9747 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009749 (exit $ac_status); } && {
9750 test -z "$ac_c_werror_flag" ||
9751 test ! -s conftest.err
9752 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_hi=-1 ac_mid=-1
9754 while :; do
9755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009756/* confdefs.h. */
9757_ACEOF
9758cat confdefs.h >>conftest.$ac_ext
9759cat >>conftest.$ac_ext <<_ACEOF
9760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009761$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009762 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009763int
9764main ()
9765{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009766static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009767test_array [0] = 0
9768
9769 ;
9770 return 0;
9771}
9772_ACEOF
9773rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774if { (ac_try="$ac_compile"
9775case "(($ac_try" in
9776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9777 *) ac_try_echo=$ac_try;;
9778esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009782 grep -v '^ *+' conftest.er1 >conftest.err
9783 rm -f conftest.er1
9784 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786 (exit $ac_status); } && {
9787 test -z "$ac_c_werror_flag" ||
9788 test ! -s conftest.err
9789 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 ac_lo=$ac_mid; break
9791else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009793sed 's/^/| /' conftest.$ac_ext >&5
9794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009795 ac_hi=`expr '(' $ac_mid ')' - 1`
9796 if test $ac_mid -le $ac_hi; then
9797 ac_lo= ac_hi=
9798 break
9799 fi
9800 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009802
9803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 done
9805else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009807sed 's/^/| /' conftest.$ac_ext >&5
9808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811
9812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814
9815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009816# Binary search between lo and hi bounds.
9817while test "x$ac_lo" != "x$ac_hi"; do
9818 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009820/* confdefs.h. */
9821_ACEOF
9822cat confdefs.h >>conftest.$ac_ext
9823cat >>conftest.$ac_ext <<_ACEOF
9824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009826 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009827int
9828main ()
9829{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009830static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009831test_array [0] = 0
9832
9833 ;
9834 return 0;
9835}
9836_ACEOF
9837rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838if { (ac_try="$ac_compile"
9839case "(($ac_try" in
9840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9841 *) ac_try_echo=$ac_try;;
9842esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009846 grep -v '^ *+' conftest.er1 >conftest.err
9847 rm -f conftest.er1
9848 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850 (exit $ac_status); } && {
9851 test -z "$ac_c_werror_flag" ||
9852 test ! -s conftest.err
9853 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_hi=$ac_mid
9855else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009857sed 's/^/| /' conftest.$ac_ext >&5
9858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861
9862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009863done
9864case $ac_lo in
9865?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009867 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009868See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009869echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009870See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009871 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872 else
9873 ac_cv_sizeof_double=0
9874 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009875esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009876else
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* confdefs.h. */
9879_ACEOF
9880cat confdefs.h >>conftest.$ac_ext
9881cat >>conftest.$ac_ext <<_ACEOF
9882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009883$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009884 typedef double ac__type_sizeof_;
9885static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9886static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009887#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009888#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009889int
9890main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009891{
Martin v. Löwis11437992002-04-12 09:54:03 +00009892
9893 FILE *f = fopen ("conftest.val", "w");
9894 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009896 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009899 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009901 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009902 }
9903 else
9904 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009906 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009908 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009911
9912 ;
9913 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009914}
Martin v. Löwis11437992002-04-12 09:54:03 +00009915_ACEOF
9916rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917if { (ac_try="$ac_link"
9918case "(($ac_try" in
9919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9920 *) ac_try_echo=$ac_try;;
9921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927 { (case "(($ac_try" in
9928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9929 *) ac_try_echo=$ac_try;;
9930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009932 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 (exit $ac_status); }; }; then
9936 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009938 echo "$as_me: program exited with status $ac_status" >&5
9939echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009940sed 's/^/| /' conftest.$ac_ext >&5
9941
Martin v. Löwis11437992002-04-12 09:54:03 +00009942( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009943if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009944 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009945See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009946echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009947See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009948 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949 else
9950 ac_cv_sizeof_double=0
9951 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953rm -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 +00009954fi
9955rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009957{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9958echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959
9960
9961
Martin v. Löwis11437992002-04-12 09:54:03 +00009962cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009963#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009964_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009965
9966
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009967{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9968echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9969if test "${ac_cv_type_fpos_t+set}" = set; then
9970 echo $ECHO_N "(cached) $ECHO_C" >&6
9971else
9972 cat >conftest.$ac_ext <<_ACEOF
9973/* confdefs.h. */
9974_ACEOF
9975cat confdefs.h >>conftest.$ac_ext
9976cat >>conftest.$ac_ext <<_ACEOF
9977/* end confdefs.h. */
9978$ac_includes_default
9979typedef fpos_t ac__type_new_;
9980int
9981main ()
9982{
9983if ((ac__type_new_ *) 0)
9984 return 0;
9985if (sizeof (ac__type_new_))
9986 return 0;
9987 ;
9988 return 0;
9989}
9990_ACEOF
9991rm -f conftest.$ac_objext
9992if { (ac_try="$ac_compile"
9993case "(($ac_try" in
9994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9995 *) ac_try_echo=$ac_try;;
9996esac
9997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9998 (eval "$ac_compile") 2>conftest.er1
9999 ac_status=$?
10000 grep -v '^ *+' conftest.er1 >conftest.err
10001 rm -f conftest.er1
10002 cat conftest.err >&5
10003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10004 (exit $ac_status); } && {
10005 test -z "$ac_c_werror_flag" ||
10006 test ! -s conftest.err
10007 } && test -s conftest.$ac_objext; then
10008 ac_cv_type_fpos_t=yes
10009else
10010 echo "$as_me: failed program was:" >&5
10011sed 's/^/| /' conftest.$ac_ext >&5
10012
10013 ac_cv_type_fpos_t=no
10014fi
10015
10016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10017fi
10018{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10019echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021# The cast to long int works around a bug in the HP C Compiler
10022# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10023# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10024# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010025{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10026echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010027if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010028 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010029else
Martin v. Löwis11437992002-04-12 09:54:03 +000010030 if test "$cross_compiling" = yes; then
10031 # Depending upon the size, compute the lo and hi bounds.
10032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010033/* confdefs.h. */
10034_ACEOF
10035cat confdefs.h >>conftest.$ac_ext
10036cat >>conftest.$ac_ext <<_ACEOF
10037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010038$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010039 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010040int
10041main ()
10042{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010043static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010044test_array [0] = 0
10045
10046 ;
10047 return 0;
10048}
10049_ACEOF
10050rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010051if { (ac_try="$ac_compile"
10052case "(($ac_try" in
10053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10054 *) ac_try_echo=$ac_try;;
10055esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010059 grep -v '^ *+' conftest.er1 >conftest.err
10060 rm -f conftest.er1
10061 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063 (exit $ac_status); } && {
10064 test -z "$ac_c_werror_flag" ||
10065 test ! -s conftest.err
10066 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 ac_lo=0 ac_mid=0
10068 while :; do
10069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010070/* confdefs.h. */
10071_ACEOF
10072cat confdefs.h >>conftest.$ac_ext
10073cat >>conftest.$ac_ext <<_ACEOF
10074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010075$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010076 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010077int
10078main ()
10079{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010080static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010081test_array [0] = 0
10082
10083 ;
10084 return 0;
10085}
10086_ACEOF
10087rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088if { (ac_try="$ac_compile"
10089case "(($ac_try" in
10090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10091 *) ac_try_echo=$ac_try;;
10092esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010096 grep -v '^ *+' conftest.er1 >conftest.err
10097 rm -f conftest.er1
10098 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 (exit $ac_status); } && {
10101 test -z "$ac_c_werror_flag" ||
10102 test ! -s conftest.err
10103 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 ac_hi=$ac_mid; break
10105else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010107sed 's/^/| /' conftest.$ac_ext >&5
10108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109 ac_lo=`expr $ac_mid + 1`
10110 if test $ac_lo -le $ac_mid; then
10111 ac_lo= ac_hi=
10112 break
10113 fi
10114 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116
10117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 done
10119else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010121sed 's/^/| /' conftest.$ac_ext >&5
10122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010124/* confdefs.h. */
10125_ACEOF
10126cat confdefs.h >>conftest.$ac_ext
10127cat >>conftest.$ac_ext <<_ACEOF
10128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010129$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010130 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010131int
10132main ()
10133{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010134static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010135test_array [0] = 0
10136
10137 ;
10138 return 0;
10139}
10140_ACEOF
10141rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142if { (ac_try="$ac_compile"
10143case "(($ac_try" in
10144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10145 *) ac_try_echo=$ac_try;;
10146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010150 grep -v '^ *+' conftest.er1 >conftest.err
10151 rm -f conftest.er1
10152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154 (exit $ac_status); } && {
10155 test -z "$ac_c_werror_flag" ||
10156 test ! -s conftest.err
10157 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010158 ac_hi=-1 ac_mid=-1
10159 while :; do
10160 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010161/* confdefs.h. */
10162_ACEOF
10163cat confdefs.h >>conftest.$ac_ext
10164cat >>conftest.$ac_ext <<_ACEOF
10165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010166$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010167 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010168int
10169main ()
10170{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010171static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010172test_array [0] = 0
10173
10174 ;
10175 return 0;
10176}
10177_ACEOF
10178rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179if { (ac_try="$ac_compile"
10180case "(($ac_try" in
10181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10182 *) ac_try_echo=$ac_try;;
10183esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010187 grep -v '^ *+' conftest.er1 >conftest.err
10188 rm -f conftest.er1
10189 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191 (exit $ac_status); } && {
10192 test -z "$ac_c_werror_flag" ||
10193 test ! -s conftest.err
10194 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ac_lo=$ac_mid; break
10196else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010198sed 's/^/| /' conftest.$ac_ext >&5
10199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200 ac_hi=`expr '(' $ac_mid ')' - 1`
10201 if test $ac_mid -le $ac_hi; then
10202 ac_lo= ac_hi=
10203 break
10204 fi
10205 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207
10208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 done
10210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010212sed 's/^/| /' conftest.$ac_ext >&5
10213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216
10217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219
10220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010221# Binary search between lo and hi bounds.
10222while test "x$ac_lo" != "x$ac_hi"; do
10223 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010225/* confdefs.h. */
10226_ACEOF
10227cat confdefs.h >>conftest.$ac_ext
10228cat >>conftest.$ac_ext <<_ACEOF
10229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010230$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010231 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010232int
10233main ()
10234{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010235static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010236test_array [0] = 0
10237
10238 ;
10239 return 0;
10240}
10241_ACEOF
10242rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010243if { (ac_try="$ac_compile"
10244case "(($ac_try" in
10245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10246 *) ac_try_echo=$ac_try;;
10247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010251 grep -v '^ *+' conftest.er1 >conftest.err
10252 rm -f conftest.er1
10253 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 (exit $ac_status); } && {
10256 test -z "$ac_c_werror_flag" ||
10257 test ! -s conftest.err
10258 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_hi=$ac_mid
10260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010262sed 's/^/| /' conftest.$ac_ext >&5
10263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010266
10267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010268done
10269case $ac_lo in
10270?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010272 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010273See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010274echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010275See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010276 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277 else
10278 ac_cv_sizeof_fpos_t=0
10279 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010280esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010281else
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010283/* confdefs.h. */
10284_ACEOF
10285cat confdefs.h >>conftest.$ac_ext
10286cat >>conftest.$ac_ext <<_ACEOF
10287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010288$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010289 typedef fpos_t ac__type_sizeof_;
10290static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10291static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010292#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010293#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010294int
10295main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010296{
Martin v. Löwis11437992002-04-12 09:54:03 +000010297
10298 FILE *f = fopen ("conftest.val", "w");
10299 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010301 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010304 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010306 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 }
10308 else
10309 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010310 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010311 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010312 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010313 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010316
10317 ;
10318 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010319}
Martin v. Löwis11437992002-04-12 09:54:03 +000010320_ACEOF
10321rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322if { (ac_try="$ac_link"
10323case "(($ac_try" in
10324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10325 *) ac_try_echo=$ac_try;;
10326esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332 { (case "(($ac_try" in
10333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10334 *) ac_try_echo=$ac_try;;
10335esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 (exit $ac_status); }; }; then
10341 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010343 echo "$as_me: program exited with status $ac_status" >&5
10344echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010345sed 's/^/| /' conftest.$ac_ext >&5
10346
Martin v. Löwis11437992002-04-12 09:54:03 +000010347( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010349 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010350See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010351echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010352See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010353 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354 else
10355 ac_cv_sizeof_fpos_t=0
10356 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010358rm -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 +000010359fi
10360rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010361fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010362{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10363echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364
10365
10366
Martin v. Löwis11437992002-04-12 09:54:03 +000010367cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010368#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010370
Michael W. Hudson54241132001-12-07 15:38:26 +000010371
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010372{ echo "$as_me:$LINENO: checking for size_t" >&5
10373echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10374if test "${ac_cv_type_size_t+set}" = set; then
10375 echo $ECHO_N "(cached) $ECHO_C" >&6
10376else
10377 cat >conftest.$ac_ext <<_ACEOF
10378/* confdefs.h. */
10379_ACEOF
10380cat confdefs.h >>conftest.$ac_ext
10381cat >>conftest.$ac_ext <<_ACEOF
10382/* end confdefs.h. */
10383$ac_includes_default
10384typedef size_t ac__type_new_;
10385int
10386main ()
10387{
10388if ((ac__type_new_ *) 0)
10389 return 0;
10390if (sizeof (ac__type_new_))
10391 return 0;
10392 ;
10393 return 0;
10394}
10395_ACEOF
10396rm -f conftest.$ac_objext
10397if { (ac_try="$ac_compile"
10398case "(($ac_try" in
10399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10400 *) ac_try_echo=$ac_try;;
10401esac
10402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10403 (eval "$ac_compile") 2>conftest.er1
10404 ac_status=$?
10405 grep -v '^ *+' conftest.er1 >conftest.err
10406 rm -f conftest.er1
10407 cat conftest.err >&5
10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10409 (exit $ac_status); } && {
10410 test -z "$ac_c_werror_flag" ||
10411 test ! -s conftest.err
10412 } && test -s conftest.$ac_objext; then
10413 ac_cv_type_size_t=yes
10414else
10415 echo "$as_me: failed program was:" >&5
10416sed 's/^/| /' conftest.$ac_ext >&5
10417
10418 ac_cv_type_size_t=no
10419fi
10420
10421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10422fi
10423{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10424echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426# The cast to long int works around a bug in the HP C Compiler
10427# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10428# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10429# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010430{ echo "$as_me:$LINENO: checking size of size_t" >&5
10431echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010433 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435 if test "$cross_compiling" = yes; then
10436 # Depending upon the size, compute the lo and hi bounds.
10437cat >conftest.$ac_ext <<_ACEOF
10438/* confdefs.h. */
10439_ACEOF
10440cat confdefs.h >>conftest.$ac_ext
10441cat >>conftest.$ac_ext <<_ACEOF
10442/* end confdefs.h. */
10443$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010444 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010445int
10446main ()
10447{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010448static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010449test_array [0] = 0
10450
10451 ;
10452 return 0;
10453}
10454_ACEOF
10455rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010456if { (ac_try="$ac_compile"
10457case "(($ac_try" in
10458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10459 *) ac_try_echo=$ac_try;;
10460esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463 ac_status=$?
10464 grep -v '^ *+' conftest.er1 >conftest.err
10465 rm -f conftest.er1
10466 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468 (exit $ac_status); } && {
10469 test -z "$ac_c_werror_flag" ||
10470 test ! -s conftest.err
10471 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472 ac_lo=0 ac_mid=0
10473 while :; do
10474 cat >conftest.$ac_ext <<_ACEOF
10475/* confdefs.h. */
10476_ACEOF
10477cat confdefs.h >>conftest.$ac_ext
10478cat >>conftest.$ac_ext <<_ACEOF
10479/* end confdefs.h. */
10480$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010481 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010482int
10483main ()
10484{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010485static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010486test_array [0] = 0
10487
10488 ;
10489 return 0;
10490}
10491_ACEOF
10492rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493if { (ac_try="$ac_compile"
10494case "(($ac_try" in
10495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10496 *) ac_try_echo=$ac_try;;
10497esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500 ac_status=$?
10501 grep -v '^ *+' conftest.er1 >conftest.err
10502 rm -f conftest.er1
10503 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505 (exit $ac_status); } && {
10506 test -z "$ac_c_werror_flag" ||
10507 test ! -s conftest.err
10508 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509 ac_hi=$ac_mid; break
10510else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010511 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512sed 's/^/| /' conftest.$ac_ext >&5
10513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514 ac_lo=`expr $ac_mid + 1`
10515 if test $ac_lo -le $ac_mid; then
10516 ac_lo= ac_hi=
10517 break
10518 fi
10519 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010521
10522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523 done
10524else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010525 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526sed 's/^/| /' conftest.$ac_ext >&5
10527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529/* confdefs.h. */
10530_ACEOF
10531cat confdefs.h >>conftest.$ac_ext
10532cat >>conftest.$ac_ext <<_ACEOF
10533/* end confdefs.h. */
10534$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010535 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536int
10537main ()
10538{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010539static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010540test_array [0] = 0
10541
10542 ;
10543 return 0;
10544}
10545_ACEOF
10546rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547if { (ac_try="$ac_compile"
10548case "(($ac_try" in
10549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10550 *) ac_try_echo=$ac_try;;
10551esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010554 ac_status=$?
10555 grep -v '^ *+' conftest.er1 >conftest.err
10556 rm -f conftest.er1
10557 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010559 (exit $ac_status); } && {
10560 test -z "$ac_c_werror_flag" ||
10561 test ! -s conftest.err
10562 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563 ac_hi=-1 ac_mid=-1
10564 while :; do
10565 cat >conftest.$ac_ext <<_ACEOF
10566/* confdefs.h. */
10567_ACEOF
10568cat confdefs.h >>conftest.$ac_ext
10569cat >>conftest.$ac_ext <<_ACEOF
10570/* end confdefs.h. */
10571$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010572 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573int
10574main ()
10575{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010576static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010577test_array [0] = 0
10578
10579 ;
10580 return 0;
10581}
10582_ACEOF
10583rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584if { (ac_try="$ac_compile"
10585case "(($ac_try" in
10586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10587 *) ac_try_echo=$ac_try;;
10588esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591 ac_status=$?
10592 grep -v '^ *+' conftest.er1 >conftest.err
10593 rm -f conftest.er1
10594 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 (exit $ac_status); } && {
10597 test -z "$ac_c_werror_flag" ||
10598 test ! -s conftest.err
10599 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600 ac_lo=$ac_mid; break
10601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010602 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603sed 's/^/| /' conftest.$ac_ext >&5
10604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605 ac_hi=`expr '(' $ac_mid ')' - 1`
10606 if test $ac_mid -le $ac_hi; then
10607 ac_lo= ac_hi=
10608 break
10609 fi
10610 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612
10613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010614 done
10615else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010616 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617sed 's/^/| /' conftest.$ac_ext >&5
10618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621
10622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624
10625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626# Binary search between lo and hi bounds.
10627while test "x$ac_lo" != "x$ac_hi"; do
10628 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10629 cat >conftest.$ac_ext <<_ACEOF
10630/* confdefs.h. */
10631_ACEOF
10632cat confdefs.h >>conftest.$ac_ext
10633cat >>conftest.$ac_ext <<_ACEOF
10634/* end confdefs.h. */
10635$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010636 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637int
10638main ()
10639{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010640static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010641test_array [0] = 0
10642
10643 ;
10644 return 0;
10645}
10646_ACEOF
10647rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648if { (ac_try="$ac_compile"
10649case "(($ac_try" in
10650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10651 *) ac_try_echo=$ac_try;;
10652esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 ac_status=$?
10656 grep -v '^ *+' conftest.er1 >conftest.err
10657 rm -f conftest.er1
10658 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660 (exit $ac_status); } && {
10661 test -z "$ac_c_werror_flag" ||
10662 test ! -s conftest.err
10663 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664 ac_hi=$ac_mid
10665else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010666 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667sed 's/^/| /' conftest.$ac_ext >&5
10668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671
10672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673done
10674case $ac_lo in
10675?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010677 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010679echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010681 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682 else
10683 ac_cv_sizeof_size_t=0
10684 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010685esac
10686else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687 cat >conftest.$ac_ext <<_ACEOF
10688/* confdefs.h. */
10689_ACEOF
10690cat confdefs.h >>conftest.$ac_ext
10691cat >>conftest.$ac_ext <<_ACEOF
10692/* end confdefs.h. */
10693$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010694 typedef size_t ac__type_sizeof_;
10695static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10696static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697#include <stdio.h>
10698#include <stdlib.h>
10699int
10700main ()
10701{
10702
10703 FILE *f = fopen ("conftest.val", "w");
10704 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010706 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010707 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010709 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010711 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712 }
10713 else
10714 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010716 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010718 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721
10722 ;
10723 return 0;
10724}
10725_ACEOF
10726rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727if { (ac_try="$ac_link"
10728case "(($ac_try" in
10729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10730 *) ac_try_echo=$ac_try;;
10731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010736 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737 { (case "(($ac_try" in
10738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10739 *) ac_try_echo=$ac_try;;
10740esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010743 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010745 (exit $ac_status); }; }; then
10746 ac_cv_sizeof_size_t=`cat conftest.val`
10747else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010748 echo "$as_me: program exited with status $ac_status" >&5
10749echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010750sed 's/^/| /' conftest.$ac_ext >&5
10751
10752( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010754 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010755See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010756echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010758 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759 else
10760 ac_cv_sizeof_size_t=0
10761 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763rm -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 +000010764fi
10765rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010766fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010767{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10768echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769
10770
10771
Martin v. Löwis18e16552006-02-15 17:27:45 +000010772cat >>confdefs.h <<_ACEOF
10773#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10774_ACEOF
10775
10776
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010777{ echo "$as_me:$LINENO: checking for pid_t" >&5
10778echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10779if test "${ac_cv_type_pid_t+set}" = set; then
10780 echo $ECHO_N "(cached) $ECHO_C" >&6
10781else
10782 cat >conftest.$ac_ext <<_ACEOF
10783/* confdefs.h. */
10784_ACEOF
10785cat confdefs.h >>conftest.$ac_ext
10786cat >>conftest.$ac_ext <<_ACEOF
10787/* end confdefs.h. */
10788$ac_includes_default
10789typedef pid_t ac__type_new_;
10790int
10791main ()
10792{
10793if ((ac__type_new_ *) 0)
10794 return 0;
10795if (sizeof (ac__type_new_))
10796 return 0;
10797 ;
10798 return 0;
10799}
10800_ACEOF
10801rm -f conftest.$ac_objext
10802if { (ac_try="$ac_compile"
10803case "(($ac_try" in
10804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10805 *) ac_try_echo=$ac_try;;
10806esac
10807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10808 (eval "$ac_compile") 2>conftest.er1
10809 ac_status=$?
10810 grep -v '^ *+' conftest.er1 >conftest.err
10811 rm -f conftest.er1
10812 cat conftest.err >&5
10813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10814 (exit $ac_status); } && {
10815 test -z "$ac_c_werror_flag" ||
10816 test ! -s conftest.err
10817 } && test -s conftest.$ac_objext; then
10818 ac_cv_type_pid_t=yes
10819else
10820 echo "$as_me: failed program was:" >&5
10821sed 's/^/| /' conftest.$ac_ext >&5
10822
10823 ac_cv_type_pid_t=no
10824fi
10825
10826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10827fi
10828{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10829echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10830
Christian Heimes400adb02008-02-01 08:12:03 +000010831# The cast to long int works around a bug in the HP C Compiler
10832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10834# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010835{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10836echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010837if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010838 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010839else
10840 if test "$cross_compiling" = yes; then
10841 # Depending upon the size, compute the lo and hi bounds.
10842cat >conftest.$ac_ext <<_ACEOF
10843/* confdefs.h. */
10844_ACEOF
10845cat confdefs.h >>conftest.$ac_ext
10846cat >>conftest.$ac_ext <<_ACEOF
10847/* end confdefs.h. */
10848$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010849 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010850int
10851main ()
10852{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010853static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010854test_array [0] = 0
10855
10856 ;
10857 return 0;
10858}
10859_ACEOF
10860rm -f conftest.$ac_objext
10861if { (ac_try="$ac_compile"
10862case "(($ac_try" in
10863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10864 *) ac_try_echo=$ac_try;;
10865esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010867 (eval "$ac_compile") 2>conftest.er1
10868 ac_status=$?
10869 grep -v '^ *+' conftest.er1 >conftest.err
10870 rm -f conftest.er1
10871 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010873 (exit $ac_status); } && {
10874 test -z "$ac_c_werror_flag" ||
10875 test ! -s conftest.err
10876 } && test -s conftest.$ac_objext; then
10877 ac_lo=0 ac_mid=0
10878 while :; do
10879 cat >conftest.$ac_ext <<_ACEOF
10880/* confdefs.h. */
10881_ACEOF
10882cat confdefs.h >>conftest.$ac_ext
10883cat >>conftest.$ac_ext <<_ACEOF
10884/* end confdefs.h. */
10885$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010886 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010887int
10888main ()
10889{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010890static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010891test_array [0] = 0
10892
10893 ;
10894 return 0;
10895}
10896_ACEOF
10897rm -f conftest.$ac_objext
10898if { (ac_try="$ac_compile"
10899case "(($ac_try" in
10900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10901 *) ac_try_echo=$ac_try;;
10902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010904 (eval "$ac_compile") 2>conftest.er1
10905 ac_status=$?
10906 grep -v '^ *+' conftest.er1 >conftest.err
10907 rm -f conftest.er1
10908 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010910 (exit $ac_status); } && {
10911 test -z "$ac_c_werror_flag" ||
10912 test ! -s conftest.err
10913 } && test -s conftest.$ac_objext; then
10914 ac_hi=$ac_mid; break
10915else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010916 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010917sed 's/^/| /' conftest.$ac_ext >&5
10918
10919 ac_lo=`expr $ac_mid + 1`
10920 if test $ac_lo -le $ac_mid; then
10921 ac_lo= ac_hi=
10922 break
10923 fi
10924 ac_mid=`expr 2 '*' $ac_mid + 1`
10925fi
10926
10927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10928 done
10929else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010930 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010931sed 's/^/| /' conftest.$ac_ext >&5
10932
10933 cat >conftest.$ac_ext <<_ACEOF
10934/* confdefs.h. */
10935_ACEOF
10936cat confdefs.h >>conftest.$ac_ext
10937cat >>conftest.$ac_ext <<_ACEOF
10938/* end confdefs.h. */
10939$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010940 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010941int
10942main ()
10943{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010944static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010945test_array [0] = 0
10946
10947 ;
10948 return 0;
10949}
10950_ACEOF
10951rm -f conftest.$ac_objext
10952if { (ac_try="$ac_compile"
10953case "(($ac_try" in
10954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10955 *) ac_try_echo=$ac_try;;
10956esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010958 (eval "$ac_compile") 2>conftest.er1
10959 ac_status=$?
10960 grep -v '^ *+' conftest.er1 >conftest.err
10961 rm -f conftest.er1
10962 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010964 (exit $ac_status); } && {
10965 test -z "$ac_c_werror_flag" ||
10966 test ! -s conftest.err
10967 } && test -s conftest.$ac_objext; then
10968 ac_hi=-1 ac_mid=-1
10969 while :; do
10970 cat >conftest.$ac_ext <<_ACEOF
10971/* confdefs.h. */
10972_ACEOF
10973cat confdefs.h >>conftest.$ac_ext
10974cat >>conftest.$ac_ext <<_ACEOF
10975/* end confdefs.h. */
10976$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010977 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010978int
10979main ()
10980{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010981static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010982test_array [0] = 0
10983
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988rm -f conftest.$ac_objext
10989if { (ac_try="$ac_compile"
10990case "(($ac_try" in
10991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10992 *) ac_try_echo=$ac_try;;
10993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010995 (eval "$ac_compile") 2>conftest.er1
10996 ac_status=$?
10997 grep -v '^ *+' conftest.er1 >conftest.err
10998 rm -f conftest.er1
10999 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011001 (exit $ac_status); } && {
11002 test -z "$ac_c_werror_flag" ||
11003 test ! -s conftest.err
11004 } && test -s conftest.$ac_objext; then
11005 ac_lo=$ac_mid; break
11006else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011007 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011008sed 's/^/| /' conftest.$ac_ext >&5
11009
11010 ac_hi=`expr '(' $ac_mid ')' - 1`
11011 if test $ac_mid -le $ac_hi; then
11012 ac_lo= ac_hi=
11013 break
11014 fi
11015 ac_mid=`expr 2 '*' $ac_mid`
11016fi
11017
11018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11019 done
11020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011021 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011022sed 's/^/| /' conftest.$ac_ext >&5
11023
11024 ac_lo= ac_hi=
11025fi
11026
11027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11028fi
11029
11030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11031# Binary search between lo and hi bounds.
11032while test "x$ac_lo" != "x$ac_hi"; do
11033 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11034 cat >conftest.$ac_ext <<_ACEOF
11035/* confdefs.h. */
11036_ACEOF
11037cat confdefs.h >>conftest.$ac_ext
11038cat >>conftest.$ac_ext <<_ACEOF
11039/* end confdefs.h. */
11040$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011041 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011042int
11043main ()
11044{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011045static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011046test_array [0] = 0
11047
11048 ;
11049 return 0;
11050}
11051_ACEOF
11052rm -f conftest.$ac_objext
11053if { (ac_try="$ac_compile"
11054case "(($ac_try" in
11055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11056 *) ac_try_echo=$ac_try;;
11057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011059 (eval "$ac_compile") 2>conftest.er1
11060 ac_status=$?
11061 grep -v '^ *+' conftest.er1 >conftest.err
11062 rm -f conftest.er1
11063 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (exit $ac_status); } && {
11066 test -z "$ac_c_werror_flag" ||
11067 test ! -s conftest.err
11068 } && test -s conftest.$ac_objext; then
11069 ac_hi=$ac_mid
11070else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011071 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011072sed 's/^/| /' conftest.$ac_ext >&5
11073
11074 ac_lo=`expr '(' $ac_mid ')' + 1`
11075fi
11076
11077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11078done
11079case $ac_lo in
11080?*) ac_cv_sizeof_pid_t=$ac_lo;;
11081'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011082 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011083See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011084echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011085See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011086 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011087 else
11088 ac_cv_sizeof_pid_t=0
11089 fi ;;
11090esac
11091else
11092 cat >conftest.$ac_ext <<_ACEOF
11093/* confdefs.h. */
11094_ACEOF
11095cat confdefs.h >>conftest.$ac_ext
11096cat >>conftest.$ac_ext <<_ACEOF
11097/* end confdefs.h. */
11098$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011099 typedef pid_t ac__type_sizeof_;
11100static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11101static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011102#include <stdio.h>
11103#include <stdlib.h>
11104int
11105main ()
11106{
11107
11108 FILE *f = fopen ("conftest.val", "w");
11109 if (! f)
11110 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011111 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011112 {
11113 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011114 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011115 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011116 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011117 }
11118 else
11119 {
11120 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011121 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011122 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011123 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011124 }
11125 return ferror (f) || fclose (f) != 0;
11126
11127 ;
11128 return 0;
11129}
11130_ACEOF
11131rm -f conftest$ac_exeext
11132if { (ac_try="$ac_link"
11133case "(($ac_try" in
11134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11135 *) ac_try_echo=$ac_try;;
11136esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011138 (eval "$ac_link") 2>&5
11139 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11142 { (case "(($ac_try" in
11143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11144 *) ac_try_echo=$ac_try;;
11145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011147 (eval "$ac_try") 2>&5
11148 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011150 (exit $ac_status); }; }; then
11151 ac_cv_sizeof_pid_t=`cat conftest.val`
11152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011153 echo "$as_me: program exited with status $ac_status" >&5
11154echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011155sed 's/^/| /' conftest.$ac_ext >&5
11156
11157( exit $ac_status )
11158if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011159 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011160See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011161echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011162See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011163 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011164 else
11165 ac_cv_sizeof_pid_t=0
11166 fi
11167fi
11168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11169fi
11170rm -f conftest.val
11171fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011172{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11173echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011174
11175
11176
11177cat >>confdefs.h <<_ACEOF
11178#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11179_ACEOF
11180
11181
Michael W. Hudson54241132001-12-07 15:38:26 +000011182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011183{ echo "$as_me:$LINENO: checking for long long support" >&5
11184echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011185have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011187/* confdefs.h. */
11188_ACEOF
11189cat confdefs.h >>conftest.$ac_ext
11190cat >>conftest.$ac_ext <<_ACEOF
11191/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011192
Martin v. Löwis11437992002-04-12 09:54:03 +000011193int
11194main ()
11195{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011196long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 ;
11198 return 0;
11199}
11200_ACEOF
11201rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202if { (ac_try="$ac_compile"
11203case "(($ac_try" in
11204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11205 *) ac_try_echo=$ac_try;;
11206esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011210 grep -v '^ *+' conftest.er1 >conftest.err
11211 rm -f conftest.er1
11212 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214 (exit $ac_status); } && {
11215 test -z "$ac_c_werror_flag" ||
11216 test ! -s conftest.err
11217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
11219
11220cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011221#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011222_ACEOF
11223
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011224 have_long_long=yes
11225
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011228sed 's/^/| /' conftest.$ac_ext >&5
11229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232
11233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011234{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11235echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011236if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011237{ echo "$as_me:$LINENO: checking for long long" >&5
11238echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11239if test "${ac_cv_type_long_long+set}" = set; then
11240 echo $ECHO_N "(cached) $ECHO_C" >&6
11241else
11242 cat >conftest.$ac_ext <<_ACEOF
11243/* confdefs.h. */
11244_ACEOF
11245cat confdefs.h >>conftest.$ac_ext
11246cat >>conftest.$ac_ext <<_ACEOF
11247/* end confdefs.h. */
11248$ac_includes_default
11249typedef long long ac__type_new_;
11250int
11251main ()
11252{
11253if ((ac__type_new_ *) 0)
11254 return 0;
11255if (sizeof (ac__type_new_))
11256 return 0;
11257 ;
11258 return 0;
11259}
11260_ACEOF
11261rm -f conftest.$ac_objext
11262if { (ac_try="$ac_compile"
11263case "(($ac_try" in
11264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11265 *) ac_try_echo=$ac_try;;
11266esac
11267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11268 (eval "$ac_compile") 2>conftest.er1
11269 ac_status=$?
11270 grep -v '^ *+' conftest.er1 >conftest.err
11271 rm -f conftest.er1
11272 cat conftest.err >&5
11273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11274 (exit $ac_status); } && {
11275 test -z "$ac_c_werror_flag" ||
11276 test ! -s conftest.err
11277 } && test -s conftest.$ac_objext; then
11278 ac_cv_type_long_long=yes
11279else
11280 echo "$as_me: failed program was:" >&5
11281sed 's/^/| /' conftest.$ac_ext >&5
11282
11283 ac_cv_type_long_long=no
11284fi
11285
11286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11287fi
11288{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11289echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291# The cast to long int works around a bug in the HP C Compiler
11292# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11293# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11294# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011295{ echo "$as_me:$LINENO: checking size of long long" >&5
11296echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011297if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011298 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011299else
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 if test "$cross_compiling" = yes; then
11301 # Depending upon the size, compute the lo and hi bounds.
11302cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* confdefs.h. */
11304_ACEOF
11305cat confdefs.h >>conftest.$ac_ext
11306cat >>conftest.$ac_ext <<_ACEOF
11307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011308$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011309 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011310int
11311main ()
11312{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011313static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011314test_array [0] = 0
11315
11316 ;
11317 return 0;
11318}
11319_ACEOF
11320rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011321if { (ac_try="$ac_compile"
11322case "(($ac_try" in
11323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11324 *) ac_try_echo=$ac_try;;
11325esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011329 grep -v '^ *+' conftest.er1 >conftest.err
11330 rm -f conftest.er1
11331 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333 (exit $ac_status); } && {
11334 test -z "$ac_c_werror_flag" ||
11335 test ! -s conftest.err
11336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 ac_lo=0 ac_mid=0
11338 while :; do
11339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011340/* confdefs.h. */
11341_ACEOF
11342cat confdefs.h >>conftest.$ac_ext
11343cat >>conftest.$ac_ext <<_ACEOF
11344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011345$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011346 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011347int
11348main ()
11349{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011351test_array [0] = 0
11352
11353 ;
11354 return 0;
11355}
11356_ACEOF
11357rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358if { (ac_try="$ac_compile"
11359case "(($ac_try" in
11360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11361 *) ac_try_echo=$ac_try;;
11362esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011366 grep -v '^ *+' conftest.er1 >conftest.err
11367 rm -f conftest.er1
11368 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370 (exit $ac_status); } && {
11371 test -z "$ac_c_werror_flag" ||
11372 test ! -s conftest.err
11373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 ac_hi=$ac_mid; break
11375else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011377sed 's/^/| /' conftest.$ac_ext >&5
11378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379 ac_lo=`expr $ac_mid + 1`
11380 if test $ac_lo -le $ac_mid; then
11381 ac_lo= ac_hi=
11382 break
11383 fi
11384 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386
11387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 done
11389else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011391sed 's/^/| /' conftest.$ac_ext >&5
11392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011394/* confdefs.h. */
11395_ACEOF
11396cat confdefs.h >>conftest.$ac_ext
11397cat >>conftest.$ac_ext <<_ACEOF
11398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011399$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011400 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011401int
11402main ()
11403{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011404static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011405test_array [0] = 0
11406
11407 ;
11408 return 0;
11409}
11410_ACEOF
11411rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412if { (ac_try="$ac_compile"
11413case "(($ac_try" in
11414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11415 *) ac_try_echo=$ac_try;;
11416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011420 grep -v '^ *+' conftest.er1 >conftest.err
11421 rm -f conftest.er1
11422 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011424 (exit $ac_status); } && {
11425 test -z "$ac_c_werror_flag" ||
11426 test ! -s conftest.err
11427 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 ac_hi=-1 ac_mid=-1
11429 while :; do
11430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011431/* confdefs.h. */
11432_ACEOF
11433cat confdefs.h >>conftest.$ac_ext
11434cat >>conftest.$ac_ext <<_ACEOF
11435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011436$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011437 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011438int
11439main ()
11440{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011442test_array [0] = 0
11443
11444 ;
11445 return 0;
11446}
11447_ACEOF
11448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449if { (ac_try="$ac_compile"
11450case "(($ac_try" in
11451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11452 *) ac_try_echo=$ac_try;;
11453esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011457 grep -v '^ *+' conftest.er1 >conftest.err
11458 rm -f conftest.er1
11459 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461 (exit $ac_status); } && {
11462 test -z "$ac_c_werror_flag" ||
11463 test ! -s conftest.err
11464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 ac_lo=$ac_mid; break
11466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011468sed 's/^/| /' conftest.$ac_ext >&5
11469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011470 ac_hi=`expr '(' $ac_mid ')' - 1`
11471 if test $ac_mid -le $ac_hi; then
11472 ac_lo= ac_hi=
11473 break
11474 fi
11475 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011477
11478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 done
11480else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011482sed 's/^/| /' conftest.$ac_ext >&5
11483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486
11487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489
11490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011491# Binary search between lo and hi bounds.
11492while test "x$ac_lo" != "x$ac_hi"; do
11493 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011495/* confdefs.h. */
11496_ACEOF
11497cat confdefs.h >>conftest.$ac_ext
11498cat >>conftest.$ac_ext <<_ACEOF
11499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011500$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011501 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011502int
11503main ()
11504{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011505static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011506test_array [0] = 0
11507
11508 ;
11509 return 0;
11510}
11511_ACEOF
11512rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513if { (ac_try="$ac_compile"
11514case "(($ac_try" in
11515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11516 *) ac_try_echo=$ac_try;;
11517esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011521 grep -v '^ *+' conftest.er1 >conftest.err
11522 rm -f conftest.er1
11523 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525 (exit $ac_status); } && {
11526 test -z "$ac_c_werror_flag" ||
11527 test ! -s conftest.err
11528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 ac_hi=$ac_mid
11530else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011532sed 's/^/| /' conftest.$ac_ext >&5
11533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536
11537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011538done
11539case $ac_lo in
11540?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011541'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011542 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011543See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011544echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011545See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011546 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011547 else
11548 ac_cv_sizeof_long_long=0
11549 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011550esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011551else
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011553/* confdefs.h. */
11554_ACEOF
11555cat confdefs.h >>conftest.$ac_ext
11556cat >>conftest.$ac_ext <<_ACEOF
11557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011558$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011559 typedef long long ac__type_sizeof_;
11560static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11561static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011562#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011563#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011564int
11565main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011566{
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
11568 FILE *f = fopen ("conftest.val", "w");
11569 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011571 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011574 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011576 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 }
11578 else
11579 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011580 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011581 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011583 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011586
11587 ;
11588 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011589}
Martin v. Löwis11437992002-04-12 09:54:03 +000011590_ACEOF
11591rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592if { (ac_try="$ac_link"
11593case "(($ac_try" in
11594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11595 *) ac_try_echo=$ac_try;;
11596esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602 { (case "(($ac_try" in
11603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11604 *) ac_try_echo=$ac_try;;
11605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 (exit $ac_status); }; }; then
11611 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011613 echo "$as_me: program exited with status $ac_status" >&5
11614echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011615sed 's/^/| /' conftest.$ac_ext >&5
11616
Martin v. Löwis11437992002-04-12 09:54:03 +000011617( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011618if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011619 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011620See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011621echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011622See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011623 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624 else
11625 ac_cv_sizeof_long_long=0
11626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628rm -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 +000011629fi
11630rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011631fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011632{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11633echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011634
11635
11636
Martin v. Löwis11437992002-04-12 09:54:03 +000011637cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011638#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011639_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011640
Michael W. Hudson54241132001-12-07 15:38:26 +000011641
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011642fi
11643
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011644{ echo "$as_me:$LINENO: checking for long double support" >&5
11645echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011646have_long_double=no
11647cat >conftest.$ac_ext <<_ACEOF
11648/* confdefs.h. */
11649_ACEOF
11650cat confdefs.h >>conftest.$ac_ext
11651cat >>conftest.$ac_ext <<_ACEOF
11652/* end confdefs.h. */
11653
11654int
11655main ()
11656{
11657long double x; x = (long double)0;
11658 ;
11659 return 0;
11660}
11661_ACEOF
11662rm -f conftest.$ac_objext
11663if { (ac_try="$ac_compile"
11664case "(($ac_try" in
11665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11666 *) ac_try_echo=$ac_try;;
11667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011669 (eval "$ac_compile") 2>conftest.er1
11670 ac_status=$?
11671 grep -v '^ *+' conftest.er1 >conftest.err
11672 rm -f conftest.er1
11673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011675 (exit $ac_status); } && {
11676 test -z "$ac_c_werror_flag" ||
11677 test ! -s conftest.err
11678 } && test -s conftest.$ac_objext; then
11679
11680
11681cat >>confdefs.h <<\_ACEOF
11682#define HAVE_LONG_DOUBLE 1
11683_ACEOF
11684
11685 have_long_double=yes
11686
11687else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011688 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011689sed 's/^/| /' conftest.$ac_ext >&5
11690
11691
11692fi
11693
11694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011695{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11696echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011697if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011698{ echo "$as_me:$LINENO: checking for long double" >&5
11699echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11700if test "${ac_cv_type_long_double+set}" = set; then
11701 echo $ECHO_N "(cached) $ECHO_C" >&6
11702else
11703 cat >conftest.$ac_ext <<_ACEOF
11704/* confdefs.h. */
11705_ACEOF
11706cat confdefs.h >>conftest.$ac_ext
11707cat >>conftest.$ac_ext <<_ACEOF
11708/* end confdefs.h. */
11709$ac_includes_default
11710typedef long double ac__type_new_;
11711int
11712main ()
11713{
11714if ((ac__type_new_ *) 0)
11715 return 0;
11716if (sizeof (ac__type_new_))
11717 return 0;
11718 ;
11719 return 0;
11720}
11721_ACEOF
11722rm -f conftest.$ac_objext
11723if { (ac_try="$ac_compile"
11724case "(($ac_try" in
11725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11726 *) ac_try_echo=$ac_try;;
11727esac
11728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11729 (eval "$ac_compile") 2>conftest.er1
11730 ac_status=$?
11731 grep -v '^ *+' conftest.er1 >conftest.err
11732 rm -f conftest.er1
11733 cat conftest.err >&5
11734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11735 (exit $ac_status); } && {
11736 test -z "$ac_c_werror_flag" ||
11737 test ! -s conftest.err
11738 } && test -s conftest.$ac_objext; then
11739 ac_cv_type_long_double=yes
11740else
11741 echo "$as_me: failed program was:" >&5
11742sed 's/^/| /' conftest.$ac_ext >&5
11743
11744 ac_cv_type_long_double=no
11745fi
11746
11747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11748fi
11749{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11750echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11751
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752# The cast to long int works around a bug in the HP C Compiler
11753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11755# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011756{ echo "$as_me:$LINENO: checking size of long double" >&5
11757echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011758if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011759 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011760else
11761 if test "$cross_compiling" = yes; then
11762 # Depending upon the size, compute the lo and hi bounds.
11763cat >conftest.$ac_ext <<_ACEOF
11764/* confdefs.h. */
11765_ACEOF
11766cat confdefs.h >>conftest.$ac_ext
11767cat >>conftest.$ac_ext <<_ACEOF
11768/* end confdefs.h. */
11769$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011770 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011771int
11772main ()
11773{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011774static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011775test_array [0] = 0
11776
11777 ;
11778 return 0;
11779}
11780_ACEOF
11781rm -f conftest.$ac_objext
11782if { (ac_try="$ac_compile"
11783case "(($ac_try" in
11784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11785 *) ac_try_echo=$ac_try;;
11786esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011788 (eval "$ac_compile") 2>conftest.er1
11789 ac_status=$?
11790 grep -v '^ *+' conftest.er1 >conftest.err
11791 rm -f conftest.er1
11792 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011794 (exit $ac_status); } && {
11795 test -z "$ac_c_werror_flag" ||
11796 test ! -s conftest.err
11797 } && test -s conftest.$ac_objext; then
11798 ac_lo=0 ac_mid=0
11799 while :; do
11800 cat >conftest.$ac_ext <<_ACEOF
11801/* confdefs.h. */
11802_ACEOF
11803cat confdefs.h >>conftest.$ac_ext
11804cat >>conftest.$ac_ext <<_ACEOF
11805/* end confdefs.h. */
11806$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011807 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011808int
11809main ()
11810{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812test_array [0] = 0
11813
11814 ;
11815 return 0;
11816}
11817_ACEOF
11818rm -f conftest.$ac_objext
11819if { (ac_try="$ac_compile"
11820case "(($ac_try" in
11821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11822 *) ac_try_echo=$ac_try;;
11823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011825 (eval "$ac_compile") 2>conftest.er1
11826 ac_status=$?
11827 grep -v '^ *+' conftest.er1 >conftest.err
11828 rm -f conftest.er1
11829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011831 (exit $ac_status); } && {
11832 test -z "$ac_c_werror_flag" ||
11833 test ! -s conftest.err
11834 } && test -s conftest.$ac_objext; then
11835 ac_hi=$ac_mid; break
11836else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011837 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011838sed 's/^/| /' conftest.$ac_ext >&5
11839
11840 ac_lo=`expr $ac_mid + 1`
11841 if test $ac_lo -le $ac_mid; then
11842 ac_lo= ac_hi=
11843 break
11844 fi
11845 ac_mid=`expr 2 '*' $ac_mid + 1`
11846fi
11847
11848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11849 done
11850else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011851 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011852sed 's/^/| /' conftest.$ac_ext >&5
11853
11854 cat >conftest.$ac_ext <<_ACEOF
11855/* confdefs.h. */
11856_ACEOF
11857cat confdefs.h >>conftest.$ac_ext
11858cat >>conftest.$ac_ext <<_ACEOF
11859/* end confdefs.h. */
11860$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011861 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011862int
11863main ()
11864{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011865static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011866test_array [0] = 0
11867
11868 ;
11869 return 0;
11870}
11871_ACEOF
11872rm -f conftest.$ac_objext
11873if { (ac_try="$ac_compile"
11874case "(($ac_try" in
11875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11876 *) ac_try_echo=$ac_try;;
11877esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011879 (eval "$ac_compile") 2>conftest.er1
11880 ac_status=$?
11881 grep -v '^ *+' conftest.er1 >conftest.err
11882 rm -f conftest.er1
11883 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011885 (exit $ac_status); } && {
11886 test -z "$ac_c_werror_flag" ||
11887 test ! -s conftest.err
11888 } && test -s conftest.$ac_objext; then
11889 ac_hi=-1 ac_mid=-1
11890 while :; do
11891 cat >conftest.$ac_ext <<_ACEOF
11892/* confdefs.h. */
11893_ACEOF
11894cat confdefs.h >>conftest.$ac_ext
11895cat >>conftest.$ac_ext <<_ACEOF
11896/* end confdefs.h. */
11897$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011898 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011899int
11900main ()
11901{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011902static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011903test_array [0] = 0
11904
11905 ;
11906 return 0;
11907}
11908_ACEOF
11909rm -f conftest.$ac_objext
11910if { (ac_try="$ac_compile"
11911case "(($ac_try" in
11912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11913 *) ac_try_echo=$ac_try;;
11914esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011916 (eval "$ac_compile") 2>conftest.er1
11917 ac_status=$?
11918 grep -v '^ *+' conftest.er1 >conftest.err
11919 rm -f conftest.er1
11920 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011922 (exit $ac_status); } && {
11923 test -z "$ac_c_werror_flag" ||
11924 test ! -s conftest.err
11925 } && test -s conftest.$ac_objext; then
11926 ac_lo=$ac_mid; break
11927else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011928 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011929sed 's/^/| /' conftest.$ac_ext >&5
11930
11931 ac_hi=`expr '(' $ac_mid ')' - 1`
11932 if test $ac_mid -le $ac_hi; then
11933 ac_lo= ac_hi=
11934 break
11935 fi
11936 ac_mid=`expr 2 '*' $ac_mid`
11937fi
11938
11939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11940 done
11941else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011942 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011943sed 's/^/| /' conftest.$ac_ext >&5
11944
11945 ac_lo= ac_hi=
11946fi
11947
11948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11949fi
11950
11951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11952# Binary search between lo and hi bounds.
11953while test "x$ac_lo" != "x$ac_hi"; do
11954 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11955 cat >conftest.$ac_ext <<_ACEOF
11956/* confdefs.h. */
11957_ACEOF
11958cat confdefs.h >>conftest.$ac_ext
11959cat >>conftest.$ac_ext <<_ACEOF
11960/* end confdefs.h. */
11961$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011962 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011963int
11964main ()
11965{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011967test_array [0] = 0
11968
11969 ;
11970 return 0;
11971}
11972_ACEOF
11973rm -f conftest.$ac_objext
11974if { (ac_try="$ac_compile"
11975case "(($ac_try" in
11976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11977 *) ac_try_echo=$ac_try;;
11978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011980 (eval "$ac_compile") 2>conftest.er1
11981 ac_status=$?
11982 grep -v '^ *+' conftest.er1 >conftest.err
11983 rm -f conftest.er1
11984 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (exit $ac_status); } && {
11987 test -z "$ac_c_werror_flag" ||
11988 test ! -s conftest.err
11989 } && test -s conftest.$ac_objext; then
11990 ac_hi=$ac_mid
11991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011992 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993sed 's/^/| /' conftest.$ac_ext >&5
11994
11995 ac_lo=`expr '(' $ac_mid ')' + 1`
11996fi
11997
11998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11999done
12000case $ac_lo in
12001?*) ac_cv_sizeof_long_double=$ac_lo;;
12002'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012003 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012004See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012005echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012006See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012007 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008 else
12009 ac_cv_sizeof_long_double=0
12010 fi ;;
12011esac
12012else
12013 cat >conftest.$ac_ext <<_ACEOF
12014/* confdefs.h. */
12015_ACEOF
12016cat confdefs.h >>conftest.$ac_ext
12017cat >>conftest.$ac_ext <<_ACEOF
12018/* end confdefs.h. */
12019$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012020 typedef long double ac__type_sizeof_;
12021static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12022static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012023#include <stdio.h>
12024#include <stdlib.h>
12025int
12026main ()
12027{
12028
12029 FILE *f = fopen ("conftest.val", "w");
12030 if (! f)
12031 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012032 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012033 {
12034 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012035 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012036 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012037 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012038 }
12039 else
12040 {
12041 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012042 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012043 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012044 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012045 }
12046 return ferror (f) || fclose (f) != 0;
12047
12048 ;
12049 return 0;
12050}
12051_ACEOF
12052rm -f conftest$ac_exeext
12053if { (ac_try="$ac_link"
12054case "(($ac_try" in
12055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12056 *) ac_try_echo=$ac_try;;
12057esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012059 (eval "$ac_link") 2>&5
12060 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12063 { (case "(($ac_try" in
12064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12065 *) ac_try_echo=$ac_try;;
12066esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012068 (eval "$ac_try") 2>&5
12069 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012071 (exit $ac_status); }; }; then
12072 ac_cv_sizeof_long_double=`cat conftest.val`
12073else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012074 echo "$as_me: program exited with status $ac_status" >&5
12075echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012076sed 's/^/| /' conftest.$ac_ext >&5
12077
12078( exit $ac_status )
12079if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012080 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012081See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012082echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012083See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012084 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012085 else
12086 ac_cv_sizeof_long_double=0
12087 fi
12088fi
12089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12090fi
12091rm -f conftest.val
12092fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012093{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12094echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012095
12096
12097
12098cat >>confdefs.h <<_ACEOF
12099#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12100_ACEOF
12101
12102
12103fi
12104
12105
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012106{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12107echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012108have_c99_bool=no
12109cat >conftest.$ac_ext <<_ACEOF
12110/* confdefs.h. */
12111_ACEOF
12112cat confdefs.h >>conftest.$ac_ext
12113cat >>conftest.$ac_ext <<_ACEOF
12114/* end confdefs.h. */
12115
12116int
12117main ()
12118{
12119_Bool x; x = (_Bool)0;
12120 ;
12121 return 0;
12122}
12123_ACEOF
12124rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125if { (ac_try="$ac_compile"
12126case "(($ac_try" in
12127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12128 *) ac_try_echo=$ac_try;;
12129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012131 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012132 ac_status=$?
12133 grep -v '^ *+' conftest.er1 >conftest.err
12134 rm -f conftest.er1
12135 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137 (exit $ac_status); } && {
12138 test -z "$ac_c_werror_flag" ||
12139 test ! -s conftest.err
12140 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012141
12142
12143cat >>confdefs.h <<\_ACEOF
12144#define HAVE_C99_BOOL 1
12145_ACEOF
12146
12147 have_c99_bool=yes
12148
12149else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012150 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012151sed 's/^/| /' conftest.$ac_ext >&5
12152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012153
Thomas Woutersb2137042007-02-01 18:02:27 +000012154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155
12156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012157{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12158echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012159if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012160{ echo "$as_me:$LINENO: checking for _Bool" >&5
12161echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12162if test "${ac_cv_type__Bool+set}" = set; then
12163 echo $ECHO_N "(cached) $ECHO_C" >&6
12164else
12165 cat >conftest.$ac_ext <<_ACEOF
12166/* confdefs.h. */
12167_ACEOF
12168cat confdefs.h >>conftest.$ac_ext
12169cat >>conftest.$ac_ext <<_ACEOF
12170/* end confdefs.h. */
12171$ac_includes_default
12172typedef _Bool ac__type_new_;
12173int
12174main ()
12175{
12176if ((ac__type_new_ *) 0)
12177 return 0;
12178if (sizeof (ac__type_new_))
12179 return 0;
12180 ;
12181 return 0;
12182}
12183_ACEOF
12184rm -f conftest.$ac_objext
12185if { (ac_try="$ac_compile"
12186case "(($ac_try" in
12187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12188 *) ac_try_echo=$ac_try;;
12189esac
12190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12191 (eval "$ac_compile") 2>conftest.er1
12192 ac_status=$?
12193 grep -v '^ *+' conftest.er1 >conftest.err
12194 rm -f conftest.er1
12195 cat conftest.err >&5
12196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12197 (exit $ac_status); } && {
12198 test -z "$ac_c_werror_flag" ||
12199 test ! -s conftest.err
12200 } && test -s conftest.$ac_objext; then
12201 ac_cv_type__Bool=yes
12202else
12203 echo "$as_me: failed program was:" >&5
12204sed 's/^/| /' conftest.$ac_ext >&5
12205
12206 ac_cv_type__Bool=no
12207fi
12208
12209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12210fi
12211{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12212echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214# The cast to long int works around a bug in the HP C Compiler
12215# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12216# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12217# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012218{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12219echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012220if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012221 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012222else
12223 if test "$cross_compiling" = yes; then
12224 # Depending upon the size, compute the lo and hi bounds.
12225cat >conftest.$ac_ext <<_ACEOF
12226/* confdefs.h. */
12227_ACEOF
12228cat confdefs.h >>conftest.$ac_ext
12229cat >>conftest.$ac_ext <<_ACEOF
12230/* end confdefs.h. */
12231$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012232 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012233int
12234main ()
12235{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012236static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012237test_array [0] = 0
12238
12239 ;
12240 return 0;
12241}
12242_ACEOF
12243rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012244if { (ac_try="$ac_compile"
12245case "(($ac_try" in
12246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12247 *) ac_try_echo=$ac_try;;
12248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012251 ac_status=$?
12252 grep -v '^ *+' conftest.er1 >conftest.err
12253 rm -f conftest.er1
12254 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256 (exit $ac_status); } && {
12257 test -z "$ac_c_werror_flag" ||
12258 test ! -s conftest.err
12259 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012260 ac_lo=0 ac_mid=0
12261 while :; do
12262 cat >conftest.$ac_ext <<_ACEOF
12263/* confdefs.h. */
12264_ACEOF
12265cat confdefs.h >>conftest.$ac_ext
12266cat >>conftest.$ac_ext <<_ACEOF
12267/* end confdefs.h. */
12268$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012269 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012270int
12271main ()
12272{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012273static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012274test_array [0] = 0
12275
12276 ;
12277 return 0;
12278}
12279_ACEOF
12280rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281if { (ac_try="$ac_compile"
12282case "(($ac_try" in
12283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12284 *) ac_try_echo=$ac_try;;
12285esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012287 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012288 ac_status=$?
12289 grep -v '^ *+' conftest.er1 >conftest.err
12290 rm -f conftest.er1
12291 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293 (exit $ac_status); } && {
12294 test -z "$ac_c_werror_flag" ||
12295 test ! -s conftest.err
12296 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012297 ac_hi=$ac_mid; break
12298else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012299 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012300sed 's/^/| /' conftest.$ac_ext >&5
12301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302 ac_lo=`expr $ac_mid + 1`
12303 if test $ac_lo -le $ac_mid; then
12304 ac_lo= ac_hi=
12305 break
12306 fi
12307 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309
12310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012311 done
12312else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012313 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012314sed 's/^/| /' conftest.$ac_ext >&5
12315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012317/* confdefs.h. */
12318_ACEOF
12319cat confdefs.h >>conftest.$ac_ext
12320cat >>conftest.$ac_ext <<_ACEOF
12321/* end confdefs.h. */
12322$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012323 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012324int
12325main ()
12326{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012327static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012328test_array [0] = 0
12329
12330 ;
12331 return 0;
12332}
12333_ACEOF
12334rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335if { (ac_try="$ac_compile"
12336case "(($ac_try" in
12337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12338 *) ac_try_echo=$ac_try;;
12339esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012342 ac_status=$?
12343 grep -v '^ *+' conftest.er1 >conftest.err
12344 rm -f conftest.er1
12345 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347 (exit $ac_status); } && {
12348 test -z "$ac_c_werror_flag" ||
12349 test ! -s conftest.err
12350 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012351 ac_hi=-1 ac_mid=-1
12352 while :; do
12353 cat >conftest.$ac_ext <<_ACEOF
12354/* confdefs.h. */
12355_ACEOF
12356cat confdefs.h >>conftest.$ac_ext
12357cat >>conftest.$ac_ext <<_ACEOF
12358/* end confdefs.h. */
12359$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012360 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012361int
12362main ()
12363{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012365test_array [0] = 0
12366
12367 ;
12368 return 0;
12369}
12370_ACEOF
12371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372if { (ac_try="$ac_compile"
12373case "(($ac_try" in
12374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12375 *) ac_try_echo=$ac_try;;
12376esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012379 ac_status=$?
12380 grep -v '^ *+' conftest.er1 >conftest.err
12381 rm -f conftest.er1
12382 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 (exit $ac_status); } && {
12385 test -z "$ac_c_werror_flag" ||
12386 test ! -s conftest.err
12387 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012388 ac_lo=$ac_mid; break
12389else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012390 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012391sed 's/^/| /' conftest.$ac_ext >&5
12392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393 ac_hi=`expr '(' $ac_mid ')' - 1`
12394 if test $ac_mid -le $ac_hi; then
12395 ac_lo= ac_hi=
12396 break
12397 fi
12398 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400
12401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012402 done
12403else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012404 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012405sed 's/^/| /' conftest.$ac_ext >&5
12406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409
12410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412
12413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012414# Binary search between lo and hi bounds.
12415while test "x$ac_lo" != "x$ac_hi"; do
12416 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12417 cat >conftest.$ac_ext <<_ACEOF
12418/* confdefs.h. */
12419_ACEOF
12420cat confdefs.h >>conftest.$ac_ext
12421cat >>conftest.$ac_ext <<_ACEOF
12422/* end confdefs.h. */
12423$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012424 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012425int
12426main ()
12427{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012429test_array [0] = 0
12430
12431 ;
12432 return 0;
12433}
12434_ACEOF
12435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436if { (ac_try="$ac_compile"
12437case "(($ac_try" in
12438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12439 *) ac_try_echo=$ac_try;;
12440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012443 ac_status=$?
12444 grep -v '^ *+' conftest.er1 >conftest.err
12445 rm -f conftest.er1
12446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 (exit $ac_status); } && {
12449 test -z "$ac_c_werror_flag" ||
12450 test ! -s conftest.err
12451 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012452 ac_hi=$ac_mid
12453else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012454 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012455sed 's/^/| /' conftest.$ac_ext >&5
12456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459
12460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012461done
12462case $ac_lo in
12463?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012465 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012466See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012467echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012468See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012469 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470 else
12471 ac_cv_sizeof__Bool=0
12472 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012473esac
12474else
12475 cat >conftest.$ac_ext <<_ACEOF
12476/* confdefs.h. */
12477_ACEOF
12478cat confdefs.h >>conftest.$ac_ext
12479cat >>conftest.$ac_ext <<_ACEOF
12480/* end confdefs.h. */
12481$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012482 typedef _Bool ac__type_sizeof_;
12483static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12484static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012485#include <stdio.h>
12486#include <stdlib.h>
12487int
12488main ()
12489{
12490
12491 FILE *f = fopen ("conftest.val", "w");
12492 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012494 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012495 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012496 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012497 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012499 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012500 }
12501 else
12502 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012503 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012504 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012506 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012507 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012509
12510 ;
12511 return 0;
12512}
12513_ACEOF
12514rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515if { (ac_try="$ac_link"
12516case "(($ac_try" in
12517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12518 *) ac_try_echo=$ac_try;;
12519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012522 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525 { (case "(($ac_try" in
12526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12527 *) ac_try_echo=$ac_try;;
12528esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012531 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012533 (exit $ac_status); }; }; then
12534 ac_cv_sizeof__Bool=`cat conftest.val`
12535else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012536 echo "$as_me: program exited with status $ac_status" >&5
12537echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012538sed 's/^/| /' conftest.$ac_ext >&5
12539
12540( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012542 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012543See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012544echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012545See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012546 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547 else
12548 ac_cv_sizeof__Bool=0
12549 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551rm -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 +000012552fi
12553rm -f conftest.val
12554fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012555{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12556echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012557
12558
12559
Thomas Woutersb2137042007-02-01 18:02:27 +000012560cat >>confdefs.h <<_ACEOF
12561#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12562_ACEOF
12563
12564
12565fi
12566
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012567{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12568echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012569if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012570 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012571else
12572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012573/* confdefs.h. */
12574_ACEOF
12575cat confdefs.h >>conftest.$ac_ext
12576cat >>conftest.$ac_ext <<_ACEOF
12577/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012578#ifdef HAVE_STDINT_H
12579 #include <stdint.h>
12580 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012581
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012582typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012583int
12584main ()
12585{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012586if ((ac__type_new_ *) 0)
12587 return 0;
12588if (sizeof (ac__type_new_))
12589 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 ;
12591 return 0;
12592}
12593_ACEOF
12594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595if { (ac_try="$ac_compile"
12596case "(($ac_try" in
12597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12598 *) ac_try_echo=$ac_try;;
12599esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012603 grep -v '^ *+' conftest.er1 >conftest.err
12604 rm -f conftest.er1
12605 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607 (exit $ac_status); } && {
12608 test -z "$ac_c_werror_flag" ||
12609 test ! -s conftest.err
12610 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012611 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012614sed 's/^/| /' conftest.$ac_ext >&5
12615
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012616 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012618
12619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012620fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012621{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12622echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12623if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012624
12625cat >>confdefs.h <<_ACEOF
12626#define HAVE_UINTPTR_T 1
12627_ACEOF
12628
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012629{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12630echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12631if test "${ac_cv_type_uintptr_t+set}" = set; then
12632 echo $ECHO_N "(cached) $ECHO_C" >&6
12633else
12634 cat >conftest.$ac_ext <<_ACEOF
12635/* confdefs.h. */
12636_ACEOF
12637cat confdefs.h >>conftest.$ac_ext
12638cat >>conftest.$ac_ext <<_ACEOF
12639/* end confdefs.h. */
12640$ac_includes_default
12641typedef uintptr_t ac__type_new_;
12642int
12643main ()
12644{
12645if ((ac__type_new_ *) 0)
12646 return 0;
12647if (sizeof (ac__type_new_))
12648 return 0;
12649 ;
12650 return 0;
12651}
12652_ACEOF
12653rm -f conftest.$ac_objext
12654if { (ac_try="$ac_compile"
12655case "(($ac_try" in
12656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12657 *) ac_try_echo=$ac_try;;
12658esac
12659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12660 (eval "$ac_compile") 2>conftest.er1
12661 ac_status=$?
12662 grep -v '^ *+' conftest.er1 >conftest.err
12663 rm -f conftest.er1
12664 cat conftest.err >&5
12665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666 (exit $ac_status); } && {
12667 test -z "$ac_c_werror_flag" ||
12668 test ! -s conftest.err
12669 } && test -s conftest.$ac_objext; then
12670 ac_cv_type_uintptr_t=yes
12671else
12672 echo "$as_me: failed program was:" >&5
12673sed 's/^/| /' conftest.$ac_ext >&5
12674
12675 ac_cv_type_uintptr_t=no
12676fi
12677
12678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12679fi
12680{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12681echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683# The cast to long int works around a bug in the HP C Compiler
12684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12686# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012687{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12688echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012689if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012690 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012691else
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 if test "$cross_compiling" = yes; then
12693 # Depending upon the size, compute the lo and hi bounds.
12694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* confdefs.h. */
12696_ACEOF
12697cat confdefs.h >>conftest.$ac_ext
12698cat >>conftest.$ac_ext <<_ACEOF
12699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012700$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012701 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012702int
12703main ()
12704{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012705static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012706test_array [0] = 0
12707
12708 ;
12709 return 0;
12710}
12711_ACEOF
12712rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713if { (ac_try="$ac_compile"
12714case "(($ac_try" in
12715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12716 *) ac_try_echo=$ac_try;;
12717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012721 grep -v '^ *+' conftest.er1 >conftest.err
12722 rm -f conftest.er1
12723 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725 (exit $ac_status); } && {
12726 test -z "$ac_c_werror_flag" ||
12727 test ! -s conftest.err
12728 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 ac_lo=0 ac_mid=0
12730 while :; do
12731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012732/* confdefs.h. */
12733_ACEOF
12734cat confdefs.h >>conftest.$ac_ext
12735cat >>conftest.$ac_ext <<_ACEOF
12736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012737$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012738 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012739int
12740main ()
12741{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012743test_array [0] = 0
12744
12745 ;
12746 return 0;
12747}
12748_ACEOF
12749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012750if { (ac_try="$ac_compile"
12751case "(($ac_try" in
12752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12753 *) ac_try_echo=$ac_try;;
12754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012758 grep -v '^ *+' conftest.er1 >conftest.err
12759 rm -f conftest.er1
12760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762 (exit $ac_status); } && {
12763 test -z "$ac_c_werror_flag" ||
12764 test ! -s conftest.err
12765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 ac_hi=$ac_mid; break
12767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012769sed 's/^/| /' conftest.$ac_ext >&5
12770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771 ac_lo=`expr $ac_mid + 1`
12772 if test $ac_lo -le $ac_mid; then
12773 ac_lo= ac_hi=
12774 break
12775 fi
12776 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778
12779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 done
12781else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012783sed 's/^/| /' conftest.$ac_ext >&5
12784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012786/* confdefs.h. */
12787_ACEOF
12788cat confdefs.h >>conftest.$ac_ext
12789cat >>conftest.$ac_ext <<_ACEOF
12790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012791$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012792 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012793int
12794main ()
12795{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012797test_array [0] = 0
12798
12799 ;
12800 return 0;
12801}
12802_ACEOF
12803rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012804if { (ac_try="$ac_compile"
12805case "(($ac_try" in
12806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12807 *) ac_try_echo=$ac_try;;
12808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012812 grep -v '^ *+' conftest.er1 >conftest.err
12813 rm -f conftest.er1
12814 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012816 (exit $ac_status); } && {
12817 test -z "$ac_c_werror_flag" ||
12818 test ! -s conftest.err
12819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012820 ac_hi=-1 ac_mid=-1
12821 while :; do
12822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012823/* confdefs.h. */
12824_ACEOF
12825cat confdefs.h >>conftest.$ac_ext
12826cat >>conftest.$ac_ext <<_ACEOF
12827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012828$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012829 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012830int
12831main ()
12832{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012834test_array [0] = 0
12835
12836 ;
12837 return 0;
12838}
12839_ACEOF
12840rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841if { (ac_try="$ac_compile"
12842case "(($ac_try" in
12843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12844 *) ac_try_echo=$ac_try;;
12845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012849 grep -v '^ *+' conftest.er1 >conftest.err
12850 rm -f conftest.er1
12851 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853 (exit $ac_status); } && {
12854 test -z "$ac_c_werror_flag" ||
12855 test ! -s conftest.err
12856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 ac_lo=$ac_mid; break
12858else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012860sed 's/^/| /' conftest.$ac_ext >&5
12861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862 ac_hi=`expr '(' $ac_mid ')' - 1`
12863 if test $ac_mid -le $ac_hi; then
12864 ac_lo= ac_hi=
12865 break
12866 fi
12867 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869
12870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 done
12872else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012874sed 's/^/| /' conftest.$ac_ext >&5
12875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878
12879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881
12882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012883# Binary search between lo and hi bounds.
12884while test "x$ac_lo" != "x$ac_hi"; do
12885 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012887/* confdefs.h. */
12888_ACEOF
12889cat confdefs.h >>conftest.$ac_ext
12890cat >>conftest.$ac_ext <<_ACEOF
12891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012892$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012893 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012894int
12895main ()
12896{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012897static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012898test_array [0] = 0
12899
12900 ;
12901 return 0;
12902}
12903_ACEOF
12904rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905if { (ac_try="$ac_compile"
12906case "(($ac_try" in
12907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12908 *) ac_try_echo=$ac_try;;
12909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012913 grep -v '^ *+' conftest.er1 >conftest.err
12914 rm -f conftest.er1
12915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917 (exit $ac_status); } && {
12918 test -z "$ac_c_werror_flag" ||
12919 test ! -s conftest.err
12920 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012921 ac_hi=$ac_mid
12922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012924sed 's/^/| /' conftest.$ac_ext >&5
12925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928
12929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012930done
12931case $ac_lo in
12932?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012934 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012935See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012936echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012937See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012938 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939 else
12940 ac_cv_sizeof_uintptr_t=0
12941 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012942esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012943else
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012945/* confdefs.h. */
12946_ACEOF
12947cat confdefs.h >>conftest.$ac_ext
12948cat >>conftest.$ac_ext <<_ACEOF
12949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012950$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012951 typedef uintptr_t ac__type_sizeof_;
12952static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12953static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012954#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012955#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012956int
12957main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012958{
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
12960 FILE *f = fopen ("conftest.val", "w");
12961 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012963 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012966 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012967 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012968 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 }
12970 else
12971 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012973 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012975 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012978
12979 ;
12980 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012981}
Martin v. Löwis11437992002-04-12 09:54:03 +000012982_ACEOF
12983rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984if { (ac_try="$ac_link"
12985case "(($ac_try" in
12986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12987 *) ac_try_echo=$ac_try;;
12988esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994 { (case "(($ac_try" in
12995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12996 *) ac_try_echo=$ac_try;;
12997esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 (exit $ac_status); }; }; then
13003 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013005 echo "$as_me: program exited with status $ac_status" >&5
13006echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013007sed 's/^/| /' conftest.$ac_ext >&5
13008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013011 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013012See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013013echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013014See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013015 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013016 else
13017 ac_cv_sizeof_uintptr_t=0
13018 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020rm -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 +000013021fi
13022rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013023fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013024{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13025echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026
13027
13028
Martin v. Löwis11437992002-04-12 09:54:03 +000013029cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013030#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013031_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013032
Michael W. Hudson54241132001-12-07 15:38:26 +000013033
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013034fi
13035
Thomas Wouters89f507f2006-12-13 04:49:30 +000013036
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013037{ echo "$as_me:$LINENO: checking for off_t" >&5
13038echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13039if test "${ac_cv_type_off_t+set}" = set; then
13040 echo $ECHO_N "(cached) $ECHO_C" >&6
13041else
13042 cat >conftest.$ac_ext <<_ACEOF
13043/* confdefs.h. */
13044_ACEOF
13045cat confdefs.h >>conftest.$ac_ext
13046cat >>conftest.$ac_ext <<_ACEOF
13047/* end confdefs.h. */
13048
13049#ifdef HAVE_SYS_TYPES_H
13050#include <sys/types.h>
13051#endif
13052
13053
13054typedef off_t ac__type_new_;
13055int
13056main ()
13057{
13058if ((ac__type_new_ *) 0)
13059 return 0;
13060if (sizeof (ac__type_new_))
13061 return 0;
13062 ;
13063 return 0;
13064}
13065_ACEOF
13066rm -f conftest.$ac_objext
13067if { (ac_try="$ac_compile"
13068case "(($ac_try" in
13069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13070 *) ac_try_echo=$ac_try;;
13071esac
13072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13073 (eval "$ac_compile") 2>conftest.er1
13074 ac_status=$?
13075 grep -v '^ *+' conftest.er1 >conftest.err
13076 rm -f conftest.er1
13077 cat conftest.err >&5
13078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079 (exit $ac_status); } && {
13080 test -z "$ac_c_werror_flag" ||
13081 test ! -s conftest.err
13082 } && test -s conftest.$ac_objext; then
13083 ac_cv_type_off_t=yes
13084else
13085 echo "$as_me: failed program was:" >&5
13086sed 's/^/| /' conftest.$ac_ext >&5
13087
13088 ac_cv_type_off_t=no
13089fi
13090
13091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13092fi
13093{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13094echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013096# The cast to long int works around a bug in the HP C Compiler
13097# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13098# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13099# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013100{ echo "$as_me:$LINENO: checking size of off_t" >&5
13101echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013102if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013103 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013104else
13105 if test "$cross_compiling" = yes; then
13106 # Depending upon the size, compute the lo and hi bounds.
13107cat >conftest.$ac_ext <<_ACEOF
13108/* confdefs.h. */
13109_ACEOF
13110cat confdefs.h >>conftest.$ac_ext
13111cat >>conftest.$ac_ext <<_ACEOF
13112/* end confdefs.h. */
13113
13114#ifdef HAVE_SYS_TYPES_H
13115#include <sys/types.h>
13116#endif
13117
13118
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013119 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120int
13121main ()
13122{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013123static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013124test_array [0] = 0
13125
13126 ;
13127 return 0;
13128}
13129_ACEOF
13130rm -f conftest.$ac_objext
13131if { (ac_try="$ac_compile"
13132case "(($ac_try" in
13133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13134 *) ac_try_echo=$ac_try;;
13135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013137 (eval "$ac_compile") 2>conftest.er1
13138 ac_status=$?
13139 grep -v '^ *+' conftest.er1 >conftest.err
13140 rm -f conftest.er1
13141 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013143 (exit $ac_status); } && {
13144 test -z "$ac_c_werror_flag" ||
13145 test ! -s conftest.err
13146 } && test -s conftest.$ac_objext; then
13147 ac_lo=0 ac_mid=0
13148 while :; do
13149 cat >conftest.$ac_ext <<_ACEOF
13150/* confdefs.h. */
13151_ACEOF
13152cat confdefs.h >>conftest.$ac_ext
13153cat >>conftest.$ac_ext <<_ACEOF
13154/* end confdefs.h. */
13155
13156#ifdef HAVE_SYS_TYPES_H
13157#include <sys/types.h>
13158#endif
13159
13160
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013161 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013162int
13163main ()
13164{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013165static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013166test_array [0] = 0
13167
13168 ;
13169 return 0;
13170}
13171_ACEOF
13172rm -f conftest.$ac_objext
13173if { (ac_try="$ac_compile"
13174case "(($ac_try" in
13175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13176 *) ac_try_echo=$ac_try;;
13177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013179 (eval "$ac_compile") 2>conftest.er1
13180 ac_status=$?
13181 grep -v '^ *+' conftest.er1 >conftest.err
13182 rm -f conftest.er1
13183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013185 (exit $ac_status); } && {
13186 test -z "$ac_c_werror_flag" ||
13187 test ! -s conftest.err
13188 } && test -s conftest.$ac_objext; then
13189 ac_hi=$ac_mid; break
13190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013191 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013192sed 's/^/| /' conftest.$ac_ext >&5
13193
13194 ac_lo=`expr $ac_mid + 1`
13195 if test $ac_lo -le $ac_mid; then
13196 ac_lo= ac_hi=
13197 break
13198 fi
13199 ac_mid=`expr 2 '*' $ac_mid + 1`
13200fi
13201
13202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13203 done
13204else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013205 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013206sed 's/^/| /' conftest.$ac_ext >&5
13207
13208 cat >conftest.$ac_ext <<_ACEOF
13209/* confdefs.h. */
13210_ACEOF
13211cat confdefs.h >>conftest.$ac_ext
13212cat >>conftest.$ac_ext <<_ACEOF
13213/* end confdefs.h. */
13214
13215#ifdef HAVE_SYS_TYPES_H
13216#include <sys/types.h>
13217#endif
13218
13219
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013220 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013221int
13222main ()
13223{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013225test_array [0] = 0
13226
13227 ;
13228 return 0;
13229}
13230_ACEOF
13231rm -f conftest.$ac_objext
13232if { (ac_try="$ac_compile"
13233case "(($ac_try" in
13234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13235 *) ac_try_echo=$ac_try;;
13236esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013238 (eval "$ac_compile") 2>conftest.er1
13239 ac_status=$?
13240 grep -v '^ *+' conftest.er1 >conftest.err
13241 rm -f conftest.er1
13242 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013244 (exit $ac_status); } && {
13245 test -z "$ac_c_werror_flag" ||
13246 test ! -s conftest.err
13247 } && test -s conftest.$ac_objext; then
13248 ac_hi=-1 ac_mid=-1
13249 while :; do
13250 cat >conftest.$ac_ext <<_ACEOF
13251/* confdefs.h. */
13252_ACEOF
13253cat confdefs.h >>conftest.$ac_ext
13254cat >>conftest.$ac_ext <<_ACEOF
13255/* end confdefs.h. */
13256
13257#ifdef HAVE_SYS_TYPES_H
13258#include <sys/types.h>
13259#endif
13260
13261
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013262 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013263int
13264main ()
13265{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013266static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267test_array [0] = 0
13268
13269 ;
13270 return 0;
13271}
13272_ACEOF
13273rm -f conftest.$ac_objext
13274if { (ac_try="$ac_compile"
13275case "(($ac_try" in
13276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13277 *) ac_try_echo=$ac_try;;
13278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013280 (eval "$ac_compile") 2>conftest.er1
13281 ac_status=$?
13282 grep -v '^ *+' conftest.er1 >conftest.err
13283 rm -f conftest.er1
13284 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013286 (exit $ac_status); } && {
13287 test -z "$ac_c_werror_flag" ||
13288 test ! -s conftest.err
13289 } && test -s conftest.$ac_objext; then
13290 ac_lo=$ac_mid; break
13291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013292 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013293sed 's/^/| /' conftest.$ac_ext >&5
13294
13295 ac_hi=`expr '(' $ac_mid ')' - 1`
13296 if test $ac_mid -le $ac_hi; then
13297 ac_lo= ac_hi=
13298 break
13299 fi
13300 ac_mid=`expr 2 '*' $ac_mid`
13301fi
13302
13303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13304 done
13305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013306 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013307sed 's/^/| /' conftest.$ac_ext >&5
13308
13309 ac_lo= ac_hi=
13310fi
13311
13312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13313fi
13314
13315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13316# Binary search between lo and hi bounds.
13317while test "x$ac_lo" != "x$ac_hi"; do
13318 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13319 cat >conftest.$ac_ext <<_ACEOF
13320/* confdefs.h. */
13321_ACEOF
13322cat confdefs.h >>conftest.$ac_ext
13323cat >>conftest.$ac_ext <<_ACEOF
13324/* end confdefs.h. */
13325
13326#ifdef HAVE_SYS_TYPES_H
13327#include <sys/types.h>
13328#endif
13329
13330
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013331 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013332int
13333main ()
13334{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013336test_array [0] = 0
13337
13338 ;
13339 return 0;
13340}
13341_ACEOF
13342rm -f conftest.$ac_objext
13343if { (ac_try="$ac_compile"
13344case "(($ac_try" in
13345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13346 *) ac_try_echo=$ac_try;;
13347esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013349 (eval "$ac_compile") 2>conftest.er1
13350 ac_status=$?
13351 grep -v '^ *+' conftest.er1 >conftest.err
13352 rm -f conftest.er1
13353 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013355 (exit $ac_status); } && {
13356 test -z "$ac_c_werror_flag" ||
13357 test ! -s conftest.err
13358 } && test -s conftest.$ac_objext; then
13359 ac_hi=$ac_mid
13360else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013361 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013362sed 's/^/| /' conftest.$ac_ext >&5
13363
13364 ac_lo=`expr '(' $ac_mid ')' + 1`
13365fi
13366
13367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13368done
13369case $ac_lo in
13370?*) ac_cv_sizeof_off_t=$ac_lo;;
13371'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013373See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013374echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013375See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013376 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013377 else
13378 ac_cv_sizeof_off_t=0
13379 fi ;;
13380esac
13381else
13382 cat >conftest.$ac_ext <<_ACEOF
13383/* confdefs.h. */
13384_ACEOF
13385cat confdefs.h >>conftest.$ac_ext
13386cat >>conftest.$ac_ext <<_ACEOF
13387/* end confdefs.h. */
13388
13389#ifdef HAVE_SYS_TYPES_H
13390#include <sys/types.h>
13391#endif
13392
13393
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013394 typedef off_t ac__type_sizeof_;
13395static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13396static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013397#include <stdio.h>
13398#include <stdlib.h>
13399int
13400main ()
13401{
13402
13403 FILE *f = fopen ("conftest.val", "w");
13404 if (! f)
13405 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013406 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013407 {
13408 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013409 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013410 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013411 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013412 }
13413 else
13414 {
13415 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013416 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013417 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013418 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013419 }
13420 return ferror (f) || fclose (f) != 0;
13421
13422 ;
13423 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013424}
Martin v. Löwis11437992002-04-12 09:54:03 +000013425_ACEOF
13426rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427if { (ac_try="$ac_link"
13428case "(($ac_try" in
13429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13430 *) ac_try_echo=$ac_try;;
13431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013433 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013437 { (case "(($ac_try" in
13438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13439 *) ac_try_echo=$ac_try;;
13440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013446 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013447else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013448 echo "$as_me: program exited with status $ac_status" >&5
13449echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013450sed 's/^/| /' conftest.$ac_ext >&5
13451
Martin v. Löwis11437992002-04-12 09:54:03 +000013452( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013453if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013455See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013456echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013457See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013458 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013459 else
13460 ac_cv_sizeof_off_t=0
13461 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463rm -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 +000013464fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013465rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013466fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013467{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13468echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013470
13471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013473#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013474_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013475
Michael W. Hudson54241132001-12-07 15:38:26 +000013476
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013478{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13479echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013480if test "$have_long_long" = yes
13481then
13482if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013483 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013484
Martin v. Löwis11437992002-04-12 09:54:03 +000013485cat >>confdefs.h <<\_ACEOF
13486#define HAVE_LARGEFILE_SUPPORT 1
13487_ACEOF
13488
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013489 { echo "$as_me:$LINENO: result: yes" >&5
13490echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013492 { echo "$as_me:$LINENO: result: no" >&5
13493echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013494fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013495else
13496 { echo "$as_me:$LINENO: result: no" >&5
13497echo "${ECHO_T}no" >&6; }
13498fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013499
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013500{ echo "$as_me:$LINENO: checking for time_t" >&5
13501echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13502if test "${ac_cv_type_time_t+set}" = set; then
13503 echo $ECHO_N "(cached) $ECHO_C" >&6
13504else
13505 cat >conftest.$ac_ext <<_ACEOF
13506/* confdefs.h. */
13507_ACEOF
13508cat confdefs.h >>conftest.$ac_ext
13509cat >>conftest.$ac_ext <<_ACEOF
13510/* end confdefs.h. */
13511
13512#ifdef HAVE_SYS_TYPES_H
13513#include <sys/types.h>
13514#endif
13515#ifdef HAVE_TIME_H
13516#include <time.h>
13517#endif
13518
13519
13520typedef time_t ac__type_new_;
13521int
13522main ()
13523{
13524if ((ac__type_new_ *) 0)
13525 return 0;
13526if (sizeof (ac__type_new_))
13527 return 0;
13528 ;
13529 return 0;
13530}
13531_ACEOF
13532rm -f conftest.$ac_objext
13533if { (ac_try="$ac_compile"
13534case "(($ac_try" in
13535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13536 *) ac_try_echo=$ac_try;;
13537esac
13538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13539 (eval "$ac_compile") 2>conftest.er1
13540 ac_status=$?
13541 grep -v '^ *+' conftest.er1 >conftest.err
13542 rm -f conftest.er1
13543 cat conftest.err >&5
13544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13545 (exit $ac_status); } && {
13546 test -z "$ac_c_werror_flag" ||
13547 test ! -s conftest.err
13548 } && test -s conftest.$ac_objext; then
13549 ac_cv_type_time_t=yes
13550else
13551 echo "$as_me: failed program was:" >&5
13552sed 's/^/| /' conftest.$ac_ext >&5
13553
13554 ac_cv_type_time_t=no
13555fi
13556
13557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13558fi
13559{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13560echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13561
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013562# The cast to long int works around a bug in the HP C Compiler
13563# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13564# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13565# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013566{ echo "$as_me:$LINENO: checking size of time_t" >&5
13567echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013568if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013569 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013570else
13571 if test "$cross_compiling" = yes; then
13572 # Depending upon the size, compute the lo and hi bounds.
13573cat >conftest.$ac_ext <<_ACEOF
13574/* confdefs.h. */
13575_ACEOF
13576cat confdefs.h >>conftest.$ac_ext
13577cat >>conftest.$ac_ext <<_ACEOF
13578/* end confdefs.h. */
13579
13580#ifdef HAVE_SYS_TYPES_H
13581#include <sys/types.h>
13582#endif
13583#ifdef HAVE_TIME_H
13584#include <time.h>
13585#endif
13586
13587
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013588 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589int
13590main ()
13591{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013592static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013593test_array [0] = 0
13594
13595 ;
13596 return 0;
13597}
13598_ACEOF
13599rm -f conftest.$ac_objext
13600if { (ac_try="$ac_compile"
13601case "(($ac_try" in
13602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13603 *) ac_try_echo=$ac_try;;
13604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013606 (eval "$ac_compile") 2>conftest.er1
13607 ac_status=$?
13608 grep -v '^ *+' conftest.er1 >conftest.err
13609 rm -f conftest.er1
13610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013612 (exit $ac_status); } && {
13613 test -z "$ac_c_werror_flag" ||
13614 test ! -s conftest.err
13615 } && test -s conftest.$ac_objext; then
13616 ac_lo=0 ac_mid=0
13617 while :; do
13618 cat >conftest.$ac_ext <<_ACEOF
13619/* confdefs.h. */
13620_ACEOF
13621cat confdefs.h >>conftest.$ac_ext
13622cat >>conftest.$ac_ext <<_ACEOF
13623/* end confdefs.h. */
13624
13625#ifdef HAVE_SYS_TYPES_H
13626#include <sys/types.h>
13627#endif
13628#ifdef HAVE_TIME_H
13629#include <time.h>
13630#endif
13631
13632
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013633 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013634int
13635main ()
13636{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013638test_array [0] = 0
13639
13640 ;
13641 return 0;
13642}
13643_ACEOF
13644rm -f conftest.$ac_objext
13645if { (ac_try="$ac_compile"
13646case "(($ac_try" in
13647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13648 *) ac_try_echo=$ac_try;;
13649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651 (eval "$ac_compile") 2>conftest.er1
13652 ac_status=$?
13653 grep -v '^ *+' conftest.er1 >conftest.err
13654 rm -f conftest.er1
13655 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013657 (exit $ac_status); } && {
13658 test -z "$ac_c_werror_flag" ||
13659 test ! -s conftest.err
13660 } && test -s conftest.$ac_objext; then
13661 ac_hi=$ac_mid; break
13662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013663 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013664sed 's/^/| /' conftest.$ac_ext >&5
13665
13666 ac_lo=`expr $ac_mid + 1`
13667 if test $ac_lo -le $ac_mid; then
13668 ac_lo= ac_hi=
13669 break
13670 fi
13671 ac_mid=`expr 2 '*' $ac_mid + 1`
13672fi
13673
13674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13675 done
13676else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013677 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013678sed 's/^/| /' conftest.$ac_ext >&5
13679
13680 cat >conftest.$ac_ext <<_ACEOF
13681/* confdefs.h. */
13682_ACEOF
13683cat confdefs.h >>conftest.$ac_ext
13684cat >>conftest.$ac_ext <<_ACEOF
13685/* end confdefs.h. */
13686
13687#ifdef HAVE_SYS_TYPES_H
13688#include <sys/types.h>
13689#endif
13690#ifdef HAVE_TIME_H
13691#include <time.h>
13692#endif
13693
13694
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013695 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013696int
13697main ()
13698{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013700test_array [0] = 0
13701
13702 ;
13703 return 0;
13704}
13705_ACEOF
13706rm -f conftest.$ac_objext
13707if { (ac_try="$ac_compile"
13708case "(($ac_try" in
13709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13710 *) ac_try_echo=$ac_try;;
13711esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013713 (eval "$ac_compile") 2>conftest.er1
13714 ac_status=$?
13715 grep -v '^ *+' conftest.er1 >conftest.err
13716 rm -f conftest.er1
13717 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013719 (exit $ac_status); } && {
13720 test -z "$ac_c_werror_flag" ||
13721 test ! -s conftest.err
13722 } && test -s conftest.$ac_objext; then
13723 ac_hi=-1 ac_mid=-1
13724 while :; do
13725 cat >conftest.$ac_ext <<_ACEOF
13726/* confdefs.h. */
13727_ACEOF
13728cat confdefs.h >>conftest.$ac_ext
13729cat >>conftest.$ac_ext <<_ACEOF
13730/* end confdefs.h. */
13731
13732#ifdef HAVE_SYS_TYPES_H
13733#include <sys/types.h>
13734#endif
13735#ifdef HAVE_TIME_H
13736#include <time.h>
13737#endif
13738
13739
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013740 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013741int
13742main ()
13743{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013745test_array [0] = 0
13746
13747 ;
13748 return 0;
13749}
13750_ACEOF
13751rm -f conftest.$ac_objext
13752if { (ac_try="$ac_compile"
13753case "(($ac_try" in
13754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13755 *) ac_try_echo=$ac_try;;
13756esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013758 (eval "$ac_compile") 2>conftest.er1
13759 ac_status=$?
13760 grep -v '^ *+' conftest.er1 >conftest.err
13761 rm -f conftest.er1
13762 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013764 (exit $ac_status); } && {
13765 test -z "$ac_c_werror_flag" ||
13766 test ! -s conftest.err
13767 } && test -s conftest.$ac_objext; then
13768 ac_lo=$ac_mid; break
13769else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013770 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013771sed 's/^/| /' conftest.$ac_ext >&5
13772
13773 ac_hi=`expr '(' $ac_mid ')' - 1`
13774 if test $ac_mid -le $ac_hi; then
13775 ac_lo= ac_hi=
13776 break
13777 fi
13778 ac_mid=`expr 2 '*' $ac_mid`
13779fi
13780
13781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13782 done
13783else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013784 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013785sed 's/^/| /' conftest.$ac_ext >&5
13786
13787 ac_lo= ac_hi=
13788fi
13789
13790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13791fi
13792
13793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13794# Binary search between lo and hi bounds.
13795while test "x$ac_lo" != "x$ac_hi"; do
13796 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13797 cat >conftest.$ac_ext <<_ACEOF
13798/* confdefs.h. */
13799_ACEOF
13800cat confdefs.h >>conftest.$ac_ext
13801cat >>conftest.$ac_ext <<_ACEOF
13802/* end confdefs.h. */
13803
13804#ifdef HAVE_SYS_TYPES_H
13805#include <sys/types.h>
13806#endif
13807#ifdef HAVE_TIME_H
13808#include <time.h>
13809#endif
13810
13811
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013812 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013813int
13814main ()
13815{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013816static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013817test_array [0] = 0
13818
13819 ;
13820 return 0;
13821}
13822_ACEOF
13823rm -f conftest.$ac_objext
13824if { (ac_try="$ac_compile"
13825case "(($ac_try" in
13826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13827 *) ac_try_echo=$ac_try;;
13828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013830 (eval "$ac_compile") 2>conftest.er1
13831 ac_status=$?
13832 grep -v '^ *+' conftest.er1 >conftest.err
13833 rm -f conftest.er1
13834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013836 (exit $ac_status); } && {
13837 test -z "$ac_c_werror_flag" ||
13838 test ! -s conftest.err
13839 } && test -s conftest.$ac_objext; then
13840 ac_hi=$ac_mid
13841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013842 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013843sed 's/^/| /' conftest.$ac_ext >&5
13844
13845 ac_lo=`expr '(' $ac_mid ')' + 1`
13846fi
13847
13848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13849done
13850case $ac_lo in
13851?*) ac_cv_sizeof_time_t=$ac_lo;;
13852'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013853 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013854See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013855echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013856See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013857 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013858 else
13859 ac_cv_sizeof_time_t=0
13860 fi ;;
13861esac
13862else
13863 cat >conftest.$ac_ext <<_ACEOF
13864/* confdefs.h. */
13865_ACEOF
13866cat confdefs.h >>conftest.$ac_ext
13867cat >>conftest.$ac_ext <<_ACEOF
13868/* end confdefs.h. */
13869
13870#ifdef HAVE_SYS_TYPES_H
13871#include <sys/types.h>
13872#endif
13873#ifdef HAVE_TIME_H
13874#include <time.h>
13875#endif
13876
13877
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013878 typedef time_t ac__type_sizeof_;
13879static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13880static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013881#include <stdio.h>
13882#include <stdlib.h>
13883int
13884main ()
13885{
13886
13887 FILE *f = fopen ("conftest.val", "w");
13888 if (! f)
13889 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013890 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013891 {
13892 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013894 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013895 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013896 }
13897 else
13898 {
13899 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013900 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013901 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013902 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013903 }
13904 return ferror (f) || fclose (f) != 0;
13905
13906 ;
13907 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013908}
Martin v. Löwis11437992002-04-12 09:54:03 +000013909_ACEOF
13910rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911if { (ac_try="$ac_link"
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_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921 { (case "(($ac_try" in
13922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13923 *) ac_try_echo=$ac_try;;
13924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013927 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013930 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013931else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013932 echo "$as_me: program exited with status $ac_status" >&5
13933echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013934sed 's/^/| /' conftest.$ac_ext >&5
13935
Martin v. Löwis11437992002-04-12 09:54:03 +000013936( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013937if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013938 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013939See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013940echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013941See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013942 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013943 else
13944 ac_cv_sizeof_time_t=0
13945 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947rm -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 +000013948fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013949rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013950fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013951{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13952echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013954
13955
Martin v. Löwis11437992002-04-12 09:54:03 +000013956cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013957#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013958_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013959
Michael W. Hudson54241132001-12-07 15:38:26 +000013960
13961
Trent Mick635f6fb2000-08-23 21:33:05 +000013962# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013963ac_save_cc="$CC"
13964if test "$ac_cv_kpthread" = "yes"
13965then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013966elif test "$ac_cv_kthread" = "yes"
13967then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013968elif test "$ac_cv_pthread" = "yes"
13969then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013970fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013971
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013972{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13973echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013974have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013975cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013976/* confdefs.h. */
13977_ACEOF
13978cat confdefs.h >>conftest.$ac_ext
13979cat >>conftest.$ac_ext <<_ACEOF
13980/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013981#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013982int
13983main ()
13984{
Guido van Rossum12580492000-09-24 16:47:19 +000013985pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 ;
13987 return 0;
13988}
13989_ACEOF
13990rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991if { (ac_try="$ac_compile"
13992case "(($ac_try" in
13993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13994 *) ac_try_echo=$ac_try;;
13995esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013997 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013999 grep -v '^ *+' conftest.er1 >conftest.err
14000 rm -f conftest.er1
14001 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003 (exit $ac_status); } && {
14004 test -z "$ac_c_werror_flag" ||
14005 test ! -s conftest.err
14006 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014007 have_pthread_t=yes
14008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014010sed 's/^/| /' conftest.$ac_ext >&5
14011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012
Trent Mick635f6fb2000-08-23 21:33:05 +000014013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014
14015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014016{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14017echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014018if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014019 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14020echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14021if test "${ac_cv_type_pthread_t+set}" = set; then
14022 echo $ECHO_N "(cached) $ECHO_C" >&6
14023else
14024 cat >conftest.$ac_ext <<_ACEOF
14025/* confdefs.h. */
14026_ACEOF
14027cat confdefs.h >>conftest.$ac_ext
14028cat >>conftest.$ac_ext <<_ACEOF
14029/* end confdefs.h. */
14030
14031#ifdef HAVE_PTHREAD_H
14032#include <pthread.h>
14033#endif
14034
14035
14036typedef pthread_t ac__type_new_;
14037int
14038main ()
14039{
14040if ((ac__type_new_ *) 0)
14041 return 0;
14042if (sizeof (ac__type_new_))
14043 return 0;
14044 ;
14045 return 0;
14046}
14047_ACEOF
14048rm -f conftest.$ac_objext
14049if { (ac_try="$ac_compile"
14050case "(($ac_try" in
14051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14052 *) ac_try_echo=$ac_try;;
14053esac
14054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14055 (eval "$ac_compile") 2>conftest.er1
14056 ac_status=$?
14057 grep -v '^ *+' conftest.er1 >conftest.err
14058 rm -f conftest.er1
14059 cat conftest.err >&5
14060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14061 (exit $ac_status); } && {
14062 test -z "$ac_c_werror_flag" ||
14063 test ! -s conftest.err
14064 } && test -s conftest.$ac_objext; then
14065 ac_cv_type_pthread_t=yes
14066else
14067 echo "$as_me: failed program was:" >&5
14068sed 's/^/| /' conftest.$ac_ext >&5
14069
14070 ac_cv_type_pthread_t=no
14071fi
14072
14073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14074fi
14075{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14076echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14077
14078# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014079# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14080# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14081# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014082{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14083echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014084if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014085 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014086else
14087 if test "$cross_compiling" = yes; then
14088 # Depending upon the size, compute the lo and hi bounds.
14089cat >conftest.$ac_ext <<_ACEOF
14090/* confdefs.h. */
14091_ACEOF
14092cat confdefs.h >>conftest.$ac_ext
14093cat >>conftest.$ac_ext <<_ACEOF
14094/* end confdefs.h. */
14095
14096#ifdef HAVE_PTHREAD_H
14097#include <pthread.h>
14098#endif
14099
14100
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014101 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014102int
14103main ()
14104{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014105static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014106test_array [0] = 0
14107
14108 ;
14109 return 0;
14110}
14111_ACEOF
14112rm -f conftest.$ac_objext
14113if { (ac_try="$ac_compile"
14114case "(($ac_try" in
14115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14116 *) ac_try_echo=$ac_try;;
14117esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014119 (eval "$ac_compile") 2>conftest.er1
14120 ac_status=$?
14121 grep -v '^ *+' conftest.er1 >conftest.err
14122 rm -f conftest.er1
14123 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014125 (exit $ac_status); } && {
14126 test -z "$ac_c_werror_flag" ||
14127 test ! -s conftest.err
14128 } && test -s conftest.$ac_objext; then
14129 ac_lo=0 ac_mid=0
14130 while :; do
14131 cat >conftest.$ac_ext <<_ACEOF
14132/* confdefs.h. */
14133_ACEOF
14134cat confdefs.h >>conftest.$ac_ext
14135cat >>conftest.$ac_ext <<_ACEOF
14136/* end confdefs.h. */
14137
14138#ifdef HAVE_PTHREAD_H
14139#include <pthread.h>
14140#endif
14141
14142
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014143 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014144int
14145main ()
14146{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014148test_array [0] = 0
14149
14150 ;
14151 return 0;
14152}
14153_ACEOF
14154rm -f conftest.$ac_objext
14155if { (ac_try="$ac_compile"
14156case "(($ac_try" in
14157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14158 *) ac_try_echo=$ac_try;;
14159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014161 (eval "$ac_compile") 2>conftest.er1
14162 ac_status=$?
14163 grep -v '^ *+' conftest.er1 >conftest.err
14164 rm -f conftest.er1
14165 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014167 (exit $ac_status); } && {
14168 test -z "$ac_c_werror_flag" ||
14169 test ! -s conftest.err
14170 } && test -s conftest.$ac_objext; then
14171 ac_hi=$ac_mid; break
14172else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014173 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014174sed 's/^/| /' conftest.$ac_ext >&5
14175
14176 ac_lo=`expr $ac_mid + 1`
14177 if test $ac_lo -le $ac_mid; then
14178 ac_lo= ac_hi=
14179 break
14180 fi
14181 ac_mid=`expr 2 '*' $ac_mid + 1`
14182fi
14183
14184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14185 done
14186else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014187 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188sed 's/^/| /' conftest.$ac_ext >&5
14189
14190 cat >conftest.$ac_ext <<_ACEOF
14191/* confdefs.h. */
14192_ACEOF
14193cat confdefs.h >>conftest.$ac_ext
14194cat >>conftest.$ac_ext <<_ACEOF
14195/* end confdefs.h. */
14196
14197#ifdef HAVE_PTHREAD_H
14198#include <pthread.h>
14199#endif
14200
14201
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014202 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014203int
14204main ()
14205{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014206static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014207test_array [0] = 0
14208
14209 ;
14210 return 0;
14211}
14212_ACEOF
14213rm -f conftest.$ac_objext
14214if { (ac_try="$ac_compile"
14215case "(($ac_try" in
14216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14217 *) ac_try_echo=$ac_try;;
14218esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014220 (eval "$ac_compile") 2>conftest.er1
14221 ac_status=$?
14222 grep -v '^ *+' conftest.er1 >conftest.err
14223 rm -f conftest.er1
14224 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014226 (exit $ac_status); } && {
14227 test -z "$ac_c_werror_flag" ||
14228 test ! -s conftest.err
14229 } && test -s conftest.$ac_objext; then
14230 ac_hi=-1 ac_mid=-1
14231 while :; do
14232 cat >conftest.$ac_ext <<_ACEOF
14233/* confdefs.h. */
14234_ACEOF
14235cat confdefs.h >>conftest.$ac_ext
14236cat >>conftest.$ac_ext <<_ACEOF
14237/* end confdefs.h. */
14238
14239#ifdef HAVE_PTHREAD_H
14240#include <pthread.h>
14241#endif
14242
14243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014244 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014245int
14246main ()
14247{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014248static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014249test_array [0] = 0
14250
14251 ;
14252 return 0;
14253}
14254_ACEOF
14255rm -f conftest.$ac_objext
14256if { (ac_try="$ac_compile"
14257case "(($ac_try" in
14258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14259 *) ac_try_echo=$ac_try;;
14260esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014262 (eval "$ac_compile") 2>conftest.er1
14263 ac_status=$?
14264 grep -v '^ *+' conftest.er1 >conftest.err
14265 rm -f conftest.er1
14266 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014268 (exit $ac_status); } && {
14269 test -z "$ac_c_werror_flag" ||
14270 test ! -s conftest.err
14271 } && test -s conftest.$ac_objext; then
14272 ac_lo=$ac_mid; break
14273else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014274 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014275sed 's/^/| /' conftest.$ac_ext >&5
14276
14277 ac_hi=`expr '(' $ac_mid ')' - 1`
14278 if test $ac_mid -le $ac_hi; then
14279 ac_lo= ac_hi=
14280 break
14281 fi
14282 ac_mid=`expr 2 '*' $ac_mid`
14283fi
14284
14285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14286 done
14287else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014288 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014289sed 's/^/| /' conftest.$ac_ext >&5
14290
14291 ac_lo= ac_hi=
14292fi
14293
14294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295fi
14296
14297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14298# Binary search between lo and hi bounds.
14299while test "x$ac_lo" != "x$ac_hi"; do
14300 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14301 cat >conftest.$ac_ext <<_ACEOF
14302/* confdefs.h. */
14303_ACEOF
14304cat confdefs.h >>conftest.$ac_ext
14305cat >>conftest.$ac_ext <<_ACEOF
14306/* end confdefs.h. */
14307
14308#ifdef HAVE_PTHREAD_H
14309#include <pthread.h>
14310#endif
14311
14312
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014313 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014314int
14315main ()
14316{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014317static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014318test_array [0] = 0
14319
14320 ;
14321 return 0;
14322}
14323_ACEOF
14324rm -f conftest.$ac_objext
14325if { (ac_try="$ac_compile"
14326case "(($ac_try" in
14327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14328 *) ac_try_echo=$ac_try;;
14329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014331 (eval "$ac_compile") 2>conftest.er1
14332 ac_status=$?
14333 grep -v '^ *+' conftest.er1 >conftest.err
14334 rm -f conftest.er1
14335 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014337 (exit $ac_status); } && {
14338 test -z "$ac_c_werror_flag" ||
14339 test ! -s conftest.err
14340 } && test -s conftest.$ac_objext; then
14341 ac_hi=$ac_mid
14342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014343 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344sed 's/^/| /' conftest.$ac_ext >&5
14345
14346 ac_lo=`expr '(' $ac_mid ')' + 1`
14347fi
14348
14349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14350done
14351case $ac_lo in
14352?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14353'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014354 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014355See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014356echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014357See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014358 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014359 else
14360 ac_cv_sizeof_pthread_t=0
14361 fi ;;
14362esac
14363else
14364 cat >conftest.$ac_ext <<_ACEOF
14365/* confdefs.h. */
14366_ACEOF
14367cat confdefs.h >>conftest.$ac_ext
14368cat >>conftest.$ac_ext <<_ACEOF
14369/* end confdefs.h. */
14370
14371#ifdef HAVE_PTHREAD_H
14372#include <pthread.h>
14373#endif
14374
14375
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014376 typedef pthread_t ac__type_sizeof_;
14377static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14378static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014379#include <stdio.h>
14380#include <stdlib.h>
14381int
14382main ()
14383{
14384
14385 FILE *f = fopen ("conftest.val", "w");
14386 if (! f)
14387 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014388 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014389 {
14390 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014391 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014392 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014393 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014394 }
14395 else
14396 {
14397 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014398 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014399 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014400 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014401 }
14402 return ferror (f) || fclose (f) != 0;
14403
14404 ;
14405 return 0;
14406}
Martin v. Löwis11437992002-04-12 09:54:03 +000014407_ACEOF
14408rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409if { (ac_try="$ac_link"
14410case "(($ac_try" in
14411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14412 *) ac_try_echo=$ac_try;;
14413esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014416 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014418 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419 { (case "(($ac_try" in
14420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14421 *) ac_try_echo=$ac_try;;
14422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014428 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014429else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014430 echo "$as_me: program exited with status $ac_status" >&5
14431echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014432sed 's/^/| /' conftest.$ac_ext >&5
14433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014435if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014436 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014437See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014438echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014439See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014440 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014441 else
14442 ac_cv_sizeof_pthread_t=0
14443 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445rm -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 +000014446fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014447rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014448fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014449{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14450echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014451
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014452
14453
Martin v. Löwis11437992002-04-12 09:54:03 +000014454cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014455#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014456_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014457
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014458
Trent Mick635f6fb2000-08-23 21:33:05 +000014459fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014460CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014461
Michael W. Hudson54241132001-12-07 15:38:26 +000014462
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014463case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014464 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014465 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14466 ;;
14467 Darwin/*)
14468 OTHER_LIBTOOL_OPT=""
14469 ;;
14470esac
14471
14472
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014473ARCH_RUN_32BIT=""
14474
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014475case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014476 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014477 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14478 if test "${enable_universalsdk}"; then
14479 :
14480 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014481 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014482 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014483 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014484 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014485 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014486 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014487 if test ${gcc_version} '<' 4.0
14488 then
14489 LIBTOOL_CRUFT="-lcc_dynamic"
14490 else
14491 LIBTOOL_CRUFT=""
14492 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014493 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014494 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014495else
14496 cat >conftest.$ac_ext <<_ACEOF
14497/* confdefs.h. */
14498_ACEOF
14499cat confdefs.h >>conftest.$ac_ext
14500cat >>conftest.$ac_ext <<_ACEOF
14501/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014502
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014503 #include <unistd.h>
14504 int main(int argc, char*argv[])
14505 {
14506 if (sizeof(long) == 4) {
14507 return 0;
14508 } else {
14509 return 1;
14510 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014511 }
14512
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014513_ACEOF
14514rm -f conftest$ac_exeext
14515if { (ac_try="$ac_link"
14516case "(($ac_try" in
14517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14518 *) ac_try_echo=$ac_try;;
14519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014521 (eval "$ac_link") 2>&5
14522 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14525 { (case "(($ac_try" in
14526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14527 *) ac_try_echo=$ac_try;;
14528esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014530 (eval "$ac_try") 2>&5
14531 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014533 (exit $ac_status); }; }; then
14534 ac_osx_32bit=yes
14535else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014536 echo "$as_me: program exited with status $ac_status" >&5
14537echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014538sed 's/^/| /' conftest.$ac_ext >&5
14539
14540( exit $ac_status )
14541ac_osx_32bit=no
14542fi
14543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14544fi
14545
14546
14547
14548 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014549 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014550 i386)
14551 MACOSX_DEFAULT_ARCH="i386"
14552 ;;
14553 ppc)
14554 MACOSX_DEFAULT_ARCH="ppc"
14555 ;;
14556 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014557 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14558echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014559 { (exit 1); exit 1; }; }
14560 ;;
14561 esac
14562 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014563 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014564 i386)
14565 MACOSX_DEFAULT_ARCH="x86_64"
14566 ;;
14567 ppc)
14568 MACOSX_DEFAULT_ARCH="ppc64"
14569 ;;
14570 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014571 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14572echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014573 { (exit 1); exit 1; }; }
14574 ;;
14575 esac
14576
14577 #ARCH_RUN_32BIT="true"
14578 fi
14579
14580 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014581 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014582 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014583esac
14584
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014585{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14586echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014587if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014588then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014589 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014591 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014592
Martin v. Löwis11437992002-04-12 09:54:03 +000014593cat >>confdefs.h <<\_ACEOF
14594#define WITH_NEXT_FRAMEWORK 1
14595_ACEOF
14596
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014597 { echo "$as_me:$LINENO: result: yes" >&5
14598echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014599 if test $enable_shared = "yes"
14600 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014601 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14602echo "$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 +000014603 { (exit 1); exit 1; }; }
14604 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014605else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014606 { echo "$as_me:$LINENO: result: no" >&5
14607echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014608fi
14609
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014610{ echo "$as_me:$LINENO: checking for dyld" >&5
14611echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014612case $ac_sys_system/$ac_sys_release in
14613 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014614
Martin v. Löwis11437992002-04-12 09:54:03 +000014615cat >>confdefs.h <<\_ACEOF
14616#define WITH_DYLD 1
14617_ACEOF
14618
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014619 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14620echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014621 ;;
14622 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014623 { echo "$as_me:$LINENO: result: no" >&5
14624echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014625 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014626esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014627
Guido van Rossum0a516c91994-09-12 10:58:40 +000014628# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014629
Michael W. Hudson54241132001-12-07 15:38:26 +000014630
14631
14632
14633
Benjamin Peterson99f03762010-04-11 22:15:28 +000014634
Guido van Rossum0a516c91994-09-12 10:58:40 +000014635# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014636# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014637{ echo "$as_me:$LINENO: checking SO" >&5
14638echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014639if test -z "$SO"
14640then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014641 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014642 hp*|HP*)
14643 case `uname -m` in
14644 ia64) SO=.so;;
14645 *) SO=.sl;;
14646 esac
14647 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014648 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014649 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014650 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014651else
14652 # this might also be a termcap variable, see #610332
14653 echo
14654 echo '====================================================================='
14655 echo '+ +'
14656 echo '+ WARNING: You have set SO in your environment. +'
14657 echo '+ Do you really mean to change the extension for shared libraries? +'
14658 echo '+ Continuing in 10 seconds to let you to ponder. +'
14659 echo '+ +'
14660 echo '====================================================================='
14661 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014662fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014663{ echo "$as_me:$LINENO: result: $SO" >&5
14664echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014665
Georg Brandlb1441c72009-01-03 22:33:39 +000014666
Thomas Wouters477c8d52006-05-27 19:21:47 +000014667cat >>confdefs.h <<_ACEOF
14668#define SHLIB_EXT "$SO"
14669_ACEOF
14670
Guido van Rossum0a516c91994-09-12 10:58:40 +000014671# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014672# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014673# (Shared libraries in this instance are shared modules to be loaded into
14674# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014675{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14676echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014677if test -z "$LDSHARED"
14678then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014679 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014680 AIX*)
14681 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014682 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014683 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014684 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014685 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000014687 if test "$GCC" = "yes" ; then
14688 LDSHARED='$(CC) -shared'
14689 LDCXXSHARED='$(CXX) -shared'
14690 else
14691 LDSHARED='$(CC) -G'
14692 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +000014693 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014694 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000014695 if test "$GCC" = "yes" ; then
14696 LDSHARED='$(CC) -shared'
14697 LDCXXSHARED='$(CXX) -shared'
14698 else
14699 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014700 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014701 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014702 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014703 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014704 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000014705 if test "$enable_framework" ; then
14706 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014707 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14708 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014709 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014710 else
14711 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014712 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +000014713 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014714 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014715 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014716 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014717 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000014718 if test "$enable_framework" ; then
14719 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014720 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14721 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014722 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014723 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014724 # No framework, use the Python app as bundle-loader
14725 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014726 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014727 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014728 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014729 Darwin/*)
14730 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14731 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014732
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014733 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014734 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014735 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014736 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014737 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014738 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014739 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +000014740 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014741 else
14742 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014743 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000014744 if test "$enable_framework" ; then
14745 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014746 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14747 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014748 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014749 else
14750 # No framework, use the Python app as bundle-loader
14751 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14752 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014753 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014754 fi
14755 fi
14756 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000014757 Linux*|GNU*|QNX*)
14758 LDSHARED='$(CC) -shared'
14759 LDCXXSHARED='$(CXX) -shared';;
14760 BSD/OS*/4*)
14761 LDSHARED="gcc -shared"
14762 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014763 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014764 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014765 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +000014766 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014767 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014768 else
14769 LDSHARED="ld -Bshareable ${LDFLAGS}"
14770 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014771 OpenBSD*)
14772 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14773 then
14774 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014775 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014776 else
14777 case `uname -r` in
14778 [01].* | 2.[0-7] | 2.[0-7].*)
14779 LDSHARED="ld -Bshareable ${LDFLAGS}"
14780 ;;
14781 *)
14782 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +000014783 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014784 ;;
14785 esac
14786 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000014787 NetBSD*|DragonFly*)
14788 LDSHARED="cc -shared ${LDFLAGS}"
14789 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014790 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +000014791 if test "$GCC" = "yes" ; then
14792 LDSHARED='$(CC) -shared'
14793 LDCXXSHARED='$(CXX) -shared'
14794 else
14795 LDSHARED='$(CC) -G'
14796 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014797 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +000014798 SCO_SV*)
14799 LDSHARED='$(CC) -Wl,-G,-Bexport'
14800 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
14801 CYGWIN*)
14802 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
14803 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014804 *) LDSHARED="ld";;
14805 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014807{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14808echo "${ECHO_T}$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +000014809LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014810BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014811# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014812# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014813{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14814echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014815if test -z "$CCSHARED"
14816then
Guido van Rossum07397971997-04-29 21:49:50 +000014817 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014818 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014819 then CCSHARED="-fPIC";
14820 elif test `uname -p` = sparc;
14821 then CCSHARED="-xcode=pic32";
14822 else CCSHARED="-Kpic";
14823 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014824 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014825 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014826 else CCSHARED="+z";
14827 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014828 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014829 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014830 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014831 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014832 if test "$GCC" = "yes"
14833 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014834 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014835 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014836 SCO_SV*)
14837 if test "$GCC" = "yes"
14838 then CCSHARED="-fPIC"
14839 else CCSHARED="-Kpic -belf"
14840 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014841 IRIX*/6*) case $CC in
14842 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014843 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014844 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014845 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014846fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014847{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14848echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014849# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014850# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014851{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14852echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014853if test -z "$LINKFORSHARED"
14854then
Guido van Rossum07397971997-04-29 21:49:50 +000014855 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014856 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014857 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014858 LINKFORSHARED="-Wl,-E -Wl,+s";;
14859# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014860 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014861 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014862 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014864 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014865 if test "$enable_framework"
14866 then
Jack Jansenda49e192005-01-07 13:08:22 +000014867 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014868 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014869 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014870 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014871 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014872 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014873 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014874 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14875 then
14876 LINKFORSHARED="-Wl,--export-dynamic"
14877 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014878 SunOS/5*) case $CC in
14879 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014880 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014881 then
14882 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014883 fi;;
14884 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014885 CYGWIN*)
14886 if test $enable_shared = "no"
14887 then
14888 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14889 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014890 QNX*)
14891 # -Wl,-E causes the symbols to be added to the dynamic
14892 # symbol table so that they can be found when a module
14893 # is loaded. -N 2048K causes the stack size to be set
14894 # to 2048 kilobytes so that the stack doesn't overflow
14895 # when running test_compile.py.
14896 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014897 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014899{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14900echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014901
Michael W. Hudson54241132001-12-07 15:38:26 +000014902
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014903
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014904{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14905echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014906if test ! "$LIBRARY" = "$LDLIBRARY"
14907then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014908 case $ac_sys_system in
14909 CYGWIN*)
14910 # Cygwin needs CCSHARED when building extension DLLs
14911 # but not when building the interpreter DLL.
14912 CFLAGSFORSHARED='';;
14913 *)
14914 CFLAGSFORSHARED='$(CCSHARED)'
14915 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014917{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14918echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014919
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014920# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14921# library (with --enable-shared).
14922# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014923# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14924# if it is not required, since it creates a dependency of the shared library
14925# to LIBS. This, in turn, means that applications linking the shared libpython
14926# don't need to link LIBS explicitly. The default should be only changed
14927# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014928
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014929{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14930echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014933 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014935{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14936echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014937
14938
Guido van Rossum627b2d71993-12-24 10:39:16 +000014939# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014941{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14942echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014943if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014945else
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014947LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014949/* confdefs.h. */
14950_ACEOF
14951cat confdefs.h >>conftest.$ac_ext
14952cat >>conftest.$ac_ext <<_ACEOF
14953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955/* Override any GCC internal prototype to avoid an error.
14956 Use char because int might match the return type of a GCC
14957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014958#ifdef __cplusplus
14959extern "C"
14960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014961char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014962int
14963main ()
14964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ;
14967 return 0;
14968}
14969_ACEOF
14970rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971if { (ac_try="$ac_link"
14972case "(($ac_try" in
14973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14974 *) ac_try_echo=$ac_try;;
14975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014979 grep -v '^ *+' conftest.er1 >conftest.err
14980 rm -f conftest.er1
14981 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983 (exit $ac_status); } && {
14984 test -z "$ac_c_werror_flag" ||
14985 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014986 } && test -s conftest$ac_exeext &&
14987 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014989else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014991sed 's/^/| /' conftest.$ac_ext >&5
14992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995
14996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014998LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014999fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015000{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15001echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15002if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 cat >>confdefs.h <<_ACEOF
15004#define HAVE_LIBDL 1
15005_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015006
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015007 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015008
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015009fi
15010 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015012{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15013echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015014if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015016else
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015018LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015020/* confdefs.h. */
15021_ACEOF
15022cat confdefs.h >>conftest.$ac_ext
15023cat >>conftest.$ac_ext <<_ACEOF
15024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026/* Override any GCC internal prototype to avoid an error.
15027 Use char because int might match the return type of a GCC
15028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015029#ifdef __cplusplus
15030extern "C"
15031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015032char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015033int
15034main ()
15035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 ;
15038 return 0;
15039}
15040_ACEOF
15041rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042if { (ac_try="$ac_link"
15043case "(($ac_try" in
15044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15045 *) ac_try_echo=$ac_try;;
15046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015050 grep -v '^ *+' conftest.er1 >conftest.err
15051 rm -f conftest.er1
15052 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054 (exit $ac_status); } && {
15055 test -z "$ac_c_werror_flag" ||
15056 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015057 } && test -s conftest$ac_exeext &&
15058 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015062sed 's/^/| /' conftest.$ac_ext >&5
15063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015066
15067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015069LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015070fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015071{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15072echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15073if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 cat >>confdefs.h <<_ACEOF
15075#define HAVE_LIBDLD 1
15076_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015077
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015078 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015080fi
15081 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015082
Georg Brandlb1441c72009-01-03 22:33:39 +000015083# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015084if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015085 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15086echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015087if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015088 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015089else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015090 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015092/* confdefs.h. */
15093_ACEOF
15094cat confdefs.h >>conftest.$ac_ext
15095cat >>conftest.$ac_ext <<_ACEOF
15096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015098/* Override any GCC internal prototype to avoid an error.
15099 Use char because int might match the return type of a GCC
15100 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015101#ifdef __cplusplus
15102extern "C"
15103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015104char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015105int
15106main ()
15107{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ;
15110 return 0;
15111}
15112_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113for ac_lib in '' pthread rt posix4; do
15114 if test -z "$ac_lib"; then
15115 ac_res="none required"
15116 else
15117 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015118 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119 fi
15120 rm -f conftest.$ac_objext conftest$ac_exeext
15121if { (ac_try="$ac_link"
15122case "(($ac_try" in
15123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15124 *) ac_try_echo=$ac_try;;
15125esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015128 ac_status=$?
15129 grep -v '^ *+' conftest.er1 >conftest.err
15130 rm -f conftest.er1
15131 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133 (exit $ac_status); } && {
15134 test -z "$ac_c_werror_flag" ||
15135 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015136 } && test -s conftest$ac_exeext &&
15137 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015139else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015140 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015141sed 's/^/| /' conftest.$ac_ext >&5
15142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143
Thomas Wouters477c8d52006-05-27 19:21:47 +000015144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145
15146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15147 conftest$ac_exeext
15148 if test "${ac_cv_search_sem_init+set}" = set; then
15149 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151done
15152if test "${ac_cv_search_sem_init+set}" = set; then
15153 :
15154else
15155 ac_cv_search_sem_init=no
15156fi
15157rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015158LIBS=$ac_func_search_save_LIBS
15159fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015160{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15161echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162ac_res=$ac_cv_search_sem_init
15163if test "$ac_res" != no; then
15164 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015165
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015166fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015167 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015168 # posix4 on Solaris 2.6
15169 # pthread (first!) on Linux
15170fi
15171
Martin v. Löwis19d17342003-06-14 21:03:05 +000015172# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015173{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15174echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015175if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015177else
15178 ac_check_lib_save_LIBS=$LIBS
15179LIBS="-lintl $LIBS"
15180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015181/* confdefs.h. */
15182_ACEOF
15183cat confdefs.h >>conftest.$ac_ext
15184cat >>conftest.$ac_ext <<_ACEOF
15185/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187/* Override any GCC internal prototype to avoid an error.
15188 Use char because int might match the return type of a GCC
15189 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015190#ifdef __cplusplus
15191extern "C"
15192#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015194int
15195main ()
15196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015198 ;
15199 return 0;
15200}
15201_ACEOF
15202rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203if { (ac_try="$ac_link"
15204case "(($ac_try" in
15205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15206 *) ac_try_echo=$ac_try;;
15207esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015211 grep -v '^ *+' conftest.er1 >conftest.err
15212 rm -f conftest.er1
15213 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215 (exit $ac_status); } && {
15216 test -z "$ac_c_werror_flag" ||
15217 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015218 } && test -s conftest$ac_exeext &&
15219 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015220 ac_cv_lib_intl_textdomain=yes
15221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015223sed 's/^/| /' conftest.$ac_ext >&5
15224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227
15228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015230LIBS=$ac_check_lib_save_LIBS
15231fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015232{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15233echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15234if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015235
15236cat >>confdefs.h <<\_ACEOF
15237#define WITH_LIBINTL 1
15238_ACEOF
15239
Brett Cannonc6d936e2009-06-07 20:09:53 +000015240 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015241fi
15242
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015243
15244# checks for system dependent C++ extensions support
15245case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015246 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15247echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015254#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015255int
15256main ()
15257{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015258loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015259 ;
15260 return 0;
15261}
15262_ACEOF
15263rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264if { (ac_try="$ac_link"
15265case "(($ac_try" in
15266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15267 *) ac_try_echo=$ac_try;;
15268esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015272 grep -v '^ *+' conftest.er1 >conftest.err
15273 rm -f conftest.er1
15274 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015276 (exit $ac_status); } && {
15277 test -z "$ac_c_werror_flag" ||
15278 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015279 } && test -s conftest$ac_exeext &&
15280 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015281
Martin v. Löwis11437992002-04-12 09:54:03 +000015282cat >>confdefs.h <<\_ACEOF
15283#define AIX_GENUINE_CPLUSPLUS 1
15284_ACEOF
15285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015286 { echo "$as_me:$LINENO: result: yes" >&5
15287echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015290sed 's/^/| /' conftest.$ac_ext >&5
15291
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015292 { echo "$as_me:$LINENO: result: no" >&5
15293echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295
15296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015297 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015298 *) ;;
15299esac
15300
Guido van Rossum70c7f481998-03-26 18:44:10 +000015301# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015302{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15303echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015304if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015306else
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015308LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015310/* confdefs.h. */
15311_ACEOF
15312cat confdefs.h >>conftest.$ac_ext
15313cat >>conftest.$ac_ext <<_ACEOF
15314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015316/* Override any GCC internal prototype to avoid an error.
15317 Use char because int might match the return type of a GCC
15318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015319#ifdef __cplusplus
15320extern "C"
15321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015322char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015323int
15324main ()
15325{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015326return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ;
15328 return 0;
15329}
15330_ACEOF
15331rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332if { (ac_try="$ac_link"
15333case "(($ac_try" in
15334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15335 *) ac_try_echo=$ac_try;;
15336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015340 grep -v '^ *+' conftest.er1 >conftest.err
15341 rm -f conftest.er1
15342 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344 (exit $ac_status); } && {
15345 test -z "$ac_c_werror_flag" ||
15346 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015347 } && test -s conftest$ac_exeext &&
15348 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015350else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015352sed 's/^/| /' conftest.$ac_ext >&5
15353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356
15357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015360fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015361{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15362echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15363if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015364 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015365fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015366 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015367{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15368echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015369if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015371else
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015373LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015375/* confdefs.h. */
15376_ACEOF
15377cat confdefs.h >>conftest.$ac_ext
15378cat >>conftest.$ac_ext <<_ACEOF
15379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384#ifdef __cplusplus
15385extern "C"
15386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015387char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015388int
15389main ()
15390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 ;
15393 return 0;
15394}
15395_ACEOF
15396rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015397if { (ac_try="$ac_link"
15398case "(($ac_try" in
15399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15400 *) ac_try_echo=$ac_try;;
15401esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015405 grep -v '^ *+' conftest.er1 >conftest.err
15406 rm -f conftest.er1
15407 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409 (exit $ac_status); } && {
15410 test -z "$ac_c_werror_flag" ||
15411 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015412 } && test -s conftest$ac_exeext &&
15413 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015417sed 's/^/| /' conftest.$ac_ext >&5
15418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421
15422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015424LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015425fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015426{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15427echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15428if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015429 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015430fi
15431 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015432
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015433{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15434echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015437if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015438 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015439{ echo "$as_me:$LINENO: result: $withval" >&5
15440echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015441LIBS="$withval $LIBS"
15442
15443else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015444 { echo "$as_me:$LINENO: result: no" >&5
15445echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446fi
15447
Guido van Rossum7f43da71994-08-01 12:15:30 +000015448
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015449if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015450 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15451set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15452{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15453echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15454if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15455 echo $ECHO_N "(cached) $ECHO_C" >&6
15456else
15457 case $PKG_CONFIG in
15458 [\\/]* | ?:[\\/]*)
15459 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15460 ;;
15461 *)
15462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15463for as_dir in $PATH
15464do
15465 IFS=$as_save_IFS
15466 test -z "$as_dir" && as_dir=.
15467 for ac_exec_ext in '' $ac_executable_extensions; do
15468 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15469 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15470 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15471 break 2
15472 fi
15473done
15474done
15475IFS=$as_save_IFS
15476
15477 ;;
15478esac
15479fi
15480PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15481if test -n "$PKG_CONFIG"; then
15482 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15483echo "${ECHO_T}$PKG_CONFIG" >&6; }
15484else
15485 { echo "$as_me:$LINENO: result: no" >&5
15486echo "${ECHO_T}no" >&6; }
15487fi
15488
15489
15490fi
15491if test -z "$ac_cv_path_PKG_CONFIG"; then
15492 ac_pt_PKG_CONFIG=$PKG_CONFIG
15493 # Extract the first word of "pkg-config", so it can be a program name with args.
15494set dummy pkg-config; ac_word=$2
15495{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15496echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15497if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15498 echo $ECHO_N "(cached) $ECHO_C" >&6
15499else
15500 case $ac_pt_PKG_CONFIG in
15501 [\\/]* | ?:[\\/]*)
15502 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15503 ;;
15504 *)
15505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15506for as_dir in $PATH
15507do
15508 IFS=$as_save_IFS
15509 test -z "$as_dir" && as_dir=.
15510 for ac_exec_ext in '' $ac_executable_extensions; do
15511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15512 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15513 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15514 break 2
15515 fi
15516done
15517done
15518IFS=$as_save_IFS
15519
15520 ;;
15521esac
15522fi
15523ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15524if test -n "$ac_pt_PKG_CONFIG"; then
15525 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15526echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15527else
15528 { echo "$as_me:$LINENO: result: no" >&5
15529echo "${ECHO_T}no" >&6; }
15530fi
15531
15532 if test "x$ac_pt_PKG_CONFIG" = x; then
15533 PKG_CONFIG=""
15534 else
15535 case $cross_compiling:$ac_tool_warned in
15536yes:)
15537{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15538whose name does not start with the host triplet. If you think this
15539configuration is useful to you, please write to autoconf@gnu.org." >&5
15540echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15541whose name does not start with the host triplet. If you think this
15542configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15543ac_tool_warned=yes ;;
15544esac
15545 PKG_CONFIG=$ac_pt_PKG_CONFIG
15546 fi
15547else
15548 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15549fi
15550
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015551
15552# Check for use of the system expat library
15553{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15554echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15555
15556# Check whether --with-system_expat was given.
15557if test "${with_system_expat+set}" = set; then
15558 withval=$with_system_expat;
15559fi
15560
15561
15562{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15563echo "${ECHO_T}$with_system_expat" >&6; }
15564
15565# Check for use of the system libffi library
15566{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15567echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15568
15569# Check whether --with-system_ffi was given.
15570if test "${with_system_ffi+set}" = set; then
15571 withval=$with_system_ffi;
15572fi
15573
15574
15575if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015576 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15577else
15578 LIBFFI_INCLUDEDIR=""
15579fi
15580
15581
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015582{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15583echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015584
Matthias Klose55708cc2009-04-30 08:06:49 +000015585# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015586{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15587echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015588
15589# Check whether --with-dbmliborder was given.
15590if test "${with_dbmliborder+set}" = set; then
15591 withval=$with_dbmliborder;
15592if test x$with_dbmliborder = xyes
15593then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015594{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15595echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015596 { (exit 1); exit 1; }; }
15597else
15598 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15599 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15600 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015601 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15602echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015603 { (exit 1); exit 1; }; }
15604 fi
15605 done
15606fi
15607fi
15608
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015609{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15610echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015611
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015612# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015613
15614
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015615{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15616echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015619if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620 withval=$with_signal_module;
15621fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015622
15623
15624if test -z "$with_signal_module"
15625then with_signal_module="yes"
15626fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015627{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15628echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015629
15630if test "${with_signal_module}" = "yes"; then
15631 USE_SIGNAL_MODULE=""
15632 SIGNAL_OBJS=""
15633else
15634 USE_SIGNAL_MODULE="#"
15635 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15636fi
15637
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015638# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015639
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015640USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015641
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015642{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15643echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015644
Guido van Rossumec2f0731997-01-22 20:54:01 +000015645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015647if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015648 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015649{ echo "$as_me:$LINENO: result: $withval" >&5
15650echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015651LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015652if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015653 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015654fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015655else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015656 { echo "$as_me:$LINENO: result: no" >&5
15657echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658fi
15659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
15661# Templates for things AC_DEFINEd more than once.
15662# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015663
15664
Martin v. Löwis11437992002-04-12 09:54:03 +000015665
15666
15667
15668
15669
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015670{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15671echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015674if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015675 withval=$with_threads;
15676fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015677
15678
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015679# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015681# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015682if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683 withval=$with_thread; with_threads=$with_thread
15684fi
15685
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015686
15687if test -z "$with_threads"
15688then with_threads="yes"
15689fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015690{ echo "$as_me:$LINENO: result: $with_threads" >&5
15691echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015692
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015693
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015694if test "$with_threads" = "no"
15695then
15696 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015697elif test "$ac_cv_pthread_is_default" = yes
15698then
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015700#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015701_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015702
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015703 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015705#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015706_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015707
15708 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015710elif test "$ac_cv_kpthread" = "yes"
15711then
15712 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015713 if test "$ac_cv_cxx_thread" = "yes"; then
15714 CXX="$CXX -Kpthread"
15715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015716 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015717#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015718_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015719
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015720 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015721 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015722elif test "$ac_cv_kthread" = "yes"
15723then
15724 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015725 if test "$ac_cv_cxx_thread" = "yes"; then
15726 CXX="$CXX -Kthread"
15727 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015728 cat >>confdefs.h <<\_ACEOF
15729#define WITH_THREAD 1
15730_ACEOF
15731
15732 posix_threads=yes
15733 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015734elif test "$ac_cv_pthread" = "yes"
15735then
15736 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015737 if test "$ac_cv_cxx_thread" = "yes"; then
15738 CXX="$CXX -pthread"
15739 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015740 cat >>confdefs.h <<\_ACEOF
15741#define WITH_THREAD 1
15742_ACEOF
15743
15744 posix_threads=yes
15745 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015746else
15747 if test ! -z "$with_threads" -a -d "$with_threads"
15748 then LDFLAGS="$LDFLAGS -L$with_threads"
15749 fi
15750 if test ! -z "$withval" -a -d "$withval"
15751 then LDFLAGS="$LDFLAGS -L$withval"
15752 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015753
15754 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015755 # define _POSIX_THREADS in unistd.h. Some apparently don't
15756 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015757 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15758echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015760/* confdefs.h. */
15761_ACEOF
15762cat confdefs.h >>conftest.$ac_ext
15763cat >>conftest.$ac_ext <<_ACEOF
15764/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015765
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015766#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015767#ifdef _POSIX_THREADS
15768yes
15769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015770
15771_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015773 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015774 unistd_defines_pthreads=yes
15775else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015776 unistd_defines_pthreads=no
15777fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015778rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015779
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015780 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15781echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015784#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015785_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015786
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015788 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15789echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015790if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015792fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015793{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15794echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015795else
Martin v. Löwis11437992002-04-12 09:54:03 +000015796 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015797{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15798echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015799cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015800/* confdefs.h. */
15801_ACEOF
15802cat confdefs.h >>conftest.$ac_ext
15803cat >>conftest.$ac_ext <<_ACEOF
15804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015805$ac_includes_default
15806#include <cthreads.h>
15807_ACEOF
15808rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809if { (ac_try="$ac_compile"
15810case "(($ac_try" in
15811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15812 *) ac_try_echo=$ac_try;;
15813esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015817 grep -v '^ *+' conftest.er1 >conftest.err
15818 rm -f conftest.er1
15819 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821 (exit $ac_status); } && {
15822 test -z "$ac_c_werror_flag" ||
15823 test ! -s conftest.err
15824 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015825 ac_header_compiler=yes
15826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015828sed 's/^/| /' conftest.$ac_ext >&5
15829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015830 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832
15833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015834{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15835echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
15837# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015838{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15839echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015841/* confdefs.h. */
15842_ACEOF
15843cat confdefs.h >>conftest.$ac_ext
15844cat >>conftest.$ac_ext <<_ACEOF
15845/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015846#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015847_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848if { (ac_try="$ac_cpp conftest.$ac_ext"
15849case "(($ac_try" in
15850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15851 *) ac_try_echo=$ac_try;;
15852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015854 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015856 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 rm -f conftest.er1
15858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860 (exit $ac_status); } >/dev/null && {
15861 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15862 test ! -s conftest.err
15863 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 ac_header_preproc=yes
15865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015867sed 's/^/| /' conftest.$ac_ext >&5
15868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871
Martin v. Löwis11437992002-04-12 09:54:03 +000015872rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015873{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15874echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015875
15876# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015877case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15878 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015879 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15880echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15881 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15882echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015883 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015884 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015885 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015886 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15887echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15888 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15889echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15890 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15891echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15892 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15893echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15894 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15895echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15896 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15897echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015899## -------------------------------------- ##
15900## Report this to http://bugs.python.org/ ##
15901## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015902_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015904 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015906{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15907echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015908if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015910else
15911 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015912fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015913{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15914echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015915
15916fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015917if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015918 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015919#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015920_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015921
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015923#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015924_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015925
Martin v. Löwis11437992002-04-12 09:54:03 +000015926
15927cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015928#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015929_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015930
15931 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015932 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015933else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015934
Martin v. Löwis11437992002-04-12 09:54:03 +000015935 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015936 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15937echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015938if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015939 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015940fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015941{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15942echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015943else
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015945{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15946echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015948/* confdefs.h. */
15949_ACEOF
15950cat confdefs.h >>conftest.$ac_ext
15951cat >>conftest.$ac_ext <<_ACEOF
15952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015953$ac_includes_default
15954#include <mach/cthreads.h>
15955_ACEOF
15956rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957if { (ac_try="$ac_compile"
15958case "(($ac_try" in
15959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15960 *) ac_try_echo=$ac_try;;
15961esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015965 grep -v '^ *+' conftest.er1 >conftest.err
15966 rm -f conftest.er1
15967 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969 (exit $ac_status); } && {
15970 test -z "$ac_c_werror_flag" ||
15971 test ! -s conftest.err
15972 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 ac_header_compiler=yes
15974else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015976sed 's/^/| /' conftest.$ac_ext >&5
15977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015978 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980
15981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015982{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15983echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015984
15985# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015986{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15987echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015989/* confdefs.h. */
15990_ACEOF
15991cat confdefs.h >>conftest.$ac_ext
15992cat >>conftest.$ac_ext <<_ACEOF
15993/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015994#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015995_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015996if { (ac_try="$ac_cpp conftest.$ac_ext"
15997case "(($ac_try" in
15998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15999 *) ac_try_echo=$ac_try;;
16000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016003 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016004 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016005 rm -f conftest.er1
16006 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008 (exit $ac_status); } >/dev/null && {
16009 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16010 test ! -s conftest.err
16011 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 ac_header_preproc=yes
16013else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016015sed 's/^/| /' conftest.$ac_ext >&5
16016
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016021{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16022echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016023
16024# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016025case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16026 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016027 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16028echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16029 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16030echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016031 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016032 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016033 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016034 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16035echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16036 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16037echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16038 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16039echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16040 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16041echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16042 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16043echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16044 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16045echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016047## -------------------------------------- ##
16048## Report this to http://bugs.python.org/ ##
16049## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016050_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016051 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016052 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016053esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016054{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16055echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016056if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016057 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016058else
16059 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016060fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016061{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16062echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016063
16064fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016065if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016067#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016068_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016069
Martin v. Löwis11437992002-04-12 09:54:03 +000016070 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016071#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016072_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016073
Martin v. Löwis11437992002-04-12 09:54:03 +000016074
16075cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016076#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016077_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016078
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016079 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016080else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016081
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016082 # Just looking for pthread_create in libpthread is not enough:
16083 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16084 # So we really have to include pthread.h, and then link.
16085 _libs=$LIBS
16086 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016087 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16088echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016090/* confdefs.h. */
16091_ACEOF
16092cat confdefs.h >>conftest.$ac_ext
16093cat >>conftest.$ac_ext <<_ACEOF
16094/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016095#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016096
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016097void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016098int
16099main ()
16100{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016101
16102pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016103 ;
16104 return 0;
16105}
16106_ACEOF
16107rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108if { (ac_try="$ac_link"
16109case "(($ac_try" in
16110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16111 *) ac_try_echo=$ac_try;;
16112esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016116 grep -v '^ *+' conftest.er1 >conftest.err
16117 rm -f conftest.er1
16118 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016120 (exit $ac_status); } && {
16121 test -z "$ac_c_werror_flag" ||
16122 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016123 } && test -s conftest$ac_exeext &&
16124 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016126 { echo "$as_me:$LINENO: result: yes" >&5
16127echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016128 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016129#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016130_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016131
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016132 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016133 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016136sed 's/^/| /' conftest.$ac_ext >&5
16137
Martin v. Löwis11437992002-04-12 09:54:03 +000016138
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016139 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016140 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16141echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016142if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016143 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016144else
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016146/* confdefs.h. */
16147_ACEOF
16148cat confdefs.h >>conftest.$ac_ext
16149cat >>conftest.$ac_ext <<_ACEOF
16150/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016151/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16152 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16153#define pthread_detach innocuous_pthread_detach
16154
Guido van Rossumad678af1998-10-02 14:42:15 +000016155/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016156 which can conflict with char pthread_detach (); below.
16157 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016158 <limits.h> exists even on freestanding compilers. */
16159
16160#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016161# include <limits.h>
16162#else
16163# include <assert.h>
16164#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016165
16166#undef pthread_detach
16167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168/* Override any GCC internal prototype to avoid an error.
16169 Use char because int might match the return type of a GCC
16170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016171#ifdef __cplusplus
16172extern "C"
16173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016174char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016175/* The GNU C library defines this for functions which it implements
16176 to always fail with ENOSYS. Some functions are actually named
16177 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016179choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016180#endif
16181
Skip Montanaro6dead952003-09-25 14:50:04 +000016182int
16183main ()
16184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 ;
16187 return 0;
16188}
16189_ACEOF
16190rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191if { (ac_try="$ac_link"
16192case "(($ac_try" in
16193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16194 *) ac_try_echo=$ac_try;;
16195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016199 grep -v '^ *+' conftest.er1 >conftest.err
16200 rm -f conftest.er1
16201 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203 (exit $ac_status); } && {
16204 test -z "$ac_c_werror_flag" ||
16205 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016206 } && test -s conftest$ac_exeext &&
16207 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016209else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016211sed 's/^/| /' conftest.$ac_ext >&5
16212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215
16216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016217 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016218fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016219{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16220echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16221if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016223#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016224_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016225
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016226 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016227 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016228else
Guido van Rossumad678af1998-10-02 14:42:15 +000016229
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016230 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16231echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016232if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016233 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016234else
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016236LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016238/* confdefs.h. */
16239_ACEOF
16240cat confdefs.h >>conftest.$ac_ext
16241cat >>conftest.$ac_ext <<_ACEOF
16242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016244/* Override any GCC internal prototype to avoid an error.
16245 Use char because int might match the return type of a GCC
16246 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016247#ifdef __cplusplus
16248extern "C"
16249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016250char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016251int
16252main ()
16253{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 ;
16256 return 0;
16257}
16258_ACEOF
16259rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016260if { (ac_try="$ac_link"
16261case "(($ac_try" in
16262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16263 *) ac_try_echo=$ac_try;;
16264esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016268 grep -v '^ *+' conftest.er1 >conftest.err
16269 rm -f conftest.er1
16270 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272 (exit $ac_status); } && {
16273 test -z "$ac_c_werror_flag" ||
16274 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016275 } && test -s conftest$ac_exeext &&
16276 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016280sed 's/^/| /' conftest.$ac_ext >&5
16281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284
16285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016286 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016287LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016288fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016289{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16290echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16291if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016293#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016294_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016295
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016296 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016297 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016298 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016299else
Greg Steinadf63d62000-07-05 10:38:09 +000016300
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016301 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16302echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016303if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016304 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016305else
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016307LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016309/* confdefs.h. */
16310_ACEOF
16311cat confdefs.h >>conftest.$ac_ext
16312cat >>conftest.$ac_ext <<_ACEOF
16313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315/* Override any GCC internal prototype to avoid an error.
16316 Use char because int might match the return type of a GCC
16317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016318#ifdef __cplusplus
16319extern "C"
16320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016321char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016322int
16323main ()
16324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016325return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 ;
16327 return 0;
16328}
16329_ACEOF
16330rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016331if { (ac_try="$ac_link"
16332case "(($ac_try" in
16333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16334 *) ac_try_echo=$ac_try;;
16335esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016339 grep -v '^ *+' conftest.er1 >conftest.err
16340 rm -f conftest.er1
16341 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 (exit $ac_status); } && {
16344 test -z "$ac_c_werror_flag" ||
16345 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016346 } && test -s conftest$ac_exeext &&
16347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016351sed 's/^/| /' conftest.$ac_ext >&5
16352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355
16356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016358LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016359fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016360{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16361echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16362if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016364#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016365_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016367 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016368 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016369 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016370else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016371
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016372 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16373echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016374if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016376else
Martin v. Löwis11437992002-04-12 09:54:03 +000016377 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016378LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016379cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016380/* confdefs.h. */
16381_ACEOF
16382cat confdefs.h >>conftest.$ac_ext
16383cat >>conftest.$ac_ext <<_ACEOF
16384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016386/* Override any GCC internal prototype to avoid an error.
16387 Use char because int might match the return type of a GCC
16388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016389#ifdef __cplusplus
16390extern "C"
16391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016392char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016393int
16394main ()
16395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016396return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 ;
16398 return 0;
16399}
16400_ACEOF
16401rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016402if { (ac_try="$ac_link"
16403case "(($ac_try" in
16404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16405 *) ac_try_echo=$ac_try;;
16406esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016410 grep -v '^ *+' conftest.er1 >conftest.err
16411 rm -f conftest.er1
16412 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016414 (exit $ac_status); } && {
16415 test -z "$ac_c_werror_flag" ||
16416 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016417 } && test -s conftest$ac_exeext &&
16418 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016419 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016420else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016422sed 's/^/| /' conftest.$ac_ext >&5
16423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016424 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016426
16427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016428 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016429LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016430fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016431{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16432echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16433if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016434 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016435#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016436_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016437
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016438 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016439 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016440 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016441else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016442
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016443 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16444echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016445if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016446 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016447else
Martin v. Löwis11437992002-04-12 09:54:03 +000016448 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016449LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016450cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016451/* confdefs.h. */
16452_ACEOF
16453cat confdefs.h >>conftest.$ac_ext
16454cat >>conftest.$ac_ext <<_ACEOF
16455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457/* Override any GCC internal prototype to avoid an error.
16458 Use char because int might match the return type of a GCC
16459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016460#ifdef __cplusplus
16461extern "C"
16462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016463char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016464int
16465main ()
16466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016467return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016468 ;
16469 return 0;
16470}
16471_ACEOF
16472rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016473if { (ac_try="$ac_link"
16474case "(($ac_try" in
16475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16476 *) ac_try_echo=$ac_try;;
16477esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016481 grep -v '^ *+' conftest.er1 >conftest.err
16482 rm -f conftest.er1
16483 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016485 (exit $ac_status); } && {
16486 test -z "$ac_c_werror_flag" ||
16487 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016488 } && test -s conftest$ac_exeext &&
16489 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016491else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016493sed 's/^/| /' conftest.$ac_ext >&5
16494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016495 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016497
16498rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016500LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016501fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016502{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16503echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16504if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016506#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016507_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016508
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016509 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016510 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016511 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016512else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016513
Martin v. Löwis130fb172001-07-19 11:00:41 +000016514 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016515fi
16516
Guido van Rossum627b2d71993-12-24 10:39:16 +000016517
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016518fi
16519
Guido van Rossum0be3e491997-05-22 20:33:33 +000016520fi
16521
Guido van Rossum49545951997-12-02 19:28:29 +000016522fi
16523
Guido van Rossumb93a8621998-05-07 13:27:32 +000016524fi
16525
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527
16528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016529 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530fi
16531
Martin v. Löwis11437992002-04-12 09:54:03 +000016532
16533fi
16534
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016535
Michael W. Hudson54241132001-12-07 15:38:26 +000016536
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016537 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16538echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016539if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016541else
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016543LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016545/* confdefs.h. */
16546_ACEOF
16547cat confdefs.h >>conftest.$ac_ext
16548cat >>conftest.$ac_ext <<_ACEOF
16549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016551/* Override any GCC internal prototype to avoid an error.
16552 Use char because int might match the return type of a GCC
16553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016554#ifdef __cplusplus
16555extern "C"
16556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016557char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016558int
16559main ()
16560{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 ;
16563 return 0;
16564}
16565_ACEOF
16566rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567if { (ac_try="$ac_link"
16568case "(($ac_try" in
16569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16570 *) ac_try_echo=$ac_try;;
16571esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016575 grep -v '^ *+' conftest.er1 >conftest.err
16576 rm -f conftest.er1
16577 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016579 (exit $ac_status); } && {
16580 test -z "$ac_c_werror_flag" ||
16581 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016582 } && test -s conftest$ac_exeext &&
16583 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016584 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016585else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016587sed 's/^/| /' conftest.$ac_ext >&5
16588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591
16592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016594LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016595fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016596{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16597echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16598if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016599 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016600#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016601_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016602
Martin v. Löwis130fb172001-07-19 11:00:41 +000016603 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016604 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016605 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016606fi
16607
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016608
Neal Norwitza978ab02002-11-02 16:58:05 +000016609 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016610 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16611echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016612if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016614else
Martin v. Löwis11437992002-04-12 09:54:03 +000016615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016616LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016618/* confdefs.h. */
16619_ACEOF
16620cat confdefs.h >>conftest.$ac_ext
16621cat >>conftest.$ac_ext <<_ACEOF
16622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624/* Override any GCC internal prototype to avoid an error.
16625 Use char because int might match the return type of a GCC
16626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016627#ifdef __cplusplus
16628extern "C"
16629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016630char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016631int
16632main ()
16633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 ;
16636 return 0;
16637}
16638_ACEOF
16639rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640if { (ac_try="$ac_link"
16641case "(($ac_try" in
16642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16643 *) ac_try_echo=$ac_try;;
16644esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016646 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016648 grep -v '^ *+' conftest.er1 >conftest.err
16649 rm -f conftest.er1
16650 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016652 (exit $ac_status); } && {
16653 test -z "$ac_c_werror_flag" ||
16654 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016655 } && test -s conftest$ac_exeext &&
16656 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016658else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016660sed 's/^/| /' conftest.$ac_ext >&5
16661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664
16665rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016667LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016668fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016669{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16670echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16671if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016672 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016673#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016674_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016675
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016676 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016677 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016678 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016679fi
16680
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016681 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016682
Martin v. Löwis130fb172001-07-19 11:00:41 +000016683 if test "$USE_THREAD_MODULE" != "#"
16684 then
16685 # If the above checks didn't disable threads, (at least) OSF1
16686 # needs this '-threads' argument during linking.
16687 case $ac_sys_system in
16688 OSF1) LDLAST=-threads;;
16689 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016690 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016691fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016693if test "$posix_threads" = "yes"; then
16694 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016695
16696cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016697#define _POSIX_THREADS 1
16698_ACEOF
16699
16700 fi
16701
16702 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16703 case $ac_sys_system/$ac_sys_release in
16704 SunOS/5.6)
16705cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016706#define HAVE_PTHREAD_DESTRUCTOR 1
16707_ACEOF
16708
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016709 ;;
16710 SunOS/5.8)
16711cat >>confdefs.h <<\_ACEOF
16712#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16713_ACEOF
16714
16715 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016716 AIX/5)
16717cat >>confdefs.h <<\_ACEOF
16718#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16719_ACEOF
16720
16721 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016722 esac
16723
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016724 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16725echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016726 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016728else
16729 if test "$cross_compiling" = yes; then
16730 ac_cv_pthread_system_supported=no
16731else
16732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016733/* confdefs.h. */
16734_ACEOF
16735cat confdefs.h >>conftest.$ac_ext
16736cat >>conftest.$ac_ext <<_ACEOF
16737/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016738#include <pthread.h>
16739 void *foo(void *parm) {
16740 return NULL;
16741 }
16742 main() {
16743 pthread_attr_t attr;
16744 pthread_t id;
16745 if (pthread_attr_init(&attr)) exit(-1);
16746 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16747 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16748 exit(0);
16749 }
16750_ACEOF
16751rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752if { (ac_try="$ac_link"
16753case "(($ac_try" in
16754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16755 *) ac_try_echo=$ac_try;;
16756esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016758 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016759 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762 { (case "(($ac_try" in
16763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16764 *) ac_try_echo=$ac_try;;
16765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016767 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016768 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016770 (exit $ac_status); }; }; then
16771 ac_cv_pthread_system_supported=yes
16772else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016773 echo "$as_me: program exited with status $ac_status" >&5
16774echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016775sed 's/^/| /' conftest.$ac_ext >&5
16776
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016777( exit $ac_status )
16778ac_cv_pthread_system_supported=no
16779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016780rm -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 +000016781fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016783
16784
Guido van Rossum627b2d71993-12-24 10:39:16 +000016785fi
16786
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016787 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16788echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016789 if test "$ac_cv_pthread_system_supported" = "yes"; then
16790
16791cat >>confdefs.h <<\_ACEOF
16792#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16793_ACEOF
16794
16795 fi
16796
16797for ac_func in pthread_sigmask
16798do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016799as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16800{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16801echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016804else
16805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016806/* confdefs.h. */
16807_ACEOF
16808cat confdefs.h >>conftest.$ac_ext
16809cat >>conftest.$ac_ext <<_ACEOF
16810/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016811/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16812 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16813#define $ac_func innocuous_$ac_func
16814
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016815/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016816 which can conflict with char $ac_func (); below.
16817 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016818 <limits.h> exists even on freestanding compilers. */
16819
16820#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016821# include <limits.h>
16822#else
16823# include <assert.h>
16824#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016825
16826#undef $ac_func
16827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016828/* Override any GCC internal prototype to avoid an error.
16829 Use char because int might match the return type of a GCC
16830 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016831#ifdef __cplusplus
16832extern "C"
16833#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016834char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016835/* The GNU C library defines this for functions which it implements
16836 to always fail with ENOSYS. Some functions are actually named
16837 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016838#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016839choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016840#endif
16841
Skip Montanaro6dead952003-09-25 14:50:04 +000016842int
16843main ()
16844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016845return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016846 ;
16847 return 0;
16848}
16849_ACEOF
16850rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851if { (ac_try="$ac_link"
16852case "(($ac_try" in
16853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16854 *) ac_try_echo=$ac_try;;
16855esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016857 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016859 grep -v '^ *+' conftest.er1 >conftest.err
16860 rm -f conftest.er1
16861 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863 (exit $ac_status); } && {
16864 test -z "$ac_c_werror_flag" ||
16865 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016866 } && test -s conftest$ac_exeext &&
16867 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016868 eval "$as_ac_var=yes"
16869else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016871sed 's/^/| /' conftest.$ac_ext >&5
16872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875
16876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016878fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016879ac_res=`eval echo '${'$as_ac_var'}'`
16880 { echo "$as_me:$LINENO: result: $ac_res" >&5
16881echo "${ECHO_T}$ac_res" >&6; }
16882if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016883 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016884#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016885_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016886 case $ac_sys_system in
16887 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016888
Jason Tishlerfac083d2003-07-22 15:20:49 +000016889cat >>confdefs.h <<\_ACEOF
16890#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16891_ACEOF
16892
16893 ;;
16894 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016895fi
16896done
16897
16898fi
16899
16900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016901# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016902
16903
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016904{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16905echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016906# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016907if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016909 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016910 { echo "$as_me:$LINENO: result: no" >&5
16911echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016912 ipv6=no
16913 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016914 *) { echo "$as_me:$LINENO: result: yes" >&5
16915echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016917#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016918_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016919
16920 ipv6=yes
16921 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923else
Martin v. Löwis11437992002-04-12 09:54:03 +000016924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016925 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016926 { echo "$as_me:$LINENO: result: no" >&5
16927echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016928 ipv6=no
16929
16930else
Martin v. Löwis11437992002-04-12 09:54:03 +000016931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016932/* confdefs.h. */
16933_ACEOF
16934cat confdefs.h >>conftest.$ac_ext
16935cat >>conftest.$ac_ext <<_ACEOF
16936/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016937 /* AF_INET6 available check */
16938#include <sys/types.h>
16939#include <sys/socket.h>
16940main()
16941{
16942 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16943 exit(1);
16944 else
16945 exit(0);
16946}
16947
Martin v. Löwis11437992002-04-12 09:54:03 +000016948_ACEOF
16949rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950if { (ac_try="$ac_link"
16951case "(($ac_try" in
16952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16953 *) ac_try_echo=$ac_try;;
16954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016956 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016957 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016959 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960 { (case "(($ac_try" in
16961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16962 *) ac_try_echo=$ac_try;;
16963esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016965 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016968 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016969 { echo "$as_me:$LINENO: result: yes" >&5
16970echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016971 ipv6=yes
16972else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016973 echo "$as_me: program exited with status $ac_status" >&5
16974echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016975sed 's/^/| /' conftest.$ac_ext >&5
16976
Martin v. Löwis11437992002-04-12 09:54:03 +000016977( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016978{ echo "$as_me:$LINENO: result: no" >&5
16979echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016980 ipv6=no
16981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982rm -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 +000016983fi
16984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016985
16986
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016987if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016988 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16989echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016991/* confdefs.h. */
16992_ACEOF
16993cat confdefs.h >>conftest.$ac_ext
16994cat >>conftest.$ac_ext <<_ACEOF
16995/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016996#include <sys/types.h>
16997#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016998int
16999main ()
17000{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017001struct sockaddr_in6 x;
17002x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 ;
17004 return 0;
17005}
17006_ACEOF
17007rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008if { (ac_try="$ac_compile"
17009case "(($ac_try" in
17010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17011 *) ac_try_echo=$ac_try;;
17012esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017016 grep -v '^ *+' conftest.er1 >conftest.err
17017 rm -f conftest.er1
17018 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020 (exit $ac_status); } && {
17021 test -z "$ac_c_werror_flag" ||
17022 test ! -s conftest.err
17023 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017024 { echo "$as_me:$LINENO: result: yes" >&5
17025echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017026 ipv6=yes
17027else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017029sed 's/^/| /' conftest.$ac_ext >&5
17030
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017031 { echo "$as_me:$LINENO: result: no" >&5
17032echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017033 ipv6=no
17034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035
17036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017037fi
17038
17039if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017040 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017041#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017042_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017043
17044fi
17045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046fi
17047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017048
17049ipv6type=unknown
17050ipv6lib=none
17051ipv6trylibc=no
17052
17053if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017054 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17055echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017056 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17057 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017058 case $i in
17059 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017061/* confdefs.h. */
17062_ACEOF
17063cat confdefs.h >>conftest.$ac_ext
17064cat >>conftest.$ac_ext <<_ACEOF
17065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017067#include <netinet/in.h>
17068#ifdef IPV6_INRIA_VERSION
17069yes
17070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017073 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017074 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017075fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017076rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017077
17078 ;;
17079 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017081/* confdefs.h. */
17082_ACEOF
17083cat confdefs.h >>conftest.$ac_ext
17084cat >>conftest.$ac_ext <<_ACEOF
17085/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017086
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017087#include <netinet/in.h>
17088#ifdef __KAME__
17089yes
17090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017091_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017093 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017094 ipv6type=$i;
17095 ipv6lib=inet6
17096 ipv6libdir=/usr/local/v6/lib
17097 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017098fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017099rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017100
17101 ;;
17102 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017104/* confdefs.h. */
17105_ACEOF
17106cat confdefs.h >>conftest.$ac_ext
17107cat >>conftest.$ac_ext <<_ACEOF
17108/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017109
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017110#include <features.h>
17111#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17112yes
17113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017114_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017116 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017117 ipv6type=$i;
17118 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017119fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017120rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017121
17122 ;;
17123 linux-inet6)
17124 if test -d /usr/inet6; then
17125 ipv6type=$i
17126 ipv6lib=inet6
17127 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017128 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017129 fi
17130 ;;
17131 solaris)
17132 if test -f /etc/netconfig; then
17133 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17134 ipv6type=$i
17135 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017136 fi
17137 fi
17138 ;;
17139 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017141/* confdefs.h. */
17142_ACEOF
17143cat confdefs.h >>conftest.$ac_ext
17144cat >>conftest.$ac_ext <<_ACEOF
17145/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017146
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017147#include <sys/param.h>
17148#ifdef _TOSHIBA_INET6
17149yes
17150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017151_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017153 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017154 ipv6type=$i;
17155 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017156 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017157fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017158rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017159
17160 ;;
17161 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017163/* confdefs.h. */
17164_ACEOF
17165cat confdefs.h >>conftest.$ac_ext
17166cat >>conftest.$ac_ext <<_ACEOF
17167/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017168
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017169#include </usr/local/v6/include/sys/v6config.h>
17170#ifdef __V6D__
17171yes
17172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017173_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017175 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017176 ipv6type=$i;
17177 ipv6lib=v6;
17178 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017179 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017180fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017181rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017182
17183 ;;
17184 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017186/* confdefs.h. */
17187_ACEOF
17188cat confdefs.h >>conftest.$ac_ext
17189cat >>conftest.$ac_ext <<_ACEOF
17190/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017191
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017192#include <sys/param.h>
17193#ifdef _ZETA_MINAMI_INET6
17194yes
17195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017196_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017198 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017199 ipv6type=$i;
17200 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017201 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017202fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017203rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017204
17205 ;;
17206 esac
17207 if test "$ipv6type" != "unknown"; then
17208 break
17209 fi
17210 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017211 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17212echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017213fi
17214
17215if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17216 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17217 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17218 echo "using lib$ipv6lib"
17219 else
17220 if test $ipv6trylibc = "yes"; then
17221 echo "using libc"
17222 else
17223 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17224 echo "You need to fetch lib$ipv6lib.a from appropriate"
17225 echo 'ipv6 kit and compile beforehand.'
17226 exit 1
17227 fi
17228 fi
17229fi
17230
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017231{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17232echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017233cat >conftest.$ac_ext <<_ACEOF
17234/* confdefs.h. */
17235_ACEOF
17236cat confdefs.h >>conftest.$ac_ext
17237cat >>conftest.$ac_ext <<_ACEOF
17238/* end confdefs.h. */
17239#include <Carbon/Carbon.h>
17240int
17241main ()
17242{
17243FSIORefNum fRef = 0
17244 ;
17245 return 0;
17246}
17247_ACEOF
17248rm -f conftest.$ac_objext
17249if { (ac_try="$ac_compile"
17250case "(($ac_try" in
17251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17252 *) ac_try_echo=$ac_try;;
17253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017255 (eval "$ac_compile") 2>conftest.er1
17256 ac_status=$?
17257 grep -v '^ *+' conftest.er1 >conftest.err
17258 rm -f conftest.er1
17259 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017261 (exit $ac_status); } && {
17262 test -z "$ac_c_werror_flag" ||
17263 test ! -s conftest.err
17264 } && test -s conftest.$ac_objext; then
17265
17266cat >>confdefs.h <<\_ACEOF
17267#define HAVE_OSX105_SDK 1
17268_ACEOF
17269
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017270 { echo "$as_me:$LINENO: result: yes" >&5
17271echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017273 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017274sed 's/^/| /' conftest.$ac_ext >&5
17275
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017276 { echo "$as_me:$LINENO: result: no" >&5
17277echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017278
17279fi
17280
17281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17282
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017283# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017284{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17285echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017287# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017288if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 withval=$with_doc_strings;
17290fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017291
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017292
17293if test -z "$with_doc_strings"
17294then with_doc_strings="yes"
17295fi
17296if test "$with_doc_strings" != "no"
17297then
17298
17299cat >>confdefs.h <<\_ACEOF
17300#define WITH_DOC_STRINGS 1
17301_ACEOF
17302
17303fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017304{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17305echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017306
Neil Schemenauera35c6882001-02-27 04:45:05 +000017307# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017308{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17309echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017312if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017314if test "$withval" != no
17315then
17316
17317cat >>confdefs.h <<\_ACEOF
17318#define WITH_TSC 1
17319_ACEOF
17320
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017321 { echo "$as_me:$LINENO: result: yes" >&5
17322echo "${ECHO_T}yes" >&6; }
17323else { echo "$as_me:$LINENO: result: no" >&5
17324echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017325fi
17326else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017327 { echo "$as_me:$LINENO: result: no" >&5
17328echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329fi
17330
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017331
17332# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017333{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17334echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017337if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338 withval=$with_pymalloc;
17339fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017340
Neil Schemenauera35c6882001-02-27 04:45:05 +000017341
Neil Schemenauer16c22972002-03-22 15:34:49 +000017342if test -z "$with_pymalloc"
17343then with_pymalloc="yes"
17344fi
17345if test "$with_pymalloc" != "no"
17346then
Martin v. Löwis11437992002-04-12 09:54:03 +000017347
17348cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017349#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017350_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017351
17352fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017353{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17354echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017355
Benjamin Peterson05159c42009-12-03 03:01:27 +000017356# Check for Valgrind support
17357{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17358echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17359
17360# Check whether --with-valgrind was given.
17361if test "${with_valgrind+set}" = set; then
17362 withval=$with_valgrind;
17363else
17364 with_valgrind=no
17365fi
17366
17367{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17368echo "${ECHO_T}$with_valgrind" >&6; }
17369if test "$with_valgrind" != no; then
17370 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17371 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17372echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17373if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17374 echo $ECHO_N "(cached) $ECHO_C" >&6
17375fi
17376{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17377echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17378else
17379 # Is the header compilable?
17380{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17381echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17382cat >conftest.$ac_ext <<_ACEOF
17383/* confdefs.h. */
17384_ACEOF
17385cat confdefs.h >>conftest.$ac_ext
17386cat >>conftest.$ac_ext <<_ACEOF
17387/* end confdefs.h. */
17388$ac_includes_default
17389#include <valgrind/valgrind.h>
17390_ACEOF
17391rm -f conftest.$ac_objext
17392if { (ac_try="$ac_compile"
17393case "(($ac_try" in
17394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17395 *) ac_try_echo=$ac_try;;
17396esac
17397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17398 (eval "$ac_compile") 2>conftest.er1
17399 ac_status=$?
17400 grep -v '^ *+' conftest.er1 >conftest.err
17401 rm -f conftest.er1
17402 cat conftest.err >&5
17403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17404 (exit $ac_status); } && {
17405 test -z "$ac_c_werror_flag" ||
17406 test ! -s conftest.err
17407 } && test -s conftest.$ac_objext; then
17408 ac_header_compiler=yes
17409else
17410 echo "$as_me: failed program was:" >&5
17411sed 's/^/| /' conftest.$ac_ext >&5
17412
17413 ac_header_compiler=no
17414fi
17415
17416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17417{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17418echo "${ECHO_T}$ac_header_compiler" >&6; }
17419
17420# Is the header present?
17421{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17422echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17423cat >conftest.$ac_ext <<_ACEOF
17424/* confdefs.h. */
17425_ACEOF
17426cat confdefs.h >>conftest.$ac_ext
17427cat >>conftest.$ac_ext <<_ACEOF
17428/* end confdefs.h. */
17429#include <valgrind/valgrind.h>
17430_ACEOF
17431if { (ac_try="$ac_cpp conftest.$ac_ext"
17432case "(($ac_try" in
17433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17434 *) ac_try_echo=$ac_try;;
17435esac
17436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17437 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17438 ac_status=$?
17439 grep -v '^ *+' conftest.er1 >conftest.err
17440 rm -f conftest.er1
17441 cat conftest.err >&5
17442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17443 (exit $ac_status); } >/dev/null && {
17444 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17445 test ! -s conftest.err
17446 }; then
17447 ac_header_preproc=yes
17448else
17449 echo "$as_me: failed program was:" >&5
17450sed 's/^/| /' conftest.$ac_ext >&5
17451
17452 ac_header_preproc=no
17453fi
17454
17455rm -f conftest.err conftest.$ac_ext
17456{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17457echo "${ECHO_T}$ac_header_preproc" >&6; }
17458
17459# So? What about this header?
17460case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17461 yes:no: )
17462 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17463echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17464 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17465echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17466 ac_header_preproc=yes
17467 ;;
17468 no:yes:* )
17469 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17470echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17471 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17472echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17473 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17474echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17475 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17476echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17477 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17478echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17479 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17480echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17481 ( cat <<\_ASBOX
17482## -------------------------------------- ##
17483## Report this to http://bugs.python.org/ ##
17484## -------------------------------------- ##
17485_ASBOX
17486 ) | sed "s/^/$as_me: WARNING: /" >&2
17487 ;;
17488esac
17489{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17490echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17491if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17492 echo $ECHO_N "(cached) $ECHO_C" >&6
17493else
17494 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17495fi
17496{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17497echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17498
17499fi
17500if test $ac_cv_header_valgrind_valgrind_h = yes; then
17501
17502cat >>confdefs.h <<\_ACEOF
17503#define WITH_VALGRIND 1
17504_ACEOF
17505
17506else
17507 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17508echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17509 { (exit 1); exit 1; }; }
17510
17511fi
17512
17513
17514fi
17515
Barry Warsawef82cd72000-06-30 16:21:01 +000017516# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017517{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17518echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017521if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017523if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017524then
17525
17526cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017527#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017528_ACEOF
17529
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017530 { echo "$as_me:$LINENO: result: yes" >&5
17531echo "${ECHO_T}yes" >&6; }
17532else { echo "$as_me:$LINENO: result: no" >&5
17533echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017534fi
17535else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017536 { echo "$as_me:$LINENO: result: no" >&5
17537echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538fi
17539
Barry Warsawef82cd72000-06-30 16:21:01 +000017540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017541# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017542
Guido van Rossum98935bf2001-09-05 19:13:16 +000017543DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017544
Guido van Rossume97ee181999-12-20 21:27:22 +000017545# the dlopen() function means we might want to use dynload_shlib.o. some
17546# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017547
Thomas Wouters3a584202000-08-05 23:28:51 +000017548for ac_func in dlopen
17549do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017550as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17551{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17552echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017554 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017555else
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017557/* confdefs.h. */
17558_ACEOF
17559cat confdefs.h >>conftest.$ac_ext
17560cat >>conftest.$ac_ext <<_ACEOF
17561/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017562/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17563 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17564#define $ac_func innocuous_$ac_func
17565
Guido van Rossume97ee181999-12-20 21:27:22 +000017566/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017567 which can conflict with char $ac_func (); below.
17568 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017569 <limits.h> exists even on freestanding compilers. */
17570
17571#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017572# include <limits.h>
17573#else
17574# include <assert.h>
17575#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017576
17577#undef $ac_func
17578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579/* Override any GCC internal prototype to avoid an error.
17580 Use char because int might match the return type of a GCC
17581 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017582#ifdef __cplusplus
17583extern "C"
17584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017585char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017586/* The GNU C library defines this for functions which it implements
17587 to always fail with ENOSYS. Some functions are actually named
17588 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017590choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017591#endif
17592
Skip Montanaro6dead952003-09-25 14:50:04 +000017593int
17594main ()
17595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 ;
17598 return 0;
17599}
17600_ACEOF
17601rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602if { (ac_try="$ac_link"
17603case "(($ac_try" in
17604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17605 *) ac_try_echo=$ac_try;;
17606esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017610 grep -v '^ *+' conftest.er1 >conftest.err
17611 rm -f conftest.er1
17612 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614 (exit $ac_status); } && {
17615 test -z "$ac_c_werror_flag" ||
17616 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017617 } && test -s conftest$ac_exeext &&
17618 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017620else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017622sed 's/^/| /' conftest.$ac_ext >&5
17623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626
17627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017628 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017629fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017630ac_res=`eval echo '${'$as_ac_var'}'`
17631 { echo "$as_me:$LINENO: result: $ac_res" >&5
17632echo "${ECHO_T}$ac_res" >&6; }
17633if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017635#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017636_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017637
Guido van Rossume97ee181999-12-20 21:27:22 +000017638fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017639done
Guido van Rossume97ee181999-12-20 21:27:22 +000017640
Michael W. Hudson54241132001-12-07 15:38:26 +000017641
Guido van Rossume97ee181999-12-20 21:27:22 +000017642# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17643# loading of modules.
17644
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017645{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17646echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017647if test -z "$DYNLOADFILE"
17648then
17649 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017650 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17651 if test "$ac_cv_func_dlopen" = yes
17652 then DYNLOADFILE="dynload_shlib.o"
17653 else DYNLOADFILE="dynload_aix.o"
17654 fi
17655 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017656 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017657 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17658 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017659 *)
17660 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17661 # out any dynamic loading
17662 if test "$ac_cv_func_dlopen" = yes
17663 then DYNLOADFILE="dynload_shlib.o"
17664 else DYNLOADFILE="dynload_stub.o"
17665 fi
17666 ;;
17667 esac
17668fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017669{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17670echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017671if test "$DYNLOADFILE" != "dynload_stub.o"
17672then
Martin v. Löwis11437992002-04-12 09:54:03 +000017673
17674cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017675#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017676_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017677
17678fi
17679
Neil Schemenauer4e425612001-06-19 15:44:15 +000017680# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17681
Michael W. Hudson54241132001-12-07 15:38:26 +000017682
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017683{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17684echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017685if test -z "$MACHDEP_OBJS"
17686then
Jack Jansene578a632001-08-15 01:27:14 +000017687 MACHDEP_OBJS=$extra_machdep_objs
17688else
17689 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017690fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017691{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17692echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017693
Guido van Rossum627b2d71993-12-24 10:39:16 +000017694# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
Martin v. Löwisd6320502004-08-12 13:45:08 +000017766
Martin v. Löwisc3001752005-01-23 09:27:24 +000017767
17768
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017769
17770
Thomas Wouterscf297e42007-02-23 15:07:44 +000017771
17772
Gregory P. Smith25523d22007-09-03 16:44:55 +000017773
Christian Heimes4e30a842007-11-30 22:12:06 +000017774
Martin v. Löwis92fab752008-03-08 10:40:41 +000017775
Martin v. Löwis823725e2008-03-24 13:39:54 +000017776
17777
Benjamin Peterson965ce872009-04-05 21:24:58 +000017778
17779
17780
17781
Martin v. Löwis011e8422009-05-05 04:43:17 +000017782
Martin v. Löwis113a0852009-05-29 17:25:39 +000017783
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017784
17785
17786
17787
Antoine Pitroub7572f02009-12-02 20:46:48 +000017788
Martin v. Löwis823725e2008-03-24 13:39:54 +000017789for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17790 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017791 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017792 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017793 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017794 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017795 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017796 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17797 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017798 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17799 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017800 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017801 truncate uname unsetenv utimes waitpid wait3 wait4 \
17802 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017803do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017804as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17805{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17806echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017809else
Martin v. Löwis11437992002-04-12 09:54:03 +000017810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017811/* confdefs.h. */
17812_ACEOF
17813cat confdefs.h >>conftest.$ac_ext
17814cat >>conftest.$ac_ext <<_ACEOF
17815/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017816/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17817 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17818#define $ac_func innocuous_$ac_func
17819
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017820/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017821 which can conflict with char $ac_func (); below.
17822 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017823 <limits.h> exists even on freestanding compilers. */
17824
17825#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017826# include <limits.h>
17827#else
17828# include <assert.h>
17829#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017830
17831#undef $ac_func
17832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017833/* Override any GCC internal prototype to avoid an error.
17834 Use char because int might match the return type of a GCC
17835 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017836#ifdef __cplusplus
17837extern "C"
17838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017839char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017840/* The GNU C library defines this for functions which it implements
17841 to always fail with ENOSYS. Some functions are actually named
17842 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017844choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017845#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017846
Skip Montanaro6dead952003-09-25 14:50:04 +000017847int
17848main ()
17849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017851 ;
17852 return 0;
17853}
17854_ACEOF
17855rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856if { (ac_try="$ac_link"
17857case "(($ac_try" in
17858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17859 *) ac_try_echo=$ac_try;;
17860esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017862 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017864 grep -v '^ *+' conftest.er1 >conftest.err
17865 rm -f conftest.er1
17866 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868 (exit $ac_status); } && {
17869 test -z "$ac_c_werror_flag" ||
17870 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017871 } && test -s conftest$ac_exeext &&
17872 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017873 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017874else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017876sed 's/^/| /' conftest.$ac_ext >&5
17877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017878 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880
17881rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017882 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017883fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017884ac_res=`eval echo '${'$as_ac_var'}'`
17885 { echo "$as_me:$LINENO: result: $ac_res" >&5
17886echo "${ECHO_T}$ac_res" >&6; }
17887if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017889#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017890_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017891
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017892fi
17893done
17894
Michael W. Hudson54241132001-12-07 15:38:26 +000017895
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017896# For some functions, having a definition is not sufficient, since
17897# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017898{ echo "$as_me:$LINENO: checking for chroot" >&5
17899echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017900cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017901/* confdefs.h. */
17902_ACEOF
17903cat confdefs.h >>conftest.$ac_ext
17904cat >>conftest.$ac_ext <<_ACEOF
17905/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017906#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017907int
17908main ()
17909{
17910void *x=chroot
17911 ;
17912 return 0;
17913}
17914_ACEOF
17915rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017916if { (ac_try="$ac_compile"
17917case "(($ac_try" in
17918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17919 *) ac_try_echo=$ac_try;;
17920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017924 grep -v '^ *+' conftest.er1 >conftest.err
17925 rm -f conftest.er1
17926 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017928 (exit $ac_status); } && {
17929 test -z "$ac_c_werror_flag" ||
17930 test ! -s conftest.err
17931 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017932
17933cat >>confdefs.h <<\_ACEOF
17934#define HAVE_CHROOT 1
17935_ACEOF
17936
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017937 { echo "$as_me:$LINENO: result: yes" >&5
17938echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017939else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017941sed 's/^/| /' conftest.$ac_ext >&5
17942
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017943 { echo "$as_me:$LINENO: result: no" >&5
17944echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017945
17946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017947
17948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017949{ echo "$as_me:$LINENO: checking for link" >&5
17950echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017951cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017952/* confdefs.h. */
17953_ACEOF
17954cat confdefs.h >>conftest.$ac_ext
17955cat >>conftest.$ac_ext <<_ACEOF
17956/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017957#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017958int
17959main ()
17960{
17961void *x=link
17962 ;
17963 return 0;
17964}
17965_ACEOF
17966rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967if { (ac_try="$ac_compile"
17968case "(($ac_try" in
17969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17970 *) ac_try_echo=$ac_try;;
17971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017975 grep -v '^ *+' conftest.er1 >conftest.err
17976 rm -f conftest.er1
17977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979 (exit $ac_status); } && {
17980 test -z "$ac_c_werror_flag" ||
17981 test ! -s conftest.err
17982 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017983
17984cat >>confdefs.h <<\_ACEOF
17985#define HAVE_LINK 1
17986_ACEOF
17987
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017988 { echo "$as_me:$LINENO: result: yes" >&5
17989echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017990else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017992sed 's/^/| /' conftest.$ac_ext >&5
17993
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017994 { echo "$as_me:$LINENO: result: no" >&5
17995echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017996
17997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998
17999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018000{ echo "$as_me:$LINENO: checking for symlink" >&5
18001echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018002cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018003/* confdefs.h. */
18004_ACEOF
18005cat confdefs.h >>conftest.$ac_ext
18006cat >>conftest.$ac_ext <<_ACEOF
18007/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018008#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018009int
18010main ()
18011{
18012void *x=symlink
18013 ;
18014 return 0;
18015}
18016_ACEOF
18017rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018if { (ac_try="$ac_compile"
18019case "(($ac_try" in
18020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18021 *) ac_try_echo=$ac_try;;
18022esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018026 grep -v '^ *+' conftest.er1 >conftest.err
18027 rm -f conftest.er1
18028 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030 (exit $ac_status); } && {
18031 test -z "$ac_c_werror_flag" ||
18032 test ! -s conftest.err
18033 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018034
18035cat >>confdefs.h <<\_ACEOF
18036#define HAVE_SYMLINK 1
18037_ACEOF
18038
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018039 { echo "$as_me:$LINENO: result: yes" >&5
18040echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018043sed 's/^/| /' conftest.$ac_ext >&5
18044
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018045 { echo "$as_me:$LINENO: result: no" >&5
18046echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018047
18048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049
18050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018051{ echo "$as_me:$LINENO: checking for fchdir" >&5
18052echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018054/* confdefs.h. */
18055_ACEOF
18056cat confdefs.h >>conftest.$ac_ext
18057cat >>conftest.$ac_ext <<_ACEOF
18058/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018059#include <unistd.h>
18060int
18061main ()
18062{
18063void *x=fchdir
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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +000018085
18086cat >>confdefs.h <<\_ACEOF
18087#define HAVE_FCHDIR 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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +000018098
18099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100
18101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018102{ echo "$as_me:$LINENO: checking for fsync" >&5
18103echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018105/* confdefs.h. */
18106_ACEOF
18107cat confdefs.h >>conftest.$ac_ext
18108cat >>conftest.$ac_ext <<_ACEOF
18109/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018110#include <unistd.h>
18111int
18112main ()
18113{
18114void *x=fsync
18115 ;
18116 return 0;
18117}
18118_ACEOF
18119rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120if { (ac_try="$ac_compile"
18121case "(($ac_try" in
18122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18123 *) ac_try_echo=$ac_try;;
18124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018128 grep -v '^ *+' conftest.er1 >conftest.err
18129 rm -f conftest.er1
18130 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018132 (exit $ac_status); } && {
18133 test -z "$ac_c_werror_flag" ||
18134 test ! -s conftest.err
18135 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018136
18137cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018138#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018139_ACEOF
18140
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018141 { echo "$as_me:$LINENO: result: yes" >&5
18142echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018143else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018145sed 's/^/| /' conftest.$ac_ext >&5
18146
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018147 { echo "$as_me:$LINENO: result: no" >&5
18148echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018149
18150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151
18152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018153{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18154echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018156/* confdefs.h. */
18157_ACEOF
18158cat confdefs.h >>conftest.$ac_ext
18159cat >>conftest.$ac_ext <<_ACEOF
18160/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018161#include <unistd.h>
18162int
18163main ()
18164{
18165void *x=fdatasync
18166 ;
18167 return 0;
18168}
18169_ACEOF
18170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171if { (ac_try="$ac_compile"
18172case "(($ac_try" in
18173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18174 *) ac_try_echo=$ac_try;;
18175esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018179 grep -v '^ *+' conftest.er1 >conftest.err
18180 rm -f conftest.er1
18181 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018183 (exit $ac_status); } && {
18184 test -z "$ac_c_werror_flag" ||
18185 test ! -s conftest.err
18186 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018187
18188cat >>confdefs.h <<\_ACEOF
18189#define HAVE_FDATASYNC 1
18190_ACEOF
18191
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018192 { echo "$as_me:$LINENO: result: yes" >&5
18193echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018196sed 's/^/| /' conftest.$ac_ext >&5
18197
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018198 { echo "$as_me:$LINENO: result: no" >&5
18199echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018200
18201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018202
18203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018204{ echo "$as_me:$LINENO: checking for epoll" >&5
18205echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018206cat >conftest.$ac_ext <<_ACEOF
18207/* confdefs.h. */
18208_ACEOF
18209cat confdefs.h >>conftest.$ac_ext
18210cat >>conftest.$ac_ext <<_ACEOF
18211/* end confdefs.h. */
18212#include <sys/epoll.h>
18213int
18214main ()
18215{
18216void *x=epoll_create
18217 ;
18218 return 0;
18219}
18220_ACEOF
18221rm -f conftest.$ac_objext
18222if { (ac_try="$ac_compile"
18223case "(($ac_try" in
18224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18225 *) ac_try_echo=$ac_try;;
18226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018228 (eval "$ac_compile") 2>conftest.er1
18229 ac_status=$?
18230 grep -v '^ *+' conftest.er1 >conftest.err
18231 rm -f conftest.er1
18232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018234 (exit $ac_status); } && {
18235 test -z "$ac_c_werror_flag" ||
18236 test ! -s conftest.err
18237 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018238
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018239cat >>confdefs.h <<\_ACEOF
18240#define HAVE_EPOLL 1
18241_ACEOF
18242
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018243 { echo "$as_me:$LINENO: result: yes" >&5
18244echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018245else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018246 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018247sed 's/^/| /' conftest.$ac_ext >&5
18248
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018249 { echo "$as_me:$LINENO: result: no" >&5
18250echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018251
18252fi
18253
18254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018255{ echo "$as_me:$LINENO: checking for kqueue" >&5
18256echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018257cat >conftest.$ac_ext <<_ACEOF
18258/* confdefs.h. */
18259_ACEOF
18260cat confdefs.h >>conftest.$ac_ext
18261cat >>conftest.$ac_ext <<_ACEOF
18262/* end confdefs.h. */
18263
18264#include <sys/types.h>
18265#include <sys/event.h>
18266
18267int
18268main ()
18269{
18270int x=kqueue()
18271 ;
18272 return 0;
18273}
18274_ACEOF
18275rm -f conftest.$ac_objext
18276if { (ac_try="$ac_compile"
18277case "(($ac_try" in
18278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18279 *) ac_try_echo=$ac_try;;
18280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018282 (eval "$ac_compile") 2>conftest.er1
18283 ac_status=$?
18284 grep -v '^ *+' conftest.er1 >conftest.err
18285 rm -f conftest.er1
18286 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018288 (exit $ac_status); } && {
18289 test -z "$ac_c_werror_flag" ||
18290 test ! -s conftest.err
18291 } && test -s conftest.$ac_objext; then
18292
18293cat >>confdefs.h <<\_ACEOF
18294#define HAVE_KQUEUE 1
18295_ACEOF
18296
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018297 { echo "$as_me:$LINENO: result: yes" >&5
18298echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018299else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018300 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018301sed 's/^/| /' conftest.$ac_ext >&5
18302
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018303 { echo "$as_me:$LINENO: result: no" >&5
18304echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018305
18306fi
18307
18308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018309# On some systems (eg. FreeBSD 5), we would find a definition of the
18310# functions ctermid_r, setgroups in the library, but no prototype
18311# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18312# address to avoid compiler warnings and potential miscompilations
18313# because of the missing prototypes.
18314
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018315{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18316echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018318/* confdefs.h. */
18319_ACEOF
18320cat confdefs.h >>conftest.$ac_ext
18321cat >>conftest.$ac_ext <<_ACEOF
18322/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018323
18324#include "confdefs.h"
18325#include <stdio.h>
18326
Martin v. Löwisd5843682002-11-21 20:41:28 +000018327int
18328main ()
18329{
18330void* p = ctermid_r
18331 ;
18332 return 0;
18333}
18334_ACEOF
18335rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018336if { (ac_try="$ac_compile"
18337case "(($ac_try" in
18338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18339 *) ac_try_echo=$ac_try;;
18340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018342 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018344 grep -v '^ *+' conftest.er1 >conftest.err
18345 rm -f conftest.er1
18346 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018348 (exit $ac_status); } && {
18349 test -z "$ac_c_werror_flag" ||
18350 test ! -s conftest.err
18351 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018352
18353cat >>confdefs.h <<\_ACEOF
18354#define HAVE_CTERMID_R 1
18355_ACEOF
18356
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018357 { echo "$as_me:$LINENO: result: yes" >&5
18358echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018359else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018361sed 's/^/| /' conftest.$ac_ext >&5
18362
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018363 { echo "$as_me:$LINENO: result: no" >&5
18364echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018365
18366fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18369
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018370{ echo "$as_me:$LINENO: checking for flock" >&5
18371echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018373/* confdefs.h. */
18374_ACEOF
18375cat confdefs.h >>conftest.$ac_ext
18376cat >>conftest.$ac_ext <<_ACEOF
18377/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018378
18379#include "confdefs.h"
18380#include <sys/file.h>
18381
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018382int
18383main ()
18384{
18385void* p = flock
18386 ;
18387 return 0;
18388}
18389_ACEOF
18390rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018391if { (ac_try="$ac_compile"
18392case "(($ac_try" in
18393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18394 *) ac_try_echo=$ac_try;;
18395esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018399 grep -v '^ *+' conftest.er1 >conftest.err
18400 rm -f conftest.er1
18401 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018403 (exit $ac_status); } && {
18404 test -z "$ac_c_werror_flag" ||
18405 test ! -s conftest.err
18406 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018407
18408cat >>confdefs.h <<\_ACEOF
18409#define HAVE_FLOCK 1
18410_ACEOF
18411
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018412 { echo "$as_me:$LINENO: result: yes" >&5
18413echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018416sed 's/^/| /' conftest.$ac_ext >&5
18417
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018418 { echo "$as_me:$LINENO: result: no" >&5
18419echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018420
18421fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18424
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018425{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18426echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018428/* confdefs.h. */
18429_ACEOF
18430cat confdefs.h >>conftest.$ac_ext
18431cat >>conftest.$ac_ext <<_ACEOF
18432/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018433
18434#include "confdefs.h"
18435#include <unistd.h>
18436
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018437int
18438main ()
18439{
18440void* p = getpagesize
18441 ;
18442 return 0;
18443}
18444_ACEOF
18445rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018446if { (ac_try="$ac_compile"
18447case "(($ac_try" in
18448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18449 *) ac_try_echo=$ac_try;;
18450esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018454 grep -v '^ *+' conftest.er1 >conftest.err
18455 rm -f conftest.er1
18456 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458 (exit $ac_status); } && {
18459 test -z "$ac_c_werror_flag" ||
18460 test ! -s conftest.err
18461 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018462
18463cat >>confdefs.h <<\_ACEOF
18464#define HAVE_GETPAGESIZE 1
18465_ACEOF
18466
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018467 { echo "$as_me:$LINENO: result: yes" >&5
18468echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018469else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018471sed 's/^/| /' conftest.$ac_ext >&5
18472
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018473 { echo "$as_me:$LINENO: result: no" >&5
18474echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018475
18476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477
18478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018479
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018480for ac_prog in true
18481do
18482 # Extract the first word of "$ac_prog", so it can be a program name with args.
18483set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018484{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018486if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018487 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018488else
18489 if test -n "$TRUE"; then
18490 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18491else
18492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18493for as_dir in $PATH
18494do
18495 IFS=$as_save_IFS
18496 test -z "$as_dir" && as_dir=.
18497 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498 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 +000018499 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018500 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018501 break 2
18502 fi
18503done
18504done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018506
18507fi
18508fi
18509TRUE=$ac_cv_prog_TRUE
18510if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018511 { echo "$as_me:$LINENO: result: $TRUE" >&5
18512echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018513else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018514 { echo "$as_me:$LINENO: result: no" >&5
18515echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018516fi
18517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018519 test -n "$TRUE" && break
18520done
18521test -n "$TRUE" || TRUE="/bin/true"
18522
18523
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018524{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18525echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018526if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018527 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018528else
18529 ac_check_lib_save_LIBS=$LIBS
18530LIBS="-lc $LIBS"
18531cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018532/* confdefs.h. */
18533_ACEOF
18534cat confdefs.h >>conftest.$ac_ext
18535cat >>conftest.$ac_ext <<_ACEOF
18536/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018538/* Override any GCC internal prototype to avoid an error.
18539 Use char because int might match the return type of a GCC
18540 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018541#ifdef __cplusplus
18542extern "C"
18543#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018544char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018545int
18546main ()
18547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018549 ;
18550 return 0;
18551}
18552_ACEOF
18553rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018554if { (ac_try="$ac_link"
18555case "(($ac_try" in
18556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18557 *) ac_try_echo=$ac_try;;
18558esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018560 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018562 grep -v '^ *+' conftest.er1 >conftest.err
18563 rm -f conftest.er1
18564 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566 (exit $ac_status); } && {
18567 test -z "$ac_c_werror_flag" ||
18568 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018569 } && test -s conftest$ac_exeext &&
18570 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018571 ac_cv_lib_c_inet_aton=yes
18572else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018574sed 's/^/| /' conftest.$ac_ext >&5
18575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018576 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578
18579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018581LIBS=$ac_check_lib_save_LIBS
18582fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018583{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18584echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18585if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018586 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018587else
18588
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018589{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18590echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018591if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018592 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018593else
18594 ac_check_lib_save_LIBS=$LIBS
18595LIBS="-lresolv $LIBS"
18596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018597/* confdefs.h. */
18598_ACEOF
18599cat confdefs.h >>conftest.$ac_ext
18600cat >>conftest.$ac_ext <<_ACEOF
18601/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018603/* Override any GCC internal prototype to avoid an error.
18604 Use char because int might match the return type of a GCC
18605 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018606#ifdef __cplusplus
18607extern "C"
18608#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018609char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018610int
18611main ()
18612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018613return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018614 ;
18615 return 0;
18616}
18617_ACEOF
18618rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619if { (ac_try="$ac_link"
18620case "(($ac_try" in
18621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18622 *) ac_try_echo=$ac_try;;
18623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018627 grep -v '^ *+' conftest.er1 >conftest.err
18628 rm -f conftest.er1
18629 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631 (exit $ac_status); } && {
18632 test -z "$ac_c_werror_flag" ||
18633 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018634 } && test -s conftest$ac_exeext &&
18635 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018636 ac_cv_lib_resolv_inet_aton=yes
18637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018639sed 's/^/| /' conftest.$ac_ext >&5
18640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018643
18644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018646LIBS=$ac_check_lib_save_LIBS
18647fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018648{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18649echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18650if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018651 cat >>confdefs.h <<_ACEOF
18652#define HAVE_LIBRESOLV 1
18653_ACEOF
18654
18655 LIBS="-lresolv $LIBS"
18656
18657fi
18658
18659
18660fi
18661
18662
Christian Heimesd0764e22007-12-04 15:00:33 +000018663# On Tru64, chflags seems to be present, but calling it will
18664# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018665{ echo "$as_me:$LINENO: checking for chflags" >&5
18666echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018667if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018668 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018669else
18670 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018671 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018672else
18673 cat >conftest.$ac_ext <<_ACEOF
18674/* confdefs.h. */
18675_ACEOF
18676cat confdefs.h >>conftest.$ac_ext
18677cat >>conftest.$ac_ext <<_ACEOF
18678/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018679[
Christian Heimesd0764e22007-12-04 15:00:33 +000018680#include <sys/stat.h>
18681#include <unistd.h>
18682int main(int argc, char*argv[])
18683{
18684 if(chflags(argv[0], 0) != 0)
18685 return 1;
18686 return 0;
18687}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018688]
Christian Heimesd0764e22007-12-04 15:00:33 +000018689_ACEOF
18690rm -f conftest$ac_exeext
18691if { (ac_try="$ac_link"
18692case "(($ac_try" in
18693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18694 *) ac_try_echo=$ac_try;;
18695esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018697 (eval "$ac_link") 2>&5
18698 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18701 { (case "(($ac_try" in
18702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18703 *) ac_try_echo=$ac_try;;
18704esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018706 (eval "$ac_try") 2>&5
18707 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018709 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018710 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018711else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018712 echo "$as_me: program exited with status $ac_status" >&5
18713echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018714sed 's/^/| /' conftest.$ac_ext >&5
18715
18716( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018717ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018718fi
18719rm -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 +000018720fi
18721
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018722
18723
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018724fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018725{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18726echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018727if test "$ac_cv_have_chflags" = cross ; then
18728 { echo "$as_me:$LINENO: checking for chflags" >&5
18729echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18730if test "${ac_cv_func_chflags+set}" = set; then
18731 echo $ECHO_N "(cached) $ECHO_C" >&6
18732else
18733 cat >conftest.$ac_ext <<_ACEOF
18734/* confdefs.h. */
18735_ACEOF
18736cat confdefs.h >>conftest.$ac_ext
18737cat >>conftest.$ac_ext <<_ACEOF
18738/* end confdefs.h. */
18739/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18740 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18741#define chflags innocuous_chflags
18742
18743/* System header to define __stub macros and hopefully few prototypes,
18744 which can conflict with char chflags (); below.
18745 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18746 <limits.h> exists even on freestanding compilers. */
18747
18748#ifdef __STDC__
18749# include <limits.h>
18750#else
18751# include <assert.h>
18752#endif
18753
18754#undef chflags
18755
18756/* Override any GCC internal prototype to avoid an error.
18757 Use char because int might match the return type of a GCC
18758 builtin and then its argument prototype would still apply. */
18759#ifdef __cplusplus
18760extern "C"
18761#endif
18762char chflags ();
18763/* The GNU C library defines this for functions which it implements
18764 to always fail with ENOSYS. Some functions are actually named
18765 something starting with __ and the normal name is an alias. */
18766#if defined __stub_chflags || defined __stub___chflags
18767choke me
18768#endif
18769
18770int
18771main ()
18772{
18773return chflags ();
18774 ;
18775 return 0;
18776}
18777_ACEOF
18778rm -f conftest.$ac_objext conftest$ac_exeext
18779if { (ac_try="$ac_link"
18780case "(($ac_try" in
18781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18782 *) ac_try_echo=$ac_try;;
18783esac
18784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18785 (eval "$ac_link") 2>conftest.er1
18786 ac_status=$?
18787 grep -v '^ *+' conftest.er1 >conftest.err
18788 rm -f conftest.er1
18789 cat conftest.err >&5
18790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18791 (exit $ac_status); } && {
18792 test -z "$ac_c_werror_flag" ||
18793 test ! -s conftest.err
18794 } && test -s conftest$ac_exeext &&
18795 $as_test_x conftest$ac_exeext; then
18796 ac_cv_func_chflags=yes
18797else
18798 echo "$as_me: failed program was:" >&5
18799sed 's/^/| /' conftest.$ac_ext >&5
18800
18801 ac_cv_func_chflags=no
18802fi
18803
18804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18805 conftest$ac_exeext conftest.$ac_ext
18806fi
18807{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18808echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18809if test $ac_cv_func_chflags = yes; then
18810 ac_cv_have_chflags="yes"
18811else
18812 ac_cv_have_chflags="no"
18813fi
18814
18815fi
18816if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018817
18818cat >>confdefs.h <<\_ACEOF
18819#define HAVE_CHFLAGS 1
18820_ACEOF
18821
18822fi
18823
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018824{ echo "$as_me:$LINENO: checking for lchflags" >&5
18825echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018826if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018827 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018828else
18829 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018830 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018831else
18832 cat >conftest.$ac_ext <<_ACEOF
18833/* confdefs.h. */
18834_ACEOF
18835cat confdefs.h >>conftest.$ac_ext
18836cat >>conftest.$ac_ext <<_ACEOF
18837/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018838[
Christian Heimesd0764e22007-12-04 15:00:33 +000018839#include <sys/stat.h>
18840#include <unistd.h>
18841int main(int argc, char*argv[])
18842{
18843 if(lchflags(argv[0], 0) != 0)
18844 return 1;
18845 return 0;
18846}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018847]
Christian Heimesd0764e22007-12-04 15:00:33 +000018848_ACEOF
18849rm -f conftest$ac_exeext
18850if { (ac_try="$ac_link"
18851case "(($ac_try" in
18852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18853 *) ac_try_echo=$ac_try;;
18854esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018856 (eval "$ac_link") 2>&5
18857 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18860 { (case "(($ac_try" in
18861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18862 *) ac_try_echo=$ac_try;;
18863esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018865 (eval "$ac_try") 2>&5
18866 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018868 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018869 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018870else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018871 echo "$as_me: program exited with status $ac_status" >&5
18872echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018873sed 's/^/| /' conftest.$ac_ext >&5
18874
18875( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018876ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018877fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18879fi
18880
18881
Christian Heimesd0764e22007-12-04 15:00:33 +000018882
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018883fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018884{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18885echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018886if test "$ac_cv_have_lchflags" = cross ; then
18887 { echo "$as_me:$LINENO: checking for lchflags" >&5
18888echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18889if test "${ac_cv_func_lchflags+set}" = set; then
18890 echo $ECHO_N "(cached) $ECHO_C" >&6
18891else
18892 cat >conftest.$ac_ext <<_ACEOF
18893/* confdefs.h. */
18894_ACEOF
18895cat confdefs.h >>conftest.$ac_ext
18896cat >>conftest.$ac_ext <<_ACEOF
18897/* end confdefs.h. */
18898/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18899 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18900#define lchflags innocuous_lchflags
18901
18902/* System header to define __stub macros and hopefully few prototypes,
18903 which can conflict with char lchflags (); below.
18904 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18905 <limits.h> exists even on freestanding compilers. */
18906
18907#ifdef __STDC__
18908# include <limits.h>
18909#else
18910# include <assert.h>
18911#endif
18912
18913#undef lchflags
18914
18915/* Override any GCC internal prototype to avoid an error.
18916 Use char because int might match the return type of a GCC
18917 builtin and then its argument prototype would still apply. */
18918#ifdef __cplusplus
18919extern "C"
18920#endif
18921char lchflags ();
18922/* The GNU C library defines this for functions which it implements
18923 to always fail with ENOSYS. Some functions are actually named
18924 something starting with __ and the normal name is an alias. */
18925#if defined __stub_lchflags || defined __stub___lchflags
18926choke me
18927#endif
18928
18929int
18930main ()
18931{
18932return lchflags ();
18933 ;
18934 return 0;
18935}
18936_ACEOF
18937rm -f conftest.$ac_objext conftest$ac_exeext
18938if { (ac_try="$ac_link"
18939case "(($ac_try" in
18940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18941 *) ac_try_echo=$ac_try;;
18942esac
18943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18944 (eval "$ac_link") 2>conftest.er1
18945 ac_status=$?
18946 grep -v '^ *+' conftest.er1 >conftest.err
18947 rm -f conftest.er1
18948 cat conftest.err >&5
18949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18950 (exit $ac_status); } && {
18951 test -z "$ac_c_werror_flag" ||
18952 test ! -s conftest.err
18953 } && test -s conftest$ac_exeext &&
18954 $as_test_x conftest$ac_exeext; then
18955 ac_cv_func_lchflags=yes
18956else
18957 echo "$as_me: failed program was:" >&5
18958sed 's/^/| /' conftest.$ac_ext >&5
18959
18960 ac_cv_func_lchflags=no
18961fi
18962
18963rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18964 conftest$ac_exeext conftest.$ac_ext
18965fi
18966{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18967echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18968if test $ac_cv_func_lchflags = yes; then
18969 ac_cv_have_lchflags="yes"
18970else
18971 ac_cv_have_lchflags="no"
18972fi
18973
18974fi
18975if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018976
18977cat >>confdefs.h <<\_ACEOF
18978#define HAVE_LCHFLAGS 1
18979_ACEOF
18980
18981fi
18982
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018983case $ac_sys_system/$ac_sys_release in
18984Darwin/*)
18985 _CUR_CFLAGS="${CFLAGS}"
18986 _CUR_LDFLAGS="${LDFLAGS}"
18987 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18988 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18989 ;;
18990esac
18991
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018992{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18993echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018994if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018995 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018996else
18997 ac_check_lib_save_LIBS=$LIBS
18998LIBS="-lz $LIBS"
18999cat >conftest.$ac_ext <<_ACEOF
19000/* confdefs.h. */
19001_ACEOF
19002cat confdefs.h >>conftest.$ac_ext
19003cat >>conftest.$ac_ext <<_ACEOF
19004/* end confdefs.h. */
19005
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019006/* Override any GCC internal prototype to avoid an error.
19007 Use char because int might match the return type of a GCC
19008 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019009#ifdef __cplusplus
19010extern "C"
19011#endif
19012char inflateCopy ();
19013int
19014main ()
19015{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019016return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019017 ;
19018 return 0;
19019}
19020_ACEOF
19021rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019022if { (ac_try="$ac_link"
19023case "(($ac_try" in
19024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19025 *) ac_try_echo=$ac_try;;
19026esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019028 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019029 ac_status=$?
19030 grep -v '^ *+' conftest.er1 >conftest.err
19031 rm -f conftest.er1
19032 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034 (exit $ac_status); } && {
19035 test -z "$ac_c_werror_flag" ||
19036 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019037 } && test -s conftest$ac_exeext &&
19038 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019039 ac_cv_lib_z_inflateCopy=yes
19040else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019041 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019042sed 's/^/| /' conftest.$ac_ext >&5
19043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019044 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019046
19047rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019048 conftest$ac_exeext conftest.$ac_ext
19049LIBS=$ac_check_lib_save_LIBS
19050fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019051{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19052echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19053if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019054
19055cat >>confdefs.h <<\_ACEOF
19056#define HAVE_ZLIB_COPY 1
19057_ACEOF
19058
19059fi
19060
19061
19062case $ac_sys_system/$ac_sys_release in
19063Darwin/*)
19064 CFLAGS="${_CUR_CFLAGS}"
19065 LDFLAGS="${_CUR_LDFLAGS}"
19066 ;;
19067esac
19068
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019069{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19070echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019072/* confdefs.h. */
19073_ACEOF
19074cat confdefs.h >>conftest.$ac_ext
19075cat >>conftest.$ac_ext <<_ACEOF
19076/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019077
19078#include "confdefs.h"
19079#include <netdb.h>
19080
Martin v. Löwise9416172003-05-03 10:12:45 +000019081int
19082main ()
19083{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019084void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019085 ;
19086 return 0;
19087}
19088_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019089rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019090if { (ac_try="$ac_link"
19091case "(($ac_try" in
19092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19093 *) ac_try_echo=$ac_try;;
19094esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019096 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019098 grep -v '^ *+' conftest.er1 >conftest.err
19099 rm -f conftest.er1
19100 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019102 (exit $ac_status); } && {
19103 test -z "$ac_c_werror_flag" ||
19104 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019105 } && test -s conftest$ac_exeext &&
19106 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019107
19108cat >>confdefs.h <<\_ACEOF
19109#define HAVE_HSTRERROR 1
19110_ACEOF
19111
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019112 { echo "$as_me:$LINENO: result: yes" >&5
19113echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019116sed 's/^/| /' conftest.$ac_ext >&5
19117
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019118 { echo "$as_me:$LINENO: result: no" >&5
19119echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019120
19121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019122
19123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019126{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19127echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019129/* confdefs.h. */
19130_ACEOF
19131cat confdefs.h >>conftest.$ac_ext
19132cat >>conftest.$ac_ext <<_ACEOF
19133/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019134
19135#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019136#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019137#include <sys/socket.h>
19138#include <netinet/in.h>
19139#include <arpa/inet.h>
19140
Martin v. Löwise9416172003-05-03 10:12:45 +000019141int
19142main ()
19143{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019144void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019145 ;
19146 return 0;
19147}
19148_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019149rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019150if { (ac_try="$ac_link"
19151case "(($ac_try" in
19152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19153 *) ac_try_echo=$ac_try;;
19154esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019156 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019158 grep -v '^ *+' conftest.er1 >conftest.err
19159 rm -f conftest.er1
19160 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019162 (exit $ac_status); } && {
19163 test -z "$ac_c_werror_flag" ||
19164 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019165 } && test -s conftest$ac_exeext &&
19166 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019167
19168cat >>confdefs.h <<\_ACEOF
19169#define HAVE_INET_ATON 1
19170_ACEOF
19171
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019172 { echo "$as_me:$LINENO: result: yes" >&5
19173echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019176sed 's/^/| /' conftest.$ac_ext >&5
19177
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019178 { echo "$as_me:$LINENO: result: no" >&5
19179echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019180
19181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019182
19183rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019184 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019185
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019186{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19187echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019189/* confdefs.h. */
19190_ACEOF
19191cat confdefs.h >>conftest.$ac_ext
19192cat >>conftest.$ac_ext <<_ACEOF
19193/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019194
19195#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019196#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019197#include <sys/socket.h>
19198#include <netinet/in.h>
19199#include <arpa/inet.h>
19200
Martin v. Löwise9416172003-05-03 10:12:45 +000019201int
19202main ()
19203{
19204void* p = inet_pton
19205 ;
19206 return 0;
19207}
19208_ACEOF
19209rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019210if { (ac_try="$ac_compile"
19211case "(($ac_try" in
19212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19213 *) ac_try_echo=$ac_try;;
19214esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019218 grep -v '^ *+' conftest.er1 >conftest.err
19219 rm -f conftest.er1
19220 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019222 (exit $ac_status); } && {
19223 test -z "$ac_c_werror_flag" ||
19224 test ! -s conftest.err
19225 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019226
19227cat >>confdefs.h <<\_ACEOF
19228#define HAVE_INET_PTON 1
19229_ACEOF
19230
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019231 { echo "$as_me:$LINENO: result: yes" >&5
19232echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019235sed 's/^/| /' conftest.$ac_ext >&5
19236
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019237 { echo "$as_me:$LINENO: result: no" >&5
19238echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019239
19240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019241
19242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019243
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019244# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019245{ echo "$as_me:$LINENO: checking for setgroups" >&5
19246echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019248/* confdefs.h. */
19249_ACEOF
19250cat confdefs.h >>conftest.$ac_ext
19251cat >>conftest.$ac_ext <<_ACEOF
19252/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019253
19254#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019255#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019256#ifdef HAVE_GRP_H
19257#include <grp.h>
19258#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019259
Martin v. Löwisd5843682002-11-21 20:41:28 +000019260int
19261main ()
19262{
19263void* p = setgroups
19264 ;
19265 return 0;
19266}
19267_ACEOF
19268rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019269if { (ac_try="$ac_compile"
19270case "(($ac_try" in
19271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19272 *) ac_try_echo=$ac_try;;
19273esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019277 grep -v '^ *+' conftest.er1 >conftest.err
19278 rm -f conftest.er1
19279 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019281 (exit $ac_status); } && {
19282 test -z "$ac_c_werror_flag" ||
19283 test ! -s conftest.err
19284 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019285
19286cat >>confdefs.h <<\_ACEOF
19287#define HAVE_SETGROUPS 1
19288_ACEOF
19289
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019290 { echo "$as_me:$LINENO: result: yes" >&5
19291echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019294sed 's/^/| /' conftest.$ac_ext >&5
19295
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019296 { echo "$as_me:$LINENO: result: no" >&5
19297echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019298
19299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019300
19301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019302
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019303# check for openpty and forkpty
19304
Martin v. Löwis11437992002-04-12 09:54:03 +000019305
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019306for ac_func in openpty
19307do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019308as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19309{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19310echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019311if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019313else
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019315/* confdefs.h. */
19316_ACEOF
19317cat confdefs.h >>conftest.$ac_ext
19318cat >>conftest.$ac_ext <<_ACEOF
19319/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019320/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19321 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19322#define $ac_func innocuous_$ac_func
19323
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019324/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019325 which can conflict with char $ac_func (); below.
19326 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019327 <limits.h> exists even on freestanding compilers. */
19328
19329#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019330# include <limits.h>
19331#else
19332# include <assert.h>
19333#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019334
19335#undef $ac_func
19336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019337/* Override any GCC internal prototype to avoid an error.
19338 Use char because int might match the return type of a GCC
19339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019340#ifdef __cplusplus
19341extern "C"
19342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019343char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019344/* The GNU C library defines this for functions which it implements
19345 to always fail with ENOSYS. Some functions are actually named
19346 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019347#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019348choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019349#endif
19350
Skip Montanaro6dead952003-09-25 14:50:04 +000019351int
19352main ()
19353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019354return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019355 ;
19356 return 0;
19357}
19358_ACEOF
19359rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019360if { (ac_try="$ac_link"
19361case "(($ac_try" in
19362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19363 *) ac_try_echo=$ac_try;;
19364esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019366 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019368 grep -v '^ *+' conftest.er1 >conftest.err
19369 rm -f conftest.er1
19370 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019372 (exit $ac_status); } && {
19373 test -z "$ac_c_werror_flag" ||
19374 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019375 } && test -s conftest$ac_exeext &&
19376 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019377 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019378else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019380sed 's/^/| /' conftest.$ac_ext >&5
19381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019382 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019384
19385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019386 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019387fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019388ac_res=`eval echo '${'$as_ac_var'}'`
19389 { echo "$as_me:$LINENO: result: $ac_res" >&5
19390echo "${ECHO_T}$ac_res" >&6; }
19391if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019392 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019393#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019394_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019396else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019397 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19398echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019399if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019400 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019401else
Martin v. Löwis11437992002-04-12 09:54:03 +000019402 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019403LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019404cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019405/* confdefs.h. */
19406_ACEOF
19407cat confdefs.h >>conftest.$ac_ext
19408cat >>conftest.$ac_ext <<_ACEOF
19409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019411/* Override any GCC internal prototype to avoid an error.
19412 Use char because int might match the return type of a GCC
19413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019414#ifdef __cplusplus
19415extern "C"
19416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019417char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019418int
19419main ()
19420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019421return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 ;
19423 return 0;
19424}
19425_ACEOF
19426rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019427if { (ac_try="$ac_link"
19428case "(($ac_try" in
19429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19430 *) ac_try_echo=$ac_try;;
19431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019433 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019435 grep -v '^ *+' conftest.er1 >conftest.err
19436 rm -f conftest.er1
19437 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019439 (exit $ac_status); } && {
19440 test -z "$ac_c_werror_flag" ||
19441 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019442 } && test -s conftest$ac_exeext &&
19443 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019444 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019447sed 's/^/| /' conftest.$ac_ext >&5
19448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019449 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019451
19452rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019454LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019455fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019456{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19457echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19458if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019459 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019460#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019461_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019462 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019463else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019464 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19465echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019466if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019467 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019468else
19469 ac_check_lib_save_LIBS=$LIBS
19470LIBS="-lbsd $LIBS"
19471cat >conftest.$ac_ext <<_ACEOF
19472/* confdefs.h. */
19473_ACEOF
19474cat confdefs.h >>conftest.$ac_ext
19475cat >>conftest.$ac_ext <<_ACEOF
19476/* end confdefs.h. */
19477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019478/* Override any GCC internal prototype to avoid an error.
19479 Use char because int might match the return type of a GCC
19480 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019481#ifdef __cplusplus
19482extern "C"
19483#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019484char openpty ();
19485int
19486main ()
19487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019488return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019489 ;
19490 return 0;
19491}
19492_ACEOF
19493rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019494if { (ac_try="$ac_link"
19495case "(($ac_try" in
19496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19497 *) ac_try_echo=$ac_try;;
19498esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019500 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019501 ac_status=$?
19502 grep -v '^ *+' conftest.er1 >conftest.err
19503 rm -f conftest.er1
19504 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019506 (exit $ac_status); } && {
19507 test -z "$ac_c_werror_flag" ||
19508 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019509 } && test -s conftest$ac_exeext &&
19510 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019511 ac_cv_lib_bsd_openpty=yes
19512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019513 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019514sed 's/^/| /' conftest.$ac_ext >&5
19515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019516 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019518
19519rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019520 conftest$ac_exeext conftest.$ac_ext
19521LIBS=$ac_check_lib_save_LIBS
19522fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019523{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19524echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19525if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019526 cat >>confdefs.h <<\_ACEOF
19527#define HAVE_OPENPTY 1
19528_ACEOF
19529 LIBS="$LIBS -lbsd"
19530fi
19531
19532
19533fi
19534
Fred Drake8cef4cf2000-06-28 16:40:38 +000019535
19536fi
19537done
19538
Martin v. Löwis11437992002-04-12 09:54:03 +000019539
Fred Drake8cef4cf2000-06-28 16:40:38 +000019540for ac_func in forkpty
19541do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019542as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19543{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19544echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019545if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019546 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019547else
Martin v. Löwis11437992002-04-12 09:54:03 +000019548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019549/* confdefs.h. */
19550_ACEOF
19551cat confdefs.h >>conftest.$ac_ext
19552cat >>conftest.$ac_ext <<_ACEOF
19553/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019554/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19555 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19556#define $ac_func innocuous_$ac_func
19557
Fred Drake8cef4cf2000-06-28 16:40:38 +000019558/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019559 which can conflict with char $ac_func (); below.
19560 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019561 <limits.h> exists even on freestanding compilers. */
19562
19563#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019564# include <limits.h>
19565#else
19566# include <assert.h>
19567#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019568
19569#undef $ac_func
19570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019571/* Override any GCC internal prototype to avoid an error.
19572 Use char because int might match the return type of a GCC
19573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019574#ifdef __cplusplus
19575extern "C"
19576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019577char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019578/* The GNU C library defines this for functions which it implements
19579 to always fail with ENOSYS. Some functions are actually named
19580 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019581#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019582choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019583#endif
19584
Skip Montanaro6dead952003-09-25 14:50:04 +000019585int
19586main ()
19587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019588return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019589 ;
19590 return 0;
19591}
19592_ACEOF
19593rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019594if { (ac_try="$ac_link"
19595case "(($ac_try" in
19596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19597 *) ac_try_echo=$ac_try;;
19598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019600 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019602 grep -v '^ *+' conftest.er1 >conftest.err
19603 rm -f conftest.er1
19604 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019606 (exit $ac_status); } && {
19607 test -z "$ac_c_werror_flag" ||
19608 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019609 } && test -s conftest$ac_exeext &&
19610 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019611 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019614sed 's/^/| /' conftest.$ac_ext >&5
19615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019616 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019618
19619rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019620 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019621fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019622ac_res=`eval echo '${'$as_ac_var'}'`
19623 { echo "$as_me:$LINENO: result: $ac_res" >&5
19624echo "${ECHO_T}$ac_res" >&6; }
19625if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019626 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019627#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019628_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019629
Fred Drake8cef4cf2000-06-28 16:40:38 +000019630else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019631 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19632echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019633if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019634 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019635else
Martin v. Löwis11437992002-04-12 09:54:03 +000019636 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019637LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019639/* confdefs.h. */
19640_ACEOF
19641cat confdefs.h >>conftest.$ac_ext
19642cat >>conftest.$ac_ext <<_ACEOF
19643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019645/* Override any GCC internal prototype to avoid an error.
19646 Use char because int might match the return type of a GCC
19647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019648#ifdef __cplusplus
19649extern "C"
19650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019651char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019652int
19653main ()
19654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019655return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019656 ;
19657 return 0;
19658}
19659_ACEOF
19660rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019661if { (ac_try="$ac_link"
19662case "(($ac_try" in
19663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19664 *) ac_try_echo=$ac_try;;
19665esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019667 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 grep -v '^ *+' conftest.er1 >conftest.err
19670 rm -f conftest.er1
19671 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019673 (exit $ac_status); } && {
19674 test -z "$ac_c_werror_flag" ||
19675 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019676 } && test -s conftest$ac_exeext &&
19677 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019678 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019679else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019681sed 's/^/| /' conftest.$ac_ext >&5
19682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019683 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019685
19686rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019687 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019688LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019689fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019690{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19691echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19692if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019693 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019694#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019695_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019696 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019698 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19699echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019700if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019701 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019702else
19703 ac_check_lib_save_LIBS=$LIBS
19704LIBS="-lbsd $LIBS"
19705cat >conftest.$ac_ext <<_ACEOF
19706/* confdefs.h. */
19707_ACEOF
19708cat confdefs.h >>conftest.$ac_ext
19709cat >>conftest.$ac_ext <<_ACEOF
19710/* end confdefs.h. */
19711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019712/* Override any GCC internal prototype to avoid an error.
19713 Use char because int might match the return type of a GCC
19714 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019715#ifdef __cplusplus
19716extern "C"
19717#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019718char forkpty ();
19719int
19720main ()
19721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019722return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019723 ;
19724 return 0;
19725}
19726_ACEOF
19727rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019728if { (ac_try="$ac_link"
19729case "(($ac_try" in
19730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19731 *) ac_try_echo=$ac_try;;
19732esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019735 ac_status=$?
19736 grep -v '^ *+' conftest.er1 >conftest.err
19737 rm -f conftest.er1
19738 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019740 (exit $ac_status); } && {
19741 test -z "$ac_c_werror_flag" ||
19742 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019743 } && test -s conftest$ac_exeext &&
19744 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019745 ac_cv_lib_bsd_forkpty=yes
19746else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019747 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019748sed 's/^/| /' conftest.$ac_ext >&5
19749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019750 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019752
19753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019754 conftest$ac_exeext conftest.$ac_ext
19755LIBS=$ac_check_lib_save_LIBS
19756fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019757{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19758echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19759if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019760 cat >>confdefs.h <<\_ACEOF
19761#define HAVE_FORKPTY 1
19762_ACEOF
19763 LIBS="$LIBS -lbsd"
19764fi
19765
19766
19767fi
19768
Fred Drake8cef4cf2000-06-28 16:40:38 +000019769
19770fi
19771done
19772
Jack Jansendd19cf82001-12-06 22:36:17 +000019773
Christian Heimesb186d002008-03-18 15:15:01 +000019774# Stuff for expat.
19775
19776for ac_func in memmove
19777do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019778as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19779{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19780echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019781if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019782 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019783else
19784 cat >conftest.$ac_ext <<_ACEOF
19785/* confdefs.h. */
19786_ACEOF
19787cat confdefs.h >>conftest.$ac_ext
19788cat >>conftest.$ac_ext <<_ACEOF
19789/* end confdefs.h. */
19790/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19791 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19792#define $ac_func innocuous_$ac_func
19793
19794/* System header to define __stub macros and hopefully few prototypes,
19795 which can conflict with char $ac_func (); below.
19796 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19797 <limits.h> exists even on freestanding compilers. */
19798
19799#ifdef __STDC__
19800# include <limits.h>
19801#else
19802# include <assert.h>
19803#endif
19804
19805#undef $ac_func
19806
19807/* Override any GCC internal prototype to avoid an error.
19808 Use char because int might match the return type of a GCC
19809 builtin and then its argument prototype would still apply. */
19810#ifdef __cplusplus
19811extern "C"
19812#endif
19813char $ac_func ();
19814/* The GNU C library defines this for functions which it implements
19815 to always fail with ENOSYS. Some functions are actually named
19816 something starting with __ and the normal name is an alias. */
19817#if defined __stub_$ac_func || defined __stub___$ac_func
19818choke me
19819#endif
19820
19821int
19822main ()
19823{
19824return $ac_func ();
19825 ;
19826 return 0;
19827}
19828_ACEOF
19829rm -f conftest.$ac_objext conftest$ac_exeext
19830if { (ac_try="$ac_link"
19831case "(($ac_try" in
19832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19833 *) ac_try_echo=$ac_try;;
19834esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019836 (eval "$ac_link") 2>conftest.er1
19837 ac_status=$?
19838 grep -v '^ *+' conftest.er1 >conftest.err
19839 rm -f conftest.er1
19840 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019842 (exit $ac_status); } && {
19843 test -z "$ac_c_werror_flag" ||
19844 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019845 } && test -s conftest$ac_exeext &&
19846 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019847 eval "$as_ac_var=yes"
19848else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019849 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019850sed 's/^/| /' conftest.$ac_ext >&5
19851
19852 eval "$as_ac_var=no"
19853fi
19854
19855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19856 conftest$ac_exeext conftest.$ac_ext
19857fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019858ac_res=`eval echo '${'$as_ac_var'}'`
19859 { echo "$as_me:$LINENO: result: $ac_res" >&5
19860echo "${ECHO_T}$ac_res" >&6; }
19861if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019862 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019863#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019864_ACEOF
19865
19866fi
19867done
19868
19869
Michael W. Hudson54241132001-12-07 15:38:26 +000019870# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019871
19872
19873
19874
19875
19876
Fred Drake8cef4cf2000-06-28 16:40:38 +000019877for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19878do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019879as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19880{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19881echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019882if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019884else
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019886/* confdefs.h. */
19887_ACEOF
19888cat confdefs.h >>conftest.$ac_ext
19889cat >>conftest.$ac_ext <<_ACEOF
19890/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019891/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19892 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19893#define $ac_func innocuous_$ac_func
19894
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019895/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019896 which can conflict with char $ac_func (); below.
19897 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019898 <limits.h> exists even on freestanding compilers. */
19899
19900#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019901# include <limits.h>
19902#else
19903# include <assert.h>
19904#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019905
19906#undef $ac_func
19907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019908/* Override any GCC internal prototype to avoid an error.
19909 Use char because int might match the return type of a GCC
19910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019911#ifdef __cplusplus
19912extern "C"
19913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019914char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019915/* The GNU C library defines this for functions which it implements
19916 to always fail with ENOSYS. Some functions are actually named
19917 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019918#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019919choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019920#endif
19921
Skip Montanaro6dead952003-09-25 14:50:04 +000019922int
19923main ()
19924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019925return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019926 ;
19927 return 0;
19928}
19929_ACEOF
19930rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019931if { (ac_try="$ac_link"
19932case "(($ac_try" in
19933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19934 *) ac_try_echo=$ac_try;;
19935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019937 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019939 grep -v '^ *+' conftest.er1 >conftest.err
19940 rm -f conftest.er1
19941 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019943 (exit $ac_status); } && {
19944 test -z "$ac_c_werror_flag" ||
19945 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019946 } && test -s conftest$ac_exeext &&
19947 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019948 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019949else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019951sed 's/^/| /' conftest.$ac_ext >&5
19952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019953 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019955
19956rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019957 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019958fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019959ac_res=`eval echo '${'$as_ac_var'}'`
19960 { echo "$as_me:$LINENO: result: $ac_res" >&5
19961echo "${ECHO_T}$ac_res" >&6; }
19962if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019963 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019964#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019965_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019967fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019968done
19969
Michael W. Hudson54241132001-12-07 15:38:26 +000019970
Martin v. Löwis11437992002-04-12 09:54:03 +000019971
19972
19973
Christian Heimesb186d002008-03-18 15:15:01 +000019974for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019975do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019976as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19977{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19978echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019979if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019981else
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019983/* confdefs.h. */
19984_ACEOF
19985cat confdefs.h >>conftest.$ac_ext
19986cat >>conftest.$ac_ext <<_ACEOF
19987/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019988/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19989 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19990#define $ac_func innocuous_$ac_func
19991
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019992/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019993 which can conflict with char $ac_func (); below.
19994 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019995 <limits.h> exists even on freestanding compilers. */
19996
19997#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019998# include <limits.h>
19999#else
20000# include <assert.h>
20001#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020002
20003#undef $ac_func
20004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020005/* Override any GCC internal prototype to avoid an error.
20006 Use char because int might match the return type of a GCC
20007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020008#ifdef __cplusplus
20009extern "C"
20010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020011char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020012/* The GNU C library defines this for functions which it implements
20013 to always fail with ENOSYS. Some functions are actually named
20014 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020015#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020016choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020017#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020018
Skip Montanaro6dead952003-09-25 14:50:04 +000020019int
20020main ()
20021{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020022return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020023 ;
20024 return 0;
20025}
20026_ACEOF
20027rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020028if { (ac_try="$ac_link"
20029case "(($ac_try" in
20030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20031 *) ac_try_echo=$ac_try;;
20032esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020034 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020036 grep -v '^ *+' conftest.er1 >conftest.err
20037 rm -f conftest.er1
20038 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020040 (exit $ac_status); } && {
20041 test -z "$ac_c_werror_flag" ||
20042 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020043 } && test -s conftest$ac_exeext &&
20044 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020045 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020046else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020048sed 's/^/| /' conftest.$ac_ext >&5
20049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020050 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020052
20053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020055fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020056ac_res=`eval echo '${'$as_ac_var'}'`
20057 { echo "$as_me:$LINENO: result: $ac_res" >&5
20058echo "${ECHO_T}$ac_res" >&6; }
20059if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020060 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020061#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020062_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020063
Martin v. Löwis1142de32002-03-29 16:28:31 +000020064else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020065 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020066 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020067 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20068 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020069esac
20070
Martin v. Löwis1142de32002-03-29 16:28:31 +000020071fi
20072done
20073
20074
Martin v. Löwis11437992002-04-12 09:54:03 +000020075
Martin v. Löwis1142de32002-03-29 16:28:31 +000020076for ac_func in getpgrp
20077do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020078as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20079{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20080echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020081if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020082 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020083else
Martin v. Löwis11437992002-04-12 09:54:03 +000020084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020085/* confdefs.h. */
20086_ACEOF
20087cat confdefs.h >>conftest.$ac_ext
20088cat >>conftest.$ac_ext <<_ACEOF
20089/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020090/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20091 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20092#define $ac_func innocuous_$ac_func
20093
Martin v. Löwis1142de32002-03-29 16:28:31 +000020094/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020095 which can conflict with char $ac_func (); below.
20096 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020097 <limits.h> exists even on freestanding compilers. */
20098
20099#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020100# include <limits.h>
20101#else
20102# include <assert.h>
20103#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020104
20105#undef $ac_func
20106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020107/* Override any GCC internal prototype to avoid an error.
20108 Use char because int might match the return type of a GCC
20109 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020110#ifdef __cplusplus
20111extern "C"
20112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020113char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020114/* The GNU C library defines this for functions which it implements
20115 to always fail with ENOSYS. Some functions are actually named
20116 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020117#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020118choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020119#endif
20120
Skip Montanaro6dead952003-09-25 14:50:04 +000020121int
20122main ()
20123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020124return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020125 ;
20126 return 0;
20127}
20128_ACEOF
20129rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020130if { (ac_try="$ac_link"
20131case "(($ac_try" in
20132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20133 *) ac_try_echo=$ac_try;;
20134esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020138 grep -v '^ *+' conftest.er1 >conftest.err
20139 rm -f conftest.er1
20140 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020142 (exit $ac_status); } && {
20143 test -z "$ac_c_werror_flag" ||
20144 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020145 } && test -s conftest$ac_exeext &&
20146 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020147 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020148else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020150sed 's/^/| /' conftest.$ac_ext >&5
20151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020152 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020154
20155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020157fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020158ac_res=`eval echo '${'$as_ac_var'}'`
20159 { echo "$as_me:$LINENO: result: $ac_res" >&5
20160echo "${ECHO_T}$ac_res" >&6; }
20161if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020162 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020164_ACEOF
20165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020166/* confdefs.h. */
20167_ACEOF
20168cat confdefs.h >>conftest.$ac_ext
20169cat >>conftest.$ac_ext <<_ACEOF
20170/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020171#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020172int
20173main ()
20174{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020175getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020176 ;
20177 return 0;
20178}
20179_ACEOF
20180rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181if { (ac_try="$ac_compile"
20182case "(($ac_try" in
20183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20184 *) ac_try_echo=$ac_try;;
20185esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020187 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020189 grep -v '^ *+' conftest.er1 >conftest.err
20190 rm -f conftest.er1
20191 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020193 (exit $ac_status); } && {
20194 test -z "$ac_c_werror_flag" ||
20195 test ! -s conftest.err
20196 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020197
20198cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020199#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020200_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020201
Martin v. Löwis11437992002-04-12 09:54:03 +000020202
Guido van Rossumf78abae1997-01-21 22:02:36 +000020203else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020205sed 's/^/| /' conftest.$ac_ext >&5
20206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020207
Guido van Rossum627b2d71993-12-24 10:39:16 +000020208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020209
20210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020211
Guido van Rossum627b2d71993-12-24 10:39:16 +000020212fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020213done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020214
Jack Jansen150753c2003-03-29 22:07:47 +000020215
20216for ac_func in setpgrp
20217do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020218as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20219{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20220echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020221if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020223else
Martin v. Löwis11437992002-04-12 09:54:03 +000020224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020225/* confdefs.h. */
20226_ACEOF
20227cat confdefs.h >>conftest.$ac_ext
20228cat >>conftest.$ac_ext <<_ACEOF
20229/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020230/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20231 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20232#define $ac_func innocuous_$ac_func
20233
Jack Jansen150753c2003-03-29 22:07:47 +000020234/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020235 which can conflict with char $ac_func (); below.
20236 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020237 <limits.h> exists even on freestanding compilers. */
20238
20239#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020240# include <limits.h>
20241#else
20242# include <assert.h>
20243#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020244
20245#undef $ac_func
20246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020247/* Override any GCC internal prototype to avoid an error.
20248 Use char because int might match the return type of a GCC
20249 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020250#ifdef __cplusplus
20251extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020252#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020253char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020254/* The GNU C library defines this for functions which it implements
20255 to always fail with ENOSYS. Some functions are actually named
20256 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020257#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020258choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020259#endif
20260
Skip Montanaro6dead952003-09-25 14:50:04 +000020261int
20262main ()
20263{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020264return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 ;
20266 return 0;
20267}
20268_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020269rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020270if { (ac_try="$ac_link"
20271case "(($ac_try" in
20272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20273 *) ac_try_echo=$ac_try;;
20274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020276 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020278 grep -v '^ *+' conftest.er1 >conftest.err
20279 rm -f conftest.er1
20280 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020282 (exit $ac_status); } && {
20283 test -z "$ac_c_werror_flag" ||
20284 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020285 } && test -s conftest$ac_exeext &&
20286 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020287 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020290sed 's/^/| /' conftest.$ac_ext >&5
20291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020292 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020294
20295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020296 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020297fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020298ac_res=`eval echo '${'$as_ac_var'}'`
20299 { echo "$as_me:$LINENO: result: $ac_res" >&5
20300echo "${ECHO_T}$ac_res" >&6; }
20301if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020302 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020303#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020304_ACEOF
20305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020306/* confdefs.h. */
20307_ACEOF
20308cat confdefs.h >>conftest.$ac_ext
20309cat >>conftest.$ac_ext <<_ACEOF
20310/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020311#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020312int
20313main ()
20314{
20315setpgrp(0,0);
20316 ;
20317 return 0;
20318}
20319_ACEOF
20320rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020321if { (ac_try="$ac_compile"
20322case "(($ac_try" in
20323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20324 *) ac_try_echo=$ac_try;;
20325esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020327 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020329 grep -v '^ *+' conftest.er1 >conftest.err
20330 rm -f conftest.er1
20331 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020333 (exit $ac_status); } && {
20334 test -z "$ac_c_werror_flag" ||
20335 test ! -s conftest.err
20336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020337
20338cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020339#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020340_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020341
Jack Jansen150753c2003-03-29 22:07:47 +000020342
20343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020345sed 's/^/| /' conftest.$ac_ext >&5
20346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020347
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349
20350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020351
20352fi
20353done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020354
Martin v. Löwis11437992002-04-12 09:54:03 +000020355
Thomas Wouters3a584202000-08-05 23:28:51 +000020356for ac_func in gettimeofday
20357do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020358as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20359{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20360echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020361if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020362 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020363else
Martin v. Löwis11437992002-04-12 09:54:03 +000020364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020365/* confdefs.h. */
20366_ACEOF
20367cat confdefs.h >>conftest.$ac_ext
20368cat >>conftest.$ac_ext <<_ACEOF
20369/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020370/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20371 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20372#define $ac_func innocuous_$ac_func
20373
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020374/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020375 which can conflict with char $ac_func (); below.
20376 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020377 <limits.h> exists even on freestanding compilers. */
20378
20379#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020380# include <limits.h>
20381#else
20382# include <assert.h>
20383#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020384
20385#undef $ac_func
20386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020387/* Override any GCC internal prototype to avoid an error.
20388 Use char because int might match the return type of a GCC
20389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020390#ifdef __cplusplus
20391extern "C"
20392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020393char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020394/* The GNU C library defines this for functions which it implements
20395 to always fail with ENOSYS. Some functions are actually named
20396 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020397#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020398choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020399#endif
20400
Skip Montanaro6dead952003-09-25 14:50:04 +000020401int
20402main ()
20403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020404return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020405 ;
20406 return 0;
20407}
20408_ACEOF
20409rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020410if { (ac_try="$ac_link"
20411case "(($ac_try" in
20412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20413 *) ac_try_echo=$ac_try;;
20414esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020416 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020418 grep -v '^ *+' conftest.er1 >conftest.err
20419 rm -f conftest.er1
20420 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020422 (exit $ac_status); } && {
20423 test -z "$ac_c_werror_flag" ||
20424 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020425 } && test -s conftest$ac_exeext &&
20426 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020427 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020428else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020430sed 's/^/| /' conftest.$ac_ext >&5
20431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020432 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020434
20435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020436 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020437fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020438ac_res=`eval echo '${'$as_ac_var'}'`
20439 { echo "$as_me:$LINENO: result: $ac_res" >&5
20440echo "${ECHO_T}$ac_res" >&6; }
20441if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020442 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020443#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020444_ACEOF
20445 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 Rossum627b2d71993-12-24 10:39:16 +000020451#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020452int
20453main ()
20454{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020455gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 ;
20457 return 0;
20458}
20459_ACEOF
20460rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020461if { (ac_try="$ac_compile"
20462case "(($ac_try" in
20463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20464 *) ac_try_echo=$ac_try;;
20465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020469 grep -v '^ *+' conftest.er1 >conftest.err
20470 rm -f conftest.er1
20471 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020473 (exit $ac_status); } && {
20474 test -z "$ac_c_werror_flag" ||
20475 test ! -s conftest.err
20476 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020477 :
20478else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020480sed 's/^/| /' conftest.$ac_ext >&5
20481
Martin v. Löwis11437992002-04-12 09:54:03 +000020482
20483cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020484#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020486
Martin v. Löwis11437992002-04-12 09:54:03 +000020487
Guido van Rossum627b2d71993-12-24 10:39:16 +000020488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020489
20490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020491
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020492fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020493done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020494
Michael W. Hudson54241132001-12-07 15:38:26 +000020495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020496{ echo "$as_me:$LINENO: checking for major" >&5
20497echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020499/* confdefs.h. */
20500_ACEOF
20501cat confdefs.h >>conftest.$ac_ext
20502cat >>conftest.$ac_ext <<_ACEOF
20503/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020504
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020505#if defined(MAJOR_IN_MKDEV)
20506#include <sys/mkdev.h>
20507#elif defined(MAJOR_IN_SYSMACROS)
20508#include <sys/sysmacros.h>
20509#else
20510#include <sys/types.h>
20511#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020512
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020513int
20514main ()
20515{
20516
20517 makedev(major(0),minor(0));
20518
20519 ;
20520 return 0;
20521}
20522_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020523rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020524if { (ac_try="$ac_link"
20525case "(($ac_try" in
20526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20527 *) ac_try_echo=$ac_try;;
20528esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020530 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020532 grep -v '^ *+' conftest.er1 >conftest.err
20533 rm -f conftest.er1
20534 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020536 (exit $ac_status); } && {
20537 test -z "$ac_c_werror_flag" ||
20538 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020539 } && test -s conftest$ac_exeext &&
20540 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020541
20542
20543cat >>confdefs.h <<\_ACEOF
20544#define HAVE_DEVICE_MACROS 1
20545_ACEOF
20546
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020547 { echo "$as_me:$LINENO: result: yes" >&5
20548echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020549
20550else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020552sed 's/^/| /' conftest.$ac_ext >&5
20553
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020554
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020555 { echo "$as_me:$LINENO: result: no" >&5
20556echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020557
20558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020559
20560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020561 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020562
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020563# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020564# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020565{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20566echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020567cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020568/* confdefs.h. */
20569_ACEOF
20570cat confdefs.h >>conftest.$ac_ext
20571cat >>conftest.$ac_ext <<_ACEOF
20572/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020573
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020574#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020575#include <sys/socket.h>
20576#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020577#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020578
Martin v. Löwis11437992002-04-12 09:54:03 +000020579int
20580main ()
20581{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020582getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020583 ;
20584 return 0;
20585}
20586_ACEOF
20587rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020588if { (ac_try="$ac_link"
20589case "(($ac_try" in
20590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20591 *) ac_try_echo=$ac_try;;
20592esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020594 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020596 grep -v '^ *+' conftest.er1 >conftest.err
20597 rm -f conftest.er1
20598 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020600 (exit $ac_status); } && {
20601 test -z "$ac_c_werror_flag" ||
20602 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020603 } && test -s conftest$ac_exeext &&
20604 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020605 have_getaddrinfo=yes
20606else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020607 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020608sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020609
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020610 have_getaddrinfo=no
20611fi
20612
20613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20614 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020615{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20616echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020617if test $have_getaddrinfo = yes
20618then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020619 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20620echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020621 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020622 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020623else
20624 if test "$cross_compiling" = yes; then
20625 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020626else
Martin v. Löwis11437992002-04-12 09:54:03 +000020627 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020628/* confdefs.h. */
20629_ACEOF
20630cat confdefs.h >>conftest.$ac_ext
20631cat >>conftest.$ac_ext <<_ACEOF
20632/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020633
20634#include <sys/types.h>
20635#include <netdb.h>
20636#include <string.h>
20637#include <sys/socket.h>
20638#include <netinet/in.h>
20639
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020640int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020641{
20642 int passive, gaierr, inet4 = 0, inet6 = 0;
20643 struct addrinfo hints, *ai, *aitop;
20644 char straddr[INET6_ADDRSTRLEN], strport[16];
20645
20646 for (passive = 0; passive <= 1; passive++) {
20647 memset(&hints, 0, sizeof(hints));
20648 hints.ai_family = AF_UNSPEC;
20649 hints.ai_flags = passive ? AI_PASSIVE : 0;
20650 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020651 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020652 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20653 (void)gai_strerror(gaierr);
20654 goto bad;
20655 }
20656 for (ai = aitop; ai; ai = ai->ai_next) {
20657 if (ai->ai_addr == NULL ||
20658 ai->ai_addrlen == 0 ||
20659 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20660 straddr, sizeof(straddr), strport, sizeof(strport),
20661 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20662 goto bad;
20663 }
20664 switch (ai->ai_family) {
20665 case AF_INET:
20666 if (strcmp(strport, "54321") != 0) {
20667 goto bad;
20668 }
20669 if (passive) {
20670 if (strcmp(straddr, "0.0.0.0") != 0) {
20671 goto bad;
20672 }
20673 } else {
20674 if (strcmp(straddr, "127.0.0.1") != 0) {
20675 goto bad;
20676 }
20677 }
20678 inet4++;
20679 break;
20680 case AF_INET6:
20681 if (strcmp(strport, "54321") != 0) {
20682 goto bad;
20683 }
20684 if (passive) {
20685 if (strcmp(straddr, "::") != 0) {
20686 goto bad;
20687 }
20688 } else {
20689 if (strcmp(straddr, "::1") != 0) {
20690 goto bad;
20691 }
20692 }
20693 inet6++;
20694 break;
20695 case AF_UNSPEC:
20696 goto bad;
20697 break;
20698 default:
20699 /* another family support? */
20700 break;
20701 }
20702 }
20703 }
20704
20705 if (!(inet4 == 0 || inet4 == 2))
20706 goto bad;
20707 if (!(inet6 == 0 || inet6 == 2))
20708 goto bad;
20709
20710 if (aitop)
20711 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020712 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020713
20714 bad:
20715 if (aitop)
20716 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020717 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020718}
20719
Martin v. Löwis11437992002-04-12 09:54:03 +000020720_ACEOF
20721rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020722if { (ac_try="$ac_link"
20723case "(($ac_try" in
20724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20725 *) ac_try_echo=$ac_try;;
20726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020728 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020729 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020731 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020732 { (case "(($ac_try" in
20733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20734 *) ac_try_echo=$ac_try;;
20735esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020737 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020740 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020741 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020742else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020743 echo "$as_me: program exited with status $ac_status" >&5
20744echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020745sed 's/^/| /' conftest.$ac_ext >&5
20746
Martin v. Löwis11437992002-04-12 09:54:03 +000020747( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020748ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020750rm -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 +000020751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020752
20753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020754fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020755
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020757
Mark Dickinson2df5d282009-12-31 21:22:50 +000020758if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020759then
20760 if test $ipv6 = yes
20761 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020762 echo 'Fatal: You must get working getaddrinfo() function.'
20763 echo ' or you can specify "--disable-ipv6"'.
20764 exit 1
20765 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020766else
Martin v. Löwis11437992002-04-12 09:54:03 +000020767
20768cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020769#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020770_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020771
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020772fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020773
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020774for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020775do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020776as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20777{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20778echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020779if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020780 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020781else
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020783/* confdefs.h. */
20784_ACEOF
20785cat confdefs.h >>conftest.$ac_ext
20786cat >>conftest.$ac_ext <<_ACEOF
20787/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020788/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20789 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20790#define $ac_func innocuous_$ac_func
20791
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020792/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020793 which can conflict with char $ac_func (); below.
20794 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020795 <limits.h> exists even on freestanding compilers. */
20796
20797#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020798# include <limits.h>
20799#else
20800# include <assert.h>
20801#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020802
20803#undef $ac_func
20804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020805/* Override any GCC internal prototype to avoid an error.
20806 Use char because int might match the return type of a GCC
20807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020808#ifdef __cplusplus
20809extern "C"
20810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020811char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020812/* The GNU C library defines this for functions which it implements
20813 to always fail with ENOSYS. Some functions are actually named
20814 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020815#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020816choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020817#endif
20818
Skip Montanaro6dead952003-09-25 14:50:04 +000020819int
20820main ()
20821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020822return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020823 ;
20824 return 0;
20825}
20826_ACEOF
20827rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020828if { (ac_try="$ac_link"
20829case "(($ac_try" in
20830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20831 *) ac_try_echo=$ac_try;;
20832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020834 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020836 grep -v '^ *+' conftest.er1 >conftest.err
20837 rm -f conftest.er1
20838 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020840 (exit $ac_status); } && {
20841 test -z "$ac_c_werror_flag" ||
20842 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020843 } && test -s conftest$ac_exeext &&
20844 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020845 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020848sed 's/^/| /' conftest.$ac_ext >&5
20849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020850 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020852
20853rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020854 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020855fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020856ac_res=`eval echo '${'$as_ac_var'}'`
20857 { echo "$as_me:$LINENO: result: $ac_res" >&5
20858echo "${ECHO_T}$ac_res" >&6; }
20859if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020861#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020862_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020863
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020864fi
20865done
20866
Michael W. Hudson54241132001-12-07 15:38:26 +000020867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020868# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020869{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20870echo $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 +000020871if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020873else
Martin v. Löwis11437992002-04-12 09:54:03 +000020874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020875/* confdefs.h. */
20876_ACEOF
20877cat confdefs.h >>conftest.$ac_ext
20878cat >>conftest.$ac_ext <<_ACEOF
20879/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020880#include <sys/types.h>
20881#include <sys/time.h>
20882#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020883
Martin v. Löwis11437992002-04-12 09:54:03 +000020884int
20885main ()
20886{
20887if ((struct tm *) 0)
20888return 0;
20889 ;
20890 return 0;
20891}
20892_ACEOF
20893rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020894if { (ac_try="$ac_compile"
20895case "(($ac_try" in
20896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20897 *) ac_try_echo=$ac_try;;
20898esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020902 grep -v '^ *+' conftest.er1 >conftest.err
20903 rm -f conftest.er1
20904 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020906 (exit $ac_status); } && {
20907 test -z "$ac_c_werror_flag" ||
20908 test ! -s conftest.err
20909 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020910 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020911else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020913sed 's/^/| /' conftest.$ac_ext >&5
20914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020915 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020917
20918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020919fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020920{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20921echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020922if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020923
20924cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020925#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020926_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020927
20928fi
20929
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020930{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20931echo $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 +000020932if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020934else
Martin v. Löwis11437992002-04-12 09:54:03 +000020935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020936/* confdefs.h. */
20937_ACEOF
20938cat confdefs.h >>conftest.$ac_ext
20939cat >>conftest.$ac_ext <<_ACEOF
20940/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020941#include <sys/types.h>
20942#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020943
Martin v. Löwis11437992002-04-12 09:54:03 +000020944int
20945main ()
20946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020947struct tm tm;
20948 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020949 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020950 ;
20951 return 0;
20952}
20953_ACEOF
20954rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020955if { (ac_try="$ac_compile"
20956case "(($ac_try" in
20957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20958 *) ac_try_echo=$ac_try;;
20959esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020963 grep -v '^ *+' conftest.er1 >conftest.err
20964 rm -f conftest.er1
20965 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020967 (exit $ac_status); } && {
20968 test -z "$ac_c_werror_flag" ||
20969 test ! -s conftest.err
20970 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020971 ac_cv_struct_tm=time.h
20972else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020974sed 's/^/| /' conftest.$ac_ext >&5
20975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020976 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020978
20979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020980fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020981{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20982echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020983if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020984
20985cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020986#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020987_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020988
20989fi
20990
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020991{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20992echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020993if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020994 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020995else
Martin v. Löwis11437992002-04-12 09:54:03 +000020996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020997/* confdefs.h. */
20998_ACEOF
20999cat confdefs.h >>conftest.$ac_ext
21000cat >>conftest.$ac_ext <<_ACEOF
21001/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021002#include <sys/types.h>
21003#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021004
21005
Martin v. Löwis11437992002-04-12 09:54:03 +000021006int
21007main ()
21008{
21009static struct tm ac_aggr;
21010if (ac_aggr.tm_zone)
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öwis11437992002-04-12 09:54:03 +000021024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021025 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öwis11437992002-04-12 09:54:03 +000021033 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021034else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021036sed 's/^/| /' conftest.$ac_ext >&5
21037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021039/* confdefs.h. */
21040_ACEOF
21041cat confdefs.h >>conftest.$ac_ext
21042cat >>conftest.$ac_ext <<_ACEOF
21043/* end confdefs.h. */
21044#include <sys/types.h>
21045#include <$ac_cv_struct_tm>
21046
21047
21048int
21049main ()
21050{
21051static struct tm ac_aggr;
21052if (sizeof ac_aggr.tm_zone)
21053return 0;
21054 ;
21055 return 0;
21056}
21057_ACEOF
21058rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021059if { (ac_try="$ac_compile"
21060case "(($ac_try" in
21061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21062 *) ac_try_echo=$ac_try;;
21063esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021065 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021067 grep -v '^ *+' conftest.er1 >conftest.err
21068 rm -f conftest.er1
21069 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021071 (exit $ac_status); } && {
21072 test -z "$ac_c_werror_flag" ||
21073 test ! -s conftest.err
21074 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021075 ac_cv_member_struct_tm_tm_zone=yes
21076else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021078sed 's/^/| /' conftest.$ac_ext >&5
21079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021080 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021082
21083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021085
21086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021087fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021088{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21089echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21090if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021091
21092cat >>confdefs.h <<_ACEOF
21093#define HAVE_STRUCT_TM_TM_ZONE 1
21094_ACEOF
21095
21096
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021097fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021098
Martin v. Löwis11437992002-04-12 09:54:03 +000021099if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21100
21101cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021102#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021103_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021104
21105else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021106 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21107echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021108if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021109 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021110else
21111 cat >conftest.$ac_ext <<_ACEOF
21112/* confdefs.h. */
21113_ACEOF
21114cat confdefs.h >>conftest.$ac_ext
21115cat >>conftest.$ac_ext <<_ACEOF
21116/* end confdefs.h. */
21117#include <time.h>
21118
21119int
21120main ()
21121{
21122#ifndef tzname
21123 (void) tzname;
21124#endif
21125
21126 ;
21127 return 0;
21128}
21129_ACEOF
21130rm -f conftest.$ac_objext
21131if { (ac_try="$ac_compile"
21132case "(($ac_try" in
21133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21134 *) ac_try_echo=$ac_try;;
21135esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021137 (eval "$ac_compile") 2>conftest.er1
21138 ac_status=$?
21139 grep -v '^ *+' conftest.er1 >conftest.err
21140 rm -f conftest.er1
21141 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021143 (exit $ac_status); } && {
21144 test -z "$ac_c_werror_flag" ||
21145 test ! -s conftest.err
21146 } && test -s conftest.$ac_objext; then
21147 ac_cv_have_decl_tzname=yes
21148else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021149 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021150sed 's/^/| /' conftest.$ac_ext >&5
21151
21152 ac_cv_have_decl_tzname=no
21153fi
21154
21155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21156fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021157{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21158echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21159if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021160
21161cat >>confdefs.h <<_ACEOF
21162#define HAVE_DECL_TZNAME 1
21163_ACEOF
21164
21165
21166else
21167 cat >>confdefs.h <<_ACEOF
21168#define HAVE_DECL_TZNAME 0
21169_ACEOF
21170
21171
21172fi
21173
21174
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021175 { echo "$as_me:$LINENO: checking for tzname" >&5
21176echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021177if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021178 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021179else
Martin v. Löwis11437992002-04-12 09:54:03 +000021180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021181/* confdefs.h. */
21182_ACEOF
21183cat confdefs.h >>conftest.$ac_ext
21184cat >>conftest.$ac_ext <<_ACEOF
21185/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021186#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021187#if !HAVE_DECL_TZNAME
21188extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021190
Martin v. Löwis11437992002-04-12 09:54:03 +000021191int
21192main ()
21193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021194return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021195 ;
21196 return 0;
21197}
21198_ACEOF
21199rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021200if { (ac_try="$ac_link"
21201case "(($ac_try" in
21202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21203 *) ac_try_echo=$ac_try;;
21204esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021208 grep -v '^ *+' conftest.er1 >conftest.err
21209 rm -f conftest.er1
21210 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021212 (exit $ac_status); } && {
21213 test -z "$ac_c_werror_flag" ||
21214 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021215 } && test -s conftest$ac_exeext &&
21216 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021217 ac_cv_var_tzname=yes
21218else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021220sed 's/^/| /' conftest.$ac_ext >&5
21221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021222 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021224
21225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021226 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021227fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021228{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21229echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021230 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021231
21232cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021233#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021234_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021235
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021236 fi
21237fi
21238
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021239{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21240echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021241if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021242 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021243else
21244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021245/* confdefs.h. */
21246_ACEOF
21247cat confdefs.h >>conftest.$ac_ext
21248cat >>conftest.$ac_ext <<_ACEOF
21249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021250$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021251int
21252main ()
21253{
21254static struct stat ac_aggr;
21255if (ac_aggr.st_rdev)
21256return 0;
21257 ;
21258 return 0;
21259}
21260_ACEOF
21261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021262if { (ac_try="$ac_compile"
21263case "(($ac_try" in
21264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21265 *) ac_try_echo=$ac_try;;
21266esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021270 grep -v '^ *+' conftest.er1 >conftest.err
21271 rm -f conftest.er1
21272 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021274 (exit $ac_status); } && {
21275 test -z "$ac_c_werror_flag" ||
21276 test ! -s conftest.err
21277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 ac_cv_member_struct_stat_st_rdev=yes
21279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021281sed 's/^/| /' conftest.$ac_ext >&5
21282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021284/* confdefs.h. */
21285_ACEOF
21286cat confdefs.h >>conftest.$ac_ext
21287cat >>conftest.$ac_ext <<_ACEOF
21288/* end confdefs.h. */
21289$ac_includes_default
21290int
21291main ()
21292{
21293static struct stat ac_aggr;
21294if (sizeof ac_aggr.st_rdev)
21295return 0;
21296 ;
21297 return 0;
21298}
21299_ACEOF
21300rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021301if { (ac_try="$ac_compile"
21302case "(($ac_try" in
21303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21304 *) ac_try_echo=$ac_try;;
21305esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021307 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021309 grep -v '^ *+' conftest.er1 >conftest.err
21310 rm -f conftest.er1
21311 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021313 (exit $ac_status); } && {
21314 test -z "$ac_c_werror_flag" ||
21315 test ! -s conftest.err
21316 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021317 ac_cv_member_struct_stat_st_rdev=yes
21318else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021320sed 's/^/| /' conftest.$ac_ext >&5
21321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021322 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021324
21325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021327
21328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021329fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021330{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21331echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21332if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021333
21334cat >>confdefs.h <<_ACEOF
21335#define HAVE_STRUCT_STAT_ST_RDEV 1
21336_ACEOF
21337
21338
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021339fi
21340
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021341{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21342echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021343if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021345else
Martin v. Löwis11437992002-04-12 09:54:03 +000021346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021347/* confdefs.h. */
21348_ACEOF
21349cat confdefs.h >>conftest.$ac_ext
21350cat >>conftest.$ac_ext <<_ACEOF
21351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021352$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021353int
21354main ()
21355{
21356static struct stat ac_aggr;
21357if (ac_aggr.st_blksize)
21358return 0;
21359 ;
21360 return 0;
21361}
21362_ACEOF
21363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021364if { (ac_try="$ac_compile"
21365case "(($ac_try" in
21366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21367 *) ac_try_echo=$ac_try;;
21368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021372 grep -v '^ *+' conftest.er1 >conftest.err
21373 rm -f conftest.er1
21374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376 (exit $ac_status); } && {
21377 test -z "$ac_c_werror_flag" ||
21378 test ! -s conftest.err
21379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021380 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021381else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021383sed 's/^/| /' conftest.$ac_ext >&5
21384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021386/* confdefs.h. */
21387_ACEOF
21388cat confdefs.h >>conftest.$ac_ext
21389cat >>conftest.$ac_ext <<_ACEOF
21390/* end confdefs.h. */
21391$ac_includes_default
21392int
21393main ()
21394{
21395static struct stat ac_aggr;
21396if (sizeof ac_aggr.st_blksize)
21397return 0;
21398 ;
21399 return 0;
21400}
21401_ACEOF
21402rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021403if { (ac_try="$ac_compile"
21404case "(($ac_try" in
21405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21406 *) ac_try_echo=$ac_try;;
21407esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021409 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021411 grep -v '^ *+' conftest.er1 >conftest.err
21412 rm -f conftest.er1
21413 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415 (exit $ac_status); } && {
21416 test -z "$ac_c_werror_flag" ||
21417 test ! -s conftest.err
21418 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021419 ac_cv_member_struct_stat_st_blksize=yes
21420else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021422sed 's/^/| /' conftest.$ac_ext >&5
21423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021426
21427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429
21430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021431fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021432{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21433echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21434if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021435
Martin v. Löwis11437992002-04-12 09:54:03 +000021436cat >>confdefs.h <<_ACEOF
21437#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21438_ACEOF
21439
21440
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021441fi
21442
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021443{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21444echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021445if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021446 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021447else
21448 cat >conftest.$ac_ext <<_ACEOF
21449/* confdefs.h. */
21450_ACEOF
21451cat confdefs.h >>conftest.$ac_ext
21452cat >>conftest.$ac_ext <<_ACEOF
21453/* end confdefs.h. */
21454$ac_includes_default
21455int
21456main ()
21457{
21458static struct stat ac_aggr;
21459if (ac_aggr.st_flags)
21460return 0;
21461 ;
21462 return 0;
21463}
21464_ACEOF
21465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021466if { (ac_try="$ac_compile"
21467case "(($ac_try" in
21468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21469 *) ac_try_echo=$ac_try;;
21470esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021472 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021473 ac_status=$?
21474 grep -v '^ *+' conftest.er1 >conftest.err
21475 rm -f conftest.er1
21476 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021478 (exit $ac_status); } && {
21479 test -z "$ac_c_werror_flag" ||
21480 test ! -s conftest.err
21481 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021482 ac_cv_member_struct_stat_st_flags=yes
21483else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021484 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021485sed 's/^/| /' conftest.$ac_ext >&5
21486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021487 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021488/* confdefs.h. */
21489_ACEOF
21490cat confdefs.h >>conftest.$ac_ext
21491cat >>conftest.$ac_ext <<_ACEOF
21492/* end confdefs.h. */
21493$ac_includes_default
21494int
21495main ()
21496{
21497static struct stat ac_aggr;
21498if (sizeof ac_aggr.st_flags)
21499return 0;
21500 ;
21501 return 0;
21502}
21503_ACEOF
21504rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021505if { (ac_try="$ac_compile"
21506case "(($ac_try" in
21507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21508 *) ac_try_echo=$ac_try;;
21509esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021511 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021512 ac_status=$?
21513 grep -v '^ *+' conftest.er1 >conftest.err
21514 rm -f conftest.er1
21515 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021517 (exit $ac_status); } && {
21518 test -z "$ac_c_werror_flag" ||
21519 test ! -s conftest.err
21520 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021521 ac_cv_member_struct_stat_st_flags=yes
21522else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021523 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021524sed 's/^/| /' conftest.$ac_ext >&5
21525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021526 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021528
21529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021531
21532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021533fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021534{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21535echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21536if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021537
21538cat >>confdefs.h <<_ACEOF
21539#define HAVE_STRUCT_STAT_ST_FLAGS 1
21540_ACEOF
21541
21542
21543fi
21544
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021545{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21546echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021547if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021549else
21550 cat >conftest.$ac_ext <<_ACEOF
21551/* confdefs.h. */
21552_ACEOF
21553cat confdefs.h >>conftest.$ac_ext
21554cat >>conftest.$ac_ext <<_ACEOF
21555/* end confdefs.h. */
21556$ac_includes_default
21557int
21558main ()
21559{
21560static struct stat ac_aggr;
21561if (ac_aggr.st_gen)
21562return 0;
21563 ;
21564 return 0;
21565}
21566_ACEOF
21567rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021568if { (ac_try="$ac_compile"
21569case "(($ac_try" in
21570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21571 *) ac_try_echo=$ac_try;;
21572esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021575 ac_status=$?
21576 grep -v '^ *+' conftest.er1 >conftest.err
21577 rm -f conftest.er1
21578 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021580 (exit $ac_status); } && {
21581 test -z "$ac_c_werror_flag" ||
21582 test ! -s conftest.err
21583 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021584 ac_cv_member_struct_stat_st_gen=yes
21585else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021586 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021587sed 's/^/| /' conftest.$ac_ext >&5
21588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021589 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021590/* confdefs.h. */
21591_ACEOF
21592cat confdefs.h >>conftest.$ac_ext
21593cat >>conftest.$ac_ext <<_ACEOF
21594/* end confdefs.h. */
21595$ac_includes_default
21596int
21597main ()
21598{
21599static struct stat ac_aggr;
21600if (sizeof ac_aggr.st_gen)
21601return 0;
21602 ;
21603 return 0;
21604}
21605_ACEOF
21606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021607if { (ac_try="$ac_compile"
21608case "(($ac_try" in
21609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21610 *) ac_try_echo=$ac_try;;
21611esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021614 ac_status=$?
21615 grep -v '^ *+' conftest.er1 >conftest.err
21616 rm -f conftest.er1
21617 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021619 (exit $ac_status); } && {
21620 test -z "$ac_c_werror_flag" ||
21621 test ! -s conftest.err
21622 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021623 ac_cv_member_struct_stat_st_gen=yes
21624else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021625 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021626sed 's/^/| /' conftest.$ac_ext >&5
21627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021628 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021630
21631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021633
21634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021635fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021636{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21637echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21638if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021639
21640cat >>confdefs.h <<_ACEOF
21641#define HAVE_STRUCT_STAT_ST_GEN 1
21642_ACEOF
21643
21644
21645fi
21646
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021647{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21648echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021649if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021651else
21652 cat >conftest.$ac_ext <<_ACEOF
21653/* confdefs.h. */
21654_ACEOF
21655cat confdefs.h >>conftest.$ac_ext
21656cat >>conftest.$ac_ext <<_ACEOF
21657/* end confdefs.h. */
21658$ac_includes_default
21659int
21660main ()
21661{
21662static struct stat ac_aggr;
21663if (ac_aggr.st_birthtime)
21664return 0;
21665 ;
21666 return 0;
21667}
21668_ACEOF
21669rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021670if { (ac_try="$ac_compile"
21671case "(($ac_try" in
21672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21673 *) ac_try_echo=$ac_try;;
21674esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021677 ac_status=$?
21678 grep -v '^ *+' conftest.er1 >conftest.err
21679 rm -f conftest.er1
21680 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021682 (exit $ac_status); } && {
21683 test -z "$ac_c_werror_flag" ||
21684 test ! -s conftest.err
21685 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021686 ac_cv_member_struct_stat_st_birthtime=yes
21687else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021688 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021689sed 's/^/| /' conftest.$ac_ext >&5
21690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021691 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021692/* confdefs.h. */
21693_ACEOF
21694cat confdefs.h >>conftest.$ac_ext
21695cat >>conftest.$ac_ext <<_ACEOF
21696/* end confdefs.h. */
21697$ac_includes_default
21698int
21699main ()
21700{
21701static struct stat ac_aggr;
21702if (sizeof ac_aggr.st_birthtime)
21703return 0;
21704 ;
21705 return 0;
21706}
21707_ACEOF
21708rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021709if { (ac_try="$ac_compile"
21710case "(($ac_try" in
21711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21712 *) ac_try_echo=$ac_try;;
21713esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021716 ac_status=$?
21717 grep -v '^ *+' conftest.er1 >conftest.err
21718 rm -f conftest.er1
21719 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021721 (exit $ac_status); } && {
21722 test -z "$ac_c_werror_flag" ||
21723 test ! -s conftest.err
21724 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021725 ac_cv_member_struct_stat_st_birthtime=yes
21726else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021727 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021728sed 's/^/| /' conftest.$ac_ext >&5
21729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021730 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021732
21733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021735
21736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021737fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021738{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21739echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21740if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021741
21742cat >>confdefs.h <<_ACEOF
21743#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21744_ACEOF
21745
21746
21747fi
21748
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021749{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21750echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021751if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021752 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021753else
Martin v. Löwis11437992002-04-12 09:54:03 +000021754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021755/* confdefs.h. */
21756_ACEOF
21757cat confdefs.h >>conftest.$ac_ext
21758cat >>conftest.$ac_ext <<_ACEOF
21759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021760$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021761int
21762main ()
21763{
21764static struct stat ac_aggr;
21765if (ac_aggr.st_blocks)
21766return 0;
21767 ;
21768 return 0;
21769}
21770_ACEOF
21771rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021772if { (ac_try="$ac_compile"
21773case "(($ac_try" in
21774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21775 *) ac_try_echo=$ac_try;;
21776esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021780 grep -v '^ *+' conftest.er1 >conftest.err
21781 rm -f conftest.er1
21782 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021784 (exit $ac_status); } && {
21785 test -z "$ac_c_werror_flag" ||
21786 test ! -s conftest.err
21787 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021788 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021789else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021791sed 's/^/| /' conftest.$ac_ext >&5
21792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021794/* confdefs.h. */
21795_ACEOF
21796cat confdefs.h >>conftest.$ac_ext
21797cat >>conftest.$ac_ext <<_ACEOF
21798/* end confdefs.h. */
21799$ac_includes_default
21800int
21801main ()
21802{
21803static struct stat ac_aggr;
21804if (sizeof ac_aggr.st_blocks)
21805return 0;
21806 ;
21807 return 0;
21808}
21809_ACEOF
21810rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021811if { (ac_try="$ac_compile"
21812case "(($ac_try" in
21813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21814 *) ac_try_echo=$ac_try;;
21815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021817 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021819 grep -v '^ *+' conftest.er1 >conftest.err
21820 rm -f conftest.er1
21821 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021823 (exit $ac_status); } && {
21824 test -z "$ac_c_werror_flag" ||
21825 test ! -s conftest.err
21826 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021827 ac_cv_member_struct_stat_st_blocks=yes
21828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021830sed 's/^/| /' conftest.$ac_ext >&5
21831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021832 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021834
21835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021837
21838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021839fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021840{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21841echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21842if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021843
Martin v. Löwis11437992002-04-12 09:54:03 +000021844cat >>confdefs.h <<_ACEOF
21845#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21846_ACEOF
21847
21848
21849cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021850#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021851_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021852
21853else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021854 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021855 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021856 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21857 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021858esac
21859
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021860fi
21861
Michael W. Hudson54241132001-12-07 15:38:26 +000021862
Martin v. Löwis11437992002-04-12 09:54:03 +000021863
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021864{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21865echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021866if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021867 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021868else
Martin v. Löwis11437992002-04-12 09:54:03 +000021869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021870/* confdefs.h. */
21871_ACEOF
21872cat confdefs.h >>conftest.$ac_ext
21873cat >>conftest.$ac_ext <<_ACEOF
21874/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021875#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021876int
21877main ()
21878{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021879return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021880 ;
21881 return 0;
21882}
21883_ACEOF
21884rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021885if { (ac_try="$ac_compile"
21886case "(($ac_try" in
21887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21888 *) ac_try_echo=$ac_try;;
21889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021893 grep -v '^ *+' conftest.er1 >conftest.err
21894 rm -f conftest.er1
21895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021897 (exit $ac_status); } && {
21898 test -z "$ac_c_werror_flag" ||
21899 test ! -s conftest.err
21900 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021901 ac_cv_header_time_altzone=yes
21902else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021904sed 's/^/| /' conftest.$ac_ext >&5
21905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021906 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21910fi
21911
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021912{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21913echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021914if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021915
21916cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021917#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021918_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021919
21920fi
21921
Guido van Rossumda88dad1995-01-26 00:46:29 +000021922was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021923{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21924echo $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 +000021925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021926/* confdefs.h. */
21927_ACEOF
21928cat confdefs.h >>conftest.$ac_ext
21929cat >>conftest.$ac_ext <<_ACEOF
21930/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021931
21932#include <sys/types.h>
21933#include <sys/select.h>
21934#include <sys/time.h>
21935
Martin v. Löwis11437992002-04-12 09:54:03 +000021936int
21937main ()
21938{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021939;
Martin v. Löwis11437992002-04-12 09:54:03 +000021940 ;
21941 return 0;
21942}
21943_ACEOF
21944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021945if { (ac_try="$ac_compile"
21946case "(($ac_try" in
21947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21948 *) ac_try_echo=$ac_try;;
21949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021953 grep -v '^ *+' conftest.er1 >conftest.err
21954 rm -f conftest.er1
21955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021957 (exit $ac_status); } && {
21958 test -z "$ac_c_werror_flag" ||
21959 test ! -s conftest.err
21960 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021961
21962
21963cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021964#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021965_ACEOF
21966
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021967 was_it_defined=yes
21968
Guido van Rossumf78abae1997-01-21 22:02:36 +000021969else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021971sed 's/^/| /' conftest.$ac_ext >&5
21972
Thomas Wouters477c8d52006-05-27 19:21:47 +000021973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021974fi
21975
21976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021977{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21978echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021979
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021980{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21981echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021982if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021983 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021984else
Martin v. Löwis11437992002-04-12 09:54:03 +000021985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021986/* confdefs.h. */
21987_ACEOF
21988cat confdefs.h >>conftest.$ac_ext
21989cat >>conftest.$ac_ext <<_ACEOF
21990/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021991
21992# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021993int
21994main ()
21995{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021996struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021997 ;
21998 return 0;
21999}
22000_ACEOF
22001rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022002if { (ac_try="$ac_compile"
22003case "(($ac_try" in
22004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22005 *) ac_try_echo=$ac_try;;
22006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022010 grep -v '^ *+' conftest.er1 >conftest.err
22011 rm -f conftest.er1
22012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022014 (exit $ac_status); } && {
22015 test -z "$ac_c_werror_flag" ||
22016 test ! -s conftest.err
22017 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022018 ac_cv_struct_addrinfo=yes
22019else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022021sed 's/^/| /' conftest.$ac_ext >&5
22022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022023 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022024fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22027fi
22028
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022029{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22030echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022031if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022032
22033cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022034#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022035_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022036
22037fi
22038
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022039{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22040echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022041if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022042 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022043else
Martin v. Löwis11437992002-04-12 09:54:03 +000022044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022045/* confdefs.h. */
22046_ACEOF
22047cat confdefs.h >>conftest.$ac_ext
22048cat >>conftest.$ac_ext <<_ACEOF
22049/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022050
22051# include <sys/types.h>
22052# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022053int
22054main ()
22055{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022056struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022057 ;
22058 return 0;
22059}
22060_ACEOF
22061rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022062if { (ac_try="$ac_compile"
22063case "(($ac_try" in
22064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22065 *) ac_try_echo=$ac_try;;
22066esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022070 grep -v '^ *+' conftest.er1 >conftest.err
22071 rm -f conftest.er1
22072 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022074 (exit $ac_status); } && {
22075 test -z "$ac_c_werror_flag" ||
22076 test ! -s conftest.err
22077 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022078 ac_cv_struct_sockaddr_storage=yes
22079else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022081sed 's/^/| /' conftest.$ac_ext >&5
22082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022083 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022084fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22087fi
22088
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022089{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22090echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022091if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022092
22093cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022094#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022095_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022096
22097fi
22098
Guido van Rossum627b2d71993-12-24 10:39:16 +000022099# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022100
Michael W. Hudson54241132001-12-07 15:38:26 +000022101
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022102{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22103echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022104if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022105 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022106else
Martin v. Löwis11437992002-04-12 09:54:03 +000022107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022108/* confdefs.h. */
22109_ACEOF
22110cat confdefs.h >>conftest.$ac_ext
22111cat >>conftest.$ac_ext <<_ACEOF
22112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022113$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022114int
22115main ()
22116{
22117static int test_array [1 - 2 * !(((char) -1) < 0)];
22118test_array [0] = 0
22119
22120 ;
22121 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022122}
Martin v. Löwis11437992002-04-12 09:54:03 +000022123_ACEOF
22124rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022125if { (ac_try="$ac_compile"
22126case "(($ac_try" in
22127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22128 *) ac_try_echo=$ac_try;;
22129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022133 grep -v '^ *+' conftest.er1 >conftest.err
22134 rm -f conftest.er1
22135 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022137 (exit $ac_status); } && {
22138 test -z "$ac_c_werror_flag" ||
22139 test ! -s conftest.err
22140 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022141 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022142else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022144sed 's/^/| /' conftest.$ac_ext >&5
22145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022146 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022148
22149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022150fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022151{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22152echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022153if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022154 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022155#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022156_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022157
22158fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022159
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022160{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22161echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022162if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022163 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022164else
22165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022166/* confdefs.h. */
22167_ACEOF
22168cat confdefs.h >>conftest.$ac_ext
22169cat >>conftest.$ac_ext <<_ACEOF
22170/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022171
Martin v. Löwis11437992002-04-12 09:54:03 +000022172int
22173main ()
22174{
22175/* FIXME: Include the comments suggested by Paul. */
22176#ifndef __cplusplus
22177 /* Ultrix mips cc rejects this. */
22178 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022179 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022180 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022181 char const *const *pcpcc;
22182 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022183 /* NEC SVR4.0.2 mips cc rejects this. */
22184 struct point {int x, y;};
22185 static struct point const zero = {0,0};
22186 /* AIX XL C 1.02.0.0 rejects this.
22187 It does not let you subtract one const X* pointer from another in
22188 an arm of an if-expression whose if-part is not a constant
22189 expression */
22190 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022191 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022192 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022193 ++pcpcc;
22194 ppc = (char**) pcpcc;
22195 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022196 { /* SCO 3.2v4 cc rejects this. */
22197 char *t;
22198 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022199
Martin v. Löwis11437992002-04-12 09:54:03 +000022200 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022201 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022202 }
22203 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22204 int x[] = {25, 17};
22205 const int *foo = &x[0];
22206 ++foo;
22207 }
22208 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22209 typedef const int *iptr;
22210 iptr p = 0;
22211 ++p;
22212 }
22213 { /* AIX XL C 1.02.0.0 rejects this saying
22214 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22215 struct s { int j; const int *ap[3]; };
22216 struct s *b; b->j = 5;
22217 }
22218 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22219 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022220 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022221 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022222 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022223#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022224
Martin v. Löwis11437992002-04-12 09:54:03 +000022225 ;
22226 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022227}
Martin v. Löwis11437992002-04-12 09:54:03 +000022228_ACEOF
22229rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022230if { (ac_try="$ac_compile"
22231case "(($ac_try" in
22232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22233 *) ac_try_echo=$ac_try;;
22234esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022238 grep -v '^ *+' conftest.er1 >conftest.err
22239 rm -f conftest.er1
22240 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022242 (exit $ac_status); } && {
22243 test -z "$ac_c_werror_flag" ||
22244 test ! -s conftest.err
22245 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022246 ac_cv_c_const=yes
22247else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022249sed 's/^/| /' conftest.$ac_ext >&5
22250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022251 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022253
22254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022255fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022256{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22257echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022258if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022259
22260cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022261#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022262_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022263
22264fi
22265
Michael W. Hudson54241132001-12-07 15:38:26 +000022266
Guido van Rossumda88dad1995-01-26 00:46:29 +000022267works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022268{ echo "$as_me:$LINENO: checking for working volatile" >&5
22269echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022271/* confdefs.h. */
22272_ACEOF
22273cat confdefs.h >>conftest.$ac_ext
22274cat >>conftest.$ac_ext <<_ACEOF
22275/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022276
Martin v. Löwis11437992002-04-12 09:54:03 +000022277int
22278main ()
22279{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022280volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022281 ;
22282 return 0;
22283}
22284_ACEOF
22285rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022286if { (ac_try="$ac_compile"
22287case "(($ac_try" in
22288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22289 *) ac_try_echo=$ac_try;;
22290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022294 grep -v '^ *+' conftest.er1 >conftest.err
22295 rm -f conftest.er1
22296 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022298 (exit $ac_status); } && {
22299 test -z "$ac_c_werror_flag" ||
22300 test ! -s conftest.err
22301 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022302 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022305sed 's/^/| /' conftest.$ac_ext >&5
22306
Martin v. Löwis11437992002-04-12 09:54:03 +000022307
22308cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022309#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022310_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022311
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022312
Guido van Rossum627b2d71993-12-24 10:39:16 +000022313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022314
22315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022316{ echo "$as_me:$LINENO: result: $works" >&5
22317echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022318
Guido van Rossumda88dad1995-01-26 00:46:29 +000022319works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022320{ echo "$as_me:$LINENO: checking for working signed char" >&5
22321echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022322cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022323/* confdefs.h. */
22324_ACEOF
22325cat confdefs.h >>conftest.$ac_ext
22326cat >>conftest.$ac_ext <<_ACEOF
22327/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022328
Martin v. Löwis11437992002-04-12 09:54:03 +000022329int
22330main ()
22331{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022332signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022333 ;
22334 return 0;
22335}
22336_ACEOF
22337rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022338if { (ac_try="$ac_compile"
22339case "(($ac_try" in
22340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22341 *) ac_try_echo=$ac_try;;
22342esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022346 grep -v '^ *+' conftest.er1 >conftest.err
22347 rm -f conftest.er1
22348 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022350 (exit $ac_status); } && {
22351 test -z "$ac_c_werror_flag" ||
22352 test ! -s conftest.err
22353 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022354 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022355else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022357sed 's/^/| /' conftest.$ac_ext >&5
22358
Martin v. Löwis11437992002-04-12 09:54:03 +000022359
22360cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022361#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022362_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022363
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022364
Guido van Rossum7f43da71994-08-01 12:15:30 +000022365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022366
22367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022368{ echo "$as_me:$LINENO: result: $works" >&5
22369echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022370
Guido van Rossumda88dad1995-01-26 00:46:29 +000022371have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022372{ echo "$as_me:$LINENO: checking for prototypes" >&5
22373echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022375/* confdefs.h. */
22376_ACEOF
22377cat confdefs.h >>conftest.$ac_ext
22378cat >>conftest.$ac_ext <<_ACEOF
22379/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022380int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022381int
22382main ()
22383{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022384return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022385 ;
22386 return 0;
22387}
22388_ACEOF
22389rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022390if { (ac_try="$ac_compile"
22391case "(($ac_try" in
22392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22393 *) ac_try_echo=$ac_try;;
22394esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022398 grep -v '^ *+' conftest.er1 >conftest.err
22399 rm -f conftest.er1
22400 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022402 (exit $ac_status); } && {
22403 test -z "$ac_c_werror_flag" ||
22404 test ! -s conftest.err
22405 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022406
22407
22408cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022409#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022410_ACEOF
22411
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022412 have_prototypes=yes
22413
Guido van Rossumf78abae1997-01-21 22:02:36 +000022414else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022416sed 's/^/| /' conftest.$ac_ext >&5
22417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022418
Guido van Rossum7f43da71994-08-01 12:15:30 +000022419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022420
22421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022422{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22423echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022424
Guido van Rossumda88dad1995-01-26 00:46:29 +000022425works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022426{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22427echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022429/* confdefs.h. */
22430_ACEOF
22431cat confdefs.h >>conftest.$ac_ext
22432cat >>conftest.$ac_ext <<_ACEOF
22433/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022434
22435#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022436int foo(int x, ...) {
22437 va_list va;
22438 va_start(va, x);
22439 va_arg(va, int);
22440 va_arg(va, char *);
22441 va_arg(va, double);
22442 return 0;
22443}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022444
Martin v. Löwis11437992002-04-12 09:54:03 +000022445int
22446main ()
22447{
Guido van Rossum90eea071996-08-30 20:58:57 +000022448return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022449 ;
22450 return 0;
22451}
22452_ACEOF
22453rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022454if { (ac_try="$ac_compile"
22455case "(($ac_try" in
22456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22457 *) ac_try_echo=$ac_try;;
22458esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022462 grep -v '^ *+' conftest.er1 >conftest.err
22463 rm -f conftest.er1
22464 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022466 (exit $ac_status); } && {
22467 test -z "$ac_c_werror_flag" ||
22468 test ! -s conftest.err
22469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022470
22471
22472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022473#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022474_ACEOF
22475
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022476 works=yes
22477
Guido van Rossumf78abae1997-01-21 22:02:36 +000022478else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022480sed 's/^/| /' conftest.$ac_ext >&5
22481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022482
Guido van Rossum627b2d71993-12-24 10:39:16 +000022483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022484
22485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022486{ echo "$as_me:$LINENO: result: $works" >&5
22487echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022488
Martin v. Löwisd6320502004-08-12 13:45:08 +000022489# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022490{ echo "$as_me:$LINENO: checking for socketpair" >&5
22491echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022492cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022493/* confdefs.h. */
22494_ACEOF
22495cat confdefs.h >>conftest.$ac_ext
22496cat >>conftest.$ac_ext <<_ACEOF
22497/* end confdefs.h. */
22498
22499#include <sys/types.h>
22500#include <sys/socket.h>
22501
22502int
22503main ()
22504{
22505void *x=socketpair
22506 ;
22507 return 0;
22508}
22509_ACEOF
22510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022511if { (ac_try="$ac_compile"
22512case "(($ac_try" in
22513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22514 *) ac_try_echo=$ac_try;;
22515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022519 grep -v '^ *+' conftest.er1 >conftest.err
22520 rm -f conftest.er1
22521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022523 (exit $ac_status); } && {
22524 test -z "$ac_c_werror_flag" ||
22525 test ! -s conftest.err
22526 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022527
22528cat >>confdefs.h <<\_ACEOF
22529#define HAVE_SOCKETPAIR 1
22530_ACEOF
22531
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022532 { echo "$as_me:$LINENO: result: yes" >&5
22533echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022534else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022535 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022536sed 's/^/| /' conftest.$ac_ext >&5
22537
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022538 { echo "$as_me:$LINENO: result: no" >&5
22539echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022540
22541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022542
22543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022544
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022545# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022546{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22547echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022548cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022549/* confdefs.h. */
22550_ACEOF
22551cat confdefs.h >>conftest.$ac_ext
22552cat >>conftest.$ac_ext <<_ACEOF
22553/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022554#include <sys/types.h>
22555#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022556int
22557main ()
22558{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022559struct sockaddr x;
22560x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022561 ;
22562 return 0;
22563}
22564_ACEOF
22565rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022566if { (ac_try="$ac_compile"
22567case "(($ac_try" in
22568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22569 *) ac_try_echo=$ac_try;;
22570esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022574 grep -v '^ *+' conftest.er1 >conftest.err
22575 rm -f conftest.er1
22576 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022578 (exit $ac_status); } && {
22579 test -z "$ac_c_werror_flag" ||
22580 test ! -s conftest.err
22581 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022582 { echo "$as_me:$LINENO: result: yes" >&5
22583echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022584
22585cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022586#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022587_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022588
22589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022591sed 's/^/| /' conftest.$ac_ext >&5
22592
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022593 { echo "$as_me:$LINENO: result: no" >&5
22594echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022596
22597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022598
Guido van Rossumda88dad1995-01-26 00:46:29 +000022599va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022600{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22601echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022603/* confdefs.h. */
22604_ACEOF
22605cat confdefs.h >>conftest.$ac_ext
22606cat >>conftest.$ac_ext <<_ACEOF
22607/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022608
22609#ifdef HAVE_STDARG_PROTOTYPES
22610#include <stdarg.h>
22611#else
22612#include <varargs.h>
22613#endif
22614
Martin v. Löwis11437992002-04-12 09:54:03 +000022615int
22616main ()
22617{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022618va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022619 ;
22620 return 0;
22621}
22622_ACEOF
22623rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022624if { (ac_try="$ac_compile"
22625case "(($ac_try" in
22626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22627 *) ac_try_echo=$ac_try;;
22628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022632 grep -v '^ *+' conftest.er1 >conftest.err
22633 rm -f conftest.er1
22634 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022636 (exit $ac_status); } && {
22637 test -z "$ac_c_werror_flag" ||
22638 test ! -s conftest.err
22639 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022640 :
22641else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022643sed 's/^/| /' conftest.$ac_ext >&5
22644
Martin v. Löwis11437992002-04-12 09:54:03 +000022645
22646
22647cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022648#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022649_ACEOF
22650
Guido van Rossumda88dad1995-01-26 00:46:29 +000022651 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022652
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022654
22655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022656{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22657echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022658
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022659# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022660
22661
22662
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022663{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22664echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022665if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022666 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022667else
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022669/* confdefs.h. */
22670_ACEOF
22671cat confdefs.h >>conftest.$ac_ext
22672cat >>conftest.$ac_ext <<_ACEOF
22673/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022674/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22675 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22676#define gethostbyname_r innocuous_gethostbyname_r
22677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022678/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022679 which can conflict with char gethostbyname_r (); below.
22680 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022681 <limits.h> exists even on freestanding compilers. */
22682
22683#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022684# include <limits.h>
22685#else
22686# include <assert.h>
22687#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022688
22689#undef gethostbyname_r
22690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022691/* Override any GCC internal prototype to avoid an error.
22692 Use char because int might match the return type of a GCC
22693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022694#ifdef __cplusplus
22695extern "C"
22696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022697char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022698/* The GNU C library defines this for functions which it implements
22699 to always fail with ENOSYS. Some functions are actually named
22700 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022701#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022702choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022703#endif
22704
Skip Montanaro6dead952003-09-25 14:50:04 +000022705int
22706main ()
22707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022708return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022709 ;
22710 return 0;
22711}
22712_ACEOF
22713rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022714if { (ac_try="$ac_link"
22715case "(($ac_try" in
22716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22717 *) ac_try_echo=$ac_try;;
22718esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022720 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022722 grep -v '^ *+' conftest.er1 >conftest.err
22723 rm -f conftest.er1
22724 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022726 (exit $ac_status); } && {
22727 test -z "$ac_c_werror_flag" ||
22728 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022729 } && test -s conftest$ac_exeext &&
22730 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022731 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022732else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022734sed 's/^/| /' conftest.$ac_ext >&5
22735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022736 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022738
22739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022740 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022741fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022742{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22743echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22744if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022745
Martin v. Löwis11437992002-04-12 09:54:03 +000022746 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022747#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022748_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022749
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022750 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22751echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022752 OLD_CFLAGS=$CFLAGS
22753 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022755/* confdefs.h. */
22756_ACEOF
22757cat confdefs.h >>conftest.$ac_ext
22758cat >>conftest.$ac_ext <<_ACEOF
22759/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022760
22761# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022762
Martin v. Löwis11437992002-04-12 09:54:03 +000022763int
22764main ()
22765{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022766
22767 char *name;
22768 struct hostent *he, *res;
22769 char buffer[2048];
22770 int buflen = 2048;
22771 int h_errnop;
22772
22773 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022774
22775 ;
22776 return 0;
22777}
22778_ACEOF
22779rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022780if { (ac_try="$ac_compile"
22781case "(($ac_try" in
22782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22783 *) ac_try_echo=$ac_try;;
22784esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022786 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022788 grep -v '^ *+' conftest.er1 >conftest.err
22789 rm -f conftest.er1
22790 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022792 (exit $ac_status); } && {
22793 test -z "$ac_c_werror_flag" ||
22794 test ! -s conftest.err
22795 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022796
22797 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022798#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022799_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022800
Martin v. Löwis11437992002-04-12 09:54:03 +000022801
22802cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022803#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022804_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022805
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022806 { echo "$as_me:$LINENO: result: yes" >&5
22807echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022808
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022809else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022811sed 's/^/| /' conftest.$ac_ext >&5
22812
Martin v. Löwis11437992002-04-12 09:54:03 +000022813
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022814 { echo "$as_me:$LINENO: result: no" >&5
22815echo "${ECHO_T}no" >&6; }
22816 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22817echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022819/* confdefs.h. */
22820_ACEOF
22821cat confdefs.h >>conftest.$ac_ext
22822cat >>conftest.$ac_ext <<_ACEOF
22823/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022824
22825# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022826
Martin v. Löwis11437992002-04-12 09:54:03 +000022827int
22828main ()
22829{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022830
22831 char *name;
22832 struct hostent *he;
22833 char buffer[2048];
22834 int buflen = 2048;
22835 int h_errnop;
22836
22837 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022838
22839 ;
22840 return 0;
22841}
22842_ACEOF
22843rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022844if { (ac_try="$ac_compile"
22845case "(($ac_try" in
22846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22847 *) ac_try_echo=$ac_try;;
22848esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022852 grep -v '^ *+' conftest.er1 >conftest.err
22853 rm -f conftest.er1
22854 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022856 (exit $ac_status); } && {
22857 test -z "$ac_c_werror_flag" ||
22858 test ! -s conftest.err
22859 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022860
22861 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022862#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022863_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022864
Martin v. Löwis11437992002-04-12 09:54:03 +000022865
22866cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022867#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022868_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022869
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022870 { echo "$as_me:$LINENO: result: yes" >&5
22871echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022873else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022875sed 's/^/| /' conftest.$ac_ext >&5
22876
Martin v. Löwis11437992002-04-12 09:54:03 +000022877
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022878 { echo "$as_me:$LINENO: result: no" >&5
22879echo "${ECHO_T}no" >&6; }
22880 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22881echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022883/* confdefs.h. */
22884_ACEOF
22885cat confdefs.h >>conftest.$ac_ext
22886cat >>conftest.$ac_ext <<_ACEOF
22887/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022888
22889# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022890
Martin v. Löwis11437992002-04-12 09:54:03 +000022891int
22892main ()
22893{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022894
22895 char *name;
22896 struct hostent *he;
22897 struct hostent_data data;
22898
22899 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022900
22901 ;
22902 return 0;
22903}
22904_ACEOF
22905rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022906if { (ac_try="$ac_compile"
22907case "(($ac_try" in
22908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22909 *) ac_try_echo=$ac_try;;
22910esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022914 grep -v '^ *+' conftest.er1 >conftest.err
22915 rm -f conftest.er1
22916 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022918 (exit $ac_status); } && {
22919 test -z "$ac_c_werror_flag" ||
22920 test ! -s conftest.err
22921 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022922
22923 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022924#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022925_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022926
Martin v. Löwis11437992002-04-12 09:54:03 +000022927
22928cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022929#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022930_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022931
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022932 { echo "$as_me:$LINENO: result: yes" >&5
22933echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022934
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022935else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022937sed 's/^/| /' conftest.$ac_ext >&5
22938
Martin v. Löwis11437992002-04-12 09:54:03 +000022939
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022940 { echo "$as_me:$LINENO: result: no" >&5
22941echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022942
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022944
22945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022946
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022948
22949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022950
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022952
22953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022954 CFLAGS=$OLD_CFLAGS
22955
22956else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022957
Martin v. Löwis11437992002-04-12 09:54:03 +000022958
22959for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022960do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022961as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22962{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22963echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022964if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022965 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022966else
Martin v. Löwis11437992002-04-12 09:54:03 +000022967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022968/* confdefs.h. */
22969_ACEOF
22970cat confdefs.h >>conftest.$ac_ext
22971cat >>conftest.$ac_ext <<_ACEOF
22972/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022973/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22974 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22975#define $ac_func innocuous_$ac_func
22976
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022977/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022978 which can conflict with char $ac_func (); below.
22979 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022980 <limits.h> exists even on freestanding compilers. */
22981
22982#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022983# include <limits.h>
22984#else
22985# include <assert.h>
22986#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022987
22988#undef $ac_func
22989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022990/* Override any GCC internal prototype to avoid an error.
22991 Use char because int might match the return type of a GCC
22992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022993#ifdef __cplusplus
22994extern "C"
22995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022996char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022997/* The GNU C library defines this for functions which it implements
22998 to always fail with ENOSYS. Some functions are actually named
22999 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023000#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023001choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023002#endif
23003
Skip Montanaro6dead952003-09-25 14:50:04 +000023004int
23005main ()
23006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023007return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023008 ;
23009 return 0;
23010}
23011_ACEOF
23012rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023013if { (ac_try="$ac_link"
23014case "(($ac_try" in
23015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23016 *) ac_try_echo=$ac_try;;
23017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023019 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023021 grep -v '^ *+' conftest.er1 >conftest.err
23022 rm -f conftest.er1
23023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023025 (exit $ac_status); } && {
23026 test -z "$ac_c_werror_flag" ||
23027 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023028 } && test -s conftest$ac_exeext &&
23029 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023030 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023031else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023033sed 's/^/| /' conftest.$ac_ext >&5
23034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023035 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023037
23038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023039 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023040fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023041ac_res=`eval echo '${'$as_ac_var'}'`
23042 { echo "$as_me:$LINENO: result: $ac_res" >&5
23043echo "${ECHO_T}$ac_res" >&6; }
23044if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023045 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023046#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023047_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023048
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023049fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023050done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023051
Michael W. Hudson54241132001-12-07 15:38:26 +000023052
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023053fi
23054
Michael W. Hudson54241132001-12-07 15:38:26 +000023055
23056
23057
23058
23059
23060
Guido van Rossum627b2d71993-12-24 10:39:16 +000023061# checks for system services
23062# (none yet)
23063
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023064# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023065{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23066echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023067if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023068 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023069else
Martin v. Löwis11437992002-04-12 09:54:03 +000023070 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023071/* confdefs.h. */
23072_ACEOF
23073cat confdefs.h >>conftest.$ac_ext
23074cat >>conftest.$ac_ext <<_ACEOF
23075/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023076/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23078#define __fpu_control innocuous___fpu_control
23079
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023080/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023081 which can conflict with char __fpu_control (); below.
23082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023083 <limits.h> exists even on freestanding compilers. */
23084
23085#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023086# include <limits.h>
23087#else
23088# include <assert.h>
23089#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023090
23091#undef __fpu_control
23092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023093/* Override any GCC internal prototype to avoid an error.
23094 Use char because int might match the return type of a GCC
23095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023096#ifdef __cplusplus
23097extern "C"
23098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023099char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023100/* The GNU C library defines this for functions which it implements
23101 to always fail with ENOSYS. Some functions are actually named
23102 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023103#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023104choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023105#endif
23106
Skip Montanaro6dead952003-09-25 14:50:04 +000023107int
23108main ()
23109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023110return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023111 ;
23112 return 0;
23113}
23114_ACEOF
23115rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023116if { (ac_try="$ac_link"
23117case "(($ac_try" in
23118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23119 *) ac_try_echo=$ac_try;;
23120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023122 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023124 grep -v '^ *+' conftest.er1 >conftest.err
23125 rm -f conftest.er1
23126 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023128 (exit $ac_status); } && {
23129 test -z "$ac_c_werror_flag" ||
23130 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023131 } && test -s conftest$ac_exeext &&
23132 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023133 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023134else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023136sed 's/^/| /' conftest.$ac_ext >&5
23137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023138 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023140
23141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023142 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023143fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023144{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23145echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23146if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023147 :
23148else
Martin v. Löwis11437992002-04-12 09:54:03 +000023149
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023150{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23151echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023152if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023153 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023154else
Martin v. Löwis11437992002-04-12 09:54:03 +000023155 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023156LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023158/* confdefs.h. */
23159_ACEOF
23160cat confdefs.h >>conftest.$ac_ext
23161cat >>conftest.$ac_ext <<_ACEOF
23162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023164/* Override any GCC internal prototype to avoid an error.
23165 Use char because int might match the return type of a GCC
23166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023167#ifdef __cplusplus
23168extern "C"
23169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023170char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023171int
23172main ()
23173{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023174return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023175 ;
23176 return 0;
23177}
23178_ACEOF
23179rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023180if { (ac_try="$ac_link"
23181case "(($ac_try" in
23182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23183 *) ac_try_echo=$ac_try;;
23184esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023186 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023188 grep -v '^ *+' conftest.er1 >conftest.err
23189 rm -f conftest.er1
23190 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023192 (exit $ac_status); } && {
23193 test -z "$ac_c_werror_flag" ||
23194 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023195 } && test -s conftest$ac_exeext &&
23196 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023197 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023198else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023200sed 's/^/| /' conftest.$ac_ext >&5
23201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023202 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023204
23205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023207LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023208fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023209{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23210echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23211if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023212 cat >>confdefs.h <<_ACEOF
23213#define HAVE_LIBIEEE 1
23214_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023216 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023217
Guido van Rossum627b2d71993-12-24 10:39:16 +000023218fi
23219
Michael W. Hudson54241132001-12-07 15:38:26 +000023220
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023221fi
23222
Michael W. Hudson54241132001-12-07 15:38:26 +000023223
Guido van Rossum7f253911997-05-09 02:42:48 +000023224# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023225{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23226echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023228# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023229if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023230 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023231if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023232then
23233
23234cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023235#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023236_ACEOF
23237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023238 { echo "$as_me:$LINENO: result: yes" >&5
23239echo "${ECHO_T}yes" >&6; }
23240else { echo "$as_me:$LINENO: result: no" >&5
23241echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023242fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023243else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023244 { echo "$as_me:$LINENO: result: no" >&5
23245echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023246fi
23247
Guido van Rossum7f253911997-05-09 02:42:48 +000023248
Guido van Rossum7f43da71994-08-01 12:15:30 +000023249# check for --with-libm=...
23250
Guido van Rossum563e7081996-09-10 18:20:48 +000023251case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023252Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023253*) LIBM=-lm
23254esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023255{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23256echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023258# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023259if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023260 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023261if test "$withval" = no
23262then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023263 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23264echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023265elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023266then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023267 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23268echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23269else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23270echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023271 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023272fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023273else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023274 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23275echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023276fi
23277
Guido van Rossum7f43da71994-08-01 12:15:30 +000023278
23279# check for --with-libc=...
23280
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023281{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23282echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023284# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023285if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023286 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023287if test "$withval" = no
23288then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023289 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23290echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023291elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023292then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023293 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23294echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23295else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23296echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023297 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023298fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023299else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023300 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23301echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023302fi
23303
Guido van Rossum7f43da71994-08-01 12:15:30 +000023304
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023305# **************************************************
23306# * Check for various properties of floating point *
23307# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023308
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023309{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23310echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023311if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023312 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023313else
23314
23315if test "$cross_compiling" = yes; then
23316 ac_cv_little_endian_double=no
23317else
23318 cat >conftest.$ac_ext <<_ACEOF
23319/* confdefs.h. */
23320_ACEOF
23321cat confdefs.h >>conftest.$ac_ext
23322cat >>conftest.$ac_ext <<_ACEOF
23323/* end confdefs.h. */
23324
23325#include <string.h>
23326int main() {
23327 double x = 9006104071832581.0;
23328 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23329 return 0;
23330 else
23331 return 1;
23332}
23333
23334_ACEOF
23335rm -f conftest$ac_exeext
23336if { (ac_try="$ac_link"
23337case "(($ac_try" in
23338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23339 *) ac_try_echo=$ac_try;;
23340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023342 (eval "$ac_link") 2>&5
23343 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23346 { (case "(($ac_try" in
23347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23348 *) ac_try_echo=$ac_try;;
23349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023351 (eval "$ac_try") 2>&5
23352 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023354 (exit $ac_status); }; }; then
23355 ac_cv_little_endian_double=yes
23356else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023357 echo "$as_me: program exited with status $ac_status" >&5
23358echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023359sed 's/^/| /' conftest.$ac_ext >&5
23360
23361( exit $ac_status )
23362ac_cv_little_endian_double=no
23363fi
23364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23365fi
23366
23367
23368fi
23369
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023370{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23371echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023372if test "$ac_cv_little_endian_double" = yes
23373then
23374
23375cat >>confdefs.h <<\_ACEOF
23376#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23377_ACEOF
23378
23379fi
23380
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023381{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23382echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023383if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023384 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023385else
23386
23387if test "$cross_compiling" = yes; then
23388 ac_cv_big_endian_double=no
23389else
23390 cat >conftest.$ac_ext <<_ACEOF
23391/* confdefs.h. */
23392_ACEOF
23393cat confdefs.h >>conftest.$ac_ext
23394cat >>conftest.$ac_ext <<_ACEOF
23395/* end confdefs.h. */
23396
23397#include <string.h>
23398int main() {
23399 double x = 9006104071832581.0;
23400 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23401 return 0;
23402 else
23403 return 1;
23404}
23405
23406_ACEOF
23407rm -f conftest$ac_exeext
23408if { (ac_try="$ac_link"
23409case "(($ac_try" in
23410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23411 *) ac_try_echo=$ac_try;;
23412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023414 (eval "$ac_link") 2>&5
23415 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023417 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23418 { (case "(($ac_try" in
23419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23420 *) ac_try_echo=$ac_try;;
23421esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023423 (eval "$ac_try") 2>&5
23424 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023426 (exit $ac_status); }; }; then
23427 ac_cv_big_endian_double=yes
23428else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023429 echo "$as_me: program exited with status $ac_status" >&5
23430echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023431sed 's/^/| /' conftest.$ac_ext >&5
23432
23433( exit $ac_status )
23434ac_cv_big_endian_double=no
23435fi
23436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23437fi
23438
23439
23440fi
23441
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023442{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23443echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023444if test "$ac_cv_big_endian_double" = yes
23445then
23446
23447cat >>confdefs.h <<\_ACEOF
23448#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23449_ACEOF
23450
23451fi
23452
23453# Some ARM platforms use a mixed-endian representation for doubles.
23454# While Python doesn't currently have full support for these platforms
23455# (see e.g., issue 1762561), we can at least make sure that float <-> string
23456# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023457{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23458echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023459if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023460 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023461else
23462
23463if test "$cross_compiling" = yes; then
23464 ac_cv_mixed_endian_double=no
23465else
23466 cat >conftest.$ac_ext <<_ACEOF
23467/* confdefs.h. */
23468_ACEOF
23469cat confdefs.h >>conftest.$ac_ext
23470cat >>conftest.$ac_ext <<_ACEOF
23471/* end confdefs.h. */
23472
23473#include <string.h>
23474int main() {
23475 double x = 9006104071832581.0;
23476 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23477 return 0;
23478 else
23479 return 1;
23480}
23481
23482_ACEOF
23483rm -f conftest$ac_exeext
23484if { (ac_try="$ac_link"
23485case "(($ac_try" in
23486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23487 *) ac_try_echo=$ac_try;;
23488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023490 (eval "$ac_link") 2>&5
23491 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023493 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23494 { (case "(($ac_try" in
23495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23496 *) ac_try_echo=$ac_try;;
23497esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023499 (eval "$ac_try") 2>&5
23500 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023502 (exit $ac_status); }; }; then
23503 ac_cv_mixed_endian_double=yes
23504else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023505 echo "$as_me: program exited with status $ac_status" >&5
23506echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023507sed 's/^/| /' conftest.$ac_ext >&5
23508
23509( exit $ac_status )
23510ac_cv_mixed_endian_double=no
23511fi
23512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23513fi
23514
23515
23516fi
23517
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023518{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23519echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023520if test "$ac_cv_mixed_endian_double" = yes
23521then
23522
23523cat >>confdefs.h <<\_ACEOF
23524#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23525_ACEOF
23526
23527fi
23528
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023529# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023530# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023531# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023532# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023533# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023534# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023535
23536# This inline assembler syntax may also work for suncc and icc,
23537# so we try it on all platforms.
23538
23539{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023540echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023541cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023542/* confdefs.h. */
23543_ACEOF
23544cat confdefs.h >>conftest.$ac_ext
23545cat >>conftest.$ac_ext <<_ACEOF
23546/* end confdefs.h. */
23547
23548int
23549main ()
23550{
23551
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023552 unsigned short cw;
23553 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23554 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023555
23556 ;
23557 return 0;
23558}
23559_ACEOF
23560rm -f conftest.$ac_objext
23561if { (ac_try="$ac_compile"
23562case "(($ac_try" in
23563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23564 *) ac_try_echo=$ac_try;;
23565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023567 (eval "$ac_compile") 2>conftest.er1
23568 ac_status=$?
23569 grep -v '^ *+' conftest.er1 >conftest.err
23570 rm -f conftest.er1
23571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023573 (exit $ac_status); } && {
23574 test -z "$ac_c_werror_flag" ||
23575 test ! -s conftest.err
23576 } && test -s conftest.$ac_objext; then
23577 have_gcc_asm_for_x87=yes
23578else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023579 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023580sed 's/^/| /' conftest.$ac_ext >&5
23581
23582 have_gcc_asm_for_x87=no
23583fi
23584
23585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023586{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023587echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023588if test "$have_gcc_asm_for_x87" = yes
23589then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023590
23591cat >>confdefs.h <<\_ACEOF
23592#define HAVE_GCC_ASM_FOR_X87 1
23593_ACEOF
23594
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023595fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023596
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023597# Detect whether system arithmetic is subject to x87-style double
23598# rounding issues. The result of this test has little meaning on non
23599# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23600# mode is round-to-nearest and double rounding issues are present, and
23601# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023602{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23603echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023604# $BASECFLAGS may affect the result
23605ac_save_cc="$CC"
23606CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023607if test "$cross_compiling" = yes; then
23608 ac_cv_x87_double_rounding=no
23609else
23610 cat >conftest.$ac_ext <<_ACEOF
23611/* confdefs.h. */
23612_ACEOF
23613cat confdefs.h >>conftest.$ac_ext
23614cat >>conftest.$ac_ext <<_ACEOF
23615/* end confdefs.h. */
23616
23617#include <stdlib.h>
23618#include <math.h>
23619int main() {
23620 volatile double x, y, z;
23621 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23622 x = 0.99999999999999989; /* 1-2**-53 */
23623 y = 1./x;
23624 if (y != 1.)
23625 exit(0);
23626 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23627 x = 1e16;
23628 y = 2.99999;
23629 z = x + y;
23630 if (z != 1e16+4.)
23631 exit(0);
23632 /* both tests show evidence of double rounding */
23633 exit(1);
23634}
23635
23636_ACEOF
23637rm -f conftest$ac_exeext
23638if { (ac_try="$ac_link"
23639case "(($ac_try" in
23640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23641 *) ac_try_echo=$ac_try;;
23642esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023644 (eval "$ac_link") 2>&5
23645 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23648 { (case "(($ac_try" in
23649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23650 *) ac_try_echo=$ac_try;;
23651esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023653 (eval "$ac_try") 2>&5
23654 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023656 (exit $ac_status); }; }; then
23657 ac_cv_x87_double_rounding=no
23658else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023659 echo "$as_me: program exited with status $ac_status" >&5
23660echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023661sed 's/^/| /' conftest.$ac_ext >&5
23662
23663( exit $ac_status )
23664ac_cv_x87_double_rounding=yes
23665fi
23666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23667fi
23668
23669
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023670CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023671{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23672echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023673if test "$ac_cv_x87_double_rounding" = yes
23674then
23675
23676cat >>confdefs.h <<\_ACEOF
23677#define X87_DOUBLE_ROUNDING 1
23678_ACEOF
23679
23680fi
23681
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023682# ************************************
23683# * Check for mathematical functions *
23684# ************************************
23685
23686LIBS_SAVE=$LIBS
23687LIBS="$LIBS $LIBM"
23688
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023689# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23690# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023691{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23692echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023693if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023694 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023695else
23696
23697if test "$cross_compiling" = yes; then
23698 ac_cv_tanh_preserves_zero_sign=no
23699else
23700 cat >conftest.$ac_ext <<_ACEOF
23701/* confdefs.h. */
23702_ACEOF
23703cat confdefs.h >>conftest.$ac_ext
23704cat >>conftest.$ac_ext <<_ACEOF
23705/* end confdefs.h. */
23706
23707#include <math.h>
23708#include <stdlib.h>
23709int main() {
23710 /* return 0 if either negative zeros don't exist
23711 on this platform or if negative zeros exist
23712 and tanh(-0.) == -0. */
23713 if (atan2(0., -1.) == atan2(-0., -1.) ||
23714 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23715 else exit(1);
23716}
23717
23718_ACEOF
23719rm -f conftest$ac_exeext
23720if { (ac_try="$ac_link"
23721case "(($ac_try" in
23722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23723 *) ac_try_echo=$ac_try;;
23724esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023726 (eval "$ac_link") 2>&5
23727 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023729 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23730 { (case "(($ac_try" in
23731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23732 *) ac_try_echo=$ac_try;;
23733esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023735 (eval "$ac_try") 2>&5
23736 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023738 (exit $ac_status); }; }; then
23739 ac_cv_tanh_preserves_zero_sign=yes
23740else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023741 echo "$as_me: program exited with status $ac_status" >&5
23742echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023743sed 's/^/| /' conftest.$ac_ext >&5
23744
23745( exit $ac_status )
23746ac_cv_tanh_preserves_zero_sign=no
23747fi
23748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23749fi
23750
23751
23752fi
23753
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023754{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23755echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023756if test "$ac_cv_tanh_preserves_zero_sign" = yes
23757then
23758
23759cat >>confdefs.h <<\_ACEOF
23760#define TANH_PRESERVES_ZERO_SIGN 1
23761_ACEOF
23762
23763fi
23764
23765
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023766
Michael W. Hudson54241132001-12-07 15:38:26 +000023767
Christian Heimes99170a52007-12-19 02:07:34 +000023768
23769
23770
23771
23772
Mark Dickinsonf2537862009-04-18 13:58:18 +000023773
Mark Dickinson9c113362009-09-05 10:36:23 +000023774for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23775do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023776as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23777{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23778echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023779if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023780 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023781else
23782 cat >conftest.$ac_ext <<_ACEOF
23783/* confdefs.h. */
23784_ACEOF
23785cat confdefs.h >>conftest.$ac_ext
23786cat >>conftest.$ac_ext <<_ACEOF
23787/* end confdefs.h. */
23788/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23789 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23790#define $ac_func innocuous_$ac_func
23791
23792/* System header to define __stub macros and hopefully few prototypes,
23793 which can conflict with char $ac_func (); below.
23794 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23795 <limits.h> exists even on freestanding compilers. */
23796
23797#ifdef __STDC__
23798# include <limits.h>
23799#else
23800# include <assert.h>
23801#endif
23802
23803#undef $ac_func
23804
23805/* Override any GCC internal prototype to avoid an error.
23806 Use char because int might match the return type of a GCC
23807 builtin and then its argument prototype would still apply. */
23808#ifdef __cplusplus
23809extern "C"
23810#endif
23811char $ac_func ();
23812/* The GNU C library defines this for functions which it implements
23813 to always fail with ENOSYS. Some functions are actually named
23814 something starting with __ and the normal name is an alias. */
23815#if defined __stub_$ac_func || defined __stub___$ac_func
23816choke me
23817#endif
23818
23819int
23820main ()
23821{
23822return $ac_func ();
23823 ;
23824 return 0;
23825}
23826_ACEOF
23827rm -f conftest.$ac_objext conftest$ac_exeext
23828if { (ac_try="$ac_link"
23829case "(($ac_try" in
23830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23831 *) ac_try_echo=$ac_try;;
23832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023834 (eval "$ac_link") 2>conftest.er1
23835 ac_status=$?
23836 grep -v '^ *+' conftest.er1 >conftest.err
23837 rm -f conftest.er1
23838 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023840 (exit $ac_status); } && {
23841 test -z "$ac_c_werror_flag" ||
23842 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023843 } && test -s conftest$ac_exeext &&
23844 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023845 eval "$as_ac_var=yes"
23846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023847 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023848sed 's/^/| /' conftest.$ac_ext >&5
23849
23850 eval "$as_ac_var=no"
23851fi
23852
23853rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23854 conftest$ac_exeext conftest.$ac_ext
23855fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023856ac_res=`eval echo '${'$as_ac_var'}'`
23857 { echo "$as_me:$LINENO: result: $ac_res" >&5
23858echo "${ECHO_T}$ac_res" >&6; }
23859if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023860 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023861#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023862_ACEOF
23863
23864fi
23865done
23866
23867
23868
23869
23870
23871
23872for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023873do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023874as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23875{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23876echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023877if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023878 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023879else
23880 cat >conftest.$ac_ext <<_ACEOF
23881/* confdefs.h. */
23882_ACEOF
23883cat confdefs.h >>conftest.$ac_ext
23884cat >>conftest.$ac_ext <<_ACEOF
23885/* end confdefs.h. */
23886/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23887 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23888#define $ac_func innocuous_$ac_func
23889
23890/* System header to define __stub macros and hopefully few prototypes,
23891 which can conflict with char $ac_func (); below.
23892 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23893 <limits.h> exists even on freestanding compilers. */
23894
23895#ifdef __STDC__
23896# include <limits.h>
23897#else
23898# include <assert.h>
23899#endif
23900
23901#undef $ac_func
23902
23903/* Override any GCC internal prototype to avoid an error.
23904 Use char because int might match the return type of a GCC
23905 builtin and then its argument prototype would still apply. */
23906#ifdef __cplusplus
23907extern "C"
23908#endif
23909char $ac_func ();
23910/* The GNU C library defines this for functions which it implements
23911 to always fail with ENOSYS. Some functions are actually named
23912 something starting with __ and the normal name is an alias. */
23913#if defined __stub_$ac_func || defined __stub___$ac_func
23914choke me
23915#endif
23916
23917int
23918main ()
23919{
23920return $ac_func ();
23921 ;
23922 return 0;
23923}
23924_ACEOF
23925rm -f conftest.$ac_objext conftest$ac_exeext
23926if { (ac_try="$ac_link"
23927case "(($ac_try" in
23928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23929 *) ac_try_echo=$ac_try;;
23930esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023932 (eval "$ac_link") 2>conftest.er1
23933 ac_status=$?
23934 grep -v '^ *+' conftest.er1 >conftest.err
23935 rm -f conftest.er1
23936 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023938 (exit $ac_status); } && {
23939 test -z "$ac_c_werror_flag" ||
23940 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023941 } && test -s conftest$ac_exeext &&
23942 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023943 eval "$as_ac_var=yes"
23944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023945 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023946sed 's/^/| /' conftest.$ac_ext >&5
23947
23948 eval "$as_ac_var=no"
23949fi
23950
23951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23952 conftest$ac_exeext conftest.$ac_ext
23953fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023954ac_res=`eval echo '${'$as_ac_var'}'`
23955 { echo "$as_me:$LINENO: result: $ac_res" >&5
23956echo "${ECHO_T}$ac_res" >&6; }
23957if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023958 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023959#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023960_ACEOF
23961
23962fi
23963done
23964
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023965{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23966echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023967if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023968 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023969else
23970 cat >conftest.$ac_ext <<_ACEOF
23971/* confdefs.h. */
23972_ACEOF
23973cat confdefs.h >>conftest.$ac_ext
23974cat >>conftest.$ac_ext <<_ACEOF
23975/* end confdefs.h. */
23976#include <math.h>
23977
23978int
23979main ()
23980{
23981#ifndef isinf
23982 (void) isinf;
23983#endif
23984
23985 ;
23986 return 0;
23987}
23988_ACEOF
23989rm -f conftest.$ac_objext
23990if { (ac_try="$ac_compile"
23991case "(($ac_try" in
23992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23993 *) ac_try_echo=$ac_try;;
23994esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023996 (eval "$ac_compile") 2>conftest.er1
23997 ac_status=$?
23998 grep -v '^ *+' conftest.er1 >conftest.err
23999 rm -f conftest.er1
24000 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024002 (exit $ac_status); } && {
24003 test -z "$ac_c_werror_flag" ||
24004 test ! -s conftest.err
24005 } && test -s conftest.$ac_objext; then
24006 ac_cv_have_decl_isinf=yes
24007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024008 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024009sed 's/^/| /' conftest.$ac_ext >&5
24010
24011 ac_cv_have_decl_isinf=no
24012fi
24013
24014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24015fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024016{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24017echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24018if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024019
24020cat >>confdefs.h <<_ACEOF
24021#define HAVE_DECL_ISINF 1
24022_ACEOF
24023
24024
24025else
24026 cat >>confdefs.h <<_ACEOF
24027#define HAVE_DECL_ISINF 0
24028_ACEOF
24029
24030
24031fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024032{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24033echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024034if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024035 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024036else
24037 cat >conftest.$ac_ext <<_ACEOF
24038/* confdefs.h. */
24039_ACEOF
24040cat confdefs.h >>conftest.$ac_ext
24041cat >>conftest.$ac_ext <<_ACEOF
24042/* end confdefs.h. */
24043#include <math.h>
24044
24045int
24046main ()
24047{
24048#ifndef isnan
24049 (void) isnan;
24050#endif
24051
24052 ;
24053 return 0;
24054}
24055_ACEOF
24056rm -f conftest.$ac_objext
24057if { (ac_try="$ac_compile"
24058case "(($ac_try" in
24059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24060 *) ac_try_echo=$ac_try;;
24061esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024063 (eval "$ac_compile") 2>conftest.er1
24064 ac_status=$?
24065 grep -v '^ *+' conftest.er1 >conftest.err
24066 rm -f conftest.er1
24067 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024069 (exit $ac_status); } && {
24070 test -z "$ac_c_werror_flag" ||
24071 test ! -s conftest.err
24072 } && test -s conftest.$ac_objext; then
24073 ac_cv_have_decl_isnan=yes
24074else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024075 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024076sed 's/^/| /' conftest.$ac_ext >&5
24077
24078 ac_cv_have_decl_isnan=no
24079fi
24080
24081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24082fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024083{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24084echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24085if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024086
24087cat >>confdefs.h <<_ACEOF
24088#define HAVE_DECL_ISNAN 1
24089_ACEOF
24090
24091
24092else
24093 cat >>confdefs.h <<_ACEOF
24094#define HAVE_DECL_ISNAN 0
24095_ACEOF
24096
24097
24098fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024099{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24100echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024101if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024102 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024103else
24104 cat >conftest.$ac_ext <<_ACEOF
24105/* confdefs.h. */
24106_ACEOF
24107cat confdefs.h >>conftest.$ac_ext
24108cat >>conftest.$ac_ext <<_ACEOF
24109/* end confdefs.h. */
24110#include <math.h>
24111
24112int
24113main ()
24114{
24115#ifndef isfinite
24116 (void) isfinite;
24117#endif
24118
24119 ;
24120 return 0;
24121}
24122_ACEOF
24123rm -f conftest.$ac_objext
24124if { (ac_try="$ac_compile"
24125case "(($ac_try" in
24126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24127 *) ac_try_echo=$ac_try;;
24128esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024130 (eval "$ac_compile") 2>conftest.er1
24131 ac_status=$?
24132 grep -v '^ *+' conftest.er1 >conftest.err
24133 rm -f conftest.er1
24134 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024136 (exit $ac_status); } && {
24137 test -z "$ac_c_werror_flag" ||
24138 test ! -s conftest.err
24139 } && test -s conftest.$ac_objext; then
24140 ac_cv_have_decl_isfinite=yes
24141else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024142 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024143sed 's/^/| /' conftest.$ac_ext >&5
24144
24145 ac_cv_have_decl_isfinite=no
24146fi
24147
24148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24149fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024150{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24151echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24152if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024153
24154cat >>confdefs.h <<_ACEOF
24155#define HAVE_DECL_ISFINITE 1
24156_ACEOF
24157
24158
24159else
24160 cat >>confdefs.h <<_ACEOF
24161#define HAVE_DECL_ISFINITE 0
24162_ACEOF
24163
24164
24165fi
24166
24167
Christian Heimes99170a52007-12-19 02:07:34 +000024168
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024169LIBS=$LIBS_SAVE
24170
Mark Dickinsona614f042009-11-28 12:48:43 +000024171# For multiprocessing module, check that sem_open
24172# actually works. For FreeBSD versions <= 7.2,
24173# the kernel module that provides POSIX semaphores
24174# isn't loaded by default, so an attempt to call
24175# sem_open results in a 'Signal 12' error.
24176{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24177echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24178if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24179 echo $ECHO_N "(cached) $ECHO_C" >&6
24180else
24181 if test "$cross_compiling" = yes; then
24182 ac_cv_posix_semaphores_enabled=yes
24183else
24184 cat >conftest.$ac_ext <<_ACEOF
24185/* confdefs.h. */
24186_ACEOF
24187cat confdefs.h >>conftest.$ac_ext
24188cat >>conftest.$ac_ext <<_ACEOF
24189/* end confdefs.h. */
24190
24191#include <unistd.h>
24192#include <fcntl.h>
24193#include <stdio.h>
24194#include <semaphore.h>
24195#include <sys/stat.h>
24196
24197int main(void) {
24198 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24199 if (a == SEM_FAILED) {
24200 perror("sem_open");
24201 return 1;
24202 }
24203 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024204 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024205 return 0;
24206}
24207
24208_ACEOF
24209rm -f conftest$ac_exeext
24210if { (ac_try="$ac_link"
24211case "(($ac_try" in
24212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24213 *) ac_try_echo=$ac_try;;
24214esac
24215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24216 (eval "$ac_link") 2>&5
24217 ac_status=$?
24218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24219 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24220 { (case "(($ac_try" in
24221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24222 *) ac_try_echo=$ac_try;;
24223esac
24224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24225 (eval "$ac_try") 2>&5
24226 ac_status=$?
24227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24228 (exit $ac_status); }; }; then
24229 ac_cv_posix_semaphores_enabled=yes
24230else
24231 echo "$as_me: program exited with status $ac_status" >&5
24232echo "$as_me: failed program was:" >&5
24233sed 's/^/| /' conftest.$ac_ext >&5
24234
24235( exit $ac_status )
24236ac_cv_posix_semaphores_enabled=no
24237fi
24238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24239fi
24240
24241
24242
24243fi
24244
24245{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24246echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24247if test $ac_cv_posix_semaphores_enabled = no
24248then
24249
24250cat >>confdefs.h <<\_ACEOF
24251#define POSIX_SEMAPHORES_NOT_ENABLED 1
24252_ACEOF
24253
24254fi
24255
Mark Dickinson10683072009-04-18 21:18:19 +000024256# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024257{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24258echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024259if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024260 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024261else
24262 if test "$cross_compiling" = yes; then
24263 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024264else
24265 cat >conftest.$ac_ext <<_ACEOF
24266/* confdefs.h. */
24267_ACEOF
24268cat confdefs.h >>conftest.$ac_ext
24269cat >>conftest.$ac_ext <<_ACEOF
24270/* end confdefs.h. */
24271
24272#include <unistd.h>
24273#include <fcntl.h>
24274#include <stdio.h>
24275#include <semaphore.h>
24276#include <sys/stat.h>
24277
24278int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024279 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024280 int count;
24281 int res;
24282 if(a==SEM_FAILED){
24283 perror("sem_open");
24284 return 1;
24285
24286 }
24287 res = sem_getvalue(a, &count);
24288 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024289 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024290 return res==-1 ? 1 : 0;
24291}
24292
Mark Dickinson10683072009-04-18 21:18:19 +000024293_ACEOF
24294rm -f conftest$ac_exeext
24295if { (ac_try="$ac_link"
24296case "(($ac_try" in
24297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24298 *) ac_try_echo=$ac_try;;
24299esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024301 (eval "$ac_link") 2>&5
24302 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024304 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24305 { (case "(($ac_try" in
24306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24307 *) ac_try_echo=$ac_try;;
24308esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024310 (eval "$ac_try") 2>&5
24311 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024313 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024314 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024315else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024316 echo "$as_me: program exited with status $ac_status" >&5
24317echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024318sed 's/^/| /' conftest.$ac_ext >&5
24319
24320( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024321ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024322fi
24323rm -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 +000024324fi
24325
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024326
24327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024328fi
24329
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024330{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24331echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024332if test $ac_cv_broken_sem_getvalue = yes
24333then
24334
24335cat >>confdefs.h <<\_ACEOF
24336#define HAVE_BROKEN_SEM_GETVALUE 1
24337_ACEOF
24338
24339fi
24340
Mark Dickinsonbd792642009-03-18 20:06:12 +000024341# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024342{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24343echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024344# Check whether --enable-big-digits was given.
24345if test "${enable_big_digits+set}" = set; then
24346 enableval=$enable_big_digits; case $enable_big_digits in
24347yes)
24348 enable_big_digits=30 ;;
24349no)
24350 enable_big_digits=15 ;;
2435115|30)
24352 ;;
24353*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024354 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24355echo "$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 +000024356 { (exit 1); exit 1; }; } ;;
24357esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024358{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24359echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024360
24361cat >>confdefs.h <<_ACEOF
24362#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24363_ACEOF
24364
24365
24366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024367 { echo "$as_me:$LINENO: result: no value specified" >&5
24368echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024369fi
24370
24371
Guido van Rossumef2255b2000-03-10 22:30:29 +000024372# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024373if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024374 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24375echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024376if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024378fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024379{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24380echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024381else
Martin v. Löwis11437992002-04-12 09:54:03 +000024382 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024383{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24384echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024385cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024386/* confdefs.h. */
24387_ACEOF
24388cat confdefs.h >>conftest.$ac_ext
24389cat >>conftest.$ac_ext <<_ACEOF
24390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024391$ac_includes_default
24392#include <wchar.h>
24393_ACEOF
24394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024395if { (ac_try="$ac_compile"
24396case "(($ac_try" in
24397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24398 *) ac_try_echo=$ac_try;;
24399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024403 grep -v '^ *+' conftest.er1 >conftest.err
24404 rm -f conftest.er1
24405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024407 (exit $ac_status); } && {
24408 test -z "$ac_c_werror_flag" ||
24409 test ! -s conftest.err
24410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024411 ac_header_compiler=yes
24412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024414sed 's/^/| /' conftest.$ac_ext >&5
24415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024416 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024418
24419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024420{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24421echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024422
24423# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024424{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24425echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024427/* confdefs.h. */
24428_ACEOF
24429cat confdefs.h >>conftest.$ac_ext
24430cat >>conftest.$ac_ext <<_ACEOF
24431/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024432#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024433_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024434if { (ac_try="$ac_cpp conftest.$ac_ext"
24435case "(($ac_try" in
24436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24437 *) ac_try_echo=$ac_try;;
24438esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024440 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024441 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024442 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024443 rm -f conftest.er1
24444 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024446 (exit $ac_status); } >/dev/null && {
24447 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24448 test ! -s conftest.err
24449 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024450 ac_header_preproc=yes
24451else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024453sed 's/^/| /' conftest.$ac_ext >&5
24454
Martin v. Löwis11437992002-04-12 09:54:03 +000024455 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024457
Martin v. Löwis11437992002-04-12 09:54:03 +000024458rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024459{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24460echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024461
24462# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024463case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24464 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024465 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24466echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24467 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24468echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024469 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024470 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024471 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024472 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24473echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24474 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24475echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24476 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24477echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24478 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24479echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24480 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24481echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24482 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24483echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024484 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024485## -------------------------------------- ##
24486## Report this to http://bugs.python.org/ ##
24487## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024488_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024489 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024490 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024491esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024492{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24493echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024494if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024495 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024496else
24497 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024498fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024499{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24500echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024501
24502fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024503if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024504
24505
24506cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024507#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024508_ACEOF
24509
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024510 wchar_h="yes"
24511
Guido van Rossumef2255b2000-03-10 22:30:29 +000024512else
Martin v. Löwis11437992002-04-12 09:54:03 +000024513 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024514
24515fi
24516
Michael W. Hudson54241132001-12-07 15:38:26 +000024517
Martin v. Löwis11437992002-04-12 09:54:03 +000024518
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024519# determine wchar_t size
24520if test "$wchar_h" = yes
24521then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024522 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24523echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24524if test "${ac_cv_type_wchar_t+set}" = set; then
24525 echo $ECHO_N "(cached) $ECHO_C" >&6
24526else
24527 cat >conftest.$ac_ext <<_ACEOF
24528/* confdefs.h. */
24529_ACEOF
24530cat confdefs.h >>conftest.$ac_ext
24531cat >>conftest.$ac_ext <<_ACEOF
24532/* end confdefs.h. */
24533#include <wchar.h>
24534
24535typedef wchar_t ac__type_new_;
24536int
24537main ()
24538{
24539if ((ac__type_new_ *) 0)
24540 return 0;
24541if (sizeof (ac__type_new_))
24542 return 0;
24543 ;
24544 return 0;
24545}
24546_ACEOF
24547rm -f conftest.$ac_objext
24548if { (ac_try="$ac_compile"
24549case "(($ac_try" in
24550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24551 *) ac_try_echo=$ac_try;;
24552esac
24553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24554 (eval "$ac_compile") 2>conftest.er1
24555 ac_status=$?
24556 grep -v '^ *+' conftest.er1 >conftest.err
24557 rm -f conftest.er1
24558 cat conftest.err >&5
24559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24560 (exit $ac_status); } && {
24561 test -z "$ac_c_werror_flag" ||
24562 test ! -s conftest.err
24563 } && test -s conftest.$ac_objext; then
24564 ac_cv_type_wchar_t=yes
24565else
24566 echo "$as_me: failed program was:" >&5
24567sed 's/^/| /' conftest.$ac_ext >&5
24568
24569 ac_cv_type_wchar_t=no
24570fi
24571
24572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24573fi
24574{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24575echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24576
24577# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024578# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24579# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24580# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024581{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24582echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024583if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024584 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024585else
Martin v. Löwis11437992002-04-12 09:54:03 +000024586 if test "$cross_compiling" = yes; then
24587 # Depending upon the size, compute the lo and hi bounds.
24588cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024589/* confdefs.h. */
24590_ACEOF
24591cat confdefs.h >>conftest.$ac_ext
24592cat >>conftest.$ac_ext <<_ACEOF
24593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024594#include <wchar.h>
24595
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024596 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024597int
24598main ()
24599{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024601test_array [0] = 0
24602
24603 ;
24604 return 0;
24605}
24606_ACEOF
24607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024608if { (ac_try="$ac_compile"
24609case "(($ac_try" in
24610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24611 *) ac_try_echo=$ac_try;;
24612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024616 grep -v '^ *+' conftest.er1 >conftest.err
24617 rm -f conftest.er1
24618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024620 (exit $ac_status); } && {
24621 test -z "$ac_c_werror_flag" ||
24622 test ! -s conftest.err
24623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024624 ac_lo=0 ac_mid=0
24625 while :; do
24626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024627/* confdefs.h. */
24628_ACEOF
24629cat confdefs.h >>conftest.$ac_ext
24630cat >>conftest.$ac_ext <<_ACEOF
24631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024632#include <wchar.h>
24633
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024634 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024635int
24636main ()
24637{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024638static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024639test_array [0] = 0
24640
24641 ;
24642 return 0;
24643}
24644_ACEOF
24645rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024646if { (ac_try="$ac_compile"
24647case "(($ac_try" in
24648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24649 *) ac_try_echo=$ac_try;;
24650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024654 grep -v '^ *+' conftest.er1 >conftest.err
24655 rm -f conftest.er1
24656 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024658 (exit $ac_status); } && {
24659 test -z "$ac_c_werror_flag" ||
24660 test ! -s conftest.err
24661 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024662 ac_hi=$ac_mid; break
24663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024665sed 's/^/| /' conftest.$ac_ext >&5
24666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024667 ac_lo=`expr $ac_mid + 1`
24668 if test $ac_lo -le $ac_mid; then
24669 ac_lo= ac_hi=
24670 break
24671 fi
24672 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024674
24675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024676 done
24677else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024679sed 's/^/| /' conftest.$ac_ext >&5
24680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024682/* confdefs.h. */
24683_ACEOF
24684cat confdefs.h >>conftest.$ac_ext
24685cat >>conftest.$ac_ext <<_ACEOF
24686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024687#include <wchar.h>
24688
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024689 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024690int
24691main ()
24692{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024694test_array [0] = 0
24695
24696 ;
24697 return 0;
24698}
24699_ACEOF
24700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024701if { (ac_try="$ac_compile"
24702case "(($ac_try" in
24703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24704 *) ac_try_echo=$ac_try;;
24705esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024709 grep -v '^ *+' conftest.er1 >conftest.err
24710 rm -f conftest.er1
24711 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024713 (exit $ac_status); } && {
24714 test -z "$ac_c_werror_flag" ||
24715 test ! -s conftest.err
24716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024717 ac_hi=-1 ac_mid=-1
24718 while :; do
24719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024720/* confdefs.h. */
24721_ACEOF
24722cat confdefs.h >>conftest.$ac_ext
24723cat >>conftest.$ac_ext <<_ACEOF
24724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024725#include <wchar.h>
24726
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024727 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024728int
24729main ()
24730{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024732test_array [0] = 0
24733
24734 ;
24735 return 0;
24736}
24737_ACEOF
24738rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024739if { (ac_try="$ac_compile"
24740case "(($ac_try" in
24741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24742 *) ac_try_echo=$ac_try;;
24743esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024747 grep -v '^ *+' conftest.er1 >conftest.err
24748 rm -f conftest.er1
24749 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024751 (exit $ac_status); } && {
24752 test -z "$ac_c_werror_flag" ||
24753 test ! -s conftest.err
24754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024755 ac_lo=$ac_mid; break
24756else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024758sed 's/^/| /' conftest.$ac_ext >&5
24759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024760 ac_hi=`expr '(' $ac_mid ')' - 1`
24761 if test $ac_mid -le $ac_hi; then
24762 ac_lo= ac_hi=
24763 break
24764 fi
24765 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024767
24768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024769 done
24770else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024772sed 's/^/| /' conftest.$ac_ext >&5
24773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024774 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024776
24777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024779
24780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024781# Binary search between lo and hi bounds.
24782while test "x$ac_lo" != "x$ac_hi"; do
24783 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024785/* confdefs.h. */
24786_ACEOF
24787cat confdefs.h >>conftest.$ac_ext
24788cat >>conftest.$ac_ext <<_ACEOF
24789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024790#include <wchar.h>
24791
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024792 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024793int
24794main ()
24795{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024797test_array [0] = 0
24798
24799 ;
24800 return 0;
24801}
24802_ACEOF
24803rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024804if { (ac_try="$ac_compile"
24805case "(($ac_try" in
24806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24807 *) ac_try_echo=$ac_try;;
24808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024812 grep -v '^ *+' conftest.er1 >conftest.err
24813 rm -f conftest.er1
24814 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024816 (exit $ac_status); } && {
24817 test -z "$ac_c_werror_flag" ||
24818 test ! -s conftest.err
24819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024820 ac_hi=$ac_mid
24821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024823sed 's/^/| /' conftest.$ac_ext >&5
24824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024825 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024827
24828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024829done
24830case $ac_lo in
24831?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024832'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024833 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024834See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024835echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024836See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024837 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024838 else
24839 ac_cv_sizeof_wchar_t=0
24840 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024841esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024842else
Martin v. Löwis11437992002-04-12 09:54:03 +000024843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024844/* confdefs.h. */
24845_ACEOF
24846cat confdefs.h >>conftest.$ac_ext
24847cat >>conftest.$ac_ext <<_ACEOF
24848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024849#include <wchar.h>
24850
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024851 typedef wchar_t ac__type_sizeof_;
24852static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24853static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024854#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024855#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024856int
24857main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024858{
Martin v. Löwis11437992002-04-12 09:54:03 +000024859
24860 FILE *f = fopen ("conftest.val", "w");
24861 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024862 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024863 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024864 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024865 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024866 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024867 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024868 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024869 }
24870 else
24871 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024872 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024873 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024874 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024875 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024876 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024877 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024878
24879 ;
24880 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024881}
Martin v. Löwis11437992002-04-12 09:54:03 +000024882_ACEOF
24883rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024884if { (ac_try="$ac_link"
24885case "(($ac_try" in
24886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24887 *) ac_try_echo=$ac_try;;
24888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024890 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024891 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024894 { (case "(($ac_try" in
24895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24896 *) ac_try_echo=$ac_try;;
24897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024899 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024900 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024902 (exit $ac_status); }; }; then
24903 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024904else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024905 echo "$as_me: program exited with status $ac_status" >&5
24906echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024907sed 's/^/| /' conftest.$ac_ext >&5
24908
Martin v. Löwis11437992002-04-12 09:54:03 +000024909( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024910if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024911 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024912See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024913echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024914See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024915 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024916 else
24917 ac_cv_sizeof_wchar_t=0
24918 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024920rm -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 +000024921fi
24922rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024923fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024924{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24925echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024926
24927
24928
Martin v. Löwis11437992002-04-12 09:54:03 +000024929cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024930#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024931_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024932
Michael W. Hudson54241132001-12-07 15:38:26 +000024933
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024934fi
24935
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024936{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24937echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024938have_ucs4_tcl=no
24939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024940/* confdefs.h. */
24941_ACEOF
24942cat confdefs.h >>conftest.$ac_ext
24943cat >>conftest.$ac_ext <<_ACEOF
24944/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024945
24946#include <tcl.h>
24947#if TCL_UTF_MAX != 6
24948# error "NOT UCS4_TCL"
24949#endif
24950int
24951main ()
24952{
24953
24954 ;
24955 return 0;
24956}
24957_ACEOF
24958rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024959if { (ac_try="$ac_compile"
24960case "(($ac_try" in
24961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24962 *) ac_try_echo=$ac_try;;
24963esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024967 grep -v '^ *+' conftest.er1 >conftest.err
24968 rm -f conftest.er1
24969 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024971 (exit $ac_status); } && {
24972 test -z "$ac_c_werror_flag" ||
24973 test ! -s conftest.err
24974 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024975
24976
24977cat >>confdefs.h <<\_ACEOF
24978#define HAVE_UCS4_TCL 1
24979_ACEOF
24980
24981 have_ucs4_tcl=yes
24982
24983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024985sed 's/^/| /' conftest.$ac_ext >&5
24986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024987
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024989
24990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024991{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24992echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024993
Skip Montanaro6dead952003-09-25 14:50:04 +000024994# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024995if test "$wchar_h" = yes
24996then
24997 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024998 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24999echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025000 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025001 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025002else
25003
25004 if test "$cross_compiling" = yes; then
25005 ac_cv_wchar_t_signed=yes
25006else
25007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025008/* confdefs.h. */
25009_ACEOF
25010cat confdefs.h >>conftest.$ac_ext
25011cat >>conftest.$ac_ext <<_ACEOF
25012/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025013
25014 #include <wchar.h>
25015 int main()
25016 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000025017 /* Success: exit code 0 */
25018 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025019 }
25020
25021_ACEOF
25022rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025023if { (ac_try="$ac_link"
25024case "(($ac_try" in
25025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25026 *) ac_try_echo=$ac_try;;
25027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025029 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025030 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025033 { (case "(($ac_try" in
25034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25035 *) ac_try_echo=$ac_try;;
25036esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025038 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025039 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025041 (exit $ac_status); }; }; then
25042 ac_cv_wchar_t_signed=yes
25043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025044 echo "$as_me: program exited with status $ac_status" >&5
25045echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025046sed 's/^/| /' conftest.$ac_ext >&5
25047
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025048( exit $ac_status )
25049ac_cv_wchar_t_signed=no
25050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025051rm -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 +000025052fi
25053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025054
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025055fi
25056
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025057 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25058echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025059fi
25060
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025061{ echo "$as_me:$LINENO: checking what type to use for str" >&5
25062echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025063
25064# Check whether --with-wide-unicode was given.
25065if test "${with_wide_unicode+set}" = set; then
25066 withval=$with_wide_unicode;
25067if test "$withval" != no
25068then unicode_size="4"
25069else unicode_size="2"
25070fi
25071
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025072else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025073
Georg Brandl52d168a2008-01-07 18:10:24 +000025074case "$have_ucs4_tcl" in
25075 yes) unicode_size="4" ;;
25076 *) unicode_size="2" ;;
25077esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025078
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025079fi
25080
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025081
25082
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025083
Georg Brandl52d168a2008-01-07 18:10:24 +000025084case "$unicode_size" in
25085 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025086#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025087_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025088 ;;
25089 *) cat >>confdefs.h <<\_ACEOF
25090#define Py_UNICODE_SIZE 2
25091_ACEOF
25092 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025093esac
25094
Michael W. Hudson54241132001-12-07 15:38:26 +000025095
Martin v. Löwis11437992002-04-12 09:54:03 +000025096
25097
Georg Brandl52d168a2008-01-07 18:10:24 +000025098# wchar_t is only usable if it maps to an unsigned type
25099if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025100 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025101then
25102 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025103
Martin v. Löwis11437992002-04-12 09:54:03 +000025104cat >>confdefs.h <<\_ACEOF
25105#define HAVE_USABLE_WCHAR_T 1
25106_ACEOF
25107
Georg Brandl52d168a2008-01-07 18:10:24 +000025108 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025109#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025110_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025111
Georg Brandl52d168a2008-01-07 18:10:24 +000025112elif test "$ac_cv_sizeof_short" = "$unicode_size"
25113then
25114 PY_UNICODE_TYPE="unsigned short"
25115 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025116#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025117_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025118
Georg Brandl52d168a2008-01-07 18:10:24 +000025119elif test "$ac_cv_sizeof_long" = "$unicode_size"
25120then
25121 PY_UNICODE_TYPE="unsigned long"
25122 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025123#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025124_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025125
Georg Brandl52d168a2008-01-07 18:10:24 +000025126else
25127 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025128fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025129{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25130echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025131
25132# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025133{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25134echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025135if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025136 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025137else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025138 # See if sys/param.h defines the BYTE_ORDER macro.
25139cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025140/* confdefs.h. */
25141_ACEOF
25142cat confdefs.h >>conftest.$ac_ext
25143cat >>conftest.$ac_ext <<_ACEOF
25144/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025145#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025146#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025147
Martin v. Löwis11437992002-04-12 09:54:03 +000025148int
25149main ()
25150{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025151#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25152 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25153 bogus endian macros
25154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025155
25156 ;
25157 return 0;
25158}
25159_ACEOF
25160rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025161if { (ac_try="$ac_compile"
25162case "(($ac_try" in
25163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25164 *) ac_try_echo=$ac_try;;
25165esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025169 grep -v '^ *+' conftest.er1 >conftest.err
25170 rm -f conftest.er1
25171 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025173 (exit $ac_status); } && {
25174 test -z "$ac_c_werror_flag" ||
25175 test ! -s conftest.err
25176 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025177 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025178cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025179/* confdefs.h. */
25180_ACEOF
25181cat confdefs.h >>conftest.$ac_ext
25182cat >>conftest.$ac_ext <<_ACEOF
25183/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025184#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025185#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025186
Martin v. Löwis11437992002-04-12 09:54:03 +000025187int
25188main ()
25189{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025190#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025191 not big endian
25192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025193
25194 ;
25195 return 0;
25196}
25197_ACEOF
25198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025199if { (ac_try="$ac_compile"
25200case "(($ac_try" in
25201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25202 *) ac_try_echo=$ac_try;;
25203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025207 grep -v '^ *+' conftest.er1 >conftest.err
25208 rm -f conftest.er1
25209 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025211 (exit $ac_status); } && {
25212 test -z "$ac_c_werror_flag" ||
25213 test ! -s conftest.err
25214 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025215 ac_cv_c_bigendian=yes
25216else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025218sed 's/^/| /' conftest.$ac_ext >&5
25219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025220 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025222
25223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025224else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025226sed 's/^/| /' conftest.$ac_ext >&5
25227
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025228 # It does not; compile a test program.
25229if test "$cross_compiling" = yes; then
25230 # try to guess the endianness by grepping values into an object file
25231 ac_cv_c_bigendian=unknown
25232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025233/* confdefs.h. */
25234_ACEOF
25235cat confdefs.h >>conftest.$ac_ext
25236cat >>conftest.$ac_ext <<_ACEOF
25237/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025238short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25239short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25240void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25241short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25242short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25243void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025244int
25245main ()
25246{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025247 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025248 ;
25249 return 0;
25250}
25251_ACEOF
25252rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025253if { (ac_try="$ac_compile"
25254case "(($ac_try" in
25255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25256 *) ac_try_echo=$ac_try;;
25257esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025261 grep -v '^ *+' conftest.er1 >conftest.err
25262 rm -f conftest.er1
25263 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025265 (exit $ac_status); } && {
25266 test -z "$ac_c_werror_flag" ||
25267 test ! -s conftest.err
25268 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025269 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025271fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025272if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25273 if test "$ac_cv_c_bigendian" = unknown; then
25274 ac_cv_c_bigendian=no
25275 else
25276 # finding both strings is unlikely to happen, but who knows?
25277 ac_cv_c_bigendian=unknown
25278 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025279fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025280else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025282sed 's/^/| /' conftest.$ac_ext >&5
25283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025284
Martin v. Löwis11437992002-04-12 09:54:03 +000025285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025286
25287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025288else
25289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025290/* confdefs.h. */
25291_ACEOF
25292cat confdefs.h >>conftest.$ac_ext
25293cat >>conftest.$ac_ext <<_ACEOF
25294/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025295$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025296int
25297main ()
25298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025300 /* Are we little or big endian? From Harbison&Steele. */
25301 union
25302 {
25303 long int l;
25304 char c[sizeof (long int)];
25305 } u;
25306 u.l = 1;
25307 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025308
25309 ;
25310 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025311}
Martin v. Löwis11437992002-04-12 09:54:03 +000025312_ACEOF
25313rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025314if { (ac_try="$ac_link"
25315case "(($ac_try" in
25316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25317 *) ac_try_echo=$ac_try;;
25318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025320 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025321 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025324 { (case "(($ac_try" in
25325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25326 *) ac_try_echo=$ac_try;;
25327esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025329 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025330 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025332 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025333 ac_cv_c_bigendian=no
25334else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025335 echo "$as_me: program exited with status $ac_status" >&5
25336echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025337sed 's/^/| /' conftest.$ac_ext >&5
25338
Martin v. Löwis11437992002-04-12 09:54:03 +000025339( exit $ac_status )
25340ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025342rm -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 +000025343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025344
25345
Martin v. Löwis11437992002-04-12 09:54:03 +000025346fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025347
25348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25349fi
25350{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25351echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25352case $ac_cv_c_bigendian in
25353 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025354
25355cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025356#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025357_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025358 ;;
25359 no)
25360 ;;
25361 *)
25362 { { echo "$as_me:$LINENO: error: unknown endianness
25363presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25364echo "$as_me: error: unknown endianness
25365presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025366 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025367esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025368
Michael W. Hudson54241132001-12-07 15:38:26 +000025369
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025370# Check whether right shifting a negative integer extends the sign bit
25371# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025372{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25373echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025374if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025375 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025376else
Martin v. Löwis11437992002-04-12 09:54:03 +000025377
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025378if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025379 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025380else
Martin v. Löwis11437992002-04-12 09:54:03 +000025381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025382/* confdefs.h. */
25383_ACEOF
25384cat confdefs.h >>conftest.$ac_ext
25385cat >>conftest.$ac_ext <<_ACEOF
25386/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025387
25388int main()
25389{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025390 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025391}
25392
Martin v. Löwis11437992002-04-12 09:54:03 +000025393_ACEOF
25394rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025395if { (ac_try="$ac_link"
25396case "(($ac_try" in
25397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25398 *) ac_try_echo=$ac_try;;
25399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025401 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025402 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025404 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025405 { (case "(($ac_try" in
25406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25407 *) ac_try_echo=$ac_try;;
25408esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025410 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025411 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025413 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025414 ac_cv_rshift_extends_sign=yes
25415else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025416 echo "$as_me: program exited with status $ac_status" >&5
25417echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025418sed 's/^/| /' conftest.$ac_ext >&5
25419
Martin v. Löwis11437992002-04-12 09:54:03 +000025420( exit $ac_status )
25421ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025423rm -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 +000025424fi
25425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025426
25427fi
25428
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025429{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25430echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025431if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025432then
Martin v. Löwis11437992002-04-12 09:54:03 +000025433
25434cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025435#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025436_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025437
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025438fi
25439
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025440# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025441{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25442echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025443if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025444 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025445else
Martin v. Löwis11437992002-04-12 09:54:03 +000025446
25447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025448/* confdefs.h. */
25449_ACEOF
25450cat confdefs.h >>conftest.$ac_ext
25451cat >>conftest.$ac_ext <<_ACEOF
25452/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025453#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025454int
25455main ()
25456{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025457
25458 FILE *f = fopen("/dev/null", "r");
25459 flockfile(f);
25460 getc_unlocked(f);
25461 funlockfile(f);
25462
Martin v. Löwis11437992002-04-12 09:54:03 +000025463 ;
25464 return 0;
25465}
25466_ACEOF
25467rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025468if { (ac_try="$ac_link"
25469case "(($ac_try" in
25470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25471 *) ac_try_echo=$ac_try;;
25472esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025474 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025476 grep -v '^ *+' conftest.er1 >conftest.err
25477 rm -f conftest.er1
25478 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025480 (exit $ac_status); } && {
25481 test -z "$ac_c_werror_flag" ||
25482 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025483 } && test -s conftest$ac_exeext &&
25484 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025485 ac_cv_have_getc_unlocked=yes
25486else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025488sed 's/^/| /' conftest.$ac_ext >&5
25489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025490 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025492
25493rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025494 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025495fi
25496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025497{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25498echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025499if test "$ac_cv_have_getc_unlocked" = yes
25500then
Martin v. Löwis11437992002-04-12 09:54:03 +000025501
25502cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025503#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025504_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025505
25506fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025507
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025508# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025509# save the value of LIBS so we don't actually link Python with readline
25510LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025511
Gregory P. Smith18820942008-09-07 06:24:49 +000025512# On some systems we need to link readline to a termcap compatible
25513# library. NOTE: Keep the precedence of listed libraries synchronised
25514# with setup.py.
25515py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025516{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25517echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025518for py_libtermcap in "" ncursesw ncurses curses termcap; do
25519 if test -z "$py_libtermcap"; then
25520 READLINE_LIBS="-lreadline"
25521 else
25522 READLINE_LIBS="-lreadline -l$py_libtermcap"
25523 fi
25524 LIBS="$READLINE_LIBS $LIBS_no_readline"
25525 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025526/* confdefs.h. */
25527_ACEOF
25528cat confdefs.h >>conftest.$ac_ext
25529cat >>conftest.$ac_ext <<_ACEOF
25530/* end confdefs.h. */
25531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025532/* Override any GCC internal prototype to avoid an error.
25533 Use char because int might match the return type of a GCC
25534 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025535#ifdef __cplusplus
25536extern "C"
25537#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025538char readline ();
25539int
25540main ()
25541{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025542return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025543 ;
25544 return 0;
25545}
25546_ACEOF
25547rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025548if { (ac_try="$ac_link"
25549case "(($ac_try" in
25550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25551 *) ac_try_echo=$ac_try;;
25552esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025554 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025555 ac_status=$?
25556 grep -v '^ *+' conftest.er1 >conftest.err
25557 rm -f conftest.er1
25558 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025560 (exit $ac_status); } && {
25561 test -z "$ac_c_werror_flag" ||
25562 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025563 } && test -s conftest$ac_exeext &&
25564 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025565 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025566else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025567 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025568sed 's/^/| /' conftest.$ac_ext >&5
25569
Gregory P. Smith18820942008-09-07 06:24:49 +000025570
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025572
25573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025574 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025575 if test $py_cv_lib_readline = yes; then
25576 break
25577 fi
25578done
25579# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25580#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025581if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025582 { echo "$as_me:$LINENO: result: none" >&5
25583echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025585 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25586echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025587
25588cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025589#define HAVE_LIBREADLINE 1
25590_ACEOF
25591
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025592fi
25593
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025594# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025595{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25596echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025597if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025598 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025599else
25600 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025601LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025602cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025603/* confdefs.h. */
25604_ACEOF
25605cat confdefs.h >>conftest.$ac_ext
25606cat >>conftest.$ac_ext <<_ACEOF
25607/* end confdefs.h. */
25608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025609/* Override any GCC internal prototype to avoid an error.
25610 Use char because int might match the return type of a GCC
25611 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025612#ifdef __cplusplus
25613extern "C"
25614#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025615char rl_callback_handler_install ();
25616int
25617main ()
25618{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025619return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025620 ;
25621 return 0;
25622}
25623_ACEOF
25624rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025625if { (ac_try="$ac_link"
25626case "(($ac_try" in
25627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25628 *) ac_try_echo=$ac_try;;
25629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025631 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025633 grep -v '^ *+' conftest.er1 >conftest.err
25634 rm -f conftest.er1
25635 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025637 (exit $ac_status); } && {
25638 test -z "$ac_c_werror_flag" ||
25639 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025640 } && test -s conftest$ac_exeext &&
25641 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025642 ac_cv_lib_readline_rl_callback_handler_install=yes
25643else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025644 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025645sed 's/^/| /' conftest.$ac_ext >&5
25646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025647 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025649
25650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025651 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025652LIBS=$ac_check_lib_save_LIBS
25653fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025654{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25655echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25656if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025657
25658cat >>confdefs.h <<\_ACEOF
25659#define HAVE_RL_CALLBACK 1
25660_ACEOF
25661
25662fi
25663
25664
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025665# check for readline 2.2
25666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025667/* confdefs.h. */
25668_ACEOF
25669cat confdefs.h >>conftest.$ac_ext
25670cat >>conftest.$ac_ext <<_ACEOF
25671/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025672#include <readline/readline.h>
25673_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025674if { (ac_try="$ac_cpp conftest.$ac_ext"
25675case "(($ac_try" in
25676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25677 *) ac_try_echo=$ac_try;;
25678esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025681 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025682 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025683 rm -f conftest.er1
25684 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025686 (exit $ac_status); } >/dev/null && {
25687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25688 test ! -s conftest.err
25689 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025690 have_readline=yes
25691else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025693sed 's/^/| /' conftest.$ac_ext >&5
25694
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025695 have_readline=no
25696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025697
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025698rm -f conftest.err conftest.$ac_ext
25699if test $have_readline = yes
25700then
25701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025702/* confdefs.h. */
25703_ACEOF
25704cat confdefs.h >>conftest.$ac_ext
25705cat >>conftest.$ac_ext <<_ACEOF
25706/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025707#include <readline/readline.h>
25708
25709_ACEOF
25710if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025711 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025712
25713cat >>confdefs.h <<\_ACEOF
25714#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25715_ACEOF
25716
25717fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025718rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025719
Antoine Pitroud5131772009-10-26 19:22:14 +000025720 cat >conftest.$ac_ext <<_ACEOF
25721/* confdefs.h. */
25722_ACEOF
25723cat confdefs.h >>conftest.$ac_ext
25724cat >>conftest.$ac_ext <<_ACEOF
25725/* end confdefs.h. */
25726#include <readline/readline.h>
25727
25728_ACEOF
25729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25730 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25731
25732cat >>confdefs.h <<\_ACEOF
25733#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25734_ACEOF
25735
25736fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025737rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025738
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025739fi
25740
Martin v. Löwis0daad592001-09-30 21:09:59 +000025741# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025742{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25743echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025744if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025746else
Martin v. Löwis11437992002-04-12 09:54:03 +000025747 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025748LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025750/* confdefs.h. */
25751_ACEOF
25752cat confdefs.h >>conftest.$ac_ext
25753cat >>conftest.$ac_ext <<_ACEOF
25754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025756/* Override any GCC internal prototype to avoid an error.
25757 Use char because int might match the return type of a GCC
25758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025759#ifdef __cplusplus
25760extern "C"
25761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025762char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025763int
25764main ()
25765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025766return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025767 ;
25768 return 0;
25769}
25770_ACEOF
25771rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025772if { (ac_try="$ac_link"
25773case "(($ac_try" in
25774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25775 *) ac_try_echo=$ac_try;;
25776esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025778 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025780 grep -v '^ *+' conftest.er1 >conftest.err
25781 rm -f conftest.er1
25782 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025784 (exit $ac_status); } && {
25785 test -z "$ac_c_werror_flag" ||
25786 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025787 } && test -s conftest$ac_exeext &&
25788 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025789 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025790else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025792sed 's/^/| /' conftest.$ac_ext >&5
25793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025794 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025796
25797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025799LIBS=$ac_check_lib_save_LIBS
25800fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025801{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25802echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25803if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025804
Martin v. Löwis11437992002-04-12 09:54:03 +000025805cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025806#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025807_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025808
Martin v. Löwis0daad592001-09-30 21:09:59 +000025809fi
25810
Michael W. Hudson54241132001-12-07 15:38:26 +000025811
Thomas Wouters89d996e2007-09-08 17:39:28 +000025812# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025813{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25814echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025815if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025816 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025817else
25818 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025819LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025820cat >conftest.$ac_ext <<_ACEOF
25821/* confdefs.h. */
25822_ACEOF
25823cat confdefs.h >>conftest.$ac_ext
25824cat >>conftest.$ac_ext <<_ACEOF
25825/* end confdefs.h. */
25826
25827/* Override any GCC internal prototype to avoid an error.
25828 Use char because int might match the return type of a GCC
25829 builtin and then its argument prototype would still apply. */
25830#ifdef __cplusplus
25831extern "C"
25832#endif
25833char rl_completion_display_matches_hook ();
25834int
25835main ()
25836{
25837return rl_completion_display_matches_hook ();
25838 ;
25839 return 0;
25840}
25841_ACEOF
25842rm -f conftest.$ac_objext conftest$ac_exeext
25843if { (ac_try="$ac_link"
25844case "(($ac_try" in
25845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25846 *) ac_try_echo=$ac_try;;
25847esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025849 (eval "$ac_link") 2>conftest.er1
25850 ac_status=$?
25851 grep -v '^ *+' conftest.er1 >conftest.err
25852 rm -f conftest.er1
25853 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025855 (exit $ac_status); } && {
25856 test -z "$ac_c_werror_flag" ||
25857 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025858 } && test -s conftest$ac_exeext &&
25859 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025860 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25861else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025862 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025863sed 's/^/| /' conftest.$ac_ext >&5
25864
25865 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25866fi
25867
25868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25869 conftest$ac_exeext conftest.$ac_ext
25870LIBS=$ac_check_lib_save_LIBS
25871fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025872{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25873echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25874if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025875
25876cat >>confdefs.h <<\_ACEOF
25877#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25878_ACEOF
25879
25880fi
25881
25882
Martin v. Löwis0daad592001-09-30 21:09:59 +000025883# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025884{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25885echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025886if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025888else
Martin v. Löwis11437992002-04-12 09:54:03 +000025889 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025890LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025892/* confdefs.h. */
25893_ACEOF
25894cat confdefs.h >>conftest.$ac_ext
25895cat >>conftest.$ac_ext <<_ACEOF
25896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025898/* Override any GCC internal prototype to avoid an error.
25899 Use char because int might match the return type of a GCC
25900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025901#ifdef __cplusplus
25902extern "C"
25903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025904char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025905int
25906main ()
25907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025908return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025909 ;
25910 return 0;
25911}
25912_ACEOF
25913rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025914if { (ac_try="$ac_link"
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_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +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
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025929 } && test -s conftest$ac_exeext &&
25930 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025931 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025932else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025934sed 's/^/| /' conftest.$ac_ext >&5
25935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025936 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025938
25939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025940 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025941LIBS=$ac_check_lib_save_LIBS
25942fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025943{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25944echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25945if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025946
Martin v. Löwis11437992002-04-12 09:54:03 +000025947cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025948#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025949_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025950
Guido van Rossum353ae582001-07-10 16:45:32 +000025951fi
25952
Jack Jansendd19cf82001-12-06 22:36:17 +000025953
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025954# also in readline 4.2
25955cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025956/* confdefs.h. */
25957_ACEOF
25958cat confdefs.h >>conftest.$ac_ext
25959cat >>conftest.$ac_ext <<_ACEOF
25960/* end confdefs.h. */
25961#include <readline/readline.h>
25962_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025963if { (ac_try="$ac_cpp conftest.$ac_ext"
25964case "(($ac_try" in
25965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25966 *) ac_try_echo=$ac_try;;
25967esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025969 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025970 ac_status=$?
25971 grep -v '^ *+' conftest.er1 >conftest.err
25972 rm -f conftest.er1
25973 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025975 (exit $ac_status); } >/dev/null && {
25976 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25977 test ! -s conftest.err
25978 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025979 have_readline=yes
25980else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025981 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025982sed 's/^/| /' conftest.$ac_ext >&5
25983
25984 have_readline=no
25985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025986
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025987rm -f conftest.err conftest.$ac_ext
25988if test $have_readline = yes
25989then
25990 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025991/* confdefs.h. */
25992_ACEOF
25993cat confdefs.h >>conftest.$ac_ext
25994cat >>conftest.$ac_ext <<_ACEOF
25995/* end confdefs.h. */
25996#include <readline/readline.h>
25997
25998_ACEOF
25999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26000 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26001
26002cat >>confdefs.h <<\_ACEOF
26003#define HAVE_RL_CATCH_SIGNAL 1
26004_ACEOF
26005
26006fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000026007rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026008
26009fi
26010
Martin v. Löwis82bca632006-02-10 20:49:30 +000026011# End of readline checks: restore LIBS
26012LIBS=$LIBS_no_readline
26013
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026014{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26015echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026016if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026017 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026018else
Martin v. Löwis11437992002-04-12 09:54:03 +000026019
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026020if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026021 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026022else
Martin v. Löwis11437992002-04-12 09:54:03 +000026023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026024/* confdefs.h. */
26025_ACEOF
26026cat confdefs.h >>conftest.$ac_ext
26027cat >>conftest.$ac_ext <<_ACEOF
26028/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026029
26030int main()
26031{
26032 int val1 = nice(1);
26033 if (val1 != -1 && val1 == nice(2))
26034 exit(0);
26035 exit(1);
26036}
26037
Martin v. Löwis11437992002-04-12 09:54:03 +000026038_ACEOF
26039rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026040if { (ac_try="$ac_link"
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_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026047 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026050 { (case "(($ac_try" in
26051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26052 *) ac_try_echo=$ac_try;;
26053esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026055 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026056 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026058 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026059 ac_cv_broken_nice=yes
26060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026061 echo "$as_me: program exited with status $ac_status" >&5
26062echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026063sed 's/^/| /' conftest.$ac_ext >&5
26064
Martin v. Löwis11437992002-04-12 09:54:03 +000026065( exit $ac_status )
26066ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026068rm -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 +000026069fi
26070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026071
26072fi
26073
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026074{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26075echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026076if test "$ac_cv_broken_nice" = yes
26077then
Martin v. Löwis11437992002-04-12 09:54:03 +000026078
26079cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026080#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026081_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026082
26083fi
26084
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026085{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26086echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026087if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026088 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026089else
26090 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026091 ac_cv_broken_poll=no
26092else
26093 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026094/* confdefs.h. */
26095_ACEOF
26096cat confdefs.h >>conftest.$ac_ext
26097cat >>conftest.$ac_ext <<_ACEOF
26098/* end confdefs.h. */
26099
26100#include <poll.h>
26101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026102int main()
26103{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026104 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026105 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026106
26107 close (42);
26108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026109 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026110 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026111 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026112 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026113 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026114 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026115 return 1;
26116}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026117
26118_ACEOF
26119rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026120if { (ac_try="$ac_link"
26121case "(($ac_try" in
26122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26123 *) ac_try_echo=$ac_try;;
26124esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026126 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026127 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026130 { (case "(($ac_try" in
26131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26132 *) ac_try_echo=$ac_try;;
26133esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026135 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026136 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026138 (exit $ac_status); }; }; then
26139 ac_cv_broken_poll=yes
26140else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026141 echo "$as_me: program exited with status $ac_status" >&5
26142echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026143sed 's/^/| /' conftest.$ac_ext >&5
26144
26145( exit $ac_status )
26146ac_cv_broken_poll=no
26147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026148rm -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 +000026149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026150
26151
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026152fi
26153
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026154{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26155echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026156if test "$ac_cv_broken_poll" = yes
26157then
26158
26159cat >>confdefs.h <<\_ACEOF
26160#define HAVE_BROKEN_POLL 1
26161_ACEOF
26162
26163fi
26164
Brett Cannon43802422005-02-10 20:48:03 +000026165# 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 +000026166# (which is not required by ISO C or UNIX spec) and/or if we support
26167# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026168{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26169echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026170if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026171 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026172else
26173 cat >conftest.$ac_ext <<_ACEOF
26174/* confdefs.h. */
26175_ACEOF
26176cat confdefs.h >>conftest.$ac_ext
26177cat >>conftest.$ac_ext <<_ACEOF
26178/* end confdefs.h. */
26179#include <sys/types.h>
26180#include <$ac_cv_struct_tm>
26181
26182
26183int
26184main ()
26185{
26186static struct tm ac_aggr;
26187if (ac_aggr.tm_zone)
26188return 0;
26189 ;
26190 return 0;
26191}
26192_ACEOF
26193rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026194if { (ac_try="$ac_compile"
26195case "(($ac_try" in
26196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26197 *) ac_try_echo=$ac_try;;
26198esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026200 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026201 ac_status=$?
26202 grep -v '^ *+' conftest.er1 >conftest.err
26203 rm -f conftest.er1
26204 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026206 (exit $ac_status); } && {
26207 test -z "$ac_c_werror_flag" ||
26208 test ! -s conftest.err
26209 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026210 ac_cv_member_struct_tm_tm_zone=yes
26211else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026212 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026213sed 's/^/| /' conftest.$ac_ext >&5
26214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026215 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026216/* confdefs.h. */
26217_ACEOF
26218cat confdefs.h >>conftest.$ac_ext
26219cat >>conftest.$ac_ext <<_ACEOF
26220/* end confdefs.h. */
26221#include <sys/types.h>
26222#include <$ac_cv_struct_tm>
26223
26224
26225int
26226main ()
26227{
26228static struct tm ac_aggr;
26229if (sizeof ac_aggr.tm_zone)
26230return 0;
26231 ;
26232 return 0;
26233}
26234_ACEOF
26235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026236if { (ac_try="$ac_compile"
26237case "(($ac_try" in
26238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26239 *) ac_try_echo=$ac_try;;
26240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026242 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026243 ac_status=$?
26244 grep -v '^ *+' conftest.er1 >conftest.err
26245 rm -f conftest.er1
26246 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026248 (exit $ac_status); } && {
26249 test -z "$ac_c_werror_flag" ||
26250 test ! -s conftest.err
26251 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026252 ac_cv_member_struct_tm_tm_zone=yes
26253else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026254 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026255sed 's/^/| /' conftest.$ac_ext >&5
26256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026257 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026259
26260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026262
26263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026264fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026265{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26266echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26267if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026268
26269cat >>confdefs.h <<_ACEOF
26270#define HAVE_STRUCT_TM_TM_ZONE 1
26271_ACEOF
26272
26273
26274fi
26275
26276if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26277
26278cat >>confdefs.h <<\_ACEOF
26279#define HAVE_TM_ZONE 1
26280_ACEOF
26281
26282else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026283 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26284echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026285if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026286 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026287else
26288 cat >conftest.$ac_ext <<_ACEOF
26289/* confdefs.h. */
26290_ACEOF
26291cat confdefs.h >>conftest.$ac_ext
26292cat >>conftest.$ac_ext <<_ACEOF
26293/* end confdefs.h. */
26294#include <time.h>
26295
26296int
26297main ()
26298{
26299#ifndef tzname
26300 (void) tzname;
26301#endif
26302
26303 ;
26304 return 0;
26305}
26306_ACEOF
26307rm -f conftest.$ac_objext
26308if { (ac_try="$ac_compile"
26309case "(($ac_try" in
26310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26311 *) ac_try_echo=$ac_try;;
26312esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026314 (eval "$ac_compile") 2>conftest.er1
26315 ac_status=$?
26316 grep -v '^ *+' conftest.er1 >conftest.err
26317 rm -f conftest.er1
26318 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026320 (exit $ac_status); } && {
26321 test -z "$ac_c_werror_flag" ||
26322 test ! -s conftest.err
26323 } && test -s conftest.$ac_objext; then
26324 ac_cv_have_decl_tzname=yes
26325else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026326 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026327sed 's/^/| /' conftest.$ac_ext >&5
26328
26329 ac_cv_have_decl_tzname=no
26330fi
26331
26332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26333fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026334{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26335echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26336if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026337
26338cat >>confdefs.h <<_ACEOF
26339#define HAVE_DECL_TZNAME 1
26340_ACEOF
26341
26342
26343else
26344 cat >>confdefs.h <<_ACEOF
26345#define HAVE_DECL_TZNAME 0
26346_ACEOF
26347
26348
26349fi
26350
26351
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026352 { echo "$as_me:$LINENO: checking for tzname" >&5
26353echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026354if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026355 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026356else
26357 cat >conftest.$ac_ext <<_ACEOF
26358/* confdefs.h. */
26359_ACEOF
26360cat confdefs.h >>conftest.$ac_ext
26361cat >>conftest.$ac_ext <<_ACEOF
26362/* end confdefs.h. */
26363#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026364#if !HAVE_DECL_TZNAME
26365extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026366#endif
26367
26368int
26369main ()
26370{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026371return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026372 ;
26373 return 0;
26374}
26375_ACEOF
26376rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026377if { (ac_try="$ac_link"
26378case "(($ac_try" in
26379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26380 *) ac_try_echo=$ac_try;;
26381esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026383 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026384 ac_status=$?
26385 grep -v '^ *+' conftest.er1 >conftest.err
26386 rm -f conftest.er1
26387 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026389 (exit $ac_status); } && {
26390 test -z "$ac_c_werror_flag" ||
26391 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026392 } && test -s conftest$ac_exeext &&
26393 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026394 ac_cv_var_tzname=yes
26395else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026396 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026397sed 's/^/| /' conftest.$ac_ext >&5
26398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026399 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026401
26402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026403 conftest$ac_exeext conftest.$ac_ext
26404fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026405{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26406echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026407 if test $ac_cv_var_tzname = yes; then
26408
26409cat >>confdefs.h <<\_ACEOF
26410#define HAVE_TZNAME 1
26411_ACEOF
26412
26413 fi
26414fi
26415
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026416
Martin v. Löwis1d459062005-03-14 21:23:33 +000026417# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026418{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26419echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026420if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026422else
26423
26424if test "$cross_compiling" = yes; then
26425 ac_cv_working_tzset=no
26426else
26427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026428/* confdefs.h. */
26429_ACEOF
26430cat confdefs.h >>conftest.$ac_ext
26431cat >>conftest.$ac_ext <<_ACEOF
26432/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026433
26434#include <stdlib.h>
26435#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026436#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026437
26438#if HAVE_TZNAME
26439extern char *tzname[];
26440#endif
26441
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026442int main()
26443{
Brett Cannon18367812003-09-19 00:59:16 +000026444 /* Note that we need to ensure that not only does tzset(3)
26445 do 'something' with localtime, but it works as documented
26446 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026447 This includes making sure that tzname is set properly if
26448 tm->tm_zone does not exist since it is the alternative way
26449 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026450
26451 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026452 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026453 */
26454
Martin v. Löwis1d459062005-03-14 21:23:33 +000026455 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026456 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26457
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026458 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026459 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026460 if (localtime(&groundhogday)->tm_hour != 0)
26461 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026462#if HAVE_TZNAME
26463 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26464 if (strcmp(tzname[0], "UTC") ||
26465 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26466 exit(1);
26467#endif
Brett Cannon18367812003-09-19 00:59:16 +000026468
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026469 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026470 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026471 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026472 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026473#if HAVE_TZNAME
26474 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26475 exit(1);
26476#endif
Brett Cannon18367812003-09-19 00:59:16 +000026477
26478 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26479 tzset();
26480 if (localtime(&groundhogday)->tm_hour != 11)
26481 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026482#if HAVE_TZNAME
26483 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26484 exit(1);
26485#endif
26486
26487#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026488 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26489 exit(1);
26490 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26491 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026492#endif
Brett Cannon18367812003-09-19 00:59:16 +000026493
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026494 exit(0);
26495}
26496
26497_ACEOF
26498rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026499if { (ac_try="$ac_link"
26500case "(($ac_try" in
26501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26502 *) ac_try_echo=$ac_try;;
26503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026505 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026506 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026509 { (case "(($ac_try" in
26510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26511 *) ac_try_echo=$ac_try;;
26512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026514 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026515 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026517 (exit $ac_status); }; }; then
26518 ac_cv_working_tzset=yes
26519else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026520 echo "$as_me: program exited with status $ac_status" >&5
26521echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026522sed 's/^/| /' conftest.$ac_ext >&5
26523
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026524( exit $ac_status )
26525ac_cv_working_tzset=no
26526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026527rm -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 +000026528fi
26529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026530
26531fi
26532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026533{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26534echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026535if test "$ac_cv_working_tzset" = yes
26536then
26537
26538cat >>confdefs.h <<\_ACEOF
26539#define HAVE_WORKING_TZSET 1
26540_ACEOF
26541
26542fi
26543
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026544# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026545{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26546echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026547if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026548 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026549else
26550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026551/* confdefs.h. */
26552_ACEOF
26553cat confdefs.h >>conftest.$ac_ext
26554cat >>conftest.$ac_ext <<_ACEOF
26555/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026556#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026557int
26558main ()
26559{
26560
26561struct stat st;
26562st.st_mtim.tv_nsec = 1;
26563
26564 ;
26565 return 0;
26566}
26567_ACEOF
26568rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026569if { (ac_try="$ac_compile"
26570case "(($ac_try" in
26571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26572 *) ac_try_echo=$ac_try;;
26573esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026577 grep -v '^ *+' conftest.er1 >conftest.err
26578 rm -f conftest.er1
26579 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026581 (exit $ac_status); } && {
26582 test -z "$ac_c_werror_flag" ||
26583 test ! -s conftest.err
26584 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026585 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026586else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026588sed 's/^/| /' conftest.$ac_ext >&5
26589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026590 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026591fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26594fi
26595
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026596{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26597echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026598if test "$ac_cv_stat_tv_nsec" = yes
26599then
26600
26601cat >>confdefs.h <<\_ACEOF
26602#define HAVE_STAT_TV_NSEC 1
26603_ACEOF
26604
26605fi
26606
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026607# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026608{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26609echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026610if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026611 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026612else
26613 cat >conftest.$ac_ext <<_ACEOF
26614/* confdefs.h. */
26615_ACEOF
26616cat confdefs.h >>conftest.$ac_ext
26617cat >>conftest.$ac_ext <<_ACEOF
26618/* end confdefs.h. */
26619#include <sys/stat.h>
26620int
26621main ()
26622{
26623
26624struct stat st;
26625st.st_mtimespec.tv_nsec = 1;
26626
26627 ;
26628 return 0;
26629}
26630_ACEOF
26631rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026632if { (ac_try="$ac_compile"
26633case "(($ac_try" in
26634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26635 *) ac_try_echo=$ac_try;;
26636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026639 ac_status=$?
26640 grep -v '^ *+' conftest.er1 >conftest.err
26641 rm -f conftest.er1
26642 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026644 (exit $ac_status); } && {
26645 test -z "$ac_c_werror_flag" ||
26646 test ! -s conftest.err
26647 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026648 ac_cv_stat_tv_nsec2=yes
26649else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026650 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026651sed 's/^/| /' conftest.$ac_ext >&5
26652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026653 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026654fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26657fi
26658
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026659{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26660echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026661if test "$ac_cv_stat_tv_nsec2" = yes
26662then
26663
26664cat >>confdefs.h <<\_ACEOF
26665#define HAVE_STAT_TV_NSEC2 1
26666_ACEOF
26667
26668fi
26669
Jack Jansen666b1e72001-10-31 12:11:48 +000026670# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026671{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26672echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026673if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026674 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026675else
Martin v. Löwis11437992002-04-12 09:54:03 +000026676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026677/* confdefs.h. */
26678_ACEOF
26679cat confdefs.h >>conftest.$ac_ext
26680cat >>conftest.$ac_ext <<_ACEOF
26681/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026682#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026683int
26684main ()
26685{
Jack Jansen666b1e72001-10-31 12:11:48 +000026686
26687 int rtn;
26688 rtn = mvwdelch(0,0,0);
26689
Martin v. Löwis11437992002-04-12 09:54:03 +000026690 ;
26691 return 0;
26692}
26693_ACEOF
26694rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026695if { (ac_try="$ac_compile"
26696case "(($ac_try" in
26697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26698 *) ac_try_echo=$ac_try;;
26699esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026703 grep -v '^ *+' conftest.er1 >conftest.err
26704 rm -f conftest.er1
26705 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026707 (exit $ac_status); } && {
26708 test -z "$ac_c_werror_flag" ||
26709 test ! -s conftest.err
26710 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026711 ac_cv_mvwdelch_is_expression=yes
26712else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026714sed 's/^/| /' conftest.$ac_ext >&5
26715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026716 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026717fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26720fi
26721
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026722{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26723echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026724
26725if test "$ac_cv_mvwdelch_is_expression" = yes
26726then
Martin v. Löwis11437992002-04-12 09:54:03 +000026727
26728cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026729#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026730_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026731
26732fi
26733
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026734{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26735echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026736if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026737 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026738else
Martin v. Löwis11437992002-04-12 09:54:03 +000026739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026740/* confdefs.h. */
26741_ACEOF
26742cat confdefs.h >>conftest.$ac_ext
26743cat >>conftest.$ac_ext <<_ACEOF
26744/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026745#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026746int
26747main ()
26748{
Jack Jansen666b1e72001-10-31 12:11:48 +000026749
26750 WINDOW *w;
26751 w->_flags = 0;
26752
Martin v. Löwis11437992002-04-12 09:54:03 +000026753 ;
26754 return 0;
26755}
26756_ACEOF
26757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026758if { (ac_try="$ac_compile"
26759case "(($ac_try" in
26760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26761 *) ac_try_echo=$ac_try;;
26762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026766 grep -v '^ *+' conftest.er1 >conftest.err
26767 rm -f conftest.er1
26768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026770 (exit $ac_status); } && {
26771 test -z "$ac_c_werror_flag" ||
26772 test ! -s conftest.err
26773 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026774 ac_cv_window_has_flags=yes
26775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026777sed 's/^/| /' conftest.$ac_ext >&5
26778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026779 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026780fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26783fi
26784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026785{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26786echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026787
Jack Jansen666b1e72001-10-31 12:11:48 +000026788
26789if test "$ac_cv_window_has_flags" = yes
26790then
Martin v. Löwis11437992002-04-12 09:54:03 +000026791
26792cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026793#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026794_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026795
26796fi
26797
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026798{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26799echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026800cat >conftest.$ac_ext <<_ACEOF
26801/* confdefs.h. */
26802_ACEOF
26803cat confdefs.h >>conftest.$ac_ext
26804cat >>conftest.$ac_ext <<_ACEOF
26805/* end confdefs.h. */
26806#include <curses.h>
26807int
26808main ()
26809{
26810void *x=is_term_resized
26811 ;
26812 return 0;
26813}
26814_ACEOF
26815rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026816if { (ac_try="$ac_compile"
26817case "(($ac_try" in
26818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26819 *) ac_try_echo=$ac_try;;
26820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026822 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026823 ac_status=$?
26824 grep -v '^ *+' conftest.er1 >conftest.err
26825 rm -f conftest.er1
26826 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026828 (exit $ac_status); } && {
26829 test -z "$ac_c_werror_flag" ||
26830 test ! -s conftest.err
26831 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026832
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026833cat >>confdefs.h <<\_ACEOF
26834#define HAVE_CURSES_IS_TERM_RESIZED 1
26835_ACEOF
26836
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026837 { echo "$as_me:$LINENO: result: yes" >&5
26838echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026839else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026840 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026841sed 's/^/| /' conftest.$ac_ext >&5
26842
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026843 { echo "$as_me:$LINENO: result: no" >&5
26844echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026845
26846fi
26847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26849
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026850{ echo "$as_me:$LINENO: checking for resize_term" >&5
26851echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026852cat >conftest.$ac_ext <<_ACEOF
26853/* confdefs.h. */
26854_ACEOF
26855cat confdefs.h >>conftest.$ac_ext
26856cat >>conftest.$ac_ext <<_ACEOF
26857/* end confdefs.h. */
26858#include <curses.h>
26859int
26860main ()
26861{
26862void *x=resize_term
26863 ;
26864 return 0;
26865}
26866_ACEOF
26867rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026868if { (ac_try="$ac_compile"
26869case "(($ac_try" in
26870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26871 *) ac_try_echo=$ac_try;;
26872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026874 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026875 ac_status=$?
26876 grep -v '^ *+' conftest.er1 >conftest.err
26877 rm -f conftest.er1
26878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026880 (exit $ac_status); } && {
26881 test -z "$ac_c_werror_flag" ||
26882 test ! -s conftest.err
26883 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026884
26885cat >>confdefs.h <<\_ACEOF
26886#define HAVE_CURSES_RESIZE_TERM 1
26887_ACEOF
26888
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026889 { echo "$as_me:$LINENO: result: yes" >&5
26890echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026892 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026893sed 's/^/| /' conftest.$ac_ext >&5
26894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026895 { echo "$as_me:$LINENO: result: no" >&5
26896echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026897
26898fi
26899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26901
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026902{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26903echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026904cat >conftest.$ac_ext <<_ACEOF
26905/* confdefs.h. */
26906_ACEOF
26907cat confdefs.h >>conftest.$ac_ext
26908cat >>conftest.$ac_ext <<_ACEOF
26909/* end confdefs.h. */
26910#include <curses.h>
26911int
26912main ()
26913{
26914void *x=resizeterm
26915 ;
26916 return 0;
26917}
26918_ACEOF
26919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026920if { (ac_try="$ac_compile"
26921case "(($ac_try" in
26922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26923 *) ac_try_echo=$ac_try;;
26924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026926 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026927 ac_status=$?
26928 grep -v '^ *+' conftest.er1 >conftest.err
26929 rm -f conftest.er1
26930 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026932 (exit $ac_status); } && {
26933 test -z "$ac_c_werror_flag" ||
26934 test ! -s conftest.err
26935 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026936
26937cat >>confdefs.h <<\_ACEOF
26938#define HAVE_CURSES_RESIZETERM 1
26939_ACEOF
26940
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026941 { echo "$as_me:$LINENO: result: yes" >&5
26942echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026943else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026944 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026945sed 's/^/| /' conftest.$ac_ext >&5
26946
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026947 { echo "$as_me:$LINENO: result: no" >&5
26948echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026949
26950fi
26951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26953
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026954{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26955echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026956
26957if test -r /dev/ptmx
26958then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026959 { echo "$as_me:$LINENO: result: yes" >&5
26960echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026961
26962cat >>confdefs.h <<\_ACEOF
26963#define HAVE_DEV_PTMX 1
26964_ACEOF
26965
Thomas Wouters89f507f2006-12-13 04:49:30 +000026966else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026967 { echo "$as_me:$LINENO: result: no" >&5
26968echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026969fi
26970
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026971{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26972echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026973
26974if test -r /dev/ptc
26975then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026976 { echo "$as_me:$LINENO: result: yes" >&5
26977echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026978
26979cat >>confdefs.h <<\_ACEOF
26980#define HAVE_DEV_PTC 1
26981_ACEOF
26982
Thomas Wouters89f507f2006-12-13 04:49:30 +000026983else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026984 { echo "$as_me:$LINENO: result: no" >&5
26985echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026986fi
26987
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026988if test "$have_long_long" = yes
26989then
26990 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26991echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26992 if test "${ac_cv_have_long_long_format+set}" = set; then
26993 echo $ECHO_N "(cached) $ECHO_C" >&6
26994else
26995 if test "$cross_compiling" = yes; then
26996 ac_cv_have_long_long_format=no
26997else
26998 cat >conftest.$ac_ext <<_ACEOF
26999/* confdefs.h. */
27000_ACEOF
27001cat confdefs.h >>conftest.$ac_ext
27002cat >>conftest.$ac_ext <<_ACEOF
27003/* end confdefs.h. */
27004
27005 #include <stdio.h>
27006 #include <stddef.h>
27007 #include <string.h>
27008
27009 #ifdef HAVE_SYS_TYPES_H
27010 #include <sys/types.h>
27011 #endif
27012
27013 int main()
27014 {
27015 char buffer[256];
27016
27017 if (sprintf(buffer, "%lld", (long long)123) < 0)
27018 return 1;
27019 if (strcmp(buffer, "123"))
27020 return 1;
27021
27022 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27023 return 1;
27024 if (strcmp(buffer, "-123"))
27025 return 1;
27026
27027 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27028 return 1;
27029 if (strcmp(buffer, "123"))
27030 return 1;
27031
27032 return 0;
27033 }
27034
27035_ACEOF
27036rm -f conftest$ac_exeext
27037if { (ac_try="$ac_link"
27038case "(($ac_try" in
27039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27040 *) ac_try_echo=$ac_try;;
27041esac
27042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27043 (eval "$ac_link") 2>&5
27044 ac_status=$?
27045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27047 { (case "(($ac_try" in
27048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27049 *) ac_try_echo=$ac_try;;
27050esac
27051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27052 (eval "$ac_try") 2>&5
27053 ac_status=$?
27054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27055 (exit $ac_status); }; }; then
27056 ac_cv_have_long_long_format=yes
27057else
27058 echo "$as_me: program exited with status $ac_status" >&5
27059echo "$as_me: failed program was:" >&5
27060sed 's/^/| /' conftest.$ac_ext >&5
27061
27062( exit $ac_status )
27063ac_cv_have_long_long_format=no
27064fi
27065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27066fi
27067
27068
27069
27070fi
27071
27072 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27073echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27074fi
27075
Mark Dickinson89d7d412009-12-31 20:50:59 +000027076if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027077then
27078
27079cat >>confdefs.h <<\_ACEOF
27080#define PY_FORMAT_LONG_LONG "ll"
27081_ACEOF
27082
27083fi
27084
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027085if test $ac_sys_system = Darwin
27086then
27087 LIBS="$LIBS -framework CoreFoundation"
27088fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027089
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027090{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27091echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027092if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027093 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027094else
27095 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027096 ac_cv_have_size_t_format="cross -- assuming yes"
27097
Thomas Wouters477c8d52006-05-27 19:21:47 +000027098else
27099 cat >conftest.$ac_ext <<_ACEOF
27100/* confdefs.h. */
27101_ACEOF
27102cat confdefs.h >>conftest.$ac_ext
27103cat >>conftest.$ac_ext <<_ACEOF
27104/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027105
Thomas Wouters477c8d52006-05-27 19:21:47 +000027106#include <stdio.h>
27107#include <stddef.h>
27108#include <string.h>
27109
Christian Heimes2c181612007-12-17 20:04:13 +000027110#ifdef HAVE_SYS_TYPES_H
27111#include <sys/types.h>
27112#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027113
27114#ifdef HAVE_SSIZE_T
27115typedef ssize_t Py_ssize_t;
27116#elif SIZEOF_VOID_P == SIZEOF_LONG
27117typedef long Py_ssize_t;
27118#else
27119typedef int Py_ssize_t;
27120#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027121
Christian Heimes2c181612007-12-17 20:04:13 +000027122int main()
27123{
27124 char buffer[256];
27125
Thomas Wouters477c8d52006-05-27 19:21:47 +000027126 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27127 return 1;
27128
Thomas Wouters89f507f2006-12-13 04:49:30 +000027129 if (strcmp(buffer, "123"))
27130 return 1;
27131
27132 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27133 return 1;
27134
27135 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027136 return 1;
27137
27138 return 0;
27139}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027140
Thomas Wouters477c8d52006-05-27 19:21:47 +000027141_ACEOF
27142rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027143if { (ac_try="$ac_link"
27144case "(($ac_try" in
27145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27146 *) ac_try_echo=$ac_try;;
27147esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027149 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027150 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027152 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027153 { (case "(($ac_try" in
27154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27155 *) ac_try_echo=$ac_try;;
27156esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027158 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027159 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027161 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027162 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027164 echo "$as_me: program exited with status $ac_status" >&5
27165echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027166sed 's/^/| /' conftest.$ac_ext >&5
27167
27168( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027169ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027170fi
27171rm -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 +000027172fi
27173
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027175fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027176{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27177echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027178if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027179
27180cat >>confdefs.h <<\_ACEOF
27181#define PY_FORMAT_SIZE_T "z"
27182_ACEOF
27183
27184fi
27185
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027186{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27187echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027188if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027189 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027190else
Martin v. Löwis11437992002-04-12 09:54:03 +000027191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027192/* confdefs.h. */
27193_ACEOF
27194cat confdefs.h >>conftest.$ac_ext
27195cat >>conftest.$ac_ext <<_ACEOF
27196/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027197
27198#ifdef HAVE_SYS_TYPES_H
27199#include <sys/types.h>
27200#endif
27201#ifdef HAVE_SYS_SOCKET_H
27202#include <sys/socket.h>
27203#endif
27204
27205
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027206typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027207int
27208main ()
27209{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027210if ((ac__type_new_ *) 0)
27211 return 0;
27212if (sizeof (ac__type_new_))
27213 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027214 ;
27215 return 0;
27216}
27217_ACEOF
27218rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027219if { (ac_try="$ac_compile"
27220case "(($ac_try" in
27221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27222 *) ac_try_echo=$ac_try;;
27223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027227 grep -v '^ *+' conftest.er1 >conftest.err
27228 rm -f conftest.er1
27229 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027231 (exit $ac_status); } && {
27232 test -z "$ac_c_werror_flag" ||
27233 test ! -s conftest.err
27234 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027235 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027238sed 's/^/| /' conftest.$ac_ext >&5
27239
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027240 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027242
27243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027244fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027245{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27246echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27247if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027248 :
27249else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027250
Martin v. Löwis01c04012002-11-11 14:58:44 +000027251cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027252#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027253_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027254
27255fi
27256
Michael W. Hudson54241132001-12-07 15:38:26 +000027257
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027258{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27259echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027260if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027261 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027262else
27263 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027264 ac_cv_broken_mbstowcs=no
27265else
27266 cat >conftest.$ac_ext <<_ACEOF
27267/* confdefs.h. */
27268_ACEOF
27269cat confdefs.h >>conftest.$ac_ext
27270cat >>conftest.$ac_ext <<_ACEOF
27271/* end confdefs.h. */
27272
27273#include<stdlib.h>
27274int main() {
27275 size_t len = -1;
27276 const char *str = "text";
27277 len = mbstowcs(NULL, str, 0);
27278 return (len != 4);
27279}
27280
27281_ACEOF
27282rm -f conftest$ac_exeext
27283if { (ac_try="$ac_link"
27284case "(($ac_try" in
27285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27286 *) ac_try_echo=$ac_try;;
27287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027289 (eval "$ac_link") 2>&5
27290 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027292 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27293 { (case "(($ac_try" in
27294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27295 *) ac_try_echo=$ac_try;;
27296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027298 (eval "$ac_try") 2>&5
27299 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027301 (exit $ac_status); }; }; then
27302 ac_cv_broken_mbstowcs=no
27303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027304 echo "$as_me: program exited with status $ac_status" >&5
27305echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027306sed 's/^/| /' conftest.$ac_ext >&5
27307
27308( exit $ac_status )
27309ac_cv_broken_mbstowcs=yes
27310fi
27311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27312fi
27313
27314
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027315fi
27316
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027317{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27318echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027319if test "$ac_cv_broken_mbstowcs" = yes
27320then
27321
27322cat >>confdefs.h <<\_ACEOF
27323#define HAVE_BROKEN_MBSTOWCS 1
27324_ACEOF
27325
27326fi
27327
Antoine Pitroub52ec782009-01-25 16:34:23 +000027328# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027329{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27330echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027331
27332# Check whether --with-computed-gotos was given.
27333if test "${with_computed_gotos+set}" = set; then
27334 withval=$with_computed_gotos;
27335if test "$withval" != no
27336then
27337
27338cat >>confdefs.h <<\_ACEOF
27339#define USE_COMPUTED_GOTOS 1
27340_ACEOF
27341
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027342 { echo "$as_me:$LINENO: result: yes" >&5
27343echo "${ECHO_T}yes" >&6; }
27344else { echo "$as_me:$LINENO: result: no" >&5
27345echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027346fi
27347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027348 { echo "$as_me:$LINENO: result: no" >&5
27349echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027350fi
27351
27352
27353
Michael W. Hudson54241132001-12-07 15:38:26 +000027354
27355
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027356for h in `(cd $srcdir;echo Python/thread_*.h)`
27357do
27358 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27359done
27360
Michael W. Hudson54241132001-12-07 15:38:26 +000027361
Neal Norwitzd24499d2005-12-18 21:36:39 +000027362SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027363{ echo "$as_me:$LINENO: checking for build directories" >&5
27364echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027365for dir in $SRCDIRS; do
27366 if test ! -d $dir; then
27367 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027368 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027369done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027370{ echo "$as_me:$LINENO: result: done" >&5
27371echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027372
Guido van Rossum627b2d71993-12-24 10:39:16 +000027373# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027374ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027375
Martin v. Löwis11437992002-04-12 09:54:03 +000027376cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027377# This file is a shell script that caches the results of configure
27378# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027379# scripts and configure runs, see configure's option --config-cache.
27380# It is not useful on other systems. If it contains results you don't
27381# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027382#
Martin v. Löwis11437992002-04-12 09:54:03 +000027383# config.status only pays attention to the cache file if you give it
27384# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027385#
Skip Montanaro6dead952003-09-25 14:50:04 +000027386# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027387# loading this file, other *unset* `ac_cv_foo' will be assigned the
27388# following values.
27389
27390_ACEOF
27391
Guido van Rossumf78abae1997-01-21 22:02:36 +000027392# The following way of writing the cache mishandles newlines in values,
27393# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027394# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027395# Ultrix sh set writes to stderr and can't be redirected directly,
27396# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027397(
27398 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27399 eval ac_val=\$$ac_var
27400 case $ac_val in #(
27401 *${as_nl}*)
27402 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027403 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27404echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027405 esac
27406 case $ac_var in #(
27407 _ | IFS | as_nl) ;; #(
27408 *) $as_unset $ac_var ;;
27409 esac ;;
27410 esac
27411 done
27412
Martin v. Löwis11437992002-04-12 09:54:03 +000027413 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027414 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27415 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027416 # `set' does not quote correctly, so add quotes (double-quote
27417 # substitution turns \\\\ into \\, and sed turns \\ into \).
27418 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027419 "s/'/'\\\\''/g;
27420 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027421 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027422 *)
27423 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027424 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027425 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027426 esac |
27427 sort
27428) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027429 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027430 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027431 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027432 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027433 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27434 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027435 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27436 :end' >>confcache
27437if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27438 if test -w "$cache_file"; then
27439 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027440 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27441echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027442 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027443 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027444 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27445echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027446 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027447fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027448rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027449
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027450test "x$prefix" = xNONE && prefix=$ac_default_prefix
27451# Let make expand exec_prefix.
27452test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027453
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027454DEFS=-DHAVE_CONFIG_H
27455
Skip Montanaro6dead952003-09-25 14:50:04 +000027456ac_libobjs=
27457ac_ltlibobjs=
27458for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27459 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027460 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027461 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027462 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27463 # will be set to the directory where LIBOBJS objects are built.
27464 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27465 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027466done
27467LIBOBJS=$ac_libobjs
27468
27469LTLIBOBJS=$ac_ltlibobjs
27470
27471
Martin v. Löwis11437992002-04-12 09:54:03 +000027472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027473: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027474ac_clean_files_save=$ac_clean_files
27475ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027476{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27477echo "$as_me: creating $CONFIG_STATUS" >&6;}
27478cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027479#! $SHELL
27480# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027481# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027482# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027483# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027484
Martin v. Löwis11437992002-04-12 09:54:03 +000027485debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027486ac_cs_recheck=false
27487ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027488SHELL=\${CONFIG_SHELL-$SHELL}
27489_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027490
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027491cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027492## --------------------- ##
27493## M4sh Initialization. ##
27494## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027496# Be more Bourne compatible
27497DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027498if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27499 emulate sh
27500 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027501 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027502 # is contrary to our usage. Disable this feature.
27503 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027504 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027505else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027506 case `(set -o) 2>/dev/null` in
27507 *posix*) set -o posix ;;
27508esac
27509
Michael W. Hudson54241132001-12-07 15:38:26 +000027510fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027511
27512
Michael W. Hudson54241132001-12-07 15:38:26 +000027513
Michael W. Hudson54241132001-12-07 15:38:26 +000027514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027515# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027516# Avoid depending upon Character Ranges.
27517as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27518as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27519as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27520as_cr_digits='0123456789'
27521as_cr_alnum=$as_cr_Letters$as_cr_digits
27522
27523# The user is always right.
27524if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027525 echo "#! /bin/sh" >conf$$.sh
27526 echo "exit 0" >>conf$$.sh
27527 chmod +x conf$$.sh
27528 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27529 PATH_SEPARATOR=';'
27530 else
27531 PATH_SEPARATOR=:
27532 fi
27533 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027534fi
27535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027536# Support unset when possible.
27537if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27538 as_unset=unset
27539else
27540 as_unset=false
27541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027543
27544# IFS
27545# We need space, tab and new line, in precisely that order. Quoting is
27546# there to prevent editors from complaining about space-tab.
27547# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27548# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027549as_nl='
27550'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027551IFS=" "" $as_nl"
27552
27553# Find who we are. Look in the path if we contain no directory separator.
27554case $0 in
27555 *[\\/]* ) as_myself=$0 ;;
27556 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027557for as_dir in $PATH
27558do
27559 IFS=$as_save_IFS
27560 test -z "$as_dir" && as_dir=.
27561 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27562done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027563IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027565 ;;
27566esac
27567# We did not find ourselves, most probably we were run as `sh COMMAND'
27568# in which case we are not to be found in the path.
27569if test "x$as_myself" = x; then
27570 as_myself=$0
27571fi
27572if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027573 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027574 { (exit 1); exit 1; }
27575fi
27576
27577# Work around bugs in pre-3.0 UWIN ksh.
27578for as_var in ENV MAIL MAILPATH
27579do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27580done
27581PS1='$ '
27582PS2='> '
27583PS4='+ '
27584
27585# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027586for as_var in \
27587 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27588 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27589 LC_TELEPHONE LC_TIME
27590do
27591 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27592 eval $as_var=C; export $as_var
27593 else
27594 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27595 fi
27596done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027597
27598# Required to use basename.
27599if expr a : '\(a\)' >/dev/null 2>&1 &&
27600 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27601 as_expr=expr
27602else
27603 as_expr=false
27604fi
27605
27606if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27607 as_basename=basename
27608else
27609 as_basename=false
27610fi
27611
27612
27613# Name of the executable.
27614as_me=`$as_basename -- "$0" ||
27615$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27616 X"$0" : 'X\(//\)$' \| \
27617 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027618echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027619 sed '/^.*\/\([^/][^/]*\)\/*$/{
27620 s//\1/
27621 q
27622 }
27623 /^X\/\(\/\/\)$/{
27624 s//\1/
27625 q
27626 }
27627 /^X\/\(\/\).*/{
27628 s//\1/
27629 q
27630 }
27631 s/.*/./; q'`
27632
27633# CDPATH.
27634$as_unset CDPATH
27635
27636
27637
Martin v. Löwis11437992002-04-12 09:54:03 +000027638 as_lineno_1=$LINENO
27639 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027640 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027641 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027642
Martin v. Löwis11437992002-04-12 09:54:03 +000027643 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27644 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027645 # line-number line after each line using $LINENO; the second 'sed'
27646 # does the real work. The second script uses 'N' to pair each
27647 # line-number line with the line containing $LINENO, and appends
27648 # trailing '-' during substitution so that $LINENO is not a special
27649 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027650 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027651 # scripts with optimization help from Paolo Bonzini. Blame Lee
27652 # E. McMahon (1931-1989) for sed's syntax. :-)
27653 sed -n '
27654 p
27655 /[$]LINENO/=
27656 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027657 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027658 s/[$]LINENO.*/&-/
27659 t lineno
27660 b
27661 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027662 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027663 :loop
27664 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027665 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027666 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027667 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027668 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027669 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027670 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027671
Martin v. Löwis11437992002-04-12 09:54:03 +000027672 # Don't try to exec as it changes $[0], causing all sort of problems
27673 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027674 # original and so on. Autoconf is especially sensitive to this).
27675 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027676 # Exit status is that of the last command.
27677 exit
27678}
27679
27680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027681if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27682 as_dirname=dirname
27683else
27684 as_dirname=false
27685fi
27686
27687ECHO_C= ECHO_N= ECHO_T=
27688case `echo -n x` in
27689-n*)
27690 case `echo 'x\c'` in
27691 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27692 *) ECHO_C='\c';;
27693 esac;;
27694*)
27695 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027696esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027698if expr a : '\(a\)' >/dev/null 2>&1 &&
27699 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027700 as_expr=expr
27701else
27702 as_expr=false
27703fi
27704
27705rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027706if test -d conf$$.dir; then
27707 rm -f conf$$.dir/conf$$.file
27708else
27709 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027710 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027712echo >conf$$.file
27713if ln -s conf$$.file conf$$ 2>/dev/null; then
27714 as_ln_s='ln -s'
27715 # ... but there are two gotchas:
27716 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27717 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27718 # In both cases, we have to default to `cp -p'.
27719 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027720 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027721elif ln conf$$.file conf$$ 2>/dev/null; then
27722 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027723else
27724 as_ln_s='cp -p'
27725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027726rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27727rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027728
Skip Montanaro6dead952003-09-25 14:50:04 +000027729if mkdir -p . 2>/dev/null; then
27730 as_mkdir_p=:
27731else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027732 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027733 as_mkdir_p=false
27734fi
27735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027736if test -x / >/dev/null 2>&1; then
27737 as_test_x='test -x'
27738else
27739 if ls -dL / >/dev/null 2>&1; then
27740 as_ls_L_option=L
27741 else
27742 as_ls_L_option=
27743 fi
27744 as_test_x='
27745 eval sh -c '\''
27746 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027747 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027748 else
27749 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027750 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027751 esac;
27752 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27753 ???[sx]*):;;*)false;;esac;fi
27754 '\'' sh
27755 '
27756fi
27757as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027758
27759# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027760as_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 +000027761
27762# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027763as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027764
27765
Martin v. Löwis11437992002-04-12 09:54:03 +000027766exec 6>&1
27767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027768# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027769# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027770# values after options handling.
27771ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027772This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027773generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027774
27775 CONFIG_FILES = $CONFIG_FILES
27776 CONFIG_HEADERS = $CONFIG_HEADERS
27777 CONFIG_LINKS = $CONFIG_LINKS
27778 CONFIG_COMMANDS = $CONFIG_COMMANDS
27779 $ $0 $@
27780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027781on `(hostname || uname -n) 2>/dev/null | sed 1q`
27782"
27783
Martin v. Löwis11437992002-04-12 09:54:03 +000027784_ACEOF
27785
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027786cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027787# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027788config_files="$ac_config_files"
27789config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027791_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027792
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027793cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027794ac_cs_usage="\
27795\`$as_me' instantiates files from templates according to the
27796current configuration.
27797
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027798Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027799
27800 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027801 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027802 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027803 -d, --debug don't remove temporary files
27804 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027805 --file=FILE[:TEMPLATE]
27806 instantiate the configuration file FILE
27807 --header=FILE[:TEMPLATE]
27808 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027809
27810Configuration files:
27811$config_files
27812
27813Configuration headers:
27814$config_headers
27815
27816Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027818_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027819cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027820ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027821python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027822configured by $0, generated by GNU Autoconf 2.61,
27823 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027824
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027825Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027826This config.status script is free software; the Free Software Foundation
27827gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027828
27829ac_pwd='$ac_pwd'
27830srcdir='$srcdir'
27831INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027832_ACEOF
27833
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027834cat >>$CONFIG_STATUS <<\_ACEOF
27835# If no file are specified by the user, then we need to provide default
27836# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027837ac_need_defaults=:
27838while test $# != 0
27839do
27840 case $1 in
27841 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027842 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27843 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027844 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027845 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027846 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027847 ac_option=$1
27848 ac_optarg=$2
27849 ac_shift=shift
27850 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027851 esac
27852
Skip Montanaro6dead952003-09-25 14:50:04 +000027853 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027854 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027855 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27856 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027857 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027858 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027859 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027860 debug=: ;;
27861 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027862 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027863 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027864 ac_need_defaults=false;;
27865 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027866 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027867 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027868 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027869 --he | --h)
27870 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027871 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027872Try \`$0 --help' for more information." >&2
27873 { (exit 1); exit 1; }; };;
27874 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027875 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027876 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27877 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27878 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027879
27880 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027881 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027882Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027883 { (exit 1); exit 1; }; } ;;
27884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027885 *) ac_config_targets="$ac_config_targets $1"
27886 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027887
27888 esac
27889 shift
27890done
27891
Skip Montanaro6dead952003-09-25 14:50:04 +000027892ac_configure_extra_args=
27893
27894if $ac_cs_silent; then
27895 exec 6>/dev/null
27896 ac_configure_extra_args="$ac_configure_extra_args --silent"
27897fi
27898
27899_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027900cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027901if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027902 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27903 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027904 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027905 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027906fi
27907
Martin v. Löwis11437992002-04-12 09:54:03 +000027908_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027909cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027910exec 5>>config.log
27911{
27912 echo
27913 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27914## Running $as_me. ##
27915_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027916 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027917} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027919_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027920cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027921_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027922
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027923cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027924
27925# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027926for ac_config_target in $ac_config_targets
27927do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027928 case $ac_config_target in
27929 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27930 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27931 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027932 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27933 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027934 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27935 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027936 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027937
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027938 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27939echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027940 { (exit 1); exit 1; }; };;
27941 esac
27942done
27943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027944
Martin v. Löwis11437992002-04-12 09:54:03 +000027945# If the user did not use the arguments to specify the items to instantiate,
27946# then the envvar interface is used. Set only those that are not.
27947# We use the long form for the default assignment because of an extremely
27948# bizarre bug on SunOS 4.1.3.
27949if $ac_need_defaults; then
27950 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27951 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27952fi
27953
Skip Montanaro6dead952003-09-25 14:50:04 +000027954# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027955# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027956# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027957# Hook for its removal unless debugging.
27958# Note that there is a small window in which the directory will not be cleaned:
27959# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027960$debug ||
27961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027962 tmp=
27963 trap 'exit_status=$?
27964 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27965' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027966 trap '{ (exit 1); exit 1; }' 1 2 13 15
27967}
Martin v. Löwis11437992002-04-12 09:54:03 +000027968# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027969
Martin v. Löwis11437992002-04-12 09:54:03 +000027970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027971 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027972 test -n "$tmp" && test -d "$tmp"
27973} ||
27974{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027975 tmp=./conf$$-$RANDOM
27976 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027977} ||
27978{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027979 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027980 { (exit 1); exit 1; }
27981}
27982
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027983#
27984# Set up the sed scripts for CONFIG_FILES section.
27985#
27986
27987# No need to generate the scripts if there are no CONFIG_FILES.
27988# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027989if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027990
27991_ACEOF
27992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027993
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027995ac_delim='%!_!# '
27996for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027997 cat >conf$$subs.sed <<_ACEOF
27998SHELL!$SHELL$ac_delim
27999PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28000PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28001PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28002PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28003PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28004PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28005exec_prefix!$exec_prefix$ac_delim
28006prefix!$prefix$ac_delim
28007program_transform_name!$program_transform_name$ac_delim
28008bindir!$bindir$ac_delim
28009sbindir!$sbindir$ac_delim
28010libexecdir!$libexecdir$ac_delim
28011datarootdir!$datarootdir$ac_delim
28012datadir!$datadir$ac_delim
28013sysconfdir!$sysconfdir$ac_delim
28014sharedstatedir!$sharedstatedir$ac_delim
28015localstatedir!$localstatedir$ac_delim
28016includedir!$includedir$ac_delim
28017oldincludedir!$oldincludedir$ac_delim
28018docdir!$docdir$ac_delim
28019infodir!$infodir$ac_delim
28020htmldir!$htmldir$ac_delim
28021dvidir!$dvidir$ac_delim
28022pdfdir!$pdfdir$ac_delim
28023psdir!$psdir$ac_delim
28024libdir!$libdir$ac_delim
28025localedir!$localedir$ac_delim
28026mandir!$mandir$ac_delim
28027DEFS!$DEFS$ac_delim
28028ECHO_C!$ECHO_C$ac_delim
28029ECHO_N!$ECHO_N$ac_delim
28030ECHO_T!$ECHO_T$ac_delim
28031LIBS!$LIBS$ac_delim
28032build_alias!$build_alias$ac_delim
28033host_alias!$host_alias$ac_delim
28034target_alias!$target_alias$ac_delim
28035VERSION!$VERSION$ac_delim
28036SOVERSION!$SOVERSION$ac_delim
28037CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28038UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28039ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028040LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028041PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28042PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28043PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28044PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28045PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28046FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28047FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28048FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28049FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28050FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28051MACHDEP!$MACHDEP$ac_delim
28052SGI_ABI!$SGI_ABI$ac_delim
28053CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28054EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28055CC!$CC$ac_delim
28056CFLAGS!$CFLAGS$ac_delim
28057LDFLAGS!$LDFLAGS$ac_delim
28058CPPFLAGS!$CPPFLAGS$ac_delim
28059ac_ct_CC!$ac_ct_CC$ac_delim
28060EXEEXT!$EXEEXT$ac_delim
28061OBJEXT!$OBJEXT$ac_delim
28062CXX!$CXX$ac_delim
28063MAINCC!$MAINCC$ac_delim
28064CPP!$CPP$ac_delim
28065GREP!$GREP$ac_delim
28066EGREP!$EGREP$ac_delim
28067BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28068LIBRARY!$LIBRARY$ac_delim
28069LDLIBRARY!$LDLIBRARY$ac_delim
28070DLLLIBRARY!$DLLLIBRARY$ac_delim
28071BLDLIBRARY!$BLDLIBRARY$ac_delim
28072LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28073INSTSONAME!$INSTSONAME$ac_delim
28074RUNSHARED!$RUNSHARED$ac_delim
28075LINKCC!$LINKCC$ac_delim
28076GNULD!$GNULD$ac_delim
28077RANLIB!$RANLIB$ac_delim
28078AR!$AR$ac_delim
28079ARFLAGS!$ARFLAGS$ac_delim
28080SVNVERSION!$SVNVERSION$ac_delim
28081INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28082INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28083INSTALL_DATA!$INSTALL_DATA$ac_delim
28084LN!$LN$ac_delim
28085OPT!$OPT$ac_delim
28086BASECFLAGS!$BASECFLAGS$ac_delim
28087UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28088OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28089LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28090SO!$SO$ac_delim
28091LDSHARED!$LDSHARED$ac_delim
Benjamin Peterson99f03762010-04-11 22:15:28 +000028092LDCXXSHARED!$LDCXXSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028093BLDSHARED!$BLDSHARED$ac_delim
28094CCSHARED!$CCSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028095_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028096
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028097 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028098 break
28099 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028100 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28101echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028102 { (exit 1); exit 1; }; }
28103 else
28104 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028105 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028106done
28107
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028108ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28109if test -n "$ac_eof"; then
28110 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28111 ac_eof=`expr $ac_eof + 1`
28112fi
28113
28114cat >>$CONFIG_STATUS <<_ACEOF
28115cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28116/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028117_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028118sed '
28119s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28120s/^/s,@/; s/!/@,|#_!!_#|/
28121:n
28122t n
28123s/'"$ac_delim"'$/,g/; t
28124s/$/\\/; p
28125N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28126' >>$CONFIG_STATUS <conf$$subs.sed
28127rm -f conf$$subs.sed
28128cat >>$CONFIG_STATUS <<_ACEOF
28129CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028130_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028131
28132
28133ac_delim='%!_!# '
28134for ac_last_try in false false false false false :; do
28135 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson99f03762010-04-11 22:15:28 +000028136LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028137CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028138SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028139PKG_CONFIG!$PKG_CONFIG$ac_delim
28140LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028141USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28142SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28143USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28144LDLAST!$LDLAST$ac_delim
28145THREADOBJ!$THREADOBJ$ac_delim
28146DLINCLDIR!$DLINCLDIR$ac_delim
28147DYNLOADFILE!$DYNLOADFILE$ac_delim
28148MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28149TRUE!$TRUE$ac_delim
28150LIBOBJS!$LIBOBJS$ac_delim
28151HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28152HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28153HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28154HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28155HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28156LIBM!$LIBM$ac_delim
28157LIBC!$LIBC$ac_delim
28158THREADHEADERS!$THREADHEADERS$ac_delim
28159SRCDIRS!$SRCDIRS$ac_delim
28160LTLIBOBJS!$LTLIBOBJS$ac_delim
28161_ACEOF
28162
Benjamin Peterson99f03762010-04-11 22:15:28 +000028163 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028164 break
28165 elif $ac_last_try; then
28166 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28167echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028168 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028169 else
28170 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28171 fi
28172done
28173
28174ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28175if test -n "$ac_eof"; then
28176 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28177 ac_eof=`expr $ac_eof + 1`
28178fi
28179
28180cat >>$CONFIG_STATUS <<_ACEOF
28181cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28182/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028183_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028184sed '
28185s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28186s/^/s,@/; s/!/@,|#_!!_#|/
28187:n
28188t n
28189s/'"$ac_delim"'$/,g/; t
28190s/$/\\/; p
28191N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28192' >>$CONFIG_STATUS <conf$$subs.sed
28193rm -f conf$$subs.sed
28194cat >>$CONFIG_STATUS <<_ACEOF
28195:end
28196s/|#_!!_#|//g
28197CEOF$ac_eof
28198_ACEOF
28199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028200
28201# VPATH may cause trouble with some makes, so we remove $(srcdir),
28202# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28203# trailing colons and then remove the whole line if VPATH becomes empty
28204# (actually we leave an empty line to preserve line numbers).
28205if test "x$srcdir" = x.; then
28206 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28207s/:*\$(srcdir):*/:/
28208s/:*\${srcdir}:*/:/
28209s/:*@srcdir@:*/:/
28210s/^\([^=]*=[ ]*\):*/\1/
28211s/:*$//
28212s/^[^=]*=[ ]*$//
28213}'
28214fi
28215
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028216cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028217fi # test -n "$CONFIG_FILES"
28218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028219
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028220for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028221do
28222 case $ac_tag in
28223 :[FHLC]) ac_mode=$ac_tag; continue;;
28224 esac
28225 case $ac_mode$ac_tag in
28226 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028227 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28228echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028229 { (exit 1); exit 1; }; };;
28230 :[FH]-) ac_tag=-:-;;
28231 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28232 esac
28233 ac_save_IFS=$IFS
28234 IFS=:
28235 set x $ac_tag
28236 IFS=$ac_save_IFS
28237 shift
28238 ac_file=$1
28239 shift
28240
28241 case $ac_mode in
28242 :L) ac_source=$1;;
28243 :[FH])
28244 ac_file_inputs=
28245 for ac_f
28246 do
28247 case $ac_f in
28248 -) ac_f="$tmp/stdin";;
28249 *) # Look for the file first in the build tree, then in the source tree
28250 # (if the path is not absolute). The absolute path cannot be DOS-style,
28251 # because $ac_f cannot contain `:'.
28252 test -f "$ac_f" ||
28253 case $ac_f in
28254 [\\/$]*) false;;
28255 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28256 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028257 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28258echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028259 { (exit 1); exit 1; }; };;
28260 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028261 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028262 done
28263
28264 # Let's still pretend it is `configure' which instantiates (i.e., don't
28265 # use $as_me), people would be surprised to read:
28266 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028267 configure_input="Generated from "`IFS=:
28268 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028269 if test x"$ac_file" != x-; then
28270 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028271 { echo "$as_me:$LINENO: creating $ac_file" >&5
28272echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028273 fi
28274
28275 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028276 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028277 esac
28278 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028279 esac
28280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028281 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028282$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028283 X"$ac_file" : 'X\(//\)[^/]' \| \
28284 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028285 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028286echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28288 s//\1/
28289 q
28290 }
28291 /^X\(\/\/\)[^/].*/{
28292 s//\1/
28293 q
28294 }
28295 /^X\(\/\/\)$/{
28296 s//\1/
28297 q
28298 }
28299 /^X\(\/\).*/{
28300 s//\1/
28301 q
28302 }
28303 s/.*/./; q'`
28304 { as_dir="$ac_dir"
28305 case $as_dir in #(
28306 -*) as_dir=./$as_dir;;
28307 esac
28308 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028309 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028310 while :; do
28311 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028312 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028313 *) as_qdir=$as_dir;;
28314 esac
28315 as_dirs="'$as_qdir' $as_dirs"
28316 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028317$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028318 X"$as_dir" : 'X\(//\)[^/]' \| \
28319 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028320 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028321echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028322 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28323 s//\1/
28324 q
28325 }
28326 /^X\(\/\/\)[^/].*/{
28327 s//\1/
28328 q
28329 }
28330 /^X\(\/\/\)$/{
28331 s//\1/
28332 q
28333 }
28334 /^X\(\/\).*/{
28335 s//\1/
28336 q
28337 }
28338 s/.*/./; q'`
28339 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028340 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028341 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028342 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28343echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028344 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028345 ac_builddir=.
28346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028347case "$ac_dir" in
28348.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28349*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028350 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028351 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028352 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028353 case $ac_top_builddir_sub in
28354 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28355 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28356 esac ;;
28357esac
28358ac_abs_top_builddir=$ac_pwd
28359ac_abs_builddir=$ac_pwd$ac_dir_suffix
28360# for backward compatibility:
28361ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028362
28363case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028364 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028365 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028366 ac_top_srcdir=$ac_top_builddir_sub
28367 ac_abs_top_srcdir=$ac_pwd ;;
28368 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028369 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028370 ac_top_srcdir=$srcdir
28371 ac_abs_top_srcdir=$srcdir ;;
28372 *) # Relative name.
28373 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28374 ac_top_srcdir=$ac_top_build_prefix$srcdir
28375 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028376esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028377ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028378
Martin v. Löwis11437992002-04-12 09:54:03 +000028379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028380 case $ac_mode in
28381 :F)
28382 #
28383 # CONFIG_FILE
28384 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028385
28386 case $INSTALL in
28387 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028388 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028389 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028390_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028391
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028392cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028393# If the template does not know about datarootdir, expand it.
28394# FIXME: This hack should be removed a few years after 2.60.
28395ac_datarootdir_hack=; ac_datarootdir_seen=
28396
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028397case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028398 p
28399 q
28400}
28401/@datadir@/p
28402/@docdir@/p
28403/@infodir@/p
28404/@localedir@/p
28405/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028406' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028407*datarootdir*) ac_datarootdir_seen=yes;;
28408*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028409 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28410echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028411_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028412cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028413 ac_datarootdir_hack='
28414 s&@datadir@&$datadir&g
28415 s&@docdir@&$docdir&g
28416 s&@infodir@&$infodir&g
28417 s&@localedir@&$localedir&g
28418 s&@mandir@&$mandir&g
28419 s&\\\${datarootdir}&$datarootdir&g' ;;
28420esac
28421_ACEOF
28422
28423# Neutralize VPATH when `$srcdir' = `.'.
28424# Shell code in configure.ac might set extrasub.
28425# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028426cat >>$CONFIG_STATUS <<_ACEOF
28427 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028428$extrasub
28429_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028430cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028431:t
28432/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028433s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028434s&@top_builddir@&$ac_top_builddir_sub&;t t
28435s&@srcdir@&$ac_srcdir&;t t
28436s&@abs_srcdir@&$ac_abs_srcdir&;t t
28437s&@top_srcdir@&$ac_top_srcdir&;t t
28438s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28439s&@builddir@&$ac_builddir&;t t
28440s&@abs_builddir@&$ac_abs_builddir&;t t
28441s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28442s&@INSTALL@&$ac_INSTALL&;t t
28443$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028444" $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 +000028445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028446test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28447 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28448 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028449 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028450which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028451echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028452which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028454 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028455 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028456 -) cat "$tmp/out"; rm -f "$tmp/out";;
28457 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28458 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028459 ;;
28460 :H)
28461 #
28462 # CONFIG_HEADER
28463 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028464_ACEOF
28465
28466# Transform confdefs.h into a sed script `conftest.defines', that
28467# substitutes the proper values into config.h.in to produce config.h.
28468rm -f conftest.defines conftest.tail
28469# First, append a space to every undef/define line, to ease matching.
28470echo 's/$/ /' >conftest.defines
28471# Then, protect against being on the right side of a sed subst, or in
28472# an unquoted here document, in config.status. If some macros were
28473# called several times there might be several #defines for the same
28474# symbol, which is useless. But do not sort them, since the last
28475# AC_DEFINE must be honored.
28476ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28477# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28478# NAME is the cpp macro being defined, VALUE is the value it is being given.
28479# PARAMS is the parameter list in the macro definition--in most cases, it's
28480# just an empty string.
28481ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28482ac_dB='\\)[ (].*,\\1define\\2'
28483ac_dC=' '
28484ac_dD=' ,'
28485
28486uniq confdefs.h |
28487 sed -n '
28488 t rset
28489 :rset
28490 s/^[ ]*#[ ]*define[ ][ ]*//
28491 t ok
28492 d
28493 :ok
28494 s/[\\&,]/\\&/g
28495 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28496 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28497 ' >>conftest.defines
28498
28499# Remove the space that was appended to ease matching.
28500# Then replace #undef with comments. This is necessary, for
28501# example, in the case of _POSIX_SOURCE, which is predefined and required
28502# on some systems where configure will not decide to define it.
28503# (The regexp can be short, since the line contains either #define or #undef.)
28504echo 's/ $//
28505s,^[ #]*u.*,/* & */,' >>conftest.defines
28506
28507# Break up conftest.defines:
28508ac_max_sed_lines=50
28509
28510# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28511# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28512# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28513# et cetera.
28514ac_in='$ac_file_inputs'
28515ac_out='"$tmp/out1"'
28516ac_nxt='"$tmp/out2"'
28517
28518while :
28519do
28520 # Write a here document:
28521 cat >>$CONFIG_STATUS <<_ACEOF
28522 # First, check the format of the line:
28523 cat >"\$tmp/defines.sed" <<\\CEOF
28524/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28525/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28526b
28527:def
28528_ACEOF
28529 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28530 echo 'CEOF
28531 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28532 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28533 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28534 grep . conftest.tail >/dev/null || break
28535 rm -f conftest.defines
28536 mv conftest.tail conftest.defines
28537done
28538rm -f conftest.defines conftest.tail
28539
28540echo "ac_result=$ac_in" >>$CONFIG_STATUS
28541cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028542 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028543 echo "/* $configure_input */" >"$tmp/config.h"
28544 cat "$ac_result" >>"$tmp/config.h"
28545 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28546 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28547echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028548 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028549 rm -f $ac_file
28550 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028551 fi
28552 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028553 echo "/* $configure_input */"
28554 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028555 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028556 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028557 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028559
28560 esac
28561
28562done # for ac_tag
28563
Guido van Rossum627b2d71993-12-24 10:39:16 +000028564
Martin v. Löwis11437992002-04-12 09:54:03 +000028565{ (exit 0); exit 0; }
28566_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028567chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028568ac_clean_files=$ac_clean_files_save
28569
28570
28571# configure is writing to config.log, and then calls config.status.
28572# config.status does its own redirection, appending to config.log.
28573# Unfortunately, on DOS this fails, as config.log is still kept open
28574# by configure, so config.status won't be able to write to it; its
28575# output is simply discarded. So we exec the FD to /dev/null,
28576# effectively closing config.log, so it can be properly (re)opened and
28577# appended to by config.status. When coming back to configure, we
28578# need to make the FD available again.
28579if test "$no_create" != yes; then
28580 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028581 ac_config_status_args=
28582 test "$silent" = yes &&
28583 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028584 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028585 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028586 exec 5>>config.log
28587 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28588 # would make configure fail if this is the last instruction.
28589 $ac_cs_success || { (exit 1); exit 1; }
28590fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028591
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028592
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028593echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028594if test ! -f Modules/Setup
28595then
28596 cp $srcdir/Modules/Setup.dist Modules/Setup
28597fi
28598
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028599echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028600if test ! -f Modules/Setup.local
28601then
28602 echo "# Edit this file for local setup changes" >Modules/Setup.local
28603fi
28604
28605echo "creating Makefile"
28606$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28607 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028608 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028609mv config.c Modules